schema/v2: restrict input names

Ensure that input names start with a character and otherwise only
contain characters, numbers, `-`, `_` and `.`. Limit their length
to 255.
This commit is contained in:
Christian Kellner 2021-05-28 20:07:03 +02:00 committed by Tom Gundersen
parent ef5e9364bb
commit 47fefe7e2d

View file

@ -18,8 +18,11 @@
"inputs": {
"title": "Collection of inputs for a stage",
"additionalProperties": {
"$ref": "#/definitions/input"
"additionalProperties": false,
"patternProperties": {
"^[a-zA-Z][a-zA-Z0-9_\\-\\.]{0,254}": {
"$ref": "#/definitions/input"
}
}
},