Skip to content

feat(specs): add query param to filter list endpoint results #1245

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jan 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions specs/ingestion/common/authenticationParameters.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
type:
name: type
in: query
description: Which type the returned authentication should have. Can be a list of string separated with commas.
required: false
style: form
explode: false
schema:
type: array
items:
$ref: '#/authenticationTypeWithNone'
example: basic,oauth,none

platform:
name: platform
in: query
description: Which platform the returned authentication should have. Can be a list of string separated with commas.
required: false
style: form
explode: false
schema:
type: array
items:
$ref: './schemas/authentication.yml#/PlatformType'
example: commercetools,bigcommerce

authenticationTypeWithNone:
oneOf:
- $ref: './schemas/authentication.yml#/AuthenticationType'
- $ref: './schemas/authentication.yml#/AuthenticationNone'
24 changes: 24 additions & 0 deletions specs/ingestion/common/destinationParameters.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
type:
name: type
in: query
description: Which type the returned destination should have. Can be a list of string separated with commas.
required: false
style: form
explode: false
schema:
type: array
items:
$ref: './schemas/destination.yml#/DestinationType'
example: search,predict

authenticationID:
name: authenticationID
in: query
description: Which authenticationID the returned destination should have. Can be a list of string separated with commas.
required: false
style: form
explode: false
schema:
type: array
items:
type: string
4 changes: 4 additions & 0 deletions specs/ingestion/common/schemas/authentication.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,10 @@ AuthenticationType:
type: string
enum: ['googleServiceAccount', 'basic', 'apiKey', 'oauth', 'algolia']

AuthenticationNone:
type: string
enum: ['none']

PlatformType:
type: string
enum: ['bigcommerce', 'commercetools']
Expand Down
24 changes: 24 additions & 0 deletions specs/ingestion/common/sourceParameters.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
type:
name: type
in: query
description: Which type the returned source should have. Can be a list of string separated with commas.
required: false
style: form
explode: false
schema:
type: array
items:
$ref: './schemas/source.yml#/SourceType'
example: commercetools,bigcommerce

authenticationID:
name: authenticationID
in: query
description: Which authenticationID the returned source should have. Can be a list of string separated with commas.
required: false
style: form
explode: false
schema:
type: array
items:
type: string
2 changes: 2 additions & 0 deletions specs/ingestion/paths/authentications/authentications.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ get:
parameters:
- $ref: '../../common/parameters.yml#/itemsPerPage'
- $ref: '../../common/parameters.yml#/page'
- $ref: '../../common/authenticationParameters.yml#/type'
- $ref: '../../common/authenticationParameters.yml#/platform'
responses:
'200':
description: OK
Expand Down
2 changes: 2 additions & 0 deletions specs/ingestion/paths/destinations/destinations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ get:
parameters:
- $ref: '../../common/parameters.yml#/itemsPerPage'
- $ref: '../../common/parameters.yml#/page'
- $ref: '../../common/destinationParameters.yml#/type'
- $ref: '../../common/destinationParameters.yml#/authenticationID'
responses:
'200':
description: OK
Expand Down
2 changes: 2 additions & 0 deletions specs/ingestion/paths/sources/sources.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ get:
parameters:
- $ref: '../../common/parameters.yml#/itemsPerPage'
- $ref: '../../common/parameters.yml#/page'
- $ref: '../../common/sourceParameters.yml#/type'
- $ref: '../../common/sourceParameters.yml#/authenticationID'
responses:
'200':
description: OK
Expand Down