Skip to content

Commit

Permalink
feat(APIv2): add tagging parameter to OpenAPI spec
Browse files Browse the repository at this point in the history
  • Loading branch information
romanblanco committed Sep 23, 2024
1 parent 04ecdf4 commit 5922162
Show file tree
Hide file tree
Showing 3 changed files with 4,623 additions and 4,586 deletions.
3 changes: 3 additions & 0 deletions spec/integration/v2/systems_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
description 'Lists Systems'
operationId 'Systems'
content_types
tags_params
pagination_params_v2
sort_params_v2(V2::System)
search_params_v2(V2::System, except: %i[never_reported])
Expand Down Expand Up @@ -148,6 +149,7 @@
description 'Lists Systems assigned to a Policy'
operationId 'PolicySystems'
content_types
tags_params
pagination_params_v2
sort_params_v2(V2::System, except: %i[os_major_version])
search_params_v2(
Expand Down Expand Up @@ -389,6 +391,7 @@
description 'Lists Systems assigned to a Report'
operationId 'ReportSystems'
content_types
tags_params
pagination_params_v2
sort_params_v2(V2::System, except: %i[os_major_version])
search_params_v2(V2::System, except: %i[os_major_version policies profile_ref_id assigned_or_scanned])
Expand Down
6 changes: 2 additions & 4 deletions spec/swagger_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -135,10 +135,8 @@ def search_params_v2(model = nil, except: [])

def tags_params
parameter name: :tags, in: :query, required: false,
description: 'A string or an array of tags to narrow down the results against. ' \
'The namespace, key and value are concatenated using `/` and `=` symbols. ' \
'In case the values contain symbols used for separators, `/` is replaced with `%2F`, ' \
'`=` is replaced with `%3D`.<br><br>' \
description: 'An array of tags to narrow down the search results. ' \
'In case the value contains symbols used for separators (`/` or `=`), they need to be encoded.<br>' \
'e.g.: `namespace/key=value`, `insights-client/selinux-config=SELINUX%3Denforcing`',
schema: { type: :array, items: { type: 'string' } }
end
Expand Down
Loading

0 comments on commit 5922162

Please sign in to comment.