-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #16587 from opf/bug/57016-api-doc-color-attribute-…
…of-status-missing [#57016] updated status API specification
- Loading branch information
Showing
8 changed files
with
161 additions
and
146 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,72 +1,89 @@ | ||
# Example: Status collection | ||
--- | ||
description: |- | ||
A standard, unpaginated collection of statuses. | ||
value: | ||
_type: Collection | ||
count: 6 | ||
total: 6 | ||
_embedded: | ||
elements: | ||
- _links: | ||
self: | ||
href: "/api/v3/statuses/1" | ||
_type: Status | ||
defaultDoneRatio: 0 | ||
- _type: Status | ||
id: 1 | ||
name: New | ||
isClosed: false | ||
color: '#3997AD' | ||
isDefault: true | ||
name: New | ||
isReadonly: false | ||
excludedFromTotals: false | ||
defaultDoneRatio: 0 | ||
position: 1 | ||
- _links: | ||
_links: | ||
self: | ||
href: "/api/v3/statuses/3" | ||
_type: Status | ||
defaultDoneRatio: 75 | ||
href: '/api/v3/statuses/1' | ||
- _type: Status | ||
id: 3 | ||
name: Resolved | ||
isClosed: false | ||
color: '#93D2AE' | ||
isDefault: false | ||
isReadonly: false | ||
name: Resolved | ||
excludedFromTotals: false | ||
defaultDoneRatio: 75 | ||
position: 3 | ||
- _links: | ||
_links: | ||
self: | ||
href: "/api/v3/statuses/4" | ||
_type: Status | ||
defaultDoneRatio: 25 | ||
href: '/api/v3/statuses/3' | ||
- _type: Status | ||
id: 4 | ||
name: Feedback | ||
isClosed: false | ||
color: '#A96FFE' | ||
isDefault: false | ||
name: Feedback | ||
isReadonly: false | ||
excludedFromTotals: false | ||
defaultDoneRatio: 25 | ||
position: 4 | ||
- _links: | ||
_links: | ||
self: | ||
href: "/api/v3/statuses/5" | ||
_type: Status | ||
defaultDoneRatio: 100 | ||
href: '/api/v3/statuses/4' | ||
- _type: Status | ||
id: 5 | ||
name: Closed | ||
isClosed: true | ||
color: '#DF6DA1' | ||
isDefault: false | ||
name: Closed | ||
isReadonly: false | ||
excludedFromTotals: false | ||
defaultDoneRatio: 100 | ||
position: 5 | ||
- _links: | ||
_links: | ||
self: | ||
href: "/api/v3/statuses/6" | ||
_type: Status | ||
defaultDoneRatio: 100 | ||
href: '/api/v3/statuses/5' | ||
- _type: Status | ||
id: 6 | ||
name: Rejected | ||
isClosed: true | ||
color: '#D32937' | ||
isDefault: false | ||
name: Rejected | ||
isReadonly: true | ||
excludedFromTotals: true | ||
defaultDoneRatio: 100 | ||
position: 6 | ||
- _links: | ||
_links: | ||
self: | ||
href: "/api/v3/statuses/2" | ||
_type: Status | ||
defaultDoneRatio: 50 | ||
href: '/api/v3/statuses/6' | ||
- _type: Status | ||
id: 2 | ||
name: In Progress | ||
isClosed: false | ||
color: '#3852C6' | ||
isDefault: false | ||
name: In Progress | ||
isReadonly: false | ||
excludedFromTotals: false | ||
defaultDoneRatio: 50 | ||
position: 3 | ||
_links: | ||
self: | ||
href: '/api/v3/statuses/2' | ||
_links: | ||
self: | ||
href: "/api/v3/statuses" | ||
_type: Collection | ||
count: 6 | ||
total: 6 | ||
href: '/api/v3/statuses' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
description: A standard status resource response. | ||
value: | ||
_type: Status | ||
id: 13 | ||
name: Waiting for Darth-approval | ||
isClosed: false | ||
color: '#FE005D' | ||
isDefault: false | ||
isReadonly: false | ||
excludedFromTotals: false | ||
defaultDoneRatio: 66 | ||
position: 4 | ||
_links: | ||
self: | ||
href: '/api/v3/statuses/13' | ||
title: Waiting for Darth-approval |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,53 +1,54 @@ | ||
# /api/v3/statuses/{id} | ||
--- | ||
get: | ||
summary: Get a work package status | ||
operationId: get_status | ||
tags: | ||
- Statuses | ||
description: |- | ||
Returns a work package status by its unique identifier. | ||
parameters: | ||
- description: Status id | ||
example: '1' | ||
in: path | ||
name: id | ||
required: true | ||
schema: | ||
type: integer | ||
- name: id | ||
description: Status id | ||
in: path | ||
required: true | ||
schema: | ||
type: integer | ||
example: '1' | ||
responses: | ||
'200': | ||
description: OK | ||
content: | ||
application/hal+json: | ||
examples: | ||
response: | ||
value: | ||
_links: | ||
self: | ||
href: "/api/v3/statuses/1" | ||
_type: Status | ||
defaultDoneRatio: 0 | ||
id: 1 | ||
isClosed: false | ||
isDefault: true | ||
name: New | ||
position: 1 | ||
$ref: '../components/examples/status_response.yml' | ||
schema: | ||
"$ref": "../components/schemas/status_model.yml" | ||
description: OK | ||
headers: {} | ||
$ref: '../components/schemas/status_model.yml' | ||
'403': | ||
description: |- | ||
Returned if the client does not have sufficient permissions. | ||
**Required permission:** view work package (on any project) | ||
content: | ||
application/hal+json: | ||
schema: | ||
$ref: "../components/schemas/error_response.yml" | ||
$ref: '../components/schemas/error_response.yml' | ||
examples: | ||
response: | ||
value: | ||
_type: Error | ||
errorIdentifier: urn:openproject-org:api:v3:errors:MissingPermission | ||
message: You are not allowed to see this status. | ||
description: |- | ||
Returned if the client does not have sufficient permissions. | ||
**Required permission:** view work package (on any project) | ||
headers: {} | ||
tags: | ||
- Statuses | ||
description: '' | ||
operationId: View_Status | ||
summary: View Status | ||
'404': | ||
description: Returned if the status does not exist. | ||
content: | ||
application/hal+json: | ||
schema: | ||
$ref: '../components/schemas/error_response.yml' | ||
examples: | ||
response: | ||
value: | ||
_type: Error | ||
errorIdentifier: urn:openproject-org:api:v3:errors:NotFound | ||
message: The requested resource could not be found. |
Oops, something went wrong.