Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API spec v0.2.0 #479

Closed
wants to merge 6 commits into from
Closed
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
143 changes: 118 additions & 25 deletions airbyte-api/src/main/openapi/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,48 @@ paths:
description: Workspace not found
"422":
$ref: "#/components/responses/InvalidInput"
/v1/sources/create:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is calling this?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just to make sure we are fully aligned on the terminology:

does it mean we will call source-connector: source?
does it mean we will call destination-connector: destination?

Challenging it: why don't we call it connector (with an enum type to distinguish between source and destination)?

post:
tags:
- source
summary: Creates a source
operationId: createSource
requestBody:
content:
application/json:
schema:
$ref: "#/components/schemas/SourceCreate"
responses:
"200":
description: Successful operation
content:
application/json:
schema:
$ref: "#/components/schemas/SourceRead"
"422":
$ref: "#/components/responses/InvalidInput"
/v1/sources/update:
post:
tags:
- source
summary: Update a source
operationId: updateSource
requestBody:
content:
application/json:
schema:
$ref: "#/components/schemas/SourceUpdate"
responses:
"200":
description: Successful operation
content:
application/json:
schema:
$ref: "#/components/schemas/SourceRead"
"404":
description: Source not found
"422":
$ref: "#/components/responses/InvalidInput"
/v1/sources/list:
post:
tags:
Expand Down Expand Up @@ -178,7 +220,7 @@ paths:
schema:
$ref: "#/components/schemas/SourceSpecificationRead"
"404":
description: Source Specification not found
description: Source not found
"422":
$ref: "#/components/responses/InvalidInput"
/v1/source_implementations/create:
Expand Down Expand Up @@ -337,6 +379,29 @@ paths:
description: Source Implementation not found
"422":
$ref: "#/components/responses/InvalidInput"
/v1/destinations/update:
post:
tags:
- destination
summary: Update destination
operationId: updateDestination
requestBody:
content:
application/json:
schema:
$ref: "#/components/schemas/DestinationUpdate"
required: true
responses:
"200":
description: Successful operation
content:
application/json:
schema:
$ref: "#/components/schemas/DestinationRead"
"404":
description: Destination not found
"422":
$ref: "#/components/responses/InvalidInput"
/v1/destinations/list:
post:
tags:
Expand Down Expand Up @@ -875,16 +940,46 @@ components:
properties:
sourceId:
$ref: "#/components/schemas/SourceId"
SourceCreate:
type: object
required:
- name
- defaultDockerRepository
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is it called default?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

future-proofing to allow specific connector instances to diverge from the global default version

- defaultDockerImageVersion
properties:
name:
type: string
defaultDockerRepository:
type: string
defaultDockerImageVersion:
type: string
SourceUpdate:
type: object
description: Update the source. Currently, the only allowed attribute to update is the default docker image version.
required:
- sourceId
- defaultDockerImageVersion
properties:
sourceId:
$ref: "#/components/schemas/SourceId"
defaultDockerImageVersion:
type: string
SourceRead:
type: object
required:
- sourceId
- name
- defaultDockerRepository
- defaultDockerImageVersion
properties:
sourceId:
$ref: "#/components/schemas/SourceId"
name:
type: string
defaultDockerRepository:
type: string
defaultDockerImageVersion:
type: string
SourceReadList:
type: object
required:
Expand All @@ -895,21 +990,15 @@ components:
items:
$ref: "#/components/schemas/SourceRead"
# SOURCE SPECIFICATION
SourceSpecificationId:
type: string
format: uuid
SourceSpecification:
description: The specification for what values are required to configure the source.
example: { user: { type: string } }
SourceSpecificationRead:
Copy link
Contributor

@cgardens cgardens Oct 2, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will the specification now read from the spec method on each docker image?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is the idea, but it doesn't have to happen in strict lockstep with this change.

type: object
required:
- sourceSpecificationId
- sourceId
- specification
properties:
sourceSpecificationId:
$ref: "#/components/schemas/SourceSpecificationId"
sourceId:
$ref: "#/components/schemas/SourceId"
documentationUrl:
Expand All @@ -934,14 +1023,14 @@ components:
type: object
required:
- workspaceId
- sourceSpecificationId
- sourceId
- connectionConfiguration
- name
properties:
workspaceId:
$ref: "#/components/schemas/WorkspaceId"
sourceSpecificationId:
$ref: "#/components/schemas/SourceSpecificationId"
sourceId:
$ref: "#/components/schemas/SourceId"
connectionConfiguration:
$ref: "#/components/schemas/SourceConfiguration"
name:
Expand All @@ -965,7 +1054,6 @@ components:
- sourceId
- sourceImplementationId
- workspaceId
- sourceSpecificationId
- connectionConfiguration
- name
- sourceName
Expand All @@ -976,8 +1064,6 @@ components:
$ref: "#/components/schemas/SourceImplementationId"
workspaceId:
$ref: "#/components/schemas/WorkspaceId"
sourceSpecificationId:
$ref: "#/components/schemas/SourceSpecificationId"
connectionConfiguration:
$ref: "#/components/schemas/SourceConfiguration"
name:
Expand Down Expand Up @@ -1011,16 +1097,32 @@ components:
properties:
destinationId:
$ref: "#/components/schemas/DestinationId"
DestinationUpdate:
type: object
required:
- destinationId
- destinationImageVersion
properties:
destinationId:
$ref: "#/components/schemas/DestinationId"
defaultDockerImageVersion:
type: string
DestinationRead:
type: object
required:
- destinationId
- name
- defaultDockerRepository
- defaultDockerImageVersion
properties:
destinationId:
$ref: "#/components/schemas/DestinationId"
name:
type: string
defaultDockerRepository:
type: string
defaultDockerImageVersion:
type: string
DestinationReadList:
type: object
required:
Expand All @@ -1031,21 +1133,15 @@ components:
items:
$ref: "#/components/schemas/DestinationRead"
# DESTINATION SPECIFICATION
DestinationSpecificationId:
type: string
format: uuid
DestinationSpecification:
description: The specification for what values are required to configure the destination.
example: { user: { type: string } }
DestinationSpecificationRead:
type: object
required:
- destinationSpecificationId
- destinationId
- specification
properties:
destinationSpecificationId:
$ref: "#/components/schemas/DestinationSpecificationId"
destinationId:
$ref: "#/components/schemas/DestinationId"
documentationUrl:
Expand All @@ -1070,13 +1166,13 @@ components:
type: object
required:
- workspaceId
- destinationSpecificationId
- destinationId
- connectionConfiguration
properties:
workspaceId:
$ref: "#/components/schemas/WorkspaceId"
destinationSpecificationId:
$ref: "#/components/schemas/DestinationSpecificationId"
destinationId:
$ref: "#/components/schemas/DestinationId"
connectionConfiguration:
$ref: "#/components/schemas/DestinationConfiguration"
name:
Expand All @@ -1100,7 +1196,6 @@ components:
- destinationId
- destinationImplementationId
- workspaceId
- destinationSpecificationId
- connectionConfiguration
- name
- destinationName
Expand All @@ -1111,8 +1206,6 @@ components:
$ref: "#/components/schemas/DestinationImplementationId"
workspaceId:
$ref: "#/components/schemas/WorkspaceId"
destinationSpecificationId:
$ref: "#/components/schemas/DestinationSpecificationId"
connectionConfiguration:
$ref: "#/components/schemas/DestinationConfiguration"
name:
Expand Down