Documentation Index
Fetch the complete documentation index at: https://mintlify.com/prismatic-io/spectral/llms.txt
Use this file to discover all available pages before exploring further.
Import
Signature
invokeDataSource calls the perform function of a DataSourceDefinition with a mock DataSourceContext and the params you provide. Unlike invoke, it returns the DataSourceResult directly (not wrapped in an InvokeReturn).
Data source contexts are slightly different from action contexts — they do not include
stepId, executionId, webhookUrls, or other execution-specific fields. invokeDataSource constructs the correct context type automatically.Parameters
The data source definition object to invoke. Only the
perform function is used.An object containing the input parameter values for the data source. Keys must match the input keys defined on the data source.
Optional partial data source context. Overrides the default mock context.
Return value
The value returned by the data source’s
perform function. The shape depends on the dataSourceType declared on the definition.Examples
Related
- invoke — invoke an action definition
- createConnection — create a test connection for use in context
- createHarness — harness-based testing with
harness.dataSource(key, params)
