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
4.3 KiB

  1. {
  2. "$schema": "http://json-schema.org/draft-06/schema#",
  3. "$id": "http://json-schema.org/draft-06/schema#",
  4. "title": "Core schema meta-schema",
  5. "definitions": {
  6. "schemaArray": {
  7. "type": "array",
  8. "minItems": 1,
  9. "items": { "$ref": "#" }
  10. },
  11. "nonNegativeInteger": {
  12. "type": "integer",
  13. "minimum": 0
  14. },
  15. "nonNegativeIntegerDefault0": {
  16. "allOf": [
  17. { "$ref": "#/definitions/nonNegativeInteger" },
  18. { "default": 0 }
  19. ]
  20. },
  21. "simpleTypes": {
  22. "enum": [
  23. "array",
  24. "boolean",
  25. "integer",
  26. "null",
  27. "number",
  28. "object",
  29. "string"
  30. ]
  31. },
  32. "stringArray": {
  33. "type": "array",
  34. "items": { "type": "string" },
  35. "uniqueItems": true,
  36. "default": []
  37. }
  38. },
  39. "type": ["object", "boolean"],
  40. "properties": {
  41. "$id": {
  42. "type": "string",
  43. "format": "uri-reference"
  44. },
  45. "$schema": {
  46. "type": "string",
  47. "format": "uri"
  48. },
  49. "$ref": {
  50. "type": "string",
  51. "format": "uri-reference"
  52. },
  53. "title": {
  54. "type": "string"
  55. },
  56. "description": {
  57. "type": "string"
  58. },
  59. "default": {},
  60. "examples": {
  61. "type": "array",
  62. "items": {}
  63. },
  64. "multipleOf": {
  65. "type": "number",
  66. "exclusiveMinimum": 0
  67. },
  68. "maximum": {
  69. "type": "number"
  70. },
  71. "exclusiveMaximum": {
  72. "type": "number"
  73. },
  74. "minimum": {
  75. "type": "number"
  76. },
  77. "exclusiveMinimum": {
  78. "type": "number"
  79. },
  80. "maxLength": { "$ref": "#/definitions/nonNegativeInteger" },
  81. "minLength": { "$ref": "#/definitions/nonNegativeIntegerDefault0" },
  82. "pattern": {
  83. "type": "string",
  84. "format": "regex"
  85. },
  86. "additionalItems": { "$ref": "#" },
  87. "items": {
  88. "anyOf": [
  89. { "$ref": "#" },
  90. { "$ref": "#/definitions/schemaArray" }
  91. ],
  92. "default": {}
  93. },
  94. "maxItems": { "$ref": "#/definitions/nonNegativeInteger" },
  95. "minItems": { "$ref": "#/definitions/nonNegativeIntegerDefault0" },
  96. "uniqueItems": {
  97. "type": "boolean",
  98. "default": false
  99. },
  100. "contains": { "$ref": "#" },
  101. "maxProperties": { "$ref": "#/definitions/nonNegativeInteger" },
  102. "minProperties": { "$ref": "#/definitions/nonNegativeIntegerDefault0" },
  103. "required": { "$ref": "#/definitions/stringArray" },
  104. "additionalProperties": { "$ref": "#" },
  105. "definitions": {
  106. "type": "object",
  107. "additionalProperties": { "$ref": "#" },
  108. "default": {}
  109. },
  110. "properties": {
  111. "type": "object",
  112. "additionalProperties": { "$ref": "#" },
  113. "default": {}
  114. },
  115. "patternProperties": {
  116. "type": "object",
  117. "additionalProperties": { "$ref": "#" },
  118. "default": {}
  119. },
  120. "dependencies": {
  121. "type": "object",
  122. "additionalProperties": {
  123. "anyOf": [
  124. { "$ref": "#" },
  125. { "$ref": "#/definitions/stringArray" }
  126. ]
  127. }
  128. },
  129. "propertyNames": { "$ref": "#" },
  130. "const": {},
  131. "enum": {
  132. "type": "array",
  133. "minItems": 1,
  134. "uniqueItems": true
  135. },
  136. "type": {
  137. "anyOf": [
  138. { "$ref": "#/definitions/simpleTypes" },
  139. {
  140. "type": "array",
  141. "items": { "$ref": "#/definitions/simpleTypes" },
  142. "minItems": 1,
  143. "uniqueItems": true
  144. }
  145. ]
  146. },
  147. "format": { "type": "string" },
  148. "allOf": { "$ref": "#/definitions/schemaArray" },
  149. "anyOf": { "$ref": "#/definitions/schemaArray" },
  150. "oneOf": { "$ref": "#/definitions/schemaArray" },
  151. "not": { "$ref": "#" }
  152. },
  153. "default": {}
  154. }