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
refactor: Improve readability with explicit parameter names
Christophe Bliard33a591b49db5
diff --git a/lib/api/decorators/property_schema_representer.rb b/lib/api/decorators/property_schema_representer.rbindex 2cc240a23e9..186b326c77f 100644--- a/lib/api/decorators/property_schema_representer.rb+++ b/lib/api/decorators/property_schema_representer.rb@@ -82,17 +82,17 @@ module APIproperty :min_length, exec_context: :decoratorproperty :max_length, exec_context: :decoratorproperty :regular_expression, exec_context: :decorator- property :deprecated, exec_context: :decorator, render_nil: false+ property :deprecated, exec_context: :decoratorproperty :options, exec_context: :decorator- property :location, exec_context: :decorator, render_nil: false+ property :location, exec_context: :decoratorformattable_property :description,exec_context: :decorator,render_nil: false,setter: nil,getter: ->(*) do- next unless description.present?+ next if description.blank?::API::Decorators::Formattable.new(description)enddiff --git a/lib/api/decorators/schema_representer.rb b/lib/api/decorators/schema_representer.rbindex 1b1cedc2979..6be444e12a5 100644--- a/lib/api/decorators/schema_representer.rb+++ b/lib/api/decorators/schema_representer.rb@@ -83,12 +83,12 @@ module APIendschema_property(property,- getter,- show_if,- required,- has_default,- name_source,- as)+ getter:,+ show_if:,+ required:,+ has_default:,+ name_source:,+ as:)enddef schema_with_allowed_link(property,@@ -112,12 +112,12 @@ module APIendschema_property(property,- getter,- show_if,- required,- has_default,- name_source,- as)+ getter:,+ show_if:,+ required:,+ has_default:,+ name_source:,+ as:)enddef schema_with_allowed_collection(property,@@ -150,12 +150,12 @@ module APIendschema_property(property,- getter,- show_if,- required,- has_default,- name_source,- as)+ getter:,+ show_if:,+ required:,+ has_default:,+ name_source:,+ as:)enddef schema_with_allowed_string_collection(property,@@ -189,25 +189,25 @@ module APIendschema_property(property,- getter,- show_if,- required,- has_default,- name_source,- as)+ getter:,+ show_if:,+ required:,+ has_default:,+ name_source:,+ as:)enddef schema_property(property,- getter,- show_if,- required,- has_default,- name_source,- property_alias)+ getter:,+ show_if:,+ required:,+ has_default:,+ name_source:,+ as:)raise ArgumentError unless propertyproperty property,- as: property_alias,+ as:,exec_context: :decorator,getter:,if: show_if,diff --git a/lib/api/v3/queries/schemas/query_schema_representer.rb b/lib/api/v3/queries/schemas/query_schema_representer.rbindex 8c47c735ebe..bc301fd6e63 100644--- a/lib/api/v3/queries/schemas/query_schema_representer.rb+++ b/lib/api/v3/queries/schemas/query_schema_representer.rb@@ -187,12 +187,12 @@ module API}schema_property :filters,- filters_schema,- true,- false,- true,- :filters,- :filters+ getter: filters_schema,+ show_if: true,+ required: false,+ has_default: true,+ name_source: :filters,+ as: :filtersschema_with_allowed_collection :group_by,type: '[]QueryGroupBy',