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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(specs): allow partial input update for authentications #1856

Merged
merged 1 commit into from
Aug 1, 2023
Merged
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
69 changes: 67 additions & 2 deletions specs/ingestion/common/schemas/authentication.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ AuthenticationCreateResponse:

AuthenticationUpdate:
type: object
description: Payload to partialy update an Authentication.
description: Payload to partially update an Authentication.
additionalProperties: false
properties:
type:
Expand All @@ -70,7 +70,7 @@ AuthenticationUpdate:
platform:
$ref: '#/Platform'
input:
$ref: '#/AuthInput'
$ref: '#/AuthInputPartial'

AuthenticationUpdateResponse:
type: object
Expand Down Expand Up @@ -110,6 +110,63 @@ Platform:
description: Describe which platform the Authentication is used for.
enum: ['bigcommerce', 'commercetools']

AuthGoogleServiceAccountPartial:
type: object
description: Authentication input to connect to a Google service (e.g. BigQuery).
additionalProperties: false
properties:
clientEmail:
type: string
description: Email address of the Service Account.
example: service-account-name@project-id.iam.gserviceaccount.com
privateKey:
type: string
description: Private key of the Service Account.

AuthBasicPartial:
type: object
description: Authentication input for Basic login with username and password.
additionalProperties: false
properties:
username:
type: string
password:
type: string

AuthAPIKeyPartial:
type: object
description: Authentication input used for token credentials.
additionalProperties: false
properties:
key:
type: string

AuthOAuthPartial:
type: object
description: Authentication input for OAuth login.
additionalProperties: false
properties:
url:
type: string
description: The OAuth endpoint URL.
client_id:
type: string
description: The clientID.
client_secret:
type: string
description: The secret.

AuthAlgoliaPartial:
type: object
additionalProperties: false
properties:
appID:
type: string
description: Algolia Application ID.
apiKey:
type: string
description: Algolia API Key, with the correct rights to push to an index and change settings.

AuthGoogleServiceAccount:
Fluf22 marked this conversation as resolved.
Show resolved Hide resolved
type: object
description: Authentication input to connect to a Google service (e.g. BigQuery).
Expand Down Expand Up @@ -189,3 +246,11 @@ AuthInput:
- $ref: '#/AuthAPIKey'
- $ref: '#/AuthOAuth'
- $ref: '#/AuthAlgolia'

AuthInputPartial:
oneOf:
- $ref: '#/AuthGoogleServiceAccountPartial'
- $ref: '#/AuthBasicPartial'
- $ref: '#/AuthAPIKeyPartial'
- $ref: '#/AuthOAuthPartial'
- $ref: '#/AuthAlgoliaPartial'