enum.schema.json 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. {
  2. "$schema": "https://json-schema.org/draft/2020-12/schema",
  3. "$id": "enum.schema.json",
  4. "title": "Enum in EXT_structural_metadata",
  5. "type": "object",
  6. "description": "An object defining the values of an enum.",
  7. "allOf": [
  8. {
  9. "$ref": "glTFProperty.schema.json"
  10. }
  11. ],
  12. "properties": {
  13. "name": {
  14. "type": "string",
  15. "minLength": 1,
  16. "description": "The name of the enum, e.g. for display purposes."
  17. },
  18. "description": {
  19. "type": "string",
  20. "minLength": 1,
  21. "description": "The description of the enum."
  22. },
  23. "valueType": {
  24. "default": "UINT16",
  25. "description": "The type of the integer enum value.",
  26. "anyOf": [
  27. {
  28. "const": "INT8"
  29. },
  30. {
  31. "const": "UINT8"
  32. },
  33. {
  34. "const": "INT16"
  35. },
  36. {
  37. "const": "UINT16"
  38. },
  39. {
  40. "const": "INT32"
  41. },
  42. {
  43. "const": "UINT32"
  44. },
  45. {
  46. "const": "INT64"
  47. },
  48. {
  49. "const": "UINT64"
  50. },
  51. {
  52. "type": "string"
  53. }
  54. ]
  55. },
  56. "values": {
  57. "type": "array",
  58. "description": "An array of enum values. Duplicate names or duplicate integer values are not allowed.",
  59. "items": {
  60. "$ref": "enum.value.schema.json"
  61. },
  62. "minItems": 1
  63. },
  64. "extensions": {},
  65. "extras": {}
  66. },
  67. "required": [
  68. "values"
  69. ]
  70. }