Skip to content

How to define and call a catalog function with positional arguments in v0.9? #486

@weareoutman

Description

@weareoutman

Currently, the args of FunctionCall is expected to be an object, and the catalog function definition also expects its parameters to be an object, while the string interpolation needs positional arguments sometimes, so how should we define and call a catalog function with positional arguments?

"${formatDate(${/currentDate}, 'yyyy-MM-dd')}"

"FunctionCall": {
"type": "object",
"description": "Invokes a named function on the client.",
"properties": {
"call": {
"type": "string",
"description": "The name of the function to call."
},
"args": {
"type": "object",
"description": "Arguments passed to the function.",
"additionalProperties": {
"$ref": "#/$defs/DynamicValue"
}
},

"functions": [
{
"name": "required",
"description": "Checks that the value is not null, undefined, or empty.",
"returnType": "boolean",
"parameters": {
"allOf": [{ "$ref": "#/$defs/valueParam" }],
"unevaluatedProperties": false
}

Metadata

Metadata

Assignees

Labels

triage backlogThe backlog of issues and PRs which need to be triaged in bulk.

Type

No type

Projects

Status

Todo

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions