Skip to content

Commit

Permalink
fix(specs): add query params for observability (#1277)
Browse files Browse the repository at this point in the history
  • Loading branch information
millotp authored Jan 31, 2023
1 parent 9f4ad8f commit 3739451
Show file tree
Hide file tree
Showing 8 changed files with 39 additions and 28 deletions.
33 changes: 33 additions & 0 deletions specs/ingestion/common/observabilityParameters.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
eventStatus:
name: status
in: query
description: Filter the status of the events.
schema:
type: array
items:
$ref: './schemas/event.yml#/EventStatus'

eventType:
name: type
in: query
description: Filter the type of the events.
schema:
type: array
items:
$ref: './schemas/event.yml#/EventType'

runStatus:
name: status
in: query
description: Filter the status of the runs.
schema:
type: array
items:
$ref: './schemas/run.yml#/RunStatus'

taskID:
name: taskID
in: query
description: Filter by taskID.
schema:
type: string
2 changes: 1 addition & 1 deletion specs/ingestion/common/schemas/event.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ EventStatus:

EventType:
type: string
enum: ['fetch', 'record', 'internal']
enum: ['fetch', 'record', 'log']
2 changes: 1 addition & 1 deletion specs/ingestion/common/schemas/run.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ Run:

RunStatus:
type: string
enum: ['created', 'started', 'finished']
enum: ['created', 'started', 'idled', 'finished']

RunOutcome:
type: string
Expand Down
2 changes: 0 additions & 2 deletions specs/ingestion/common/schemas/source.yml
Original file line number Diff line number Diff line change
Expand Up @@ -180,9 +180,7 @@ SourceUpdateJson:
required:
- url


SourceUpdateInput:
oneOf:
- $ref: '#/SourceUpdateCommercetools'
- $ref: '#/SourceUpdateJson'

5 changes: 2 additions & 3 deletions specs/ingestion/paths/runs/events/events.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ get:
- $ref: '../../../common/parameters.yml#/runID'
- $ref: '../../../common/parameters.yml#/itemsPerPage'
- $ref: '../../../common/parameters.yml#/page'
- $ref: '../../../common/observabilityParameters.yml#/eventStatus'
- $ref: '../../../common/observabilityParameters.yml#/eventType'
responses:
'200':
description: OK
Expand All @@ -22,10 +24,7 @@ get:
type: array
items:
$ref: '../../../common/schemas/event.yml#/Event'
pagination:
$ref: '../../../common/schemas/pagination.yml#/Pagination'
required:
- events
- pagination
'400':
$ref: '../../../../common/responses/BadRequest.yml'
2 changes: 2 additions & 0 deletions specs/ingestion/paths/runs/runs.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/observabilityParameters.yml#/runStatus'
- $ref: '../../common/observabilityParameters.yml#/taskID'
responses:
'200':
description: OK
Expand Down
19 changes: 0 additions & 19 deletions specs/ingestion/paths/runs/tasks/taskID.yml

This file was deleted.

2 changes: 0 additions & 2 deletions specs/ingestion/spec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,5 +83,3 @@ paths:
$ref: 'paths/runs/events/events.yml'
/1/runs/{runID}/events/{eventID}:
$ref: 'paths/runs/events/eventID.yml'
/1/runs/tasks/{taskID}:
$ref: 'paths/runs/tasks/taskID.yml'

0 comments on commit 3739451

Please sign in to comment.