From 31f1504e569104c8aa26455de372d66aa4d2fe4a Mon Sep 17 00:00:00 2001 From: Fabrice Lecomte Date: Fri, 30 Aug 2019 09:42:35 +0200 Subject: [PATCH] feature #11: describe "get/edit comment to article" in openAPI --- src/main/resources/openApi.yaml | 39 +++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/src/main/resources/openApi.yaml b/src/main/resources/openApi.yaml index 6cf7941..3a87437 100644 --- a/src/main/resources/openApi.yaml +++ b/src/main/resources/openApi.yaml @@ -245,6 +245,45 @@ paths: application/json: schema: $ref: '#/components/schemas/CommentResponse' + /articles/{article}/comments: + parameters: + - name: article + in: path + description: The ID of article + example: e74be8e4-6823-47c4-bd1b-789725b2fa8e + required: true + schema: + type: string + format: uuid + get: + summary: Get comment and children of one article + tags: + - comment + responses: + 200: + description: Return Comment and children + content: + application/json: + schema: + $ref: '#/components/schemas/CommentResponse' + post: + security: + - JWTAuth: [] + summary: Create Comment to article + tags: + - comment + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CommentRequest' + responses: + 200: + description: Return Comment and children + content: + application/json: + schema: + $ref: '#/components/schemas/CommentResponse' components: