Skip to content
Snippets Groups Projects
Unverified Commit a80262ff authored by Paul Jolly's avatar Paul Jolly
Browse files

Fix errors in CI JSON Schema

Spotted using 'cue import' to translate the JSON Schema to CUE
(https://cuelang.org). Previously reported via
https://cuelang.org/issue/1939.

'minLength' is a constraint that can only be used on strings:

    https://json-schema.org/understanding-json-schema/reference/string#length

Arrays should be constrained with 'minItems':

    https://json-schema.org/understanding-json-schema/reference/array#length



The removal of the stray 'additionalProperties' on the
'patternProperties' field object is also correct, on the basis an
'patternProperties' object is defined as being a map from field name
pattern to type.

Signed-off-by: default avatarPaul Jolly <paul@myitcv.io>
parent 3bc51c44
No related branches found
No related tags found
1 merge request!148555Fix errors in CI JSON Schema
......@@ -142,7 +142,7 @@
},
{
"type": "array",
"minLength": 1,
"minItems": 1,
"items": {
"type": "string"
}
......@@ -958,7 +958,7 @@
},
{
"type": "array",
"minLength": 1,
"minItems": 1,
"items": {
"type": "string"
}
......@@ -1010,7 +1010,7 @@
},
{
"type": "array",
"minLength": 1,
"minItems": 1,
"items": {
"type": "string"
}
......@@ -1090,8 +1090,7 @@
"additionalProperties": false
}
]
},
"additionalProperties": false
}
}
},
"jobVariables": {
......@@ -1121,8 +1120,7 @@
"additionalProperties": false
}
]
},
"additionalProperties": false
}
}
},
"rulesVariables": {
......@@ -1135,8 +1133,7 @@
"number",
"string"
]
},
"additionalProperties": false
}
}
},
"if": {
......@@ -1705,7 +1702,7 @@
},
{
"type": "array",
"minLength": 1,
"minItems": 1,
"items": {
"type": "string"
}
......@@ -2294,7 +2291,7 @@
},
"tags": {
"type": "array",
"minLength": 1,
"minItems": 1,
"markdownDescription": "Used to select runners from the list of available runners. A runner must have all tags listed here to run the job. [Learn More](https://docs.gitlab.com/ee/ci/yaml/#tags).",
"items": {
"anyOf": [
......@@ -2304,7 +2301,7 @@
},
{
"type": "array",
"minLength": 1,
"minItems": 1,
"items": {
"type": "string"
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment