chore: move category route schema up two levels as slug and index are optional

v1.18.x
Julian Lam 4 years ago
parent 906d7d734b
commit b3b501d789

@ -218,7 +218,7 @@ paths:
/api/top:
$ref: 'read/top.yaml'
"/api/category/{category_id}/{slug}/{topic_index}":
$ref: 'read/category/category_id/slug/topic_index.yaml'
$ref: 'read/category/category_id.yaml'
/api/self:
$ref: 'read/self.yaml'
/api/me:

@ -31,7 +31,7 @@ get:
application/json:
schema:
allOf:
- $ref: ../../../../components/schemas/CategoryObject.yaml#/CategoryObject
- $ref: ../../components/schemas/CategoryObject.yaml#/CategoryObject
- type: object
properties:
tagWhitelist:
@ -43,11 +43,11 @@ get:
children:
type: array
items:
$ref: ../../../../components/schemas/CategoryObject.yaml#/CategoryObject
$ref: ../../components/schemas/CategoryObject.yaml#/CategoryObject
topics:
type: array
items:
$ref: ../../../../components/schemas/TopicObject.yaml#/TopicObject
$ref: ../../components/schemas/TopicObject.yaml#/TopicObject
nextStart:
type: number
isWatched:
@ -92,6 +92,6 @@ get:
type: number
reputation:disabled:
type: number
- $ref: ../../../../components/schemas/Pagination.yaml#/Pagination
- $ref: ../../../../components/schemas/Breadcrumbs.yaml#/Breadcrumbs
- $ref: ../../../../components/schemas/CommonProps.yaml#/CommonProps
- $ref: ../../components/schemas/Pagination.yaml#/Pagination
- $ref: ../../components/schemas/Breadcrumbs.yaml#/Breadcrumbs
- $ref: ../../components/schemas/CommonProps.yaml#/CommonProps
Loading…
Cancel
Save