stages/groups: fix group name schema validation
Use `patternProperties` instead of `propertyNames` and `pattern`, which is not in draft 4 and so did not work (but also did not throw an error).
This commit is contained in:
parent
690a8fc42a
commit
d62c8294e1
1 changed files with 9 additions and 9 deletions
|
|
@ -22,16 +22,16 @@ SCHEMA = """
|
|||
"properties": {
|
||||
"groups": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"description": "Keys are group names, values are objects with group info",
|
||||
"propertyNames": {
|
||||
"pattern": "^[A-Za-z0-9_][A-Za-z0-9_-]{0,31}$"
|
||||
},
|
||||
"additionalProperties": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"gid": {
|
||||
"type": "number",
|
||||
"description": "GID for this group"
|
||||
"patternProperties": {
|
||||
"^[A-Za-z0-9_][A-Za-z0-9_-]{0,31}$": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"gid": {
|
||||
"type": "number",
|
||||
"description": "GID for this group"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue