Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

additional docs on news api #15986

Merged
merged 1 commit into from
Jul 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading