Skip to content

Commit

Permalink
stages/groups: fix group name schema validation
Browse files Browse the repository at this point in the history
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).
  • Loading branch information
gicmo committed Jun 9, 2021
1 parent f08f026 commit ee6d53a
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions stages/org.osbuild.groups
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
}
}
Expand Down

0 comments on commit ee6d53a

Please sign in to comment.