Added article get endpoint

This commit is contained in:
2022-02-02 15:56:17 +01:00
parent a3bd540bb0
commit 7008e70294

View File

@@ -147,6 +147,49 @@ paths:
$ref: '#/components/schemas/ArticleSummary' $ref: '#/components/schemas/ArticleSummary'
/api/article: /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: post:
summary: Uploads a new article summary: Uploads a new article
requestBody: requestBody: