Added api create endpoint
This commit is contained in:
39
api.yaml
39
api.yaml
@@ -226,7 +226,7 @@ paths:
|
||||
properties:
|
||||
id:
|
||||
type: number
|
||||
description: ID of the article to delete
|
||||
description: Id of the article to delete
|
||||
security:
|
||||
- cookie: []
|
||||
responses:
|
||||
@@ -243,6 +243,35 @@ paths:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ApiError'
|
||||
|
||||
/api/tag:
|
||||
post:
|
||||
summary: Creates a new tag
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
description: Name of the new tag
|
||||
security:
|
||||
- cookie: []
|
||||
responses:
|
||||
201:
|
||||
description: The tag was created
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/Tag'
|
||||
401:
|
||||
description: Not authorized
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ApiError'
|
||||
|
||||
components:
|
||||
schemas:
|
||||
ApiError:
|
||||
@@ -294,7 +323,10 @@ components:
|
||||
type: string
|
||||
description: A short overview summary of the article
|
||||
author:
|
||||
$ref: '#/components/schemas/Author'
|
||||
type: array
|
||||
items:
|
||||
type: number
|
||||
description: Id of authors to add
|
||||
image:
|
||||
type: string
|
||||
description: Link to a preview image
|
||||
@@ -302,7 +334,8 @@ components:
|
||||
tags:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/Tag'
|
||||
type: number
|
||||
description: Id of tags to add
|
||||
created:
|
||||
type: string
|
||||
description: A RFC3339 formatted date when the article was created
|
||||
|
||||
Reference in New Issue
Block a user