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 priority collection api specification

Simon Bullik2ce13280cea1
diff --git a/docs/api/apiv3/components/examples/priority_collection.yml b/docs/api/apiv3/components/examples/priority_collection.yml
new file mode 100644
index 00000000000..19cb668055f
--- /dev/null
+++ b/docs/api/apiv3/components/examples/priority_collection.yml
@@ -0,0 +1,51 @@
+# Example: Priority collection
+---
+value:
+ _embedded:
+ elements:
+ - _links:
+ self:
+ href: "/api/v3/priorities/1"
+ title: Low
+ _type: Priority
+ id: 1
+ isActive: true
+ isDefault: false
+ name: Low
+ position: 1
+ - _links:
+ self:
+ href: "/api/v3/priorities/2"
+ title: Normal
+ _type: Priority
+ id: 2
+ isActive: true
+ isDefault: true
+ name: Normal
+ position: 2
+ - _links:
+ self:
+ href: "/api/v3/priorities/3"
+ title: High
+ _type: Priority
+ id: 3
+ isActive: true
+ isDefault: false
+ name: High
+ position: 3
+ - _links:
+ self:
+ href: "/api/v3/priorities/4"
+ title: Immediate
+ _type: Priority
+ id: 4
+ isActive: true
+ isDefault: false
+ name: Immediate
+ position: 5
+ _links:
+ self:
+ href: "/api/v3/priorities"
+ _type: Collection
+ count: 4
+ total: 4
diff --git a/docs/api/apiv3/components/schemas/priorities_model.yml b/docs/api/apiv3/components/schemas/priorities_model.yml
deleted file mode 100644
index 49ebbda9fba..00000000000
--- a/docs/api/apiv3/components/schemas/priorities_model.yml
+++ /dev/null
@@ -1,52 +0,0 @@
-# Schema: PrioritiesModel
----
-type: object
-example:
- _links:
- self:
- href: "/api/v3/priorities"
- _type: Collection
- total: 4
- count: 4
- _embedded:
- elements:
- - _type: Priority
- _links:
- self:
- href: "/api/v3/priorities/1"
- title: Low
- id: 1
- name: Low
- position: 1
- isDefault: false
- isActive: true
- - _type: Priority
- _links:
- self:
- href: "/api/v3/priorities/2"
- title: Normal
- id: 2
- name: Normal
- position: 2
- isDefault: true
- isActive: true
- - _type: Priority
- _links:
- self:
- href: "/api/v3/priorities/3"
- title: High
- id: 3
- name: High
- position: 3
- isDefault: false
- isActive: true
- - _type: Priority
- _links:
- self:
- href: "/api/v3/priorities/4"
- title: Immediate
- id: 4
- name: Immediate
- position: 5
- isDefault: false
- isActive: true
diff --git a/docs/api/apiv3/components/schemas/priority_collection_model.yml b/docs/api/apiv3/components/schemas/priority_collection_model.yml
new file mode 100644
index 00000000000..109fecf500a
--- /dev/null
+++ b/docs/api/apiv3/components/schemas/priority_collection_model.yml
@@ -0,0 +1,35 @@
+# Schema: PriorityCollectionModel
+---
+allOf:
+ - $ref: "./collection_model.yml"
+ - type: object
+ required:
+ - _links
+ - _embedded
+ properties:
+ _links:
+ type: object
+ required:
+ - self
+ properties:
+ self:
+ allOf:
+ - $ref: "./link.yml"
+ - properties:
+ self:
+ allOf:
+ - $ref: "./link.yml"
+ - description: |-
+ This priority collection
+
+ **Resource**: PriorityCollectionModel
+ readOnly: true
+ _embedded:
+ type: object
+ required:
+ - elements
+ properties:
+ elements:
+ type: array
+ items:
+ $ref: "./priority_model.yml"
diff --git a/docs/api/apiv3/openapi-spec.yml b/docs/api/apiv3/openapi-spec.yml
index 96e2f6bc457..be010effa5c 100644
--- a/docs/api/apiv3/openapi-spec.yml
+++ b/docs/api/apiv3/openapi-spec.yml
@@ -505,6 +505,8 @@ components:
$ref: "./components/examples/notification_collection.yml"
PlaceholderUserResponse:
$ref: "./components/examples/placeholder-user-response.yml"
+ PriorityCollection:
+ $ref: "./components/examples/priority_collection.yml"
Project:
$ref: "./components/examples/project.yml"
ProjectBody:
@@ -695,8 +697,8 @@ components:
"$ref": "./components/schemas/principal_collection_model.yml"
PrincipalModel:
"$ref": "./components/schemas/principal_model.yml"
- PrioritiesModel:
- "$ref": "./components/schemas/priorities_model.yml"
+ PriorityCollectionModel:
+ "$ref": "./components/schemas/priority_collection_model.yml"
PriorityModel:
"$ref": "./components/schemas/priority_model.yml"
ProjectCollectionModel:
diff --git a/docs/api/apiv3/paths/priorities.yml b/docs/api/apiv3/paths/priorities.yml
index 66b21181527..eedb8c0a284 100644
--- a/docs/api/apiv3/paths/priorities.yml
+++ b/docs/api/apiv3/paths/priorities.yml
@@ -6,58 +6,10 @@ get:
content:
application/hal+json:
examples:
- response:
- value:
- _embedded:
- elements:
- - _links:
- self:
- href: "/api/v3/priorities/1"
- title: Low
- _type: Priority
- id: 1
- isActive: true
- isDefault: false
- name: Low
- position: 1
- - _links:
- self:
- href: "/api/v3/priorities/2"
- title: Normal
- _type: Priority
- id: 2
- isActive: true
- isDefault: true
- name: Normal
- position: 2
- - _links:
- self:
- href: "/api/v3/priorities/3"
- title: High
- _type: Priority
- id: 3
- isActive: true
- isDefault: false
- name: High
- position: 3
- - _links:
- self:
- href: "/api/v3/priorities/4"
- title: Immediate
- _type: Priority
- id: 4
- isActive: true
- isDefault: false
- name: Immediate
- position: 5
- _links:
- self:
- href: "/api/v3/priorities"
- _type: Collection
- count: 4
- total: 4
+ 'simple priority collection':
+ $ref: "../components/examples/priority_collection.yml"
schema:
- "$ref": "../components/schemas/priorities_model.yml"
+ "$ref": "../components/schemas/priority_collection_model.yml"
description: OK
headers: {}
'403':