Optimized assets endpoint
This commit is contained in:
44
api.yaml
44
api.yaml
@@ -288,13 +288,13 @@ paths:
|
||||
|
||||
/api/assets:
|
||||
get:
|
||||
summary: Get a list of assets which a article uses
|
||||
summary: Get a list of assets
|
||||
parameters:
|
||||
- in: query
|
||||
name: article_id
|
||||
name: q
|
||||
schema:
|
||||
type: number
|
||||
description: Id of the article to get the assets from
|
||||
type: string
|
||||
description: Name of assets to search
|
||||
security:
|
||||
- cookie: []
|
||||
responses:
|
||||
@@ -308,8 +308,6 @@ paths:
|
||||
$ref: '#/components/schemas/Asset'
|
||||
401:
|
||||
description: Not authorized
|
||||
404:
|
||||
description: Article was not found
|
||||
post:
|
||||
summary: Adds a new asset to an article
|
||||
requestBody:
|
||||
@@ -318,9 +316,6 @@ paths:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
article_id:
|
||||
type: number
|
||||
description: Id of the article to store the asset to
|
||||
name:
|
||||
type: string
|
||||
description: Name of the asset
|
||||
@@ -339,36 +334,7 @@ paths:
|
||||
401:
|
||||
description: Not authorized
|
||||
409:
|
||||
description: A asset with the same name for the same article already exists
|
||||
patch:
|
||||
summary: Changes an asset name. This impacts its alt tag and the link to it
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
id:
|
||||
type: number
|
||||
description: Id of the asset
|
||||
name:
|
||||
type: string
|
||||
description: New name of the asset
|
||||
security:
|
||||
- cookie: []
|
||||
responses:
|
||||
200:
|
||||
description: The asset name was changed successfully
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/Asset'
|
||||
401:
|
||||
description: Not authorized
|
||||
404:
|
||||
description: An asset with this id does not exist
|
||||
409:
|
||||
description: A asset with the same name for the same article already exists
|
||||
description: A asset with the same name already exists
|
||||
delete:
|
||||
summary: Deletes assets
|
||||
requestBody:
|
||||
|
||||
Reference in New Issue
Block a user