Skip to content

Commit

Permalink
fix(APIv2): RHINENG-13402 enable multidimensional sort in OpenAPI spec
Browse files Browse the repository at this point in the history
  • Loading branch information
romanblanco committed Oct 3, 2024
1 parent dd087f0 commit c8cd0ef
Show file tree
Hide file tree
Showing 3 changed files with 5,096 additions and 4,622 deletions.
9 changes: 9 additions & 0 deletions spec/integration/v2/systems_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,15 @@
run_test!
end

response '200', 'Lists Systems' do
let('sort_by[]') { %i[os_major_version os_minor_version] }
v2_collection_schema 'system'

after { |e| autogenerate_examples(e, 'List of Systems sorted by "os_major_version:asc and os_minor_version:asc"') }

run_test!
end

response '200', 'Lists Systems' do
let(:filter) { '(os_major_version=8)' }
v2_collection_schema 'system'
Expand Down
2 changes: 1 addition & 1 deletion spec/swagger_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ def sort_params(model = nil)
end

def sort_params_v2(model = nil, except: [])
parameter name: :sort_by, in: :query, required: false,
parameter name: :sort_by, in: :query, required: false, style: :form, explode: true,
description: 'Attribute and direction to sort the items by. ' \
'Represented by an array of fields with an optional direction ' \
'(`<key>:asc` or `<key>:desc`).<br><br>' \
Expand Down
Loading

0 comments on commit c8cd0ef

Please sign in to comment.