mirror of
https://github.com/linux-odyssey/linux-odyssey.git
synced 2026-11-08 03:20:12 +08:00
Add quest to API spec
+ Remove timestamps + Add 404 error handling
This commit is contained in:
1 parent
247c75ff84
commit
5e8115be11
3 files changed
+71
-10
No files matched your search
+61
-1
@@ -250,6 +250,45 @@ paths:
|
||||
schema:
|
||||
$ref: '#/components/schemas/User'
|
||||
|
||||
/quests:
|
||||
get:
|
||||
summary: Get quests list
|
||||
responses:
|
||||
'200':
|
||||
description: Quests summary list
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/QuestSummary'
|
||||
|
||||
/quests/{quest_name}:
|
||||
get:
|
||||
summary: get a quest's detail by name
|
||||
parameters:
|
||||
- in: path
|
||||
name: quest_name
|
||||
description: name of the quest to retrieve
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
responses:
|
||||
'200':
|
||||
description: the quest
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/Quest'
|
||||
'404':
|
||||
description: cannot find specific quest
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
message:
|
||||
type: string
|
||||
components:
|
||||
schemas:
|
||||
User:
|
||||
@@ -267,10 +306,31 @@ components:
|
||||
Quest:
|
||||
type: object
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
format: objectId
|
||||
name:
|
||||
type: string
|
||||
description:
|
||||
title:
|
||||
type: string
|
||||
content:
|
||||
type: string
|
||||
format: html
|
||||
order:
|
||||
type: number
|
||||
|
||||
QuestSummary:
|
||||
type: object
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
format: objectId
|
||||
name:
|
||||
type: string
|
||||
title:
|
||||
type: string
|
||||
order:
|
||||
type: number
|
||||
|
||||
Session:
|
||||
type: object
|
||||
|
||||
Reference in new issue
Block a user