Skip to content

Commit

Permalink
feat(tasks): put task parameters in their own file
Browse files Browse the repository at this point in the history
  • Loading branch information
Fluf22 committed Jan 16, 2023
1 parent e01d660 commit 46fa260
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 50 deletions.
46 changes: 0 additions & 46 deletions specs/ingestion/common/parameters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,49 +67,3 @@ page:
required: false
schema:
type: integer

enabled:
name: enabled
in: query
description: If the return element should have is 'enabled' property set to true.
required: false
schema:
type: boolean

action:
name: action
in: query
description: Which action the return element should have. Can be a list of string separated with commas.
required: false
style: form
explode: false
schema:
type: array
items:
$ref: './schemas/task.yml#/ActionType'
example: save,replace

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

triggerType:
name: triggerType
in: query
description: Which trigger type the return element should have. Can be a list of string separated with commas.
required: false
style: form
explode: false
schema:
type: array
items:
$ref: './schemas/task.yml#/TriggerType'
example: on_demand,schedule
45 changes: 45 additions & 0 deletions specs/ingestion/common/taskParameters.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
enabled:
name: enabled
in: query
description: If the returned task should have its 'enabled' property set to true.
required: false
schema:
type: boolean

action:
name: action
in: query
description: Which action the returned task should have. Can be a list of string separated with commas.
required: false
style: form
explode: false
schema:
type: array
items:
$ref: './schemas/task.yml#/ActionType'
example: save,replace

destinationID:
name: destinationID
in: query
description: Which destinationID 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

triggerType:
name: triggerType
in: query
description: Which trigger type the returned task should have. Can be a list of string separated with commas.
required: false
style: form
explode: false
schema:
type: array
items:
$ref: './schemas/task.yml#/TriggerType'
example: on_demand,schedule
8 changes: 4 additions & 4 deletions specs/ingestion/paths/tasks/tasks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ get:
parameters:
- $ref: '../../common/parameters.yml#/itemsPerPage'
- $ref: '../../common/parameters.yml#/page'
- $ref: '../../common/parameters.yml#/action'
- $ref: '../../common/parameters.yml#/enabled'
- $ref: '../../common/parameters.yml#/destinationIDQueryParam'
- $ref: '../../common/parameters.yml#/triggerType'
- $ref: '../../common/taskParameters.yml#/action'
- $ref: '../../common/taskParameters.yml#/enabled'
- $ref: '../../common/taskParameters.yml#/destinationID'
- $ref: '../../common/taskParameters.yml#/triggerType'
responses:
'200':
description: OK
Expand Down

0 comments on commit 46fa260

Please sign in to comment.