Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

[chore] maintained status collection api specification

Simon Bullik67d07fcb4b17
diff --git a/docs/api/apiv3/components/examples/status_collection.yml b/docs/api/apiv3/components/examples/status_collection.yml
new file mode 100644
index 00000000000..c2756848fc2
--- /dev/null
+++ b/docs/api/apiv3/components/examples/status_collection.yml
@@ -0,0 +1,72 @@
+# Example: Status collection
+---
+value:
+ _embedded:
+ elements:
+ - _links:
+ self:
+ href: "/api/v3/statuses/1"
+ _type: Status
+ defaultDoneRatio: 0
+ id: 1
+ isClosed: false
+ isDefault: true
+ name: New
+ position: 1
+ - _links:
+ self:
+ href: "/api/v3/statuses/3"
+ _type: Status
+ defaultDoneRatio: 75
+ id: 3
+ isClosed: false
+ isDefault: false
+ isReadonly: false
+ name: Resolved
+ position: 3
+ - _links:
+ self:
+ href: "/api/v3/statuses/4"
+ _type: Status
+ defaultDoneRatio: 25
+ id: 4
+ isClosed: false
+ isDefault: false
+ name: Feedback
+ position: 4
+ - _links:
+ self:
+ href: "/api/v3/statuses/5"
+ _type: Status
+ defaultDoneRatio: 100
+ id: 5
+ isClosed: true
+ isDefault: false
+ name: Closed
+ position: 5
+ - _links:
+ self:
+ href: "/api/v3/statuses/6"
+ _type: Status
+ defaultDoneRatio: 100
+ id: 6
+ isClosed: true
+ isDefault: false
+ name: Rejected
+ position: 6
+ - _links:
+ self:
+ href: "/api/v3/statuses/2"
+ _type: Status
+ defaultDoneRatio: 50
+ id: 2
+ isClosed: false
+ isDefault: false
+ name: In Progress
+ position: 3
+ _links:
+ self:
+ href: "/api/v3/statuses"
+ _type: Collection
+ count: 6
+ total: 6
diff --git a/docs/api/apiv3/components/schemas/status_collection_model.yml b/docs/api/apiv3/components/schemas/status_collection_model.yml
new file mode 100644
index 00000000000..f4031bf22c1
--- /dev/null
+++ b/docs/api/apiv3/components/schemas/status_collection_model.yml
@@ -0,0 +1,30 @@
+# Schema: StatusCollectionModel
+---
+allOf:
+ - $ref: './collection_model.yml'
+ - type: object
+ required:
+ - _links
+ - _embedded
+ properties:
+ _links:
+ type: object
+ required:
+ - self
+ properties:
+ self:
+ allOf:
+ - $ref: './link.yml'
+ - description: |-
+ This file links collection
+
+ **Resource**: StatusCollectionModel
+ _embedded:
+ type: object
+ required:
+ - elements
+ properties:
+ elements:
+ type: array
+ items:
+ $ref: './status_model.yml'
diff --git a/docs/api/apiv3/components/schemas/statuses_model.yml b/docs/api/apiv3/components/schemas/statuses_model.yml
deleted file mode 100644
index 331d23eb979..00000000000
--- a/docs/api/apiv3/components/schemas/statuses_model.yml
+++ /dev/null
@@ -1,73 +0,0 @@
-# Schema: StatusesModel
----
-type: object
-example:
- _links:
- self:
- href: "/api/v3/statuses"
- total: 6
- count: 6
- _type: Collection
- _embedded:
- elements:
- - _links:
- self:
- href: "/api/v3/statuses/1"
- _type: Status
- id: 1
- name: New
- position: 1
- isDefault: true
- isClosed: false
- defaultDoneRatio: 0
- - _links:
- self:
- href: "/api/v3/statuses/3"
- _type: Status
- id: 3
- name: Resolved
- position: 3
- isDefault: false
- isClosed: false
- isReadonly: false
- defaultDoneRatio: 75
- - _links:
- self:
- href: "/api/v3/statuses/4"
- _type: Status
- id: 4
- name: Feedback
- position: 4
- isDefault: false
- isClosed: false
- defaultDoneRatio: 25
- - _links:
- self:
- href: "/api/v3/statuses/5"
- _type: Status
- id: 5
- name: Closed
- position: 5
- isDefault: false
- isClosed: true
- defaultDoneRatio: 100
- - _links:
- self:
- href: "/api/v3/statuses/6"
- _type: Status
- id: 6
- name: Rejected
- position: 6
- isDefault: false
- isClosed: true
- defaultDoneRatio: 100
- - _links:
- self:
- href: "/api/v3/statuses/2"
- _type: Status
- id: 2
- name: In Progress
- position: 3
- isDefault: false
- isClosed: false
- defaultDoneRatio: 50
diff --git a/docs/api/apiv3/openapi-spec.yml b/docs/api/apiv3/openapi-spec.yml
index 27438f18537..bd56e77bcf4 100644
--- a/docs/api/apiv3/openapi-spec.yml
+++ b/docs/api/apiv3/openapi-spec.yml
@@ -505,6 +505,8 @@ components:
$ref: './components/examples/query.yml'
QuerySchemaModel:
$ref: './components/examples/query_schema.yml'
+ StatusCollection:
+ $ref: './components/examples/status_collection.yml'
StoragesSimpleCollectionModel:
$ref: './components/examples/storages-simple-collection-response.yml'
ValuesPropertyStartDateSchema:
@@ -735,10 +737,10 @@ components:
"$ref": "./components/schemas/schema_for_project_queries_model.yml"
Star_QueryModel:
"$ref": "./components/schemas/star_query_model.yml"
+ StatusCollectionModel:
+ "$ref": "./components/schemas/status_collection_model.yml"
StatusModel:
"$ref": "./components/schemas/status_model.yml"
- StatusesModel:
- "$ref": "./components/schemas/statuses_model.yml"
StorageCollectionModel:
"$ref": "./components/schemas/storage_collection_model.yml"
StorageFileModel:
diff --git a/docs/api/apiv3/paths/statuses.yml b/docs/api/apiv3/paths/statuses.yml
index ad877a6b1f8..557b4a7c987 100644
--- a/docs/api/apiv3/paths/statuses.yml
+++ b/docs/api/apiv3/paths/statuses.yml
@@ -6,79 +6,10 @@ get:
content:
application/hal+json:
examples:
- response:
- value:
- _embedded:
- elements:
- - _links:
- self:
- href: "/api/v3/statuses/1"
- _type: Status
- defaultDoneRatio: 0
- id: 1
- isClosed: false
- isDefault: true
- name: New
- position: 1
- - _links:
- self:
- href: "/api/v3/statuses/3"
- _type: Status
- defaultDoneRatio: 75
- id: 3
- isClosed: false
- isDefault: false
- isReadonly: false
- name: Resolved
- position: 3
- - _links:
- self:
- href: "/api/v3/statuses/4"
- _type: Status
- defaultDoneRatio: 25
- id: 4
- isClosed: false
- isDefault: false
- name: Feedback
- position: 4
- - _links:
- self:
- href: "/api/v3/statuses/5"
- _type: Status
- defaultDoneRatio: 100
- id: 5
- isClosed: true
- isDefault: false
- name: Closed
- position: 5
- - _links:
- self:
- href: "/api/v3/statuses/6"
- _type: Status
- defaultDoneRatio: 100
- id: 6
- isClosed: true
- isDefault: false
- name: Rejected
- position: 6
- - _links:
- self:
- href: "/api/v3/statuses/2"
- _type: Status
- defaultDoneRatio: 50
- id: 2
- isClosed: false
- isDefault: false
- name: In Progress
- position: 3
- _links:
- self:
- href: "/api/v3/statuses"
- _type: Collection
- count: 6
- total: 6
+ 'simple status collection':
+ $ref: "../components/examples/status_collection.yml"
schema:
- "$ref": "../components/schemas/statuses_model.yml"
+ "$ref": "../components/schemas/status_collection_model.yml"
description: OK
headers: {}
'403':