Skip to content
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
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ public class AlgoliaSwiftGenerator extends Swift5ClientCodegen {
"edit",
"edittype",
"errorbase",
"event",
"eventstatus",
"eventtype",
"exactonsinglewordquery",
"exhaustive",
Expand Down Expand Up @@ -120,6 +122,7 @@ public class AlgoliaSwiftGenerator extends Swift5ClientCodegen {
"typotolerance",
"typotoleranceenum",
"value",
"watchresponse",
"widgets"
);

Expand Down
29 changes: 29 additions & 0 deletions specs/common/parameters/ingestion.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
RunID:
type: string
# format: uuid
description: Universally unique identifier (UUID) of a task run.
example: 6c02aeb1-775e-418e-870b-1faccd4b2c0f

EventID:
type: string
# format: uuid
description: Universally unique identifier (UUID) of an event.
example: 6c02aeb1-775e-418e-870b-1faccd4b2c0f

CreatedAt:
type: string
description: Date of creation in RFC 3339 format.

PublishedAt:
type: string
description: Date of publish RFC 3339 format.

EventStatus:
oneOf:
- type: string
enum: [created, started, retried, failed, succeeded, critical]
- type: 'null'

EventType:
type: string
enum: [fetch, record, log, transform]
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ Event:
additionalProperties: false
properties:
eventID:
$ref: './common.yml#/eventID'
$ref: '../../parameters/ingestion.yml#/EventID'
runID:
$ref: './common.yml#/runID'
$ref: '../../parameters/ingestion.yml#/RunID'
status:
$ref: '#/EventStatus'
$ref: '../../parameters/ingestion.yml#/EventStatus'
type:
$ref: '#/EventType'
$ref: '../../parameters/ingestion.yml#/EventType'
batchSize:
type: integer
description: The extracted record batch size.
Expand All @@ -23,21 +23,11 @@ Event:
additionalProperties: true
- type: 'null'
publishedAt:
$ref: './common.yml#/publishedAt'
$ref: '../../parameters/ingestion.yml#/PublishedAt'
required:
- eventID
- runID
- status
- type
- batchSize
- publishedAt

EventStatus:
oneOf:
- type: string
enum: [created, started, retried, failed, succeeded, critical]
- type: 'null'

EventType:
type: string
enum: [fetch, record, log, transform]
26 changes: 26 additions & 0 deletions specs/common/schemas/ingestion/WatchResponse.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
type: object
additionalProperties: false
properties:
runID:
$ref: '../../parameters/ingestion.yml#/RunID'
eventID:
$ref: '../../parameters/ingestion.yml#/EventID'
data:
type: array
description: |
This field is always null when used with the Push endpoint.
When used for a source discover or source validate run, it will include the sampled data of the source.
items:
type: object
events:
description: in case of error, observability events will be added to the response.
type: array
items:
$ref: './Observability.yml#/Event'
message:
description: a message describing the outcome of the operation that has been ran (push, discover or validate) run.
type: string
createdAt:
$ref: '../../parameters/ingestion.yml#/CreatedAt'
required:
- runID
4 changes: 2 additions & 2 deletions specs/ingestion/common/observabilityParameters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ eventStatus:
schema:
type: array
items:
$ref: './schemas/event.yml#/EventStatus'
$ref: '../../common/parameters/ingestion.yml#/EventStatus'

eventType:
name: type
Expand All @@ -14,7 +14,7 @@ eventType:
schema:
type: array
items:
$ref: './schemas/event.yml#/EventType'
$ref: '../../common/parameters/ingestion.yml#/EventType'

runStatus:
name: status
Expand Down
4 changes: 2 additions & 2 deletions specs/ingestion/common/parameters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,15 @@ pathRunID:
required: true
description: Unique identifier of a task run.
schema:
$ref: './schemas/common.yml#/runID'
$ref: '../../common/parameters/ingestion.yml#/RunID'

pathEventID:
name: eventID
in: path
required: true
description: Unique identifier of an event.
schema:
$ref: './schemas/common.yml#/eventID'
$ref: '../../common/parameters/ingestion.yml#/EventID'

itemsPerPage:
name: itemsPerPage
Expand Down
4 changes: 2 additions & 2 deletions specs/ingestion/common/schemas/authentication.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Authentication:
input:
$ref: '#/AuthInputPartial'
createdAt:
$ref: './common.yml#/createdAt'
$ref: '../../../common/parameters/ingestion.yml#/CreatedAt'
updatedAt:
$ref: './common.yml#/updatedAt'
required:
Expand Down Expand Up @@ -55,7 +55,7 @@ AuthenticationCreateResponse:
name:
$ref: './common.yml#/name'
createdAt:
$ref: './common.yml#/createdAt'
$ref: '../../../common/parameters/ingestion.yml#/CreatedAt'
required:
- authenticationID
- name
Expand Down
46 changes: 0 additions & 46 deletions specs/ingestion/common/schemas/common.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
createdAt:
type: string
description: Date of creation in RFC 3339 format.

updatedAt:
type: string
description: Date of last update in RFC 3339 format.
Expand All @@ -14,10 +10,6 @@ finishedAt:
type: string
description: Date of finish in RFC 3339 format.

publishedAt:
type: string
description: Date of publish RFC 3339 format.

cursor:
type: string
description: Date of the last cursor in RFC 3339 format.
Expand Down Expand Up @@ -66,18 +58,6 @@ transformationID:
description: Universally unique identifier (UUID) of a transformation.
example: 6c02aeb1-775e-418e-870b-1faccd4b2c0f

runID:
type: string
# format: uuid
description: Universally unique identifier (UUID) of a task run.
example: 6c02aeb1-775e-418e-870b-1faccd4b2c0f

eventID:
type: string
# format: uuid
description: Universally unique identifier (UUID) of an event.
example: 6c02aeb1-775e-418e-870b-1faccd4b2c0f

name:
type: string
description: Descriptive name for the resource.
Expand All @@ -102,29 +82,3 @@ Window:
required:
- startDate
- endDate

WatchResponse:
type: object
additionalProperties: false
properties:
runID:
$ref: '#/runID'
eventID:
$ref: '#/eventID'
data:
type: array
description: when used with discovering or validating sources, the sampled data of your source is returned.
items:
type: object
events:
description: in case of error, observability events will be added to the response, if any.
type: array
items:
$ref: '../../common/schemas/event.yml#/Event'
message:
description: a message describing the outcome of a validate run.
type: string
createdAt:
$ref: '#/createdAt'
required:
- runID
4 changes: 2 additions & 2 deletions specs/ingestion/common/schemas/destination.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Destination:
input:
$ref: '#/DestinationInput'
createdAt:
$ref: './common.yml#/createdAt'
$ref: '../../../common/parameters/ingestion.yml#/CreatedAt'
updatedAt:
$ref: './common.yml#/updatedAt'
authenticationID:
Expand Down Expand Up @@ -59,7 +59,7 @@ DestinationCreateResponse:
name:
$ref: './common.yml#/name'
createdAt:
$ref: './common.yml#/createdAt'
$ref: '../../../common/parameters/ingestion.yml#/CreatedAt'
required:
- destinationID
- name
Expand Down
8 changes: 4 additions & 4 deletions specs/ingestion/common/schemas/run.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ RunResponse:
description: API response for running a task.
properties:
runID:
$ref: './common.yml#/runID'
$ref: '../../../common/parameters/ingestion.yml#/RunID'
createdAt:
$ref: './common.yml#/createdAt'
$ref: '../../../common/parameters/ingestion.yml#/CreatedAt'
required:
- runID
- createdAt
Expand All @@ -33,7 +33,7 @@ Run:
additionalProperties: false
properties:
runID:
$ref: './common.yml#/runID'
$ref: '../../../common/parameters/ingestion.yml#/RunID'
appID:
type: string
taskID:
Expand Down Expand Up @@ -64,7 +64,7 @@ Run:
type:
$ref: '#/RunType'
createdAt:
$ref: './common.yml#/createdAt'
$ref: '../../../common/parameters/ingestion.yml#/CreatedAt'
startedAt:
$ref: './common.yml#/startedAt'
finishedAt:
Expand Down
4 changes: 2 additions & 2 deletions specs/ingestion/common/schemas/source.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Source:
authenticationID:
$ref: './common.yml#/authenticationID'
createdAt:
$ref: './common.yml#/createdAt'
$ref: '../../../common/parameters/ingestion.yml#/CreatedAt'
updatedAt:
$ref: './common.yml#/updatedAt'
required:
Expand Down Expand Up @@ -52,7 +52,7 @@ SourceCreateResponse:
type: string
description: Descriptive name of the source.
createdAt:
$ref: './common.yml#/createdAt'
$ref: '../../../common/parameters/ingestion.yml#/CreatedAt'
required:
- sourceID
- name
Expand Down
6 changes: 3 additions & 3 deletions specs/ingestion/common/schemas/task.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Task:
policies:
$ref: '#/Policies'
createdAt:
$ref: './common.yml#/createdAt'
$ref: '../../../common/parameters/ingestion.yml#/CreatedAt'
updatedAt:
$ref: './common.yml#/updatedAt'
required:
Expand Down Expand Up @@ -77,7 +77,7 @@ TaskV1:
policies:
$ref: '#/Policies'
createdAt:
$ref: './common.yml#/createdAt'
$ref: '../../../common/parameters/ingestion.yml#/CreatedAt'
updatedAt:
$ref: './common.yml#/updatedAt'
required:
Expand Down Expand Up @@ -174,7 +174,7 @@ TaskCreateResponse:
taskID:
$ref: './common.yml#/taskID'
createdAt:
$ref: './common.yml#/createdAt'
$ref: '../../../common/parameters/ingestion.yml#/CreatedAt'
required:
- taskID
- createdAt
Expand Down
4 changes: 2 additions & 2 deletions specs/ingestion/common/schemas/transformation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Transformation:
owner:
$ref: './common.yml#/owner'
createdAt:
$ref: './common.yml#/createdAt'
$ref: '../../../common/parameters/ingestion.yml#/CreatedAt'
updatedAt:
$ref: './common.yml#/updatedAt'
required:
Expand Down Expand Up @@ -118,7 +118,7 @@ TransformationCreateResponse:
transformationID:
$ref: './common.yml#/transformationID'
createdAt:
$ref: './common.yml#/createdAt'
$ref: '../../../common/parameters/ingestion.yml#/CreatedAt'
required:
- transformationID
- createdAt
Expand Down
2 changes: 1 addition & 1 deletion specs/ingestion/paths/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,6 @@ post:
content:
application/json:
schema:
$ref: '../common/schemas/common.yml#/WatchResponse'
$ref: '../../common/schemas/ingestion/WatchResponse.yml'
'400':
$ref: '../../common/responses/BadRequest.yml'
2 changes: 1 addition & 1 deletion specs/ingestion/paths/runs/events/eventID.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ get:
content:
application/json:
schema:
$ref: '../../../common/schemas/event.yml#/Event'
$ref: '../../../../common/schemas/ingestion/Observability.yml#/Event'
'400':
$ref: '../../../../common/responses/BadRequest.yml'
2 changes: 1 addition & 1 deletion specs/ingestion/paths/runs/events/events.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ get:
events:
type: array
items:
$ref: '../../../common/schemas/event.yml#/Event'
$ref: '../../../../common/schemas/ingestion/Observability.yml#/Event'
pagination:
$ref: '../../../common/schemas/pagination.yml#/Pagination'
window:
Expand Down
2 changes: 1 addition & 1 deletion specs/ingestion/paths/sources/discover.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ post:
content:
application/json:
schema:
$ref: '../../common/schemas/common.yml#/WatchResponse'
$ref: '../../../common/schemas/ingestion/WatchResponse.yml'
'400':
$ref: '../../../common/responses/BadRequest.yml'
2 changes: 1 addition & 1 deletion specs/ingestion/paths/sources/runSource.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ post:
additionalProperties:
type: string
createdAt:
$ref: '../../common/schemas/common.yml#/createdAt'
$ref: '../../../common/parameters/ingestion.yml#/CreatedAt'
required:
- taskWithRunID
- createdAt
Expand Down
2 changes: 1 addition & 1 deletion specs/ingestion/paths/sources/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@ post:
content:
application/json:
schema:
$ref: '../../common/schemas/common.yml#/WatchResponse'
$ref: '../../../common/schemas/ingestion/WatchResponse.yml'
'400':
$ref: '../../../common/responses/BadRequest.yml'
Loading