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 Categories_by_ProjectModel

Simon Bullik96fdc23f25d1
diff --git a/docs/api/apiv3/components/schemas/categories_by_project_model.yml b/docs/api/apiv3/components/schemas/categories_by_project_model.yml
index 38460fb1a1b..81cdcb96a47 100644
--- a/docs/api/apiv3/components/schemas/categories_by_project_model.yml
+++ b/docs/api/apiv3/components/schemas/categories_by_project_model.yml
@@ -1,33 +1,32 @@
# Schema: Categories_by_ProjectModel
---
-type: object
-example:
- _links:
- self:
- href: "/api/v3/projects/11/categories"
- total: 2
- count: 2
- _type: Collection
- _embedded:
- elements:
- - _links:
- self:
- href: "/api/v3/categories/10"
- title: Category with assignee
- project:
- href: "/api/v3/projects/11"
- title: Example project
- defaultAssignee:
- href: "/api/v3/users/42"
- title: John Sheppard
- _type: Category
- id: 10
- name: Foo
- - _links:
- self:
- href: "/api/v3/categories/11"
- project:
- href: "/api/v3/projects/11"
- _type: Category
- id: 11
- name: Bar
+allOf:
+ - "$ref": "./collection_model.yml"
+ - type: object
+ required:
+ - _links
+ - _embedded
+ properties:
+ _links:
+ type: object
+ required:
+ - self
+ properties:
+ self:
+ allOf:
+ - "$ref": "./link.yml"
+ - description: |-
+ The categories collection
+
+ **Resource**: CategoriesCollection
+ readOnly: true
+ _embedded:
+ type: object
+ properties:
+ elements:
+ type: array
+ readOnly: true
+ items:
+ allOf:
+ - "$ref": "./category_model.yml"
+ - description: Collection of Categories