From 407f9e263086b5ff7df9e5f4d67d71b4cc99924b Mon Sep 17 00:00:00 2001 From: Hamza Ali Date: Thu, 10 Sep 2020 08:41:02 +0700 Subject: [PATCH] swagger: move /logout from post -> get --- api/swagger.yaml | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/api/swagger.yaml b/api/swagger.yaml index 610c49d..5bcda30 100644 --- a/api/swagger.yaml +++ b/api/swagger.yaml @@ -29,7 +29,7 @@ paths: 500: $ref: '#/components/responses/ServerError' /auth/logout: - post: + get: tags: - Auth Endpoints summary: Logs out a user, making their access token invalid. @@ -157,6 +157,36 @@ paths: 500: $ref: '#/components/responses/ServerError' + /posts: + get: + summary: Get a list of posts + description: The items retrieved will always show newest first. + parameters: + - name: filter + in: query + description: Filter posts by content in title and description + schema: + type: string + - $ref: '#/components/parameters/AfterParam' + - $ref: '#/components/parameters/BeforeParam' + - $ref: '#/components/parameters/LimitParam' + - $ref: '#/components/parameters/CountParam' + responses: + '200': + description: A list of posts filtered and formatted. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Post' + 400: + $ref: '#/components/responses/MalformedBody' + 422: + $ref: '#/components/responses/Unprocessable' + 500: + $ref: '#/components/responses/ServerError' + /posts/new: post: tags: