Skip to content

Commit

Permalink
feat(specs): source update changes (#1276)
Browse files Browse the repository at this point in the history
  • Loading branch information
mehmetaligok committed Jan 31, 2023
1 parent e3c6b64 commit 859c0a9
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 4 deletions.
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
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
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

0 comments on commit 859c0a9

Please sign in to comment.