swagger: move /logout from post -> get

master
ALI Hamza 2020-09-10 08:41:02 +07:00
parent 66f7df0d67
commit 407f9e2630
Signed by: hamza
GPG Key ID: 22473A32291F8CB6
1 changed files with 31 additions and 1 deletions

@ -29,7 +29,7 @@ paths:
500: 500:
$ref: '#/components/responses/ServerError' $ref: '#/components/responses/ServerError'
/auth/logout: /auth/logout:
post: get:
tags: tags:
- Auth Endpoints - Auth Endpoints
summary: Logs out a user, making their access token invalid. summary: Logs out a user, making their access token invalid.
@ -157,6 +157,36 @@ paths:
500: 500:
$ref: '#/components/responses/ServerError' $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: /posts/new:
post: post:
tags: tags: