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] Add proper api spec schema for Types_by_ProjectModel

Simon Bullik2cf24b4ce535
diff --git a/docs/api/apiv3/components/schemas/types_by_project_model.yml b/docs/api/apiv3/components/schemas/types_by_project_model.yml
index 0dbac89a0ba..602d4f09fb6 100644
--- a/docs/api/apiv3/components/schemas/types_by_project_model.yml
+++ b/docs/api/apiv3/components/schemas/types_by_project_model.yml
@@ -1,36 +1,32 @@
# Schema: Types_by_ProjectModel
---
-type: object
-example:
- _links:
- self:
- href: "/api/v3/projects/11/types"
- total: 2
- count: 2
- _type: Collection
- _embedded:
- elements:
- - _links:
- self:
- href: "/api/v3/types/1"
- _type: Type
- id: 1
- name: Bug
- color: "#ff0000"
- position: 1
- isDefault: true
- isMilestone: false
- createdAt: '2014-05-21T08:51:20.745Z'
- updatedAt: '2014-05-21T08:51:20.745Z'
- - _links:
- self:
- href: "/api/v3/types/2"
- _type: Type
- id: 2
- name: Feature
- color: "#888"
- position: 2
- isDefault: false
- isMilestone: false
- createdAt: '2014-05-21T08:51:20.745Z'
- updatedAt: '2014-05-21T08:51:20.745Z'
+allOf:
+ - "$ref": "./collection_model.yml"
+ - type: object
+ required:
+ - _links
+ - _embedded
+ properties:
+ _links:
+ type: object
+ required:
+ - self
+ properties:
+ self:
+ allOf:
+ - "$ref": "./link.yml"
+ - description: |-
+ The types collection
+
+ **Resource**: TypesCollection
+ readOnly: true
+ _embedded:
+ type: object
+ properties:
+ elements:
+ type: array
+ readOnly: true
+ items:
+ allOf:
+ - "$ref": "./type_model.yml"
+ - description: Collection of Types