logo

qmk_firmware

custom branch of QMK firmware git clone https://anongit.hacktivis.me/git/qmk_firmware.git

definitions.jsonschema (5198B)


  1. {
  2. "$schema": "https://json-schema.org/draft/2020-12/schema#",
  3. "$id": "qmk.definitions.v1",
  4. "title": "Common definitions used across QMK's jsonschemas.",
  5. "type": "object",
  6. "bcd_version": {
  7. "type": "string",
  8. "pattern": "^[0-9]{1,2}\\.[0-9]\\.[0-9]$"
  9. },
  10. "bit": {
  11. "type": "integer",
  12. "minimum": 0,
  13. "maximum": 1
  14. },
  15. "boolean_array": {
  16. "type": "object",
  17. "additionalProperties": {"type": "boolean"}
  18. },
  19. "filename": {
  20. "type": "string",
  21. "minLength": 1,
  22. "pattern": "^[0-9a-z_]*$"
  23. },
  24. "hex_number_2d": {
  25. "type": "string",
  26. "pattern": "^0x[0-9A-F]{2}$"
  27. },
  28. "hex_number_4d": {
  29. "type": "string",
  30. "pattern": "^0x[0-9A-F]{4}$"
  31. },
  32. "json_file_path": {
  33. "type": "string",
  34. "pattern": "^[0-9a-z_/\\-]+\\.json$"
  35. },
  36. "key_unit": {
  37. "type": "number",
  38. "minimum": 0
  39. },
  40. "keyboard": {
  41. "type": "string",
  42. "pattern": "^[0-9a-z][0-9a-z_/]*$"
  43. },
  44. "keyboard_keymap_tuple": {
  45. "type": "array",
  46. "prefixItems": [
  47. {"$ref": "#/keyboard"},
  48. {"$ref": "#/filename"}
  49. ],
  50. "minItems": 2,
  51. "maxItems": 2,
  52. "unevaluatedItems": false
  53. },
  54. "keyboard_keymap_env": {
  55. "type": "array",
  56. "prefixItems": [
  57. {"$ref": "#/keyboard"},
  58. {"$ref": "#/filename"},
  59. {"$ref": "#/kvp_object"}
  60. ],
  61. "minItems": 3,
  62. "maxItems": 3,
  63. "unevaluatedItems": false
  64. },
  65. "keycode": {
  66. "type": "string",
  67. "minLength": 2,
  68. "maxLength": 50,
  69. "pattern": "^[A-Z][A-Zs_0-9]*$"
  70. },
  71. "keycode_decl": {
  72. "type": "object",
  73. "required": [
  74. "key"
  75. ],
  76. "properties": {
  77. "key": {"$ref": "#/keycode"},
  78. "label": {"$ref": "#/text_identifier"},
  79. "aliases": {
  80. "type": "array",
  81. "minItems": 1,
  82. "items": {"$ref": "#/keycode_short"}
  83. }
  84. }
  85. },
  86. "keycode_decl_array": {
  87. "type": "array",
  88. "minItems": 1,
  89. "items": {"$ref": "#/keycode_decl"}
  90. },
  91. "keycode_short": {
  92. "type": "string",
  93. "minLength": 2,
  94. "maxLength": 7,
  95. "pattern": "^[A-Z][A-Zs_0-9]*$"
  96. },
  97. "kvp_object": {
  98. "type": "object",
  99. "additionalProperties": {"type": "string"}
  100. },
  101. "layout_macro": {
  102. "oneOf": [
  103. {
  104. "type": "string",
  105. "enum": [
  106. "LAYOUT",
  107. "LAYOUT_1x2uC",
  108. "LAYOUT_1x2uL",
  109. "LAYOUT_1x2uR",
  110. "LAYOUT_2x2uC",
  111. "LAYOUT_2x3uC",
  112. "LAYOUT_625uC",
  113. "LAYOUT_ortho_3x12_1x2uC",
  114. "LAYOUT_ortho_4x12_1x2uC",
  115. "LAYOUT_ortho_4x12_1x2uL",
  116. "LAYOUT_ortho_4x12_1x2uR",
  117. "LAYOUT_ortho_5x12_1x2uC",
  118. "LAYOUT_ortho_5x12_2x2uC",
  119. "LAYOUT_ortho_5x14_1x2uC",
  120. "LAYOUT_ortho_5x14_1x2uL",
  121. "LAYOUT_ortho_5x14_1x2uR",
  122. "LAYOUT_planck_1x2uC",
  123. "LAYOUT_planck_1x2uL",
  124. "LAYOUT_planck_1x2uR",
  125. "LAYOUT_preonic_1x2uC",
  126. "LAYOUT_preonic_1x2uL",
  127. "LAYOUT_preonic_1x2uR"
  128. ]
  129. },
  130. {
  131. "type": "string",
  132. "pattern": "^LAYOUT_[0-9a-z_]*$"
  133. }
  134. ]
  135. },
  136. "mcu_pin": {
  137. "oneOf": [
  138. {
  139. "type": "string",
  140. "enum": ["NO_PIN"]
  141. },
  142. {
  143. "type": "string",
  144. "pattern": "^[A-K]\\d{1,2}$"
  145. },
  146. {
  147. "type": "string",
  148. "pattern": "^LINE_PIN\\d{1,2}$"
  149. },
  150. {
  151. "type": "string",
  152. "pattern": "^GP\\d{1,2}$"
  153. },
  154. {"type": "integer"},
  155. {"type": "null"}
  156. ]
  157. },
  158. "mcu_pin_array": {
  159. "type": "array",
  160. "items": {"$ref": "#/mcu_pin"}
  161. },
  162. "signed_decimal": {
  163. "type": "number"
  164. },
  165. "signed_int": {
  166. "type": "integer"
  167. },
  168. "signed_int_8": {
  169. "type": "integer",
  170. "minimum": -127,
  171. "maximum": 127
  172. },
  173. "snake_case": {
  174. "type": "string",
  175. "pattern": "^[a-z][a-z0-9_]*$"
  176. },
  177. "string_array": {
  178. "type": "array",
  179. "items": {"type": "string"}
  180. },
  181. "string_object": {
  182. "type": "object",
  183. "additionalProperties": {"type": "string"}
  184. },
  185. "text_identifier": {
  186. "type": "string",
  187. "minLength": 1,
  188. "maxLength": 250
  189. },
  190. "unsigned_decimal": {
  191. "type": "number",
  192. "minimum": 0
  193. },
  194. "unsigned_int": {
  195. "type": "integer",
  196. "minimum": 0
  197. },
  198. "unsigned_int_8": {
  199. "type": "integer",
  200. "minimum": 0,
  201. "maximum": 255
  202. }
  203. }