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
update preferences api specification
ulferts8ae523353e7f
diff --git a/docs/api/apiv3/components/schemas/user_preference_model.yml b/docs/api/apiv3/components/schemas/user_preference_model.ymlindex 6f562563967..babb938b2bb 100644--- a/docs/api/apiv3/components/schemas/user_preference_model.yml+++ b/docs/api/apiv3/components/schemas/user_preference_model.yml@@ -2,9 +2,18 @@---type: objectproperties:+ autoHidePopups:+ type: boolean+ description: Whether to hide popups (e.g. success messages) after 5 secondshideMail:type: booleandescription: Hide mail address from other users+ notifications:+ type: NotificationSetting+ description: The settings for the notifications to be received by the user+ selfNotified:+ type: boolean+ description: Whether the user wants to be notfified of changes done by the user her/himselftimeZone:type: stringdescription: Current selected time zone@@ -14,9 +23,6 @@ properties:warnOnLeavingUnsaved:type: booleandescription: Issue warning when leaving a page with unsaved text- accessibilityMode:- type: boolean- description: Enable accessibility mode_links:type: objectrequired:diff --git a/docs/api/apiv3/components/schemas/user_preferences_model.yml b/docs/api/apiv3/components/schemas/user_preferences_model.ymlindex cfe00b76f9f..52781433048 100644--- a/docs/api/apiv3/components/schemas/user_preferences_model.yml+++ b/docs/api/apiv3/components/schemas/user_preferences_model.yml@@ -2,15 +2,45 @@---type: objectexample:- _type: UserPreferences_links:self:href: "/api/v3/my_preferences"user:href: "/api/v3/users/1"title: John Sheppard- hideMail: false- timeZone: Europe/Berlin+ updateImmediately:+ href: "/api/v3/users/3/preferences"+ method: "patch"+ _type: UserPreferencescommentSortDescending: true+ hideMail: false+ timeZone: "Europe/Berlin"warnOnLeavingUnsaved: true- accessibilityMode: false+ notifications:+ - channel: "mail"+ watched: false+ involved: true+ mentioned: false+ all: false+ workPackageCommented: false+ _links:+ project:+ href: null+ - channel: "in_app"+ watched: true+ involved: true+ mentioned: true+ all: false+ workPackageCommented: false+ _links:+ project:+ href: null+ - channel: "mail_digest"+ watched: true+ involved: true+ mentioned: true+ all: true,+ workPackageCommented: true+ _links:+ project:+ href: nulldiff --git a/docs/api/apiv3/paths/my_preferences.yml b/docs/api/apiv3/paths/my_preferences.ymlindex 605ca35bcc4..98ac0dccd7f 100644--- a/docs/api/apiv3/paths/my_preferences.yml+++ b/docs/api/apiv3/paths/my_preferences.yml@@ -13,13 +13,43 @@ get:href: "/api/v3/my_preferences"user:href: "/api/v3/users/1"- title: John Sheppard- _type: UserPreferences- accessibilityMode: false+ title: "John Sheppard"+ updateImmediately:+ href: "/api/v3/users/3/preferences"+ method: "patch"+ _type: "UserPreferences"commentSortDescending: truehideMail: false- timeZone: Europe/Berlin+ timeZone: "Europe/Berlin"warnOnLeavingUnsaved: true+ notifications:+ - channel: "mail"+ watched: false+ involved: true+ mentioned: false+ all: false+ workPackageCommented: false+ _links:+ project:+ href: null+ - channel: "in_app"+ watched: true+ involved: true+ mentioned: true+ all: false+ workPackageCommented: false+ _links:+ project:+ href: null+ - channel: "mail_digest"+ watched: true+ involved: true+ mentioned: true+ all: true,+ workPackageCommented: true+ _links:+ project:+ href: nullschema:"$ref": "../components/schemas/user_preferences_model.yml"description: OK@@ -54,12 +84,42 @@ patch:user:href: "/api/v3/users/1"title: John Sheppard+ updateImmediately:+ href: "/api/v3/users/3/preferences"+ method: "patch"_type: UserPreferences- accessibilityMode: falsecommentSortDescending: truehideMail: falsetimeZone: Europe/BerlinwarnOnLeavingUnsaved: true+ notifications:+ - channel: "mail"+ watched: false+ involved: true+ mentioned: false+ all: false+ workPackageCommented: false+ _links:+ project:+ href: null+ - channel: "in_app"+ watched: true+ involved: true+ mentioned: true+ all: false+ workPackageCommented: false+ _links:+ project:+ href: null+ - channel: "mail_digest"+ watched: true+ involved: true+ mentioned: true+ all: true,+ workPackageCommented: true+ _links:+ project:+ href: nullschema:"$ref": "../components/schemas/user_preferences_model.yml"description: OK@@ -114,12 +174,12 @@ patch:application/json:schema:example:- accessibilityMode: true+ autoHidePopups: truetimeZone: Europe/Parisproperties:- accessibilityMode:+ autoHidePopups:type: booleantimeZone:type: stringtype: object- summary: Update UserPreferences+ summary: Update my preferencesdiff --git a/docs/api/apiv3/tags/userpreferences.yml b/docs/api/apiv3/tags/userpreferences.ymlindex 3a07d315f3e..776217d5b84 100644--- a/docs/api/apiv3/tags/userpreferences.yml+++ b/docs/api/apiv3/tags/userpreferences.yml@@ -9,11 +9,13 @@ description: |-## Local Properties- | Property | Description | Type | Constraints | Supported operations |- |:----------------------:| -----------------------------------------------------------| ---------- | ----------- | -------------------- |- | hideMail | Hide mail address from other users | Boolean | | READ / WRITE |- | timeZone | Current selected time zone | String | | READ / WRITE |- | commentSortDescending | Sort comments in descending order | Boolean | | READ / WRITE |- | warnOnLeavingUnsaved | Issue warning when leaving a page with unsaved text | Boolean | | READ / WRITE |- | accessibilityMode | Enable accessibility mode | Boolean | | READ / WRITE |+ | Property | Description | Type | Constraints | Supported operations |+ |:----------------------:| ----------------------------------------------------------- | ---------- | ----------- | -------------------- |+ | autoHidePopups | Whether to hide popups (e.g. success messages) after 5 seconds | Boolean | | READ / WRITE |+ | hideMail | Hide mail address from other users | Boolean | | READ / WRITE |+ | notifications | The settings for the notifications to be received by the user | NotificationSetting | | READ / WRITE |+ | selfNotified | Whether the user wants to be notfified of changes done by the user her/himself | Boolean | | READ / WRITE |+ | timeZone | Current selected time zone | String | | READ / WRITE |+ | commentSortDescending | Sort comments in descending order | Boolean | | READ / WRITE |+ | warnOnLeavingUnsaved | Issue warning when leaving a page with unsaved text | Boolean | | READ / WRITE |name: UserPreferencesdiff --git a/lib/api/open_api.rb b/lib/api/open_api.rbindex 279282603e5..965759dbc45 100644--- a/lib/api/open_api.rb+++ b/lib/api/open_api.rb@@ -9,7 +9,7 @@ module APIif spec_path.exist?assemble_spec spec_pathelse- raise "Could not find openapi-spec.yml uner #{spec_path}"+ raise "Could not find openapi-spec.yml under #{spec_path}"endenddiff --git a/script/api/spec b/script/api/specindex 347a0c3ab4c..dc1e8089520 100755--- a/script/api/spec+++ b/script/api/spec@@ -3,7 +3,7 @@if ARGV.join(" ") =~ /((-h)|(--help))/puts "Prints the self-contained OpenAPI 3.0 specification of OpenProject's APIv3"puts- puts "usage: ./scripts/api/spec [--format JSON|yaml]"+ puts "usage: ./script/api/spec [--format JSON|yaml]"returnend