-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Remove source/destination spec IDs and replace with source/destinationIds in the backend #528
Changes from all commits
48b2d4c
46151b7
1e0aa2c
dfd7319
919bd32
578f083
8eaa61b
ca1a3cd
efda129
8b561f9
e934bc1
61bacdd
5993d4f
b6e0f13
371962f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -121,6 +121,48 @@ paths: | |
description: Workspace not found | ||
"422": | ||
$ref: "#/components/responses/InvalidInput" | ||
/v1/sources/create: | ||
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: | ||
|
@@ -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: | ||
|
@@ -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: | ||
|
@@ -875,16 +940,53 @@ components: | |
properties: | ||
sourceId: | ||
$ref: "#/components/schemas/SourceId" | ||
SourceCreate: | ||
type: object | ||
required: | ||
- name | ||
- dockerRepository | ||
- dockerImageTag | ||
- documentationUrl | ||
properties: | ||
name: | ||
type: string | ||
dockerRepository: | ||
type: string | ||
dockerImageTag: | ||
type: string | ||
documentationUrl: | ||
type: string | ||
format: uri | ||
SourceUpdate: | ||
type: object | ||
description: Update the source. Currently, the only allowed attribute to update is the default docker image version. | ||
required: | ||
- sourceId | ||
- dockerImageTag | ||
properties: | ||
sourceId: | ||
$ref: "#/components/schemas/SourceId" | ||
dockerImageTag: | ||
type: string | ||
SourceRead: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. SourceDefinitionRead |
||
type: object | ||
required: | ||
- sourceId | ||
- name | ||
- dockerRepository | ||
- dockerImageTag | ||
properties: | ||
sourceId: | ||
$ref: "#/components/schemas/SourceId" | ||
name: | ||
type: string | ||
dockerRepository: | ||
type: string | ||
dockerImageTag: | ||
type: string | ||
documentationUrl: | ||
type: string | ||
format: uri | ||
SourceReadList: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. SourceDefinitionList |
||
type: object | ||
required: | ||
|
@@ -895,21 +997,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: | ||
type: object | ||
required: | ||
- sourceSpecificationId | ||
- sourceId | ||
- specification | ||
- connectionSpecification | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. the naming is confusing here and it introduces a new term |
||
properties: | ||
sourceSpecificationId: | ||
$ref: "#/components/schemas/SourceSpecificationId" | ||
sourceId: | ||
$ref: "#/components/schemas/SourceId" | ||
documentationUrl: | ||
|
@@ -934,14 +1030,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: | ||
|
@@ -965,7 +1061,6 @@ components: | |
- sourceId | ||
- sourceImplementationId | ||
- workspaceId | ||
- sourceSpecificationId | ||
- connectionConfiguration | ||
- name | ||
- sourceName | ||
|
@@ -976,8 +1071,6 @@ components: | |
$ref: "#/components/schemas/SourceImplementationId" | ||
workspaceId: | ||
$ref: "#/components/schemas/WorkspaceId" | ||
sourceSpecificationId: | ||
$ref: "#/components/schemas/SourceSpecificationId" | ||
connectionConfiguration: | ||
$ref: "#/components/schemas/SourceConfiguration" | ||
name: | ||
|
@@ -1011,16 +1104,36 @@ components: | |
properties: | ||
destinationId: | ||
$ref: "#/components/schemas/DestinationId" | ||
DestinationUpdate: | ||
type: object | ||
required: | ||
- destinationId | ||
- destinationImageVersion | ||
properties: | ||
destinationId: | ||
$ref: "#/components/schemas/DestinationId" | ||
dockerImageTag: | ||
type: string | ||
DestinationRead: | ||
type: object | ||
required: | ||
- destinationId | ||
- name | ||
- dockerRepository | ||
- dockerImageTag | ||
- documentationUrl | ||
properties: | ||
destinationId: | ||
$ref: "#/components/schemas/DestinationId" | ||
name: | ||
type: string | ||
dockerRepository: | ||
type: string | ||
dockerImageTag: | ||
type: string | ||
documentationUrl: | ||
type: string | ||
format: uri | ||
DestinationReadList: | ||
type: object | ||
required: | ||
|
@@ -1031,21 +1144,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 | ||
- connectionSpecification | ||
properties: | ||
destinationSpecificationId: | ||
$ref: "#/components/schemas/DestinationSpecificationId" | ||
destinationId: | ||
$ref: "#/components/schemas/DestinationId" | ||
documentationUrl: | ||
|
@@ -1070,13 +1177,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: | ||
|
@@ -1100,7 +1207,6 @@ components: | |
- destinationId | ||
- destinationImplementationId | ||
- workspaceId | ||
- destinationSpecificationId | ||
- connectionConfiguration | ||
- name | ||
- destinationName | ||
|
@@ -1111,8 +1217,6 @@ components: | |
$ref: "#/components/schemas/DestinationImplementationId" | ||
workspaceId: | ||
$ref: "#/components/schemas/WorkspaceId" | ||
destinationSpecificationId: | ||
$ref: "#/components/schemas/DestinationSpecificationId" | ||
connectionConfiguration: | ||
$ref: "#/components/schemas/DestinationConfiguration" | ||
name: | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/* | ||
* MIT License | ||
* | ||
* Copyright (c) 2020 Airbyte | ||
* | ||
* Permission is hereby granted, free of charge, to any person obtaining a copy | ||
* of this software and associated documentation files (the "Software"), to deal | ||
* in the Software without restriction, including without limitation the rights | ||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
* copies of the Software, and to permit persons to whom the Software is | ||
* furnished to do so, subject to the following conditions: | ||
* | ||
* The above copyright notice and this permission notice shall be included in all | ||
* copies or substantial portions of the Software. | ||
* | ||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
* SOFTWARE. | ||
*/ | ||
|
||
package io.airbyte.commons.docker; | ||
|
||
public class DockerUtils { | ||
|
||
public static String getTaggedImageName(String dockerRepository, String tag) { | ||
return String.join(":", dockerRepository, tag); | ||
} | ||
|
||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't that be called SourceDefinitionCreate based on https://airbytehq.slack.com/archives/C019WEENQRM/p1601672342057100