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

feat(specs): source update changes #1276

Merged
merged 4 commits into from
Jan 31, 2023
Merged
Show file tree
Hide file tree
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
42 changes: 39 additions & 3 deletions specs/ingestion/common/schemas/source.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,10 @@ SourceUpdate:
type: object
additionalProperties: false
properties:
type:
$ref: '#/SourceType'
name:
type: string
input:
$ref: '#/SourceInput'
$ref: '#/SourceUpdateInput'
authenticationID:
type: string

Expand Down Expand Up @@ -106,6 +104,7 @@ SourceCommercetools:
storeKeys:
type: array
items:
description: Unique and immutable key of the referenced Store.
type: string
locales:
type: array
Expand All @@ -127,6 +126,7 @@ SourceBigCommerce:
properties:
storeHash:
type: string
description: The store hash identifying the store the shopper is signing in to.
required:
- store_hash

Expand All @@ -140,6 +140,7 @@ SourceJson:
properties:
url:
type: string
description: The URL of the file.
method:
$ref: '#/MethodType'
required:
Expand All @@ -150,3 +151,38 @@ SourceInput:
- $ref: '#/SourceCommercetools'
- $ref: '#/SourceBigCommerce'
- $ref: '#/SourceJson'

SourceUpdateCommercetools:
type: object
additionalProperties: false
properties:
storeKeys:
type: array
shortcuts marked this conversation as resolved.
Show resolved Hide resolved
description: Unique and immutable key of the referenced Store.
items:
type: string
locales:
type: array
description: >
Array of locales that must match the following pattern: ^[a-z]{2}(-[A-Z]{2})?$. For example ["fr-FR", "en"].
items:
type: string

SourceUpdateJson:
type: object
additionalProperties: false
properties:
url:
type: string
shortcuts marked this conversation as resolved.
Show resolved Hide resolved
description: The URL of the file.
method:
$ref: '#/MethodType'
required:
- url


SourceUpdateInput:
oneOf:
- $ref: '#/SourceUpdateCommercetools'
- $ref: '#/SourceUpdateJson'

2 changes: 1 addition & 1 deletion specs/ingestion/paths/sources/sourceID.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ get:
'400':
$ref: '../../../common/responses/BadRequest.yml'

post:
put:
tags:
- sources
summary: Update a source.
Expand Down