Added article get endpoint
This commit is contained in:
43
api.yaml
43
api.yaml
@@ -147,6 +147,49 @@ paths:
|
||||
$ref: '#/components/schemas/ArticleSummary'
|
||||
|
||||
/api/article:
|
||||
get:
|
||||
summary: Get an article by its id
|
||||
parameters:
|
||||
- in: query
|
||||
name: id
|
||||
schema:
|
||||
type: number
|
||||
description: The id of the article
|
||||
security:
|
||||
- cookie: []
|
||||
responses:
|
||||
200:
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
title:
|
||||
type: string
|
||||
description: The title of the article
|
||||
summary:
|
||||
type: string
|
||||
description: The articles' summary
|
||||
authors:
|
||||
type: array
|
||||
items:
|
||||
type: number
|
||||
description: A array of author ids which have been worked on it
|
||||
image:
|
||||
type: string
|
||||
description: A (optional) preview image
|
||||
tags:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
description: A array of tags which are set to the article
|
||||
link:
|
||||
type: string
|
||||
description: The link name (last path of the url) which redirects to the article
|
||||
content:
|
||||
type: string
|
||||
description: The article itself (its content), encoded as base64
|
||||
post:
|
||||
summary: Uploads a new article
|
||||
requestBody:
|
||||
|
||||
Reference in New Issue
Block a user