Add /player, /add_quest, /add_side_quest, responses.
This commit is contained in:
parent
5d519f7d5c
commit
ad57f67844
122
docs.yml
122
docs.yml
|
@ -21,6 +21,43 @@ paths:
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/components/schemas/auth'
|
$ref: '#/components/schemas/auth'
|
||||||
|
|
||||||
|
/player:
|
||||||
|
get:
|
||||||
|
summary: player
|
||||||
|
description: Get info about the user
|
||||||
|
parameters:
|
||||||
|
- $ref: '#/components/schemas/token'
|
||||||
|
responses:
|
||||||
|
200:
|
||||||
|
description: Player object
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
required:
|
||||||
|
- xp
|
||||||
|
- quests_completed
|
||||||
|
- total_quests
|
||||||
|
- side_quests_completed
|
||||||
|
- total_side_quests
|
||||||
|
properties:
|
||||||
|
xp:
|
||||||
|
description: Total experience of the player
|
||||||
|
type: integer
|
||||||
|
quests_completed:
|
||||||
|
description: Quests completed
|
||||||
|
type: integer
|
||||||
|
total_quests:
|
||||||
|
description: Total quests
|
||||||
|
type: integer
|
||||||
|
side_quests_completed:
|
||||||
|
description: Side Quests completed
|
||||||
|
type: integer
|
||||||
|
total_side_quests:
|
||||||
|
description: Total side quests
|
||||||
|
type: integer
|
||||||
|
401:
|
||||||
|
$ref: "#/components/responses/bad_auth"
|
||||||
|
|
||||||
/get_quests:
|
/get_quests:
|
||||||
get:
|
get:
|
||||||
summary: get_quests
|
summary: get_quests
|
||||||
|
@ -75,6 +112,8 @@ paths:
|
||||||
$ref: "#/components/responses/bad_request"
|
$ref: "#/components/responses/bad_request"
|
||||||
401:
|
401:
|
||||||
$ref: "#/components/responses/bad_auth"
|
$ref: "#/components/responses/bad_auth"
|
||||||
|
404:
|
||||||
|
$ref: "#/components/responses/doesnt_exist"
|
||||||
|
|
||||||
/get_side_quest:
|
/get_side_quest:
|
||||||
get:
|
get:
|
||||||
|
@ -94,6 +133,58 @@ paths:
|
||||||
$ref: "#/components/responses/bad_request"
|
$ref: "#/components/responses/bad_request"
|
||||||
401:
|
401:
|
||||||
$ref: "#/components/responses/bad_auth"
|
$ref: "#/components/responses/bad_auth"
|
||||||
|
404:
|
||||||
|
$ref: "#/components/responses/doesnt_exist"
|
||||||
|
|
||||||
|
/add_quest:
|
||||||
|
post:
|
||||||
|
summary: /add_quest
|
||||||
|
description: Add a quest
|
||||||
|
parameters:
|
||||||
|
- $ref: '#/components/schemas/token'
|
||||||
|
required: true
|
||||||
|
- $ref: '#/components/schemas/name'
|
||||||
|
required: true
|
||||||
|
- $ref: '#/components/schemas/priority'
|
||||||
|
required: true
|
||||||
|
- $ref: '#/components/schemas/difficulty'
|
||||||
|
required: true
|
||||||
|
responses:
|
||||||
|
200:
|
||||||
|
description: Returns the added Quest
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/quests'
|
||||||
|
400:
|
||||||
|
$ref: "#/components/responses/bad_request"
|
||||||
|
401:
|
||||||
|
$ref: "#/components/responses/bad_auth"
|
||||||
|
|
||||||
|
/add_side_quest:
|
||||||
|
post:
|
||||||
|
summary: /add_side_quest
|
||||||
|
description: Add a side quest
|
||||||
|
parameters:
|
||||||
|
- $ref: '#/components/schemas/token'
|
||||||
|
required: true
|
||||||
|
- $ref: '#/components/schemas/name'
|
||||||
|
required: true
|
||||||
|
- $ref: '#/components/schemas/priority'
|
||||||
|
required: true
|
||||||
|
- $ref: '#/components/schemas/difficulty'
|
||||||
|
required: true
|
||||||
|
responses:
|
||||||
|
200:
|
||||||
|
description: Returns the added Side Quest
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/quests'
|
||||||
|
400:
|
||||||
|
$ref: "#/components/responses/bad_request"
|
||||||
|
401:
|
||||||
|
$ref: "#/components/responses/bad_auth"
|
||||||
|
|
||||||
/update_quest:
|
/update_quest:
|
||||||
post:
|
post:
|
||||||
|
@ -117,6 +208,8 @@ paths:
|
||||||
$ref: "#/components/responses/bad_auth"
|
$ref: "#/components/responses/bad_auth"
|
||||||
400:
|
400:
|
||||||
$ref: "#/components/responses/bad_request"
|
$ref: "#/components/responses/bad_request"
|
||||||
|
404:
|
||||||
|
$ref: "#/components/responses/doesnt_exist"
|
||||||
|
|
||||||
/update_side_quest:
|
/update_side_quest:
|
||||||
post:
|
post:
|
||||||
|
@ -140,6 +233,8 @@ paths:
|
||||||
$ref: "#/components/responses/bad_auth"
|
$ref: "#/components/responses/bad_auth"
|
||||||
400:
|
400:
|
||||||
$ref: "#/components/responses/bad_request"
|
$ref: "#/components/responses/bad_request"
|
||||||
|
404:
|
||||||
|
$ref: "#/components/responses/doesnt_exist"
|
||||||
|
|
||||||
/delete_quest:
|
/delete_quest:
|
||||||
delete:
|
delete:
|
||||||
|
@ -151,6 +246,12 @@ paths:
|
||||||
responses:
|
responses:
|
||||||
200:
|
200:
|
||||||
$ref: '#/components/responses/success'
|
$ref: '#/components/responses/success'
|
||||||
|
400:
|
||||||
|
$ref: "#/components/responses/bad_request"
|
||||||
|
401:
|
||||||
|
$ref: "#/components/responses/bad_auth"
|
||||||
|
404:
|
||||||
|
$ref: "#/components/responses/doesnt_exist"
|
||||||
|
|
||||||
/delete_side_quest:
|
/delete_side_quest:
|
||||||
delete:
|
delete:
|
||||||
|
@ -162,6 +263,12 @@ paths:
|
||||||
responses:
|
responses:
|
||||||
200:
|
200:
|
||||||
$ref: '#/components/responses/success'
|
$ref: '#/components/responses/success'
|
||||||
|
400:
|
||||||
|
$ref: "#/components/responses/bad_request"
|
||||||
|
401:
|
||||||
|
$ref: "#/components/responses/bad_auth"
|
||||||
|
404:
|
||||||
|
$ref: "#/components/responses/doesnt_exist"
|
||||||
|
|
||||||
components:
|
components:
|
||||||
schemas:
|
schemas:
|
||||||
|
@ -187,11 +294,15 @@ components:
|
||||||
type: integer
|
type: integer
|
||||||
quests:
|
quests:
|
||||||
required:
|
required:
|
||||||
|
- id
|
||||||
- name
|
- name
|
||||||
- difficulty
|
- difficulty
|
||||||
- priority
|
- priority
|
||||||
- state
|
- state
|
||||||
properties:
|
properties:
|
||||||
|
id:
|
||||||
|
type: integer
|
||||||
|
description: ID of quest/side quest
|
||||||
name:
|
name:
|
||||||
type: string
|
type: string
|
||||||
description: Name of the quest/side quest
|
description: Name of the quest/side quest
|
||||||
|
@ -255,6 +366,17 @@ components:
|
||||||
error:
|
error:
|
||||||
type: string
|
type: string
|
||||||
description: The token is invalid
|
description: The token is invalid
|
||||||
|
doesnt_exist:
|
||||||
|
description: The quest/side quest doesn't exist
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
required:
|
||||||
|
- error
|
||||||
|
properties:
|
||||||
|
error:
|
||||||
|
type: string
|
||||||
|
description: The quest/side quest doesn't exist
|
||||||
success:
|
success:
|
||||||
description: Returns the success / failure
|
description: Returns the success / failure
|
||||||
content:
|
content:
|
||||||
|
|
Loading…
Reference in New Issue