From 68fe020ee8b2f9e2a49db7cb723891df9ddfe4a1 Mon Sep 17 00:00:00 2001 From: ulferts Date: Thu, 27 Jun 2024 11:26:08 +0200 Subject: [PATCH] additional docs on news api --- .../components/schemas/list_of_news_model.yml | 12 +++++++++++ .../components/schemas/news_create_model.yml | 1 - .../apiv3/components/schemas/news_model.yml | 20 +++++++++++++++++++ docs/api/apiv3/paths/news_item.yml | 2 +- docs/api/apiv3/tags/news.yml | 5 ++++- 5 files changed, 37 insertions(+), 3 deletions(-) diff --git a/docs/api/apiv3/components/schemas/list_of_news_model.yml b/docs/api/apiv3/components/schemas/list_of_news_model.yml index 7bfc7048585d..6e10eb415571 100644 --- a/docs/api/apiv3/components/schemas/list_of_news_model.yml +++ b/docs/api/apiv3/components/schemas/list_of_news_model.yml @@ -37,6 +37,12 @@ example: author: href: "/api/v3/users/2" title: Peggie Feeney + updateImmediately: + href: "api/v3/news/1" + method: "patch" + delete: + href: "api/v3/news/1" + method: "delete" - _type: News id: 2 title: terminatio tutamen. Officia adeptio sp @@ -62,6 +68,12 @@ example: author: href: "/api/v3/users/2" title: Peggie Feeney + updateImmediately: + href: "api/v3/news/2" + method: "patch" + delete: + href: "api/v3/news/2" + method: "delete" _links: self: href: "/api/v3/news?offset=1&pageSize=2" diff --git a/docs/api/apiv3/components/schemas/news_create_model.yml b/docs/api/apiv3/components/schemas/news_create_model.yml index 1d29fa7e977a..582ddf486ddd 100644 --- a/docs/api/apiv3/components/schemas/news_create_model.yml +++ b/docs/api/apiv3/components/schemas/news_create_model.yml @@ -27,7 +27,6 @@ properties: **Resource**: Project example: - _type: News title: asperiores possimus nam doloribus ab summary: Celebrer spiculum colo viscus claustrum atque. Id nulla culpa sumptus. Comparo crapula depopulo demonstro. diff --git a/docs/api/apiv3/components/schemas/news_model.yml b/docs/api/apiv3/components/schemas/news_model.yml index 7bf4c17300fb..a6ee2551aac3 100644 --- a/docs/api/apiv3/components/schemas/news_model.yml +++ b/docs/api/apiv3/components/schemas/news_model.yml @@ -54,6 +54,20 @@ properties: **Resource**: User readOnly: true + updateImmediately: + allOf: + - "$ref": "./link.yml" + - description: |- + Directly perform edits on the news + + **Permission** manage news + delete: + allOf: + - "$ref": "./link.yml" + - description: |- + Delete the news + + **Permission** manage news example: _type: News id: 1 @@ -83,6 +97,12 @@ example: author: href: "/api/v3/users/2" title: Peggie Feeney + updateImmediately: + href: "api/v3/news/1" + method: "patch" + delete: + href: "api/v3/news/1" + method: "delete" _embedded: project: _type: Project... diff --git a/docs/api/apiv3/paths/news_item.yml b/docs/api/apiv3/paths/news_item.yml index 94512dc9c79c..980718d7f6ca 100644 --- a/docs/api/apiv3/paths/news_item.yml +++ b/docs/api/apiv3/paths/news_item.yml @@ -96,7 +96,7 @@ patch: content: application/json: schema: - $ref: '../components/schemas/news_model.yml' + $ref: '../components/schemas/news_create_model.yml' responses: '200': content: diff --git a/docs/api/apiv3/tags/news.yml b/docs/api/apiv3/tags/news.yml index 685dc800abf0..741bf9461970 100644 --- a/docs/api/apiv3/tags/news.yml +++ b/docs/api/apiv3/tags/news.yml @@ -4,7 +4,10 @@ description: |- ## Actions - None yet + | Link | Description | Condition | + |:-------------------:|--------------------------------------------------------------------------| ---------------------------------------| + | delete | Delete the new | **Permission**: manage news | + | updateImmediately | Directly perform edits on the news | **Permission**: manage news | ## Linked Properties