Skip to content

Commit

Permalink
JSON generators schema: better dirpath regex
Browse files Browse the repository at this point in the history
  • Loading branch information
thorehusfeldt committed Dec 12, 2024
1 parent 0e722ca commit 38487e7
Showing 1 changed file with 15 additions and 4 deletions.
19 changes: 15 additions & 4 deletions support/schemas/generators_yaml_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@
"oneOf": [
{
"type": "string",
"pattern": "^([^{}]|\\{name\\})*(\\{seed(:[0-9]+)?\\})?([^{}]|\\{name\\})*$"
"pattern": "^\/([^{}]|\\{name\\})*(\\{seed(:[0-9]+)?\\})?([^{}]|\\{name\\})*$"
},
{
"type": "null"
Expand Down Expand Up @@ -216,9 +216,20 @@
"type": "string",
"pattern": "^([A-Za-z0-9][A-Za-z0-9_-]*[A-Za-z0-9]/)*[A-Za-z0-9][A-Za-z0-9_.-]*[A-Za-z0-9]$"
},
"casepath": {
"dirpath": {
"type": "string",
"pattern": "^([A-Za-z0-9][A-Za-z0-9_-]*[A-Za-z0-9]/)*([A-Za-z0-9]|A-Za-z0-9][A-Za-z0-9_-]*[A-Za-z0-9]$"
"pattern": "^([A-Za-z0-9]([A-Za-z0-9_-]{0,253}[A-Za-z0-9])?/)*[A-Za-z0-9]([A-Za-z0-9_-]{0,253}[A-Za-z0-9])?$"
},
"path": {
"type": "string",
"anyOf": [
{
"pattern": "^([A-Za-z0-9]([A-Za-z0-9_-]{0,253}[A-Za-z0-9])?/)*[A-Za-z0-9]([A-Za-z0-9_-]{0,253}[A-Za-z0-9])?$"
},
{
"pattern": "^/?([A-Za-z0-9]([A-Za-z0-9_-]{0,253}[A-Za-z0-9])?/)*[A-Za-z0-9][A-Za-z0-9_.-]{0,253}[A-Za-z0-9]$"
}
]
}
},
"additionalProperties": true,
Expand All @@ -242,7 +253,7 @@
"title": "Generator",
"type": "array",
"items": {
"$ref": "#/$defs/unslashedfilepath"
"$ref": "#/$defs/path"
}
}
},
Expand Down

0 comments on commit 38487e7

Please sign in to comment.