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

Try to iron out some peculiarities in APIv3 spec yml files.

Gunter Ohrner9166fcab3287
diff --git a/docs/api/apiv3/components/schemas/activity_model.yml b/docs/api/apiv3/components/schemas/activity_model.yml
index 235d0204ae2..9e387f467ff 100644
--- a/docs/api/apiv3/components/schemas/activity_model.yml
+++ b/docs/api/apiv3/components/schemas/activity_model.yml
@@ -22,7 +22,8 @@ properties:
type: array
readOnly: true
items:
- type: string
+ allOf:
+ - "$ref": "./formattable.yml"
createdAt:
type: string
format: date-time
diff --git a/docs/api/apiv3/components/schemas/link.yml b/docs/api/apiv3/components/schemas/link.yml
index 46d0b5f470c..f880ac1c8d6 100644
--- a/docs/api/apiv3/components/schemas/link.yml
+++ b/docs/api/apiv3/components/schemas/link.yml
@@ -20,7 +20,7 @@ properties:
default: GET
description: The HTTP verb to use when requesting the resource
payload:
- type: string
+ type: object
description: The payload to send in the request to achieve the desired result
identifier:
type: string
diff --git a/docs/api/apiv3/components/schemas/work_package_model.yml b/docs/api/apiv3/components/schemas/work_package_model.yml
index 1ac667e5ee4..bfa35c022a8 100644
--- a/docs/api/apiv3/components/schemas/work_package_model.yml
+++ b/docs/api/apiv3/components/schemas/work_package_model.yml
@@ -143,11 +143,14 @@ properties:
**Permission**: add watcher
readOnly: true
customActions:
- allOf:
- - "$ref": "./link.yml"
- - description: Collection of predefined changes that can be applied to the
- work package
- readOnly: true
+ type: array
+ readOnly: true
+ items:
+ allOf:
+ - "$ref": "./link.yml"
+ - description: Collection of predefined changes that can be applied to the
+ work package
+ readOnly: true
previewMarkup:
allOf:
- "$ref": "./link.yml"
@@ -221,24 +224,29 @@ properties:
**Resource**: Schema
readOnly: true
ancestors:
- allOf:
- - "$ref": "./link.yml"
- - description: |-
- Array of all visible ancestors of the work package, with the root node being the first element
+ type: array
+ readOnly: true
+ items:
+ allOf:
+ - "$ref": "./link.yml"
+ - description: |-
+ Array of all visible ancestors of the work package, with the root node being the first element
- **Resource**: Collection
+ **Resource**: Collection
- # Conditions
+ # Conditions
- **Permission** view work packages
- readOnly: true
+ **Permission** view work packages
+ readOnly: true
attachments:
- allOf:
- - "$ref": "./link.yml"
- - description: |-
- The files attached to this work package
-
- **Resource**: Collection
+ type: array
+ items:
+ allOf:
+ - "$ref": "./link.yml"
+ - description: |-
+ The files attached to this work package
+
+ **Resource**: Collection
author:
allOf:
- "$ref": "./link.yml"
diff --git a/docs/api/apiv3/paths/work_package.yml b/docs/api/apiv3/paths/work_package.yml
index b8b02c702f4..dc251e08e1f 100644
--- a/docs/api/apiv3/paths/work_package.yml
+++ b/docs/api/apiv3/paths/work_package.yml
@@ -484,24 +484,11 @@ patch:
content:
application/json:
schema:
+ "$ref": "../components/schemas/work_package_model.yml"
example:
_links:
parent:
href: "/api/v3/work_packages/42"
lockVersion: 13
subject: Lorem
- properties:
- _links:
- properties:
- parent:
- properties:
- href:
- type: string
- type: object
- type: object
- lockVersion:
- type: number
- subject:
- type: string
- type: object
summary: Edit Work Package
diff --git a/docs/api/apiv3/paths/work_packages.yml b/docs/api/apiv3/paths/work_packages.yml
index 390f466ed82..493680a1219 100644
--- a/docs/api/apiv3/paths/work_packages.yml
+++ b/docs/api/apiv3/paths/work_packages.yml
@@ -424,6 +424,7 @@ post:
content:
application/json:
schema:
+ "$ref": "../components/schemas/work_package_model.yml"
example:
_links:
assignee:
@@ -437,35 +438,4 @@ post:
customField41: 8
startDate: '2048-01-03'
subject: Lorem
- properties:
- _links:
- properties:
- assignee:
- properties:
- href:
- type: string
- type: object
- customField32:
- properties:
- href:
- type: string
- type: object
- project:
- properties:
- href:
- type: string
- type: object
- type:
- properties:
- href:
- type: string
- type: object
- type: object
- customField41:
- type: number
- startDate:
- type: string
- subject:
- type: string
- type: object
summary: Create Work Package