You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

154 lines
3.8 KiB

  1. {
  2. "$schema": "http://json-schema.org/draft-07/schema#",
  3. "$id": "qmk.definitions.v1",
  4. "title": "Common definitions used across QMK's jsonschemas.",
  5. "type": "object",
  6. "boolean_array": {
  7. "type": "object",
  8. "additionalProperties": {"type": "boolean"}
  9. },
  10. "filename": {
  11. "type": "string",
  12. "minLength": 1,
  13. "pattern": "^[0-9a-z_]*$"
  14. },
  15. "hex_number_2d": {
  16. "type": "string",
  17. "pattern": "^0x[0-9A-F]{2}$"
  18. },
  19. "hex_number_4d": {
  20. "type": "string",
  21. "pattern": "^0x[0-9A-F]{4}$"
  22. },
  23. "bcd_version": {
  24. "type": "string",
  25. "pattern": "^[0-9]{1,2}\\.[0-9]\\.[0-9]$"
  26. },
  27. "text_identifier": {
  28. "type": "string",
  29. "minLength": 1,
  30. "maxLength": 250
  31. },
  32. "layout_macro": {
  33. "oneOf": [
  34. {
  35. "type": "string",
  36. "enum": [
  37. "LAYOUT",
  38. "LAYOUT_1x2uC",
  39. "LAYOUT_1x2uL",
  40. "LAYOUT_1x2uR",
  41. "LAYOUT_2x2uC",
  42. "LAYOUT_2x3uC",
  43. "LAYOUT_625uC",
  44. "LAYOUT_ortho_3x12_1x2uC",
  45. "LAYOUT_ortho_4x12_1x2uC",
  46. "LAYOUT_ortho_4x12_1x2uL",
  47. "LAYOUT_ortho_4x12_1x2uR",
  48. "LAYOUT_ortho_5x12_1x2uC",
  49. "LAYOUT_ortho_5x12_2x2uC",
  50. "LAYOUT_ortho_5x14_1x2uC",
  51. "LAYOUT_ortho_5x14_1x2uL",
  52. "LAYOUT_ortho_5x14_1x2uR",
  53. "LAYOUT_planck_1x2uC",
  54. "LAYOUT_planck_1x2uL",
  55. "LAYOUT_planck_1x2uR",
  56. "LAYOUT_preonic_1x2uC",
  57. "LAYOUT_preonic_1x2uL",
  58. "LAYOUT_preonic_1x2uR"
  59. ]
  60. },
  61. {
  62. "type": "string",
  63. "pattern": "^LAYOUT_[0-9a-z_]*$"
  64. }
  65. ]
  66. },
  67. "key_unit": {
  68. "type": "number",
  69. "min": 0.25
  70. },
  71. "keyboard": {
  72. "oneOf": [
  73. {
  74. "type": "string",
  75. "enum": [
  76. "converter/numeric_keypad_IIe",
  77. "emptystring/NQG",
  78. "maple_computing/christmas_tree/V2017"
  79. ]
  80. },
  81. {
  82. "type": "string",
  83. "pattern": "^[0-9a-z][0-9a-z_/]*$"
  84. }
  85. ]
  86. },
  87. "mcu_pin_array": {
  88. "type": "array",
  89. "items": {"$ref": "#/mcu_pin"}
  90. },
  91. "mcu_pin": {
  92. "oneOf": [
  93. {
  94. "type": "string",
  95. "enum": ["NO_PIN"]
  96. },
  97. {
  98. "type": "string",
  99. "pattern": "^[A-K]\\d{1,2}$"
  100. },
  101. {
  102. "type": "string",
  103. "pattern": "^LINE_PIN\\d{1,2}$"
  104. },
  105. {
  106. "type": "number",
  107. "multipleOf": 1
  108. },
  109. {
  110. "type": "null"
  111. }
  112. ]
  113. },
  114. "signed_decimal": {
  115. "type": "number"
  116. },
  117. "signed_int": {
  118. "type": "number",
  119. "multipleOf": 1
  120. },
  121. "signed_int_8": {
  122. "type": "number",
  123. "min": -127,
  124. "max": 127,
  125. "multipleOf": 1
  126. },
  127. "string_array": {
  128. "type": "array",
  129. "items": {
  130. "type": "string"
  131. }
  132. },
  133. "string_object": {
  134. "type": "object",
  135. "additionalProperties": {
  136. "type": "string"
  137. }
  138. },
  139. "unsigned_decimal": {
  140. "type": "number",
  141. "min": 0
  142. },
  143. "unsigned_int": {
  144. "type": "number",
  145. "min": 0,
  146. "multipleOf": 1
  147. },
  148. "unsigned_int_8": {
  149. "type": "number",
  150. "min": 0,
  151. "max": 255,
  152. "multipleOf": 1
  153. }
  154. }