From 5f4b5b75c7f564d4b9fcedb407ba94d5eeda3b2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Vannicatte?= Date: Mon, 6 Feb 2023 15:59:20 +0100 Subject: [PATCH] fix(specs): rename task type to `onDemand` --- specs/ingestion/common/schemas/task.yml | 6 +++--- specs/ingestion/common/taskParameters.yml | 2 +- templates/javascript/clients/client/api/guards.mustache | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/specs/ingestion/common/schemas/task.yml b/specs/ingestion/common/schemas/task.yml index 160f076229..50757dd350 100644 --- a/specs/ingestion/common/schemas/task.yml +++ b/specs/ingestion/common/schemas/task.yml @@ -137,10 +137,10 @@ TriggerType: type: string description: > The type of the task reflect how it can be used: - - on_demand: a task that runs manually + - onDemand: a task that runs manually - schedule: a task that runs regularly, following a given cron expression - subscription: a task that runs after a subscription event is received from an integration (e.g. Webhook). - enum: ['on_demand', 'schedule', 'subscription'] + enum: ['onDemand', 'schedule', 'subscription'] # schedule trigger @@ -195,7 +195,7 @@ ScheduleTrigger: OnDemandTriggerType: type: string description: A task which is manually executed via the run task endpoint. - enum: ['on_demand'] + enum: ['onDemand'] OnDemandTriggerInput: type: object diff --git a/specs/ingestion/common/taskParameters.yml b/specs/ingestion/common/taskParameters.yml index 0665099b15..4c5c30ea03 100644 --- a/specs/ingestion/common/taskParameters.yml +++ b/specs/ingestion/common/taskParameters.yml @@ -55,4 +55,4 @@ triggerType: type: array items: $ref: './schemas/task.yml#/TriggerType' - example: on_demand,schedule + example: onDemand,schedule diff --git a/templates/javascript/clients/client/api/guards.mustache b/templates/javascript/clients/client/api/guards.mustache index 3cc048a5de..8e13de7567 100644 --- a/templates/javascript/clients/client/api/guards.mustache +++ b/templates/javascript/clients/client/api/guards.mustache @@ -8,7 +8,7 @@ export function isOnDemandTrigger( trigger: Trigger ): trigger is OnDemandTrigger { - return trigger.type === 'on_demand'; + return trigger.type === 'onDemand'; } /** @@ -34,4 +34,4 @@ export function isSubscriptionTrigger( ): trigger is SubscriptionTrigger { return trigger.type === 'subscription'; } -{{/isIngestionClient}} \ No newline at end of file +{{/isIngestionClient}}