Skip to content

Commit

Permalink
Minor schema fixes
Browse files Browse the repository at this point in the history
- specify the schema draft
- min -> minimum
- max -> maximum
- minLength -> minItems
- maxLength -> maxItems

Validating using AJV
  • Loading branch information
yanfali authored and tzarc committed Jun 17, 2022
1 parent 545923b commit eecbb83
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions data/schemas/keyboard.jsonschema
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@
"breathing_period": {"$ref": "qmk.definitions.v1#/unsigned_int_8"},
"levels": {
"type": "number",
"min": 1,
"max": 31,
"minimum": 1,
"maximum": 31,
"multipleOf": 1
},
"pin": {"$ref": "qmk.definitions.v1#/mcu_pin"}
Expand Down Expand Up @@ -155,7 +155,7 @@
"maxItems": 2,
"items": {
"type": "number",
"min": 0,
"minimum": 0,
"multipleOf": 1
}
},
Expand Down Expand Up @@ -231,7 +231,7 @@
"maxItems": 2,
"items": {
"type": "number",
"min": 0,
"minimum": 0,
"multipleOf": 1
}
},
Expand Down Expand Up @@ -259,7 +259,7 @@
"maxItems": 2,
"items": {
"type": "number",
"min": 0,
"minimum": 0,
"multipleOf": 1
}
},
Expand Down Expand Up @@ -291,8 +291,8 @@
"enabled": {"type": "boolean"},
"max": {
"type": "number",
"min": 1,
"max": 32,
"minimum": 1,
"maximum": 32,
"multipleOf": 1
},
"override_rgb": {"type": "boolean"}
Expand All @@ -307,8 +307,8 @@
"split": {"type": "boolean"},
"split_count": {
"type": "array",
"minLength": 2,
"maxLength": 2,
"minItems": 2,
"maxItems": 2,
"items": {"$ref": "qmk.definitions.v1#/unsigned_int"}
}
}
Expand All @@ -322,15 +322,15 @@
"idle_timeout": {"$ref": "qmk.definitions.v1#/unsigned_int"},
"unlock_sequence": {
"type": "array",
"minLength": 1,
"maxLength": 5,
"minItems": 1,
"maxItems": 5,
"items": {
"type": "array",
"minItems": 2,
"maxItems": 2,
"items": {
"type": "number",
"min": 0,
"minimum": 0,
"multipleOf": 1
}
}
Expand Down Expand Up @@ -372,8 +372,8 @@
"soft_serial_pin": {"$ref": "qmk.definitions.v1#/mcu_pin"},
"soft_serial_speed": {
"type": "number",
"min": 0,
"max": 5,
"minimum": 0,
"maximum": 5,
"multipleOf": 1
},
"transport": {
Expand Down

0 comments on commit eecbb83

Please sign in to comment.