From b3b501d7890222421f7c4956d7419b83b1025a87 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Tue, 24 Nov 2020 13:42:11 -0500 Subject: [PATCH] chore: move category route schema up two levels as slug and index are optional --- public/openapi/read.yaml | 2 +- .../slug/topic_index.yaml => category_id.yaml} | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) rename public/openapi/read/category/{category_id/slug/topic_index.yaml => category_id.yaml} (86%) diff --git a/public/openapi/read.yaml b/public/openapi/read.yaml index 885307aee8..ae2014c774 100644 --- a/public/openapi/read.yaml +++ b/public/openapi/read.yaml @@ -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: diff --git a/public/openapi/read/category/category_id/slug/topic_index.yaml b/public/openapi/read/category/category_id.yaml similarity index 86% rename from public/openapi/read/category/category_id/slug/topic_index.yaml rename to public/openapi/read/category/category_id.yaml index c0c40714c5..845af7d68a 100644 --- a/public/openapi/read/category/category_id/slug/topic_index.yaml +++ b/public/openapi/read/category/category_id.yaml @@ -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 \ No newline at end of file + - $ref: ../../components/schemas/Pagination.yaml#/Pagination + - $ref: ../../components/schemas/Breadcrumbs.yaml#/Breadcrumbs + - $ref: ../../components/schemas/CommonProps.yaml#/CommonProps \ No newline at end of file