Change params to required for add_*

This commit is contained in:
Ceda EI 2019-03-13 17:10:37 +05:30
parent 08e0e23b9c
commit 7bf9347b95
1 changed files with 27 additions and 14 deletions

View File

@ -142,13 +142,9 @@ paths:
description: Add a quest description: Add a quest
parameters: parameters:
- $ref: '#/components/schemas/token' - $ref: '#/components/schemas/token'
required: true - $ref: '#/components/schemas/name_req'
- $ref: '#/components/schemas/name' - $ref: '#/components/schemas/priority_req'
required: true - $ref: '#/components/schemas/difficulty_req'
- $ref: '#/components/schemas/priority'
required: true
- $ref: '#/components/schemas/difficulty'
required: true
responses: responses:
200: 200:
description: Returns the added Quest description: Returns the added Quest
@ -167,13 +163,9 @@ paths:
description: Add a side quest description: Add a side quest
parameters: parameters:
- $ref: '#/components/schemas/token' - $ref: '#/components/schemas/token'
required: true - $ref: '#/components/schemas/name_req'
- $ref: '#/components/schemas/name' - $ref: '#/components/schemas/priority_req'
required: true - $ref: '#/components/schemas/difficulty_req'
- $ref: '#/components/schemas/priority'
required: true
- $ref: '#/components/schemas/difficulty'
required: true
responses: responses:
200: 200:
description: Returns the added Side Quest description: Returns the added Side Quest
@ -343,6 +335,27 @@ components:
required: false required: false
schema: schema:
type: true type: true
name_req:
name: name
in: query
description: Updated Name of the quest/side quest
required: true
schema:
type: string
priority_req:
name: priority
in: query
description: New Priority to set. (Low = 1, Medium = 2, High = 3)
required: true
schema:
type: integer
difficulty_req:
name: difficulty
in: query
description: New Difficulty to set. (Low = 1, Medium = 2, High = 3)
required: true
schema:
type: integer
responses: responses:
bad_request: bad_request:
description: The request has missing parameters. description: The request has missing parameters.