Skip to content

Commit a60e679

Browse files
Fluf22millotp
andauthored
feat(specs): add sourceID query param to task list endpoint (#1250)
Co-authored-by: Pierre Millot <[email protected]>
1 parent 6916fb9 commit a60e679

File tree

5 files changed

+28
-12
lines changed

5 files changed

+28
-12
lines changed

specs/ingestion/common/authenticationParameters.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ type:
88
schema:
99
type: array
1010
items:
11-
$ref: '#/authenticationTypeWithNone'
12-
example: basic,oauth,none
11+
$ref: './schemas/authentication.yml#/AuthenticationType'
12+
example: basic,oauth
1313

1414
platform:
1515
name: platform
@@ -21,10 +21,10 @@ platform:
2121
schema:
2222
type: array
2323
items:
24-
$ref: './schemas/authentication.yml#/Platform'
25-
example: commercetools,bigcommerce
24+
$ref: '#/platformWithNone'
25+
example: commercetools,none
2626

27-
authenticationTypeWithNone:
27+
platformWithNone:
2828
oneOf:
29-
- $ref: './schemas/authentication.yml#/AuthenticationType'
30-
- $ref: './schemas/authentication.yml#/AuthenticationNone'
29+
- $ref: './schemas/authentication.yml#/Platform'
30+
- $ref: './schemas/authentication.yml#/PlatformNone'

specs/ingestion/common/schemas/authentication.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,14 +97,14 @@ AuthenticationType:
9797
type: string
9898
enum: ['googleServiceAccount', 'basic', 'apiKey', 'oauth', 'algolia']
9999

100-
AuthenticationNone:
101-
type: string
102-
enum: ['none']
103-
104100
Platform:
105101
type: string
106102
enum: ['bigcommerce', 'commercetools']
107103

104+
PlatformNone:
105+
type: string
106+
enum: ['none']
107+
108108
AuthGoogleServiceAccount:
109109
type: object
110110
additionalProperties: false

specs/ingestion/common/sourceParameters.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,14 @@ type:
1414
authenticationID:
1515
name: authenticationID
1616
in: query
17-
description: Which authenticationID the returned source should have. Can be a list of string separated with commas.
17+
description: >-
18+
Which authenticationID the returned source should have. Can be a list of string separated with commas.
19+
Also supports 'none' as a value to return sources that don't have any authentication.
1820
required: false
1921
style: form
2022
explode: false
2123
schema:
2224
type: array
2325
items:
2426
type: string
27+
example: 10000000-0a75-4000-a000-000000000001,none

specs/ingestion/common/taskParameters.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,18 @@ action:
1919
$ref: './schemas/task.yml#/ActionType'
2020
example: save,replace
2121

22+
sourceID:
23+
name: sourceID
24+
in: query
25+
description: Which sourceID the returned task should have. Can be a list of string separated with commas.
26+
required: false
27+
style: form
28+
explode: false
29+
schema:
30+
type: array
31+
items:
32+
type: string
33+
2234
destinationID:
2335
name: destinationID
2436
in: query

specs/ingestion/paths/tasks/tasks.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ get:
99
- $ref: '../../common/parameters.yml#/page'
1010
- $ref: '../../common/taskParameters.yml#/action'
1111
- $ref: '../../common/taskParameters.yml#/enabled'
12+
- $ref: '../../common/taskParameters.yml#/sourceID'
1213
- $ref: '../../common/taskParameters.yml#/destinationID'
1314
- $ref: '../../common/taskParameters.yml#/triggerType'
1415
responses:

0 commit comments

Comments
 (0)