Skip to main content

@terascope/job-components / config-validators

config-validators

Functions​

validateAPIConfig()​

validateAPIConfig<T>(inputSchema, inputConfig, context): object

Defined in: job-components/src/config-validators.ts:45

Merges the provided inputSchema with commonSchema and then validates the provided apiConfig against the resulting schema.

Type Parameters​

Type Parameter
T

Parameters​

ParameterType
inputSchemaTF.Schema<any>
inputConfigRecord<string, any>
contextContext

Returns​

object

config​

config: APIConfig & T

warnings​

warnings: JobWarning[]


validateJobConfig()​

validateJobConfig<T>(inputSchema, inputConfig, context): object

Defined in: job-components/src/config-validators.ts:82

Merges the provided inputSchema with commonSchema and then validates the provided jobConfig against the resulting schema.

Type Parameters​

Type Parameter
T

Parameters​

ParameterType
inputSchemaTF.Schema<any>
inputConfigRecord<string, any>
contextContext

Returns​

object

config​

config: ValidatedJobConfig & T

warnings​

warnings: JobWarning[]


validateOpConfig()​

validateOpConfig<T>(inputSchema, inputConfig, context): object

Defined in: job-components/src/config-validators.ts:10

Merges the provided inputSchema with commonSchema and then validates the provided opConfig against the resulting schema.

Type Parameters​

Type Parameter
T

Parameters​

ParameterType
inputSchemaTF.Schema<any>
inputConfigRecord<string, any>
contextContext

Returns​

object

config​

config: OpConfig & T

warnings​

warnings: JobWarning[]