Skip to content

Updated flowcard schema to only allow 'title' and 'label' for dropdown argument values - #738

Open
wouter-athom wants to merge 1 commit into
developfrom
fix/validate-flow-card-dropdown-values
Open

wouter-athom wants to merge 1 commit into
developfrom
fix/validate-flow-card-dropdown-values

Conversation

@wouter-athom

Copy link
Copy Markdown
Contributor

Dropdown argument values didn't get checked for valid properties. This made it so you could have dropdown argument titles resulting in null.

Fixed by requiring either title (the modern vairant) or label (legacy).

…n values

Dropdown argument values didn't get checked for valid properties. This
made it so you could have dropdown argument titles resulting in `null`.

Fixed by requiring either `title` (the modern vairant) or `label`
(legacy).

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Reject undeclared dropdown properties and regenerate the TypeScript declaration.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 2 Medium severity

Open (2)
What changed in this PR

Updates flow-card manifest validation so dropdown values require a title or legacy label.

Changes:

  • Adds dropdown label support and title/label requirements.
  • Adds validation tests for dropdown and multiselect values.
File Summary
test/​validate-flow-card-manifest.js Adds schema validation coverage.
assets/​app/​schema.json Updates dropdown validation; undeclared properties remain permitted, and the generated TypeScript declaration is out of sync.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread assets/app/schema.json
Comment on lines 550 to +559
"title": {
"$ref": "#/definitions/i18nObject"
},
"label": {
"$ref": "#/definitions/i18nObject"
}
}
},
"anyOf": [
{ "required": ["title"] },
{ "required": ["label"] }

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@wouter-athom do this? :)

Comment thread assets/app/schema.json
@jeroenwienk

Copy link
Copy Markdown
Contributor

BTW we should not every promote this deprecated label property.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants