From 7008e70294bc86086e7e02c0a7fa02780a4f83ac Mon Sep 17 00:00:00 2001 From: bytedream Date: Wed, 2 Feb 2022 15:56:17 +0100 Subject: [PATCH] Added article get endpoint --- api.yaml | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/api.yaml b/api.yaml index fb3a844..c02ac4c 100644 --- a/api.yaml +++ b/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: