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

fix(specs): add customRequest to ingestion and small fix #1418

Merged
merged 1 commit into from
Mar 22, 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
4 changes: 2 additions & 2 deletions specs/ingestion/common/schemas/source.yml
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ SourceBigCommerce:
type: string
description: The store hash identifying the store the shopper is signing in to.
channel:
$ref: "#/BigCommerceChannel"
$ref: '#/BigCommerceChannel'
required:
- store_hash

Expand All @@ -144,7 +144,7 @@ BigCommerceChannel:
example: ['usd','eur']
items:
type: string
example: "usd"
example: 'usd'
required:
- id

Expand Down
13 changes: 7 additions & 6 deletions specs/ingestion/common/schemas/task.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,9 @@ TaskCreate:

TaskCreateTrigger:
oneOf:
- $ref: '#/TriggerInput'
- $ref: '#/OnDemandTriggerInput'
- $ref: '#/ScheduleTriggerInput'
- $ref: '#/SubscriptionTrigger'

TaskCreateResponse:
type: object
Expand Down Expand Up @@ -145,7 +146,7 @@ TriggerType:
# schedule trigger

LastRun:
description: The last time the scheduled task ran.
description: The last time the scheduled task ran (RFC3339 format).
type: string

Cron:
Expand Down Expand Up @@ -183,7 +184,7 @@ ScheduleTrigger:
lastRun:
$ref: '#/LastRun'
nextRun:
description: The next scheduled run of the task.
description: The next scheduled run of the task (RFC3339 format).
type: string
required:
- type
Expand All @@ -200,7 +201,7 @@ OnDemandTriggerType:
OnDemandTriggerInput:
type: object
additionalProperties: false
description: The trigger information of a task of type `on-demand`.
description: The trigger information of a task of type `onDemand`.
properties:
type:
$ref: '#/OnDemandTriggerType'
Expand All @@ -210,7 +211,7 @@ OnDemandTriggerInput:
OnDemandTrigger:
type: object
additionalProperties: false
description: The trigger information of a task of type `on-demand`.
description: The trigger information of a task of type `onDemand`.
properties:
type:
$ref: '#/OnDemandTriggerType'
Expand All @@ -232,6 +233,6 @@ SubscriptionTrigger:
description: The trigger input for a task of type 'subscription'.
properties:
type:
$ref: '#/TriggerType'
$ref: '#/SubscriptionTriggerType'
required:
- type
8 changes: 7 additions & 1 deletion specs/ingestion/spec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,14 @@ tags:
description: A source describe the platform informations.
- name: tasks
x-displayName: Tasks
description: A Task describe how we fetch the data (reindex, on-demand, subscription) from a source and how we index it on the Algolia side.
description: A Task describe how we fetch the data (onDemand, schedule, subscription) from a source and how we index it on the Algolia side.
paths:
# ######################
# ### Custom request ###
# ######################
/1{path}:
$ref: '../common/paths/customRequest.yml'

mehmetaligok marked this conversation as resolved.
Show resolved Hide resolved
# authentications API.
/1/authentications:
$ref: 'paths/authentications/authentications.yml'
Expand Down
2 changes: 0 additions & 2 deletions templates/javascript/clients/client/api/guards.mustache
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{{#isIngestionClient}}
/**
* Guard: Return strongly typed specific OnDemandTrigger for a given Trigger.
*
Expand Down Expand Up @@ -34,4 +33,3 @@ export function isSubscriptionTrigger(
): trigger is SubscriptionTrigger {
return trigger.type === 'subscription';
}
{{/isIngestionClient}}