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: