Update spec to use _id

This commit is contained in:
wancat committed 2023-07-20 16:24:39 +08:00
1 parent 237d6d5797
commit 0d9b068678
1 file changed
+22 -18
+22 -18
View File
@@ -85,7 +85,8 @@ paths:
required: true required: true
schema: schema:
type: string type: string
format: uuid format: objectId
example: 64b7a3a3c182b4826dd1aaa1
responses: responses:
'200': '200':
description: the session description: the session
@@ -114,7 +115,8 @@ paths:
required: true required: true
schema: schema:
type: string type: string
format: uuid format: objectId
example: 64b7a3a3c182b4826dd1aaa1
responses: responses:
'204': '204':
description: Session successfully deleted description: Session successfully deleted
@@ -263,12 +265,12 @@ paths:
items: items:
$ref: '#/components/schemas/QuestSummary' $ref: '#/components/schemas/QuestSummary'
/quests/{quest_name}: /quests/{quest_id}:
get: get:
summary: get a quest's detail by name summary: get a quest's detail by name
parameters: parameters:
- in: path - in: path
name: quest_name name: quest_id
description: name of the quest to retrieve description: name of the quest to retrieve
required: true required: true
schema: schema:
@@ -294,9 +296,10 @@ components:
User: User:
type: object type: object
properties: properties:
id: _id:
type: string type: string
format: uuid format: objectId
example: 64b7a3a3c182b4826dd1aaa1
username: username:
type: string type: string
example: 'alex' example: 'alex'
@@ -306,38 +309,38 @@ components:
Quest: Quest:
type: object type: object
properties: properties:
id: _id:
type: string
format: objectId
name:
type: string type: string
example: helloworld
title: title:
type: string type: string
example: Hello World
content: content:
type: string type: string
format: html format: html
example: '<h1>Hello World</h1>'
order: order:
type: number type: number
QuestSummary: QuestSummary:
type: object type: object
properties: properties:
id: _id:
type: string
format: objectId
name:
type: string type: string
example: helloworld
title: title:
type: string type: string
example: Hello World
order: order:
type: number type: number
Session: Session:
type: object type: object
properties: properties:
id: _id:
type: string type: string
format: uuid format: objectId
example: 64b7a3a3c182b4826dd1aaa1
user: user:
$ref: '#/components/schemas/User' $ref: '#/components/schemas/User'
quest: quest:
@@ -369,9 +372,10 @@ components:
SessionSummary: SessionSummary:
type: object type: object
properties: properties:
id: _id:
type: string type: string
format: uuid format: objectId
example: 64b7a3a3c182b4826dd1aaa1
quest: quest:
$ref: '#/components/schemas/Quest' $ref: '#/components/schemas/Quest'
created_at: created_at: