Skip to content

Commit

Permalink
feat(specs): add sourceID query param to task list endpoint (#1250)
Browse files Browse the repository at this point in the history
Co-authored-by: Pierre Millot <pierre.millot@algolia.com>
  • Loading branch information
Fluf22 and millotp authored Jan 26, 2023
1 parent 6916fb9 commit a60e679
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 12 deletions.
14 changes: 7 additions & 7 deletions specs/ingestion/common/authenticationParameters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ type:
schema:
type: array
items:
$ref: '#/authenticationTypeWithNone'
example: basic,oauth,none
$ref: './schemas/authentication.yml#/AuthenticationType'
example: basic,oauth

platform:
name: platform
Expand All @@ -21,10 +21,10 @@ platform:
schema:
type: array
items:
$ref: './schemas/authentication.yml#/Platform'
example: commercetools,bigcommerce
$ref: '#/platformWithNone'
example: commercetools,none

authenticationTypeWithNone:
platformWithNone:
oneOf:
- $ref: './schemas/authentication.yml#/AuthenticationType'
- $ref: './schemas/authentication.yml#/AuthenticationNone'
- $ref: './schemas/authentication.yml#/Platform'
- $ref: './schemas/authentication.yml#/PlatformNone'
8 changes: 4 additions & 4 deletions specs/ingestion/common/schemas/authentication.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,14 +97,14 @@ AuthenticationType:
type: string
enum: ['googleServiceAccount', 'basic', 'apiKey', 'oauth', 'algolia']

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

Platform:
type: string
enum: ['bigcommerce', 'commercetools']

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

AuthGoogleServiceAccount:
type: object
additionalProperties: false
Expand Down
5 changes: 4 additions & 1 deletion specs/ingestion/common/sourceParameters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,14 @@ type:
authenticationID:
name: authenticationID
in: query
description: Which authenticationID the returned source should have. Can be a list of string separated with commas.
description: >-
Which authenticationID the returned source should have. Can be a list of string separated with commas.
Also supports 'none' as a value to return sources that don't have any authentication.
required: false
style: form
explode: false
schema:
type: array
items:
type: string
example: 10000000-0a75-4000-a000-000000000001,none
12 changes: 12 additions & 0 deletions specs/ingestion/common/taskParameters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,18 @@ action:
$ref: './schemas/task.yml#/ActionType'
example: save,replace

sourceID:
name: sourceID
in: query
description: Which sourceID the returned task should have. Can be a list of string separated with commas.
required: false
style: form
explode: false
schema:
type: array
items:
type: string

destinationID:
name: destinationID
in: query
Expand Down
1 change: 1 addition & 0 deletions specs/ingestion/paths/tasks/tasks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ get:
- $ref: '../../common/parameters.yml#/page'
- $ref: '../../common/taskParameters.yml#/action'
- $ref: '../../common/taskParameters.yml#/enabled'
- $ref: '../../common/taskParameters.yml#/sourceID'
- $ref: '../../common/taskParameters.yml#/destinationID'
- $ref: '../../common/taskParameters.yml#/triggerType'
responses:
Expand Down

0 comments on commit a60e679

Please sign in to comment.