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 openapi specification for reminders API
Kabiru Mwenja4fd3a4ea81bf
diff --git a/docs/api/apiv3/openapi-spec.yml b/docs/api/apiv3/openapi-spec.ymlindex f3efa45c893..2f2580eb1c9 100644--- a/docs/api/apiv3/openapi-spec.yml+++ b/docs/api/apiv3/openapi-spec.yml@@ -494,8 +494,10 @@ paths:"$ref": "./paths/work_package_revisions.yml""/api/v3/work_packages/{id}/relations":"$ref": "./paths/work_package_relations.yml"- "/api/v3/work_packages/{id}/reminders":+ "/api/v3/work_packages/{work_package_id}/reminders":"$ref": "./paths/work_package_reminders.yml"+ "/api/v3/work_packages/{work_package_id}/reminders/{reminder_id}":+ "$ref": "./paths/work_package_reminder.yml""/api/v3/work_packages/{id}/watchers":"$ref": "./paths/work_package_watchers.yml""/api/v3/work_packages/{id}/watchers/{user_id}":diff --git a/docs/api/apiv3/paths/work_package_reminder.yml b/docs/api/apiv3/paths/work_package_reminder.ymlnew file mode 100644index 00000000000..12c2530f985--- /dev/null+++ b/docs/api/apiv3/paths/work_package_reminder.yml@@ -0,0 +1,93 @@+# /api/v3/work_packages/{work_package_id}/reminders/{reminder_id}+---+patch:+ summary: Update a work package reminder+ operationId: update_reminder+ tags:+ - Work Packages+ - Reminders+ description: |-+ Updates an existing reminder for the specified work package.++ A user can only update their own active reminder.++ **Required permission:** view work packages for the project the work package is contained in.+ parameters:+ - name: work_package_id+ in: path+ description: Work package id+ example: '1'+ required: true+ schema:+ type: integer+ - name: reminder_id+ in: path+ description: Reminder id+ example: '1'+ required: true+ schema:+ type: integer+ requestBody:+ required: true+ content:+ application/json:+ schema:+ type: object+ properties:+ remindAt:+ type: string+ format: date-time+ description: The date and time when the reminder is due+ note:+ type: string+ description: The note of the reminder (optional)+ responses:+ '200':+ description: Reminder updated successfully+ content:+ application/hal+json:+ schema:+ $ref: '../components/schemas/reminder_model.yml'+ '404':+ description: |-+ Returned if the work package does not exist or the client does not have sufficient permissions to see it.+ content:+ application/hal+json:+ schema:+ $ref: '../components/schemas/error_response.yml'++delete:+ summary: Delete a work package reminder+ operationId: delete_reminder+ tags:+ - Work Packages+ - Reminders+ description: |-+ Deletes an existing reminder for the specified work package.++ A user can only delete their own active reminder.+ parameters:+ - name: work_package_id+ in: path+ description: Work package id+ example: '1'+ required: true+ schema:+ type: integer+ - name: reminder_id+ in: path+ description: Reminder id+ example: '1'+ required: true+ schema:+ type: integer+ responses:+ '204':+ description: Reminder deleted successfully+ '404':+ description: |-+ Returned if the work package does not exist or the client does not have sufficient permissions to see it.+ content:+ application/hal+json:+ schema:+ $ref: '../components/schemas/error_response.yml'diff --git a/docs/api/apiv3/paths/work_package_reminders.yml b/docs/api/apiv3/paths/work_package_reminders.ymlindex 4f7027a5339..7e2e1bc6b20 100644--- a/docs/api/apiv3/paths/work_package_reminders.yml+++ b/docs/api/apiv3/paths/work_package_reminders.yml@@ -1,61 +1,132 @@-# /api/v3/work_packages/{id}/reminders+# /api/v3/work_packages/{work_package_id}/reminders---get:+ summary: List work package reminders+ operationId: list_reminders+ tags:+ - Work Packages+ - Reminders+ description: |-+ Gets a list of your upcoming reminders for this work package.++ Only active reminders that belong to the current user are returned.parameters:- - description: Work package id- example: '1'- in: path- name: id- required: true- schema:- type: integer+ - name: work_package_id+ in: path+ description: Work package id+ example: '1'+ required: true+ schema:+ type: integerresponses:'200':description: OKcontent:application/hal+json:schema:- $ref: '../components/schemas/reminder_model.yml'- headers: {}+ type: object+ required:+ - _type+ - total+ - count+ - _embedded+ properties:+ _type:+ type: string+ enum:+ - Collection+ total:+ type: integer+ description: The total amount of elements available in the collection.+ minimum: 0+ count:+ type: integer+ description: Actual amount of elements in this response.+ minimum: 0+ _embedded:+ type: object+ required:+ - elements+ properties:+ elements:+ type: array+ items:+ $ref: '../components/schemas/reminder_model.yml''403':- content:- application/hal+json:- schema:- $ref: "../components/schemas/error_response.yml"- examples:- response:- value:- _type: Error- errorIdentifier: urn:openproject-org:api:v3:errors:MissingPermission- message: You are not allowed to see linked reminders for this work- package.description: |-Returned if the client does not have sufficient permissions.**Required permission:** view work packages for the project the work package is contained in.- **Required permission:** manage own reminders for the work package.-- *Note that you will only receive this error, if you are at least allowed to see the corresponding work package.*- headers: {}- '404':content:application/hal+json:schema:- $ref: "../components/schemas/error_response.yml"- examples:- response:- value:- _type: Error- errorIdentifier: urn:openproject-org:api:v3:errors:NotFound- message: The specified work package does not exist.+ $ref: '../components/schemas/error_response.yml'+ '404':description: |-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: {}+ content:+ application/hal+json:+ schema:+ $ref: '../components/schemas/error_response.yml'++post:+ summary: Create a work package reminder+ operationId: create_remindertags:- - Work Packages+ - Work Packages+ - Remindersdescription: |-- Gets a list of your upcoming reminders for this work package.- operationId: Reminders- summary: Reminders+ Creates a new reminder for the specified work package.++ **Note:** A user can only have one **active** reminder at a time for a given work package.+ parameters:+ - name: work_package_id+ in: path+ description: Work package id+ example: '1'+ required: true+ schema:+ type: integer+ requestBody:+ required: true+ content:+ application/json:+ schema:+ type: object+ required:+ - remindAt+ properties:+ remindAt:+ type: string+ format: date-time+ description: The date and time when the reminder is due+ note:+ type: string+ description: The note of the reminder+ responses:+ '201':+ description: Reminder created successfully+ content:+ application/hal+json:+ schema:+ $ref: '../components/schemas/reminder_model.yml'+ '400':+ description: |-+ Returned if the user already has an active reminder for this work package.++ **Error message**: You can only set one reminder at a time for a work package. Please delete or update the existing reminder.+ content:+ application/hal+json:+ schema:+ $ref: '../components/schemas/error_response.yml'+ '404':+ description: |-+ Returned if the work package does not exist or the client does not have sufficient permissions to see it.++ **Required permission:** view work package+ content:+ application/hal+json:+ schema:+ $ref: '../components/schemas/error_response.yml'