Skip to content

Commit

Permalink
fix: auth input partial update
Browse files Browse the repository at this point in the history
  • Loading branch information
Fluf22 committed Jul 31, 2023
1 parent 5494994 commit c4c41c6
Showing 1 changed file with 55 additions and 22 deletions.
77 changes: 55 additions & 22 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,7 +110,7 @@ Platform:
description: Describe which platform the Authentication is used for.
enum: ['bigcommerce', 'commercetools']

AuthGoogleServiceAccount:
AuthGoogleServiceAccountPartial:
type: object
description: Authentication input to connect to a Google service (e.g. BigQuery).
additionalProperties: false
Expand All @@ -122,11 +122,8 @@ AuthGoogleServiceAccount:
privateKey:
type: string
description: Private key of the Service Account.
required:
- clientEmail
- privateKey

AuthBasic:
AuthBasicPartial:
type: object
description: Authentication input for Basic login with username and password.
additionalProperties: false
Expand All @@ -135,21 +132,16 @@ AuthBasic:
type: string
password:
type: string
required:
- username
- password

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

AuthOAuth:
AuthOAuthPartial:
type: object
description: Authentication input for OAuth login.
additionalProperties: false
Expand All @@ -163,12 +155,8 @@ AuthOAuth:
client_secret:
type: string
description: The secret.
required:
- url
- client_id
- client_secret

AuthAlgolia:
AuthAlgoliaPartial:
type: object
additionalProperties: false
properties:
Expand All @@ -178,9 +166,46 @@ AuthAlgolia:
apiKey:
type: string
description: Algolia API Key, with the correct rights to push to an index and change settings.
required:
- appID
- apiKey

AuthGoogleServiceAccount:
allOf:
- $ref: '#/AuthGoogleServiceAccountPartial'
- type: object
required:
- clientEmail
- privateKey

AuthBasic:
allOf:
- $ref: '#/AuthBasicPartial'
- type: object
required:
- username
- password

AuthAPIKey:
allOf:
- $ref: '#/AuthAPIKeyPartial'
- type: object
required:
- key

AuthOAuth:
allOf:
- $ref: '#/AuthOAuthPartial'
- type: object
required:
- url
- client_id
- client_secret

AuthAlgolia:
allOf:
- $ref: '#/AuthAlgoliaPartial'
- type: object
required:
- appID
- apiKey

AuthInput:
oneOf:
Expand All @@ -189,3 +214,11 @@ AuthInput:
- $ref: '#/AuthAPIKey'
- $ref: '#/AuthOAuth'
- $ref: '#/AuthAlgolia'

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

0 comments on commit c4c41c6

Please sign in to comment.