From 40662f31fd95f4fb89bd4c7aec746bdd89634146 Mon Sep 17 00:00:00 2001 From: bytedream Date: Sun, 23 Jan 2022 00:17:43 +0100 Subject: [PATCH] Made fields for edit nullable --- api.yaml | 100 ++++++++++++++++++++++++++++++++++++------------------- 1 file changed, 66 insertions(+), 34 deletions(-) diff --git a/api.yaml b/api.yaml index 46b9fda..bf12677 100644 --- a/api.yaml +++ b/api.yaml @@ -154,7 +154,37 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Article' + type: object + properties: + title: + type: string + description: "Name of the article. Must be unique" + summary: + type: string + description: A short overview summary of the article + authors: + type: array + items: + type: number + description: A author id + description: List of additional authors as id which contributed to the article. The author which sends this request is automatically added as (main) author + image: + type: string + description: Link to a preview image + nullable: true + tags: + type: array + items: + type: number + description: A tag id + description: Tags as id the article should have. If the tag does not exist, a new one is created automatically + link: + type: string + description: The link name (last path of the url) which redirects to the article + nullable: true + content: + type: string + description: The article itself, formatted as markdown. Must be encoded as base64 security: - cookie: [] responses: @@ -182,7 +212,41 @@ paths: id: type: number description: Id of the article to edit - $ref: '#/components/schemas/Article' + title: + type: string + description: "Name of the article. Must be unique" + nullable: true + summary: + type: string + description: A short overview summary of the article + nullable: true + authors: + type: array + items: + type: number + description: A author id + description: List of additional authors as id which contributed to the article. The author which sends this request is automatically added as (main) author + nullable: true + image: + type: string + description: Link to a preview image + nullable: true + tags: + type: array + items: + type: number + description: A tag id + description: Tags as id the article should have. If the tag does not exist, a new one is created automatically + nullable: true + link: + type: string + description: The link name (last path of the url) which redirects to the article + nullable: true + content: + type: string + description: The article itself, formatted as markdown. Must be encoded as base64 + nullable: true + security: - cookie: [] responses: @@ -257,38 +321,6 @@ components: message: type: string description: Error message - Article: - type: object - properties: - title: - type: string - description: "Name of the article. Must be unique" - summary: - type: string - description: A short overview summary of the article - authors: - type: array - items: - type: number - description: A author id - description: List of additional authors as id which contributed to the article. The author which sends this request is automatically added as (main) author - image: - type: string - description: Link to a preview image - nullable: true - tags: - type: array - items: - type: number - description: A tag id - description: Tags as id the article should have. If the tag does not exist, a new one is created automatically - link: - type: string - description: The link name (last path of the url) which redirects to the article - nullable: true - content: - type: string - description: The article itself, formatted as markdown. Must be encoded as base64 ArticleSummary: type: object properties: