Skip to content

Commit

Permalink
Merge pull request #15986 from opf/fix/additional_docs_on_news_api
Browse files Browse the repository at this point in the history
additional docs on news api
  • Loading branch information
ulferts authored Jul 1, 2024
2 parents 018a2e4 + 68fe020 commit 743ac49
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 3 deletions.
12 changes: 12 additions & 0 deletions docs/api/apiv3/components/schemas/list_of_news_model.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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"
Expand Down
1 change: 0 additions & 1 deletion docs/api/apiv3/components/schemas/news_create_model.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
20 changes: 20 additions & 0 deletions docs/api/apiv3/components/schemas/news_model.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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...
Expand Down
2 changes: 1 addition & 1 deletion docs/api/apiv3/paths/news_item.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
5 changes: 4 additions & 1 deletion docs/api/apiv3/tags/news.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 743ac49

Please sign in to comment.