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
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
[#43694] eliminate some validation warnings
Eric Schuberte8e984227b91
diff --git a/docs/api/apiv3/components/schemas/work_package_model.yml b/docs/api/apiv3/components/schemas/work_package_model.ymlindex 618a58fc252..766c83a0c0a 100644--- a/docs/api/apiv3/components/schemas/work_package_model.yml+++ b/docs/api/apiv3/components/schemas/work_package_model.yml@@ -438,6 +438,7 @@ properties:**Permission** view work package watchersreadOnly: true+example:_type: WorkPackage_links:diff --git a/docs/api/apiv3/paths/work_package.yml b/docs/api/apiv3/paths/work_package.ymlindex 5c2ae8549af..29f41efb00e 100644--- a/docs/api/apiv3/paths/work_package.yml+++ b/docs/api/apiv3/paths/work_package.yml@@ -1,14 +1,23 @@# /api/v3/work_packages/{id}---delete:+ summary: Delete Work Package+ operationId: delete_work_package+ tags:+ - Work Packages+ description: |-+ Deletes the work package, as well as:++ - all associated time entries+ - its hierarchy of child work packagesparameters:- description: Work package id- example: 1in: pathname: idrequired: trueschema:type: integer+ example: 1responses:'204':description: |-@@ -16,12 +25,11 @@ delete:Note that the response body is empty as of now. In future versions of the API a body*might* be returned along with an appropriate HTTP status.- headers: { }'403':content:application/hal+json:schema:- $ref: "../components/schemas/error_response.yml"+ $ref: '../components/schemas/error_response.yml'example:_type: ErrorerrorIdentifier: urn:openproject-org:api:v3:errors:MissingPermission@@ -30,12 +38,11 @@ delete:Returned if the client does not have sufficient permissions.**Required permission:** delete work package- headers: { }'404':content:application/hal+json:schema:- $ref: "../components/schemas/error_response.yml"+ $ref: '../components/schemas/error_response.yml'example:_type: ErrorerrorIdentifier: urn:openproject-org:api:v3:errors:NotFound@@ -44,182 +51,38 @@ delete:Returned if the work package does not exist or the client does not have sufficient permissions to see it.**Required permission:** view work package- headers: { }'406':- $ref: "../components/responses/missing_content_type.yml"+ $ref: '../components/responses/missing_content_type.yml''415':- $ref: "../components/responses/unsupported_media_type.yml"+ $ref: '../components/responses/unsupported_media_type.yml'++get:+ summary: View Work Package+ operationId: view_work_packagetags:- Work Packagesdescription: |-- Deletes the work package, as well as:-- * all associated time entries-- * its hierarchy of child work packages- operationId: Delete_Work_Package- summary: Delete Work Package-get:+ Returns the specified work package.parameters:- description: Work package id- example: '1'in: pathname: idrequired: trueschema:type: integer+ example: 1responses:'200':content:application/hal+json:- example:- _links:- addAttachment:- href: "/api/v3/work_packages/1528/attachments"- method: post- addComment:- href: "/api/v3/work_packages/1528/activities"- method: post- title: Add comment- addRelation:- href: "/api/v3/relations"- method: post- title: Add relation- addWatcher:- href: "/api/v3/work_packages/1528/watchers"- method: post- payload:- user:- href: "/api/v3/users/{user_id}"- templated: true- ancestors:- - href: "/api/v3/work_packages/1290"- title: Root node of hierarchy- - href: "/api/v3/work_packages/1291"- title: Intermediate node of hierarchy- - href: "/api/v3/work_packages/1298"- title: nisi eligendi officiis eos delectus quis voluptas dolores- assignee:- href: "/api/v3/users/11"- title: Emmie Okuneva - Adele5450- attachments:- href: "/api/v3/work_packages/1528/attachments"- author:- href: "/api/v3/users/1"- title: OpenProject Admin - admin- availableWatchers:- href: "/api/v3/work_packages/1528/available_watchers"- category:- href: "/api/v3/categories/1298"- title: eligend isi- changeParent:- href: "/api/v3/work_packages/694"- method: patch- title: Change parent of Bug in OpenProject- children:- - href: "/api/v3/work_packages/1529"- title: Write API documentation- customActions:- - href: "/api/v3/work_packages/1528/custom_actions/153/execute"- method: post- title: Reset- - href: "/api/v3/work_packages/1528/custom_actions/94/execute"- method: post- title: Forward to accounting- customField3:- href: api/v3/users/14- delete:- href: "/work_packages/bulk?ids=1528"- method: delete- title: Delete Develop API- logTime:- href: "/work_packages/1528/time_entries/new"- title: Log time on Develop API- type: text/html- move:- href: "/work_packages/1528/move/new"- title: Move Develop API- type: text/html- parent:- href: "/api/v3/work_packages/1298"- title: nisi eligendi officiis eos delectus quis voluptas dolores- priority:- href: "/api/v3/priorities/2"- title: Normal- project:- href: "/api/v3/projects/1"- title: A Test Project- relations:- href: "/api/v3/work_packages/1528/relations"- title: Show relations- removeWatcher:- href: "/api/v3/work_packages/1528/watchers/{user_id}"- method: delete- templated: true- responsible:- href: "/api/v3/users/23"- title: Laron Leuschke - Alaina5788- revisions:- href: "/api/v3/work_packages/1528/revisions"- schema:- href: "/api/v3/work_packages/schemas/11-2"- self:- href: "/api/v3/work_packages/1528"- title: Develop API- status:- href: "/api/v3/statuses/1"- title: New- timeEntries:- href: "/work_packages/1528/time_entries"- title: Time entries- type: text/html- type:- href: "/api/v3/types/1"- title: A Type- update:- href: "/api/v3/work_packages/1528"- method: patch- title: Update Develop API- version:- href: "/api/v3/versions/1"- title: Version 1- watch:- href: "/api/v3/work_packages/1528/watchers"- method: post- payload:- user:- href: "/api/v3/users/1"- watchers:- href: "/api/v3/work_packages/1528/watchers"- _type: WorkPackage- createdAt: '2014-08-29T12:40:53Z'- customField1: Foo- customField2: 42- derivedDueDate:- derivedEstimatedTime: PT10H- derivedStartDate:- description:- format: markdown- html: "<p>Develop super cool OpenProject API.</p>"- raw: Develop super cool OpenProject API.- dueDate:- estimatedTime: PT2H- id: 1528- percentageDone: 0- scheduleManually: false- readonly: false- startDate:- subject: Develop API- updatedAt: '2014-08-29T12:44:41Z'schema:- "$ref": "../components/schemas/work_package_model.yml"+ $ref: '../components/schemas/work_package_model.yml'description: OK- headers: { }'404':content:application/hal+json:schema:- $ref: "../components/schemas/error_response.yml"+ $ref: '../components/schemas/error_response.yml'example:_type: ErrorerrorIdentifier: urn:openproject-org:api:v3:errors:NotFound@@ -228,186 +91,58 @@ get:Returned if the work package does not exist or the client does not have sufficient permissions to see it.**Required permission:** view work package- headers: { }++patch:+ summary: Edit Work Package+ operationId: edit_work_packagetags:- Work Packages- description: ''- operationId: View_Work_Package- summary: View Work Package-patch:+ description: |-+ When calling this endpoint the client provides a single object, containing the properties and links that it wants to change, in the body.+ Note that it is only allowed to provide properties or links supporting the **write** operation.++ Additionally to the fields the client wants to change, it is mandatory to provide the value of `lockVersion` which was received+ by the `GET` request this change originates from.++ The value of `lockVersion` is used to implement [optimistic locking](https://en.wikipedia.org/wiki/Optimistic_concurrency_control).parameters:- description: Work package id- example: '1'in: pathname: idrequired: trueschema:type: integer+ example: 1- description: |-Indicates whether change notifications (e.g. via E-Mail) should be sent.Note that this controls notifications for all users interested in changes to the work package (e.g. watchers, author and assignee),not just the current user.- example: falsein: queryname: notifyrequired: falseschema:default: truetype: boolean+ example: false+ requestBody:+ content:+ application/json:+ schema:+ $ref: '../components/schemas/work_package_model.yml'responses:'200':content:application/hal+json:- example:- _links:- addAttachment:- href: "/api/v3/work_packages/1528/attachments"- method: post- addComment:- href: "/api/v3/work_packages/1528/activities"- method: post- title: Add comment- addRelation:- href: "/api/v3/relations"- method: post- title: Add relation- addWatcher:- href: "/api/v3/work_packages/1528/watchers"- method: post- payload:- user:- href: "/api/v3/users/{user_id}"- templated: true- ancestors:- - href: "/api/v3/work_packages/1290"- title: Root node of hierarchy- - href: "/api/v3/work_packages/1291"- title: Intermediate node of hierarchy- - href: "/api/v3/work_packages/1298"- title: nisi eligendi officiis eos delectus quis voluptas dolores- assignee:- href: "/api/v3/users/11"- title: Emmie Okuneva - Adele5450- attachments:- href: "/api/v3/work_packages/1528/attachments"- author:- href: "/api/v3/users/1"- title: OpenProject Admin - admin- availableWatchers:- href: "/api/v3/work_packages/1528/available_watchers"- category:- href: "/api/v3/categories/1298"- title: eligend isi- changeParent:- href: "/api/v3/work_packages/694"- method: patch- title: Change parent of Bug in OpenProject- children:- - href: "/api/v3/work_packages/1529"- title: Write API documentation- customActions:- - href: "/api/v3/work_packages/1528/custom_actions/153/execute"- method: post- title: Reset- - href: "/api/v3/work_packages/1528/custom_actions/94/execute"- method: post- title: Forward to accounting- customField3:- href: api/v3/users/14- delete:- href: "/work_packages/bulk?ids=1528"- method: delete- title: Delete Develop API- logTime:- href: "/work_packages/1528/time_entries/new"- title: Log time on Develop API- type: text/html- move:- href: "/work_packages/1528/move/new"- title: Move Develop API- type: text/html- parent:- href: "/api/v3/work_packages/1298"- title: nisi eligendi officiis eos delectus quis voluptas dolores- priority:- href: "/api/v3/priorities/2"- title: Normal- project:- href: "/api/v3/projects/1"- title: A Test Project- relations:- href: "/api/v3/work_packages/1528/relations"- title: Show relations- removeWatcher:- href: "/api/v3/work_packages/1528/watchers/{user_id}"- method: delete- templated: true- responsible:- href: "/api/v3/users/23"- title: Laron Leuschke - Alaina5788- revisions:- href: "/api/v3/work_packages/1528/revisions"- schema:- href: "/api/v3/work_packages/schemas/11-2"- self:- href: "/api/v3/work_packages/1528"- title: Develop API- status:- href: "/api/v3/statuses/1"- title: New- timeEntries:- href: "/work_packages/1528/time_entries"- title: Time entries- type: text/html- type:- href: "/api/v3/types/1"- title: A Type- update:- href: "/api/v3/work_packages/1528"- method: patch- title: Update Develop API- version:- href: "/api/v3/versions/1"- title: Version 1- watch:- href: "/api/v3/work_packages/1528/watchers"- method: post- payload:- user:- href: "/api/v3/users/1"- watchers:- href: "/api/v3/work_packages/1528/watchers"- _type: WorkPackage- createdAt: '2014-08-29T12:40:53Z'- customField1: Foo- customField2: 42- derivedDueDate:- derivedEstimatedTime: PT10H- derivedStartDate:- description:- format: markdown- html: "<p>Develop super cool OpenProject API.</p>"- raw: Develop super cool OpenProject API.- dueDate:- estimatedTime: PT2H- id: 1528- percentageDone: 0- scheduleManually: false- readonly: false- startDate:- subject: Develop API- updatedAt: '2014-08-29T12:44:41Z'schema:- "$ref": "../components/schemas/work_package_model.yml"+ '$ref': '../components/schemas/work_package_model.yml'description: OK- headers: { }'400':- $ref: "../components/responses/invalid_request_body.yml"+ $ref: '../components/responses/invalid_request_body.yml''403':content:application/hal+json:schema:- $ref: "../components/schemas/error_response.yml"+ $ref: '../components/schemas/error_response.yml'example:_type: ErrorerrorIdentifier: urn:openproject-org:api:v3:errors:MissingPermission@@ -416,12 +151,11 @@ patch:Returned if the client does not have sufficient permissions.**Required permission:** edit work package, assign version, manage subtasks or move work package- headers: { }'404':content:application/hal+json:schema:- $ref: "../components/schemas/error_response.yml"+ $ref: '../components/schemas/error_response.yml'example:_type: ErrorerrorIdentifier: urn:openproject-org:api:v3:errors:NotFound@@ -430,14 +164,13 @@ patch:Returned if the work package does not exist or the client does not have sufficient permissions to see it.**Required permission:** view work package- headers: { }'406':- $ref: "../components/responses/missing_content_type.yml"+ $ref: '../components/responses/missing_content_type.yml''409':content:application/hal+json:schema:- $ref: "../components/schemas/error_response.yml"+ $ref: '../components/schemas/error_response.yml'example:_type: ErrorerrorIdentifier: urn:openproject-org:api:v3:errors:UpdateConflict@@ -445,14 +178,13 @@ patch:was changed since you've seen it the last time.description: Returned if the resource was changed since the client requestedit. This is determined using the `lockVersion` property.- headers: { }'415':- $ref: "../components/responses/unsupported_media_type.yml"+ $ref: '../components/responses/unsupported_media_type.yml''422':content:application/hal+json:schema:- $ref: "../components/schemas/error_response.yml"+ $ref: '../components/schemas/error_response.yml'example:_embedded:details:@@ -463,26 +195,6 @@ patch:description: |-Returned if:- * the client tries to modify a read-only property (`PropertyIsReadOnly`)-- * a constraint for a property was violated (`PropertyConstraintViolation`)-- * the client provides a link to an invalid resource (`ResourceTypeMismatch`)- headers: { }- tags:- - Work Packages- description: |-- When calling this endpoint the client provides a single object, containing the properties and links that it wants to change, in the body.- Note that it is only allowed to provide properties or links supporting the **write** operation.-- Additionally to the fields the client wants to change, it is mandatory to provide the value of `lockVersion` which was received- by the `GET` request this change originates from.-- The value of `lockVersion` is used to implement [optimistic locking](https://en.wikipedia.org/wiki/Optimistic_concurrency_control).- operationId: Edit_Work_Package- requestBody:- content:- application/json:- schema:- "$ref": "../components/schemas/work_package_model.yml"- summary: Edit Work Package+ - the client tries to modify a read-only property (`PropertyIsReadOnly`)+ - a constraint for a property was violated (`PropertyConstraintViolation`)+ - the client provides a link to an invalid resource (`ResourceTypeMismatch`)