mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-09-09 00:04:10 +00:00
The CLI linter rejected valid flow YAML that the server itself emits.
A module with a constant retry and no early-stop error message serialises
its unset defaults as `seconds: 0`, `random_factor: null` and
`error_message: null`, which the OpenFlow-derived schema rejected:
- `exponential.seconds` had `minimum: 1`, but the Rust default is 0
- `exponential.random_factor` (`Option<i8>`) was not nullable
- typed nullable fields relied on AJV's non-standard `nullable` keyword
Fixes:
- openflow.openapi.yaml: `exponential.seconds` minimum 1 -> 0; add
`nullable: true` to `exponential.random_factor`.
- gen_openflow_schema.sh: rewrite typed (non-enum) `{ type, nullable: true }`
fields to standard JSON Schema `{ type: ["<T>", "null"] }` so the generated
schemas accept null regardless of validator nullable support.
- bump windmill-yaml-validator 1.1.1 -> 1.1.2 and the CLI dependency.
Adds a regression test covering a flow with default retry and stop_after_if.
Fixes WIN-2048
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
34 lines
797 B
JSON
34 lines
797 B
JSON
{
|
|
"name": "windmill-yaml-validator",
|
|
"version": "1.1.2",
|
|
"description": "YAML validator for Windmill flow, schedule, and trigger files",
|
|
"main": "dist/index.js",
|
|
"types": "dist/index.d.ts",
|
|
"scripts": {
|
|
"build": "./gen_openflow_schema.sh && tsc",
|
|
"pretest": "./gen_openflow_schema.sh",
|
|
"test": "jest",
|
|
"test:watch": "jest --watch",
|
|
"prepublishOnly": "npm run build"
|
|
},
|
|
"keywords": [
|
|
"windmill"
|
|
],
|
|
"author": "Ruben Fiszel",
|
|
"license": "Apache 2.0",
|
|
"devDependencies": {
|
|
"@types/jest": "^29.5.0",
|
|
"@types/node": "^24.1.0",
|
|
"js-yaml": "^3.14.1",
|
|
"jest": "^29.5.0",
|
|
"ts-jest": "^29.1.0",
|
|
"typescript": "^5.0.0"
|
|
},
|
|
"files": [
|
|
"dist/**/*"
|
|
],
|
|
"dependencies": {
|
|
"@stoplight/yaml": "^4.3.0",
|
|
"ajv": "^8.17.1"
|
|
}
|
|
} |