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
add GET/PATCH/DELETE /api/v3/non_working_days/{date}
Christophe Bliardf065d80c4e11
diff --git a/docs/api/apiv3/components/schemas/non_working_day_model.yml b/docs/api/apiv3/components/schemas/non_working_day_model.ymlindex 31c81037010..39b93b1a1f6 100644--- a/docs/api/apiv3/components/schemas/non_working_day_model.yml+++ b/docs/api/apiv3/components/schemas/non_working_day_model.yml@@ -5,7 +5,6 @@ required:- _type- date- name- - _linksproperties:_type:type: stringdiff --git a/docs/api/apiv3/openapi-spec.yml b/docs/api/apiv3/openapi-spec.ymlindex fe4ef9d5d29..e540305566a 100644--- a/docs/api/apiv3/openapi-spec.yml+++ b/docs/api/apiv3/openapi-spec.yml@@ -429,13 +429,9 @@ paths:"$ref": "./paths/work_schedule_week_day.yml""/api/v3/work_schedule/non_working_days":"$ref": "./paths/work_schedule_non_working_days.yml"- # TODO: get- # TODO: patch- # TODO: delete"/api/v3/work_schedule/non_working_days/{date}":"$ref": "./paths/work_schedule_non_working_day.yml"# TODO: add some **Permission** in some description fields- # TODO: populate **tags** sectioncomponents:examples:diff --git a/docs/api/apiv3/paths/work_schedule_non_working_day.yml b/docs/api/apiv3/paths/work_schedule_non_working_day.ymlindex 575d30498ce..11fb13e5354 100644--- a/docs/api/apiv3/paths/work_schedule_non_working_day.yml+++ b/docs/api/apiv3/paths/work_schedule_non_working_day.yml@@ -1,8 +1,13 @@+# /api/v3/non_working_days/{date}----# TODO: add missing description, missing tags, missing parameters, and missing response codesget:summary: View a non-working dayoperationId: view_non_working_day+ tags:+ - Work Schedule+ - Non working days+ description: |-+ Returns the non-working day information for a given date.parameters:- name: datein: path@@ -16,11 +21,36 @@ get:responses:'200':description: OK+ content:+ application/hal+json:+ schema:+ $ref: '../components/schemas/non_working_day_model.yml'+ '400':+ description: Returned if the client sends invalid request parameters.+ content:+ application/hal+json:+ schema:+ $ref: '../components/schemas/error_response.yml'+ '404':+ description: Returned if the given date is not a non-working day.+ content:+ application/hal+json:+ schema:+ $ref: '../components/schemas/error_response.yml'+ example:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:NotFound+ message: The requested resource could not be found.# TODO: add missing description, missing tags, missing parameters, and missing response codespatch:summary: Update a non-working day attributesoperationId: update_non_working_day+ tags:+ - Work Schedule+ - Non working days+ description: |-+ Update the non-working day information for a given date.parameters:- name: datein: path@@ -31,14 +61,53 @@ patch:type: stringformat: dateexample: '2022-05-06'+ requestBody:+ content:+ application/json:+ schema:+ $ref: ../components/schemas/non_working_day_model.yml+ example:+ _type: NonWorkingDay+ date: '2022-05-01'+ name: 'Labour day'+responses:'200':description: OK+ content:+ application/hal+json:+ schema:+ $ref: '../components/schemas/non_working_day_model.yml'+ '400':+ description: Returned if the client sends invalid request parameters.+ content:+ application/hal+json:+ schema:+ $ref: '../components/schemas/error_response.yml'+ '404':+ description: Returned if the given date is not a non-working day.+ content:+ application/hal+json:+ schema:+ $ref: '../components/schemas/error_response.yml'+ example:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:NotFound+ message: The requested resource could not be found.# TODO: add missing description, missing tags, missing parameters, and missing response codesdelete:- summary: Remove a day from the non-working days+ summary: Removes a day from the non-working daysoperationId: delete_non_working_day+ tags:+ - Work Schedule+ - Non working days+ description: |-+ Removes the day of the given day from the non-working days known.++ Trying to remove a date which is not a non-working day, by calling the same+ endpoint twice for example, will succeed in both cases and return a 204+ status.parameters:- name: datein: path@@ -50,5 +119,15 @@ delete:format: dateexample: '2022-05-06'responses:- '200':- description: OK+ '204':+ description: |-+ No Content.++ The operation succeeded.+ '400':+ description: |-+ Returned if the client sends invalid request parameters.+ content:+ application/hal+json:+ schema:+ $ref: '../components/schemas/error_response.yml'diff --git a/docs/api/apiv3/paths/work_schedule_non_working_days.yml b/docs/api/apiv3/paths/work_schedule_non_working_days.ymlindex 5f6bdc454d8..d66820b8a60 100644--- a/docs/api/apiv3/paths/work_schedule_non_working_days.yml+++ b/docs/api/apiv3/paths/work_schedule_non_working_days.yml@@ -40,7 +40,7 @@ get:schema:$ref: '../components/schemas/non_working_day_collection_model.yml''400':- description: Returned if the client sends invalid request parameters+ description: Returned if the client sends invalid request parameters.content:application/hal+json:schema: