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

[#64515] API documentation for project phase definitions

Tobias Dillmann0c0e98e003ba
diff --git a/docs/api/apiv3/components/schemas/project_phase_definition_collection_model.yml b/docs/api/apiv3/components/schemas/project_phase_definition_collection_model.yml
new file mode 100644
index 00000000000..e64862af409
--- /dev/null
+++ b/docs/api/apiv3/components/schemas/project_phase_definition_collection_model.yml
@@ -0,0 +1,47 @@
+# Schema: ProjectPhaseDefinitionCollectionModel
+---
+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**: ProjectPhaseDefinitionCollectionModel
+ _embedded:
+ type: object
+ required:
+ - elements
+ properties:
+ elements:
+ type: array
+ items:
+ $ref: './project_phase_definition_model.yml'
+example:
+ _type: Collection
+ total: 2
+ count: 2
+ _links:
+ self:
+ href: '/api/v3/project_phase_definitions'
+ _embedded:
+ elements:
+ - id: 14
+ name: "Initiating"
+ _type: ProjectPhaseDefinition
+ _hint: project phase definition resource shortened for brevity
+ - id: 15
+ name: "Executing"
+ _type: ProjectPhaseDefinition
+ _hint: project phase definition resource shortened for brevity
diff --git a/docs/api/apiv3/openapi-spec.yml b/docs/api/apiv3/openapi-spec.yml
index fc7af16e524..51cfaefaf56 100644
--- a/docs/api/apiv3/openapi-spec.yml
+++ b/docs/api/apiv3/openapi-spec.yml
@@ -302,6 +302,8 @@ paths:
"$ref": "./paths/priority.yml"
"/api/v3/project_phases/{id}":
"$ref": "./paths/project_phase.yml"
+ "/api/v3/project_phase_definitions":
+ "$ref": "./paths/project_phase_definitions.yml"
"/api/v3/project_phase_definitions/{id}":
"$ref": "./paths/project_phase_definition.yml"
"/api/v3/project_storages":
@@ -795,6 +797,8 @@ components:
"$ref": "./components/schemas/project_phase_model.yml"
ProjectPhaseDefinitionModel:
"$ref": "./components/schemas/project_phase_definition_model.yml"
+ ProjectPhaseDefinitionCollectionModel:
+ "$ref": "./components/schemas/project_phase_definition_collection_model.yml"
ProjectStorageCollectionModel:
"$ref": "./components/schemas/project_storage_collection_model.yml"
ProjectStorageModel:
diff --git a/docs/api/apiv3/paths/project_phase_definitions.yml b/docs/api/apiv3/paths/project_phase_definitions.yml
new file mode 100644
index 00000000000..82a99830858
--- /dev/null
+++ b/docs/api/apiv3/paths/project_phase_definitions.yml
@@ -0,0 +1,27 @@
+# /api/v3/project_phase_definitions
+---
+get:
+ summary: List project phase definitions
+ operationId: list_project_phase_definitions
+ tags:
+ - Project Phase Definitions
+ description: |-
+ Returns a collection of all project phase definitions.
+ The result set is always limited to only contain project phase definitions the client is allowed to see.
+ responses:
+ '200':
+ description: OK
+ content:
+ application/hal+json:
+ schema:
+ $ref: '../components/schemas/project_phase_definition_collection_model.yml'
+ '400':
+ description: Returned if the client sends invalid request parameters e.g. filters
+ content:
+ application/hal+json:
+ schema:
+ $ref: '../components/schemas/error_response.yml'
+ example:
+ _type: Error
+ errorIdentifier: urn:openproject-org:api:v3:errors:InvalidQuery
+ message: Filters Invalid filter does not exist.