Added logout and additional login content
This commit is contained in:
34
api.yaml
34
api.yaml
@@ -25,6 +25,10 @@ paths:
|
|||||||
responses:
|
responses:
|
||||||
200:
|
200:
|
||||||
description: Logged in
|
description: Logged in
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/Author'
|
||||||
headers:
|
headers:
|
||||||
Set-Cookie:
|
Set-Cookie:
|
||||||
schema:
|
schema:
|
||||||
@@ -33,6 +37,20 @@ paths:
|
|||||||
401:
|
401:
|
||||||
description: Login failed
|
description: Login failed
|
||||||
|
|
||||||
|
/api/logout:
|
||||||
|
get:
|
||||||
|
summary: Logs out and invalidates the session_id cookie
|
||||||
|
security:
|
||||||
|
- session_id: []
|
||||||
|
responses:
|
||||||
|
307:
|
||||||
|
description: Logged out
|
||||||
|
headers:
|
||||||
|
Location:
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
description: Path to home / root
|
||||||
|
|
||||||
/api/authors:
|
/api/authors:
|
||||||
get:
|
get:
|
||||||
summary: Get authors
|
summary: Get authors
|
||||||
@@ -156,7 +174,7 @@ paths:
|
|||||||
type: number
|
type: number
|
||||||
description: The id of the article
|
description: The id of the article
|
||||||
security:
|
security:
|
||||||
- cookie: []
|
- session_id: []
|
||||||
responses:
|
responses:
|
||||||
200:
|
200:
|
||||||
description: OK
|
description: OK
|
||||||
@@ -235,7 +253,7 @@ paths:
|
|||||||
type: string
|
type: string
|
||||||
description: The article itself, formatted as markdown. Must be encoded as base64
|
description: The article itself, formatted as markdown. Must be encoded as base64
|
||||||
security:
|
security:
|
||||||
- cookie: []
|
- session_id: []
|
||||||
responses:
|
responses:
|
||||||
201:
|
201:
|
||||||
description: The article was created
|
description: The article was created
|
||||||
@@ -295,7 +313,7 @@ paths:
|
|||||||
nullable: true
|
nullable: true
|
||||||
|
|
||||||
security:
|
security:
|
||||||
- cookie: []
|
- session_id: []
|
||||||
responses:
|
responses:
|
||||||
200:
|
200:
|
||||||
description: The article was edited
|
description: The article was edited
|
||||||
@@ -322,7 +340,7 @@ paths:
|
|||||||
type: number
|
type: number
|
||||||
description: Id of the article to delete
|
description: Id of the article to delete
|
||||||
security:
|
security:
|
||||||
- cookie: []
|
- session_id: []
|
||||||
responses:
|
responses:
|
||||||
200:
|
200:
|
||||||
description: The article was deleted
|
description: The article was deleted
|
||||||
@@ -346,7 +364,7 @@ paths:
|
|||||||
type: number
|
type: number
|
||||||
description: Limit of assets to return
|
description: Limit of assets to return
|
||||||
security:
|
security:
|
||||||
- cookie: []
|
- session_id: []
|
||||||
responses:
|
responses:
|
||||||
200:
|
200:
|
||||||
description: All assets of the article
|
description: All assets of the article
|
||||||
@@ -374,7 +392,7 @@ paths:
|
|||||||
format: binary
|
format: binary
|
||||||
description: The file itself
|
description: The file itself
|
||||||
security:
|
security:
|
||||||
- cookie: []
|
- session_id: []
|
||||||
responses:
|
responses:
|
||||||
201:
|
201:
|
||||||
description: The asset was created / uploaded
|
description: The asset was created / uploaded
|
||||||
@@ -400,7 +418,7 @@ paths:
|
|||||||
type: number
|
type: number
|
||||||
description: Id of the assets to delete
|
description: Id of the assets to delete
|
||||||
security:
|
security:
|
||||||
- cookie: []
|
- session_id: []
|
||||||
responses:
|
responses:
|
||||||
200:
|
200:
|
||||||
description: The asset was sucessfully deleted
|
description: The asset was sucessfully deleted
|
||||||
@@ -488,7 +506,7 @@ components:
|
|||||||
type: string
|
type: string
|
||||||
description: Static link to the asset
|
description: Static link to the asset
|
||||||
securitySchemes:
|
securitySchemes:
|
||||||
cookie:
|
session_id:
|
||||||
type: apiKey
|
type: apiKey
|
||||||
in: cookie
|
in: cookie
|
||||||
name: session_id
|
name: session_id
|
||||||
|
|||||||
Reference in New Issue
Block a user