Skip to content

Commit

Permalink
Add semver validation to schema
Browse files Browse the repository at this point in the history
Uses regex pattern provided by https://semver.org/
  • Loading branch information
XDelta committed Nov 25, 2023
1 parent 3e817b3 commit 8d28c76
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions schemas/mod-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@
"versions": {
"type": "object",
"minProperties": 1,
"propertyNames": {
"pattern": "^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$"
},
"additionalProperties": {
"type": "object",
"additionalProperties": false,
Expand Down

0 comments on commit 8d28c76

Please sign in to comment.