Skip to content

Commit

Permalink
fix(specs): allow partial input update for authentications (#1856)
Browse files Browse the repository at this point in the history
  • Loading branch information
Fluf22 committed Aug 1, 2023
1 parent 5494994 commit 58ea5db
Showing 1 changed file with 67 additions and 2 deletions.
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:
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'

0 comments on commit 58ea5db

Please sign in to comment.