[chore] excluded filters section

- added section to exclude filters from schema dependeny collection
pull/10240/head
Eric Schubert 3 years ago
parent 1a862d470f
commit 354e0e317e
No known key found for this signature in database
GPG Key ID: 1D346C019BD4BAA2
  1. 14
      lib/api/v3/queries/schemas/query_schema_representer.rb

@ -265,10 +265,9 @@ module API
end
def filters_schemas
# TODO: The RelatableFilter is not supported by the schema dependencies yet
filters = represented
.available_filters
.reject { |f| f.is_a?(::Queries::WorkPackages::Filter::RelatableFilter) }
.available_filters
.select { |f| excluded_filters.none? { |excluded| f.is_a?(excluded) } }
QueryFilterInstanceSchemaCollectionRepresenter.new(filters,
self_link: filter_instance_schemas_href,
@ -283,6 +282,15 @@ module API
api_v3_paths.query_filter_instance_schemas
end
end
private
def excluded_filters
# TODO: The RelatableFilter is not supported by the schema dependencies yet
[
::Queries::WorkPackages::Filter::RelatableFilter
]
end
end
end
end

Loading…
Cancel
Save