metadata-test.json 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213
  1. {
  2. "$schema": "https://raw.githubusercontent.com/elyra-ai/elyra/master/elyra/metadata/schemas/meta-schema.json",
  3. "$id": "https://raw.githubusercontent.com/elyra-ai/elyra/master/elyra/metadata/schemas/metadata-test.json",
  4. "title": "Metadata Test",
  5. "name": "metadata-test",
  6. "schemaspace": "metadata-tests",
  7. "schemaspace_id": "8182fc28-899a-4521-8342-1a0e218c3a4d",
  8. "metadata_class_name": "elyra.tests.metadata.test_utils.MockMetadataTest",
  9. "properties": {
  10. "schema_name": {
  11. "title": "Schema Name",
  12. "description": "The schema associated with this instance",
  13. "type": "string",
  14. "const": "metadata-test"
  15. },
  16. "display_name": {
  17. "title": "Display Name",
  18. "description": "The display name of the metadata",
  19. "type": "string",
  20. "minLength": 1
  21. },
  22. "metadata": {
  23. "description": "Additional data specific to this metadata",
  24. "type": "object",
  25. "properties": {
  26. "required_test": {
  27. "title": "Required Test",
  28. "description": "Property used to test required enforcement",
  29. "type": "string",
  30. "minLength": 1
  31. },
  32. "uri_test": {
  33. "title": "URI Test",
  34. "description": "Property used to test uri formatting",
  35. "type": "string",
  36. "format": "uri"
  37. },
  38. "integer_exclusivity_test": {
  39. "title": "Integer Exclusivity Test",
  40. "description": "Property used to test integers with exclusivity restrictions",
  41. "type": "integer",
  42. "exclusiveMinimum": 3,
  43. "exclusiveMaximum": 10
  44. },
  45. "integer_multiple_test": {
  46. "title": "Integer Multiple Test",
  47. "description": "Property used to test integers with multipleOf restrictions",
  48. "type": "integer",
  49. "multipleOf": 7
  50. },
  51. "number_range_test": {
  52. "title": "Number Range Test",
  53. "description": "Property used to test numbers with range",
  54. "type": "number",
  55. "minimum": 3,
  56. "maximum": 10
  57. },
  58. "number_default_test": {
  59. "title": "Number Default Test",
  60. "description": "Property used to test numbers with defaults",
  61. "type": "number",
  62. "default": 42
  63. },
  64. "const_test": {
  65. "title": "Const Test",
  66. "description": "Property used to test properties with const",
  67. "type": "number",
  68. "const": 3.14
  69. },
  70. "string_length_test": {
  71. "title": "String Length Test",
  72. "description": "Property used to test strings with length restrictions",
  73. "type": "string",
  74. "minLength": 3,
  75. "maxLength": 10
  76. },
  77. "string_pattern_test": {
  78. "title": "String Pattern Test",
  79. "description": "Property used to test strings with pattern restrictions",
  80. "type": "string",
  81. "pattern": "^[a-z0-9][a-z0-9-.]*[a-z0-9]$"
  82. },
  83. "string_complex_test": {
  84. "title": "String Complex Test",
  85. "description": "Property used to test strings with multiple restrictions",
  86. "type": "string",
  87. "allOf": [
  88. { "minLength": 1 },
  89. { "pattern": "^[^ \t]+" },
  90. { "pattern": "[^ \t]+$" }
  91. ]
  92. },
  93. "enum_test": {
  94. "title": "Enum Test",
  95. "description": "Property used to test properties with enums",
  96. "type": "string",
  97. "enum": ["elyra", "rocks"],
  98. "uihints": {
  99. "field_type": "dropdown",
  100. "default_choices": ["elyra"]
  101. }
  102. },
  103. "array_test": {
  104. "title": "Array Test",
  105. "description": "Property used to test array with item restrictions",
  106. "type": "array",
  107. "minItems": 3,
  108. "maxItems": 10,
  109. "uniqueItems": true,
  110. "uihints": {
  111. "field_type": "code"
  112. }
  113. },
  114. "object_test": {
  115. "title": "Object Test",
  116. "description": "Property used to test object elements with properties restrictions",
  117. "type": "object",
  118. "minProperties": 3,
  119. "maxProperties": 10
  120. },
  121. "boolean_test": {
  122. "title": "Boolean Test",
  123. "description": "Property used to test boolean values",
  124. "type": "boolean"
  125. },
  126. "null_test": {
  127. "title": "Null Test",
  128. "description": "Property used to test null types",
  129. "type": "null"
  130. },
  131. "oneOf_test": {
  132. "type": "object",
  133. "description": "Property used to test behavior when a oneOf construct exists",
  134. "oneOf": [
  135. {
  136. "type": "object",
  137. "properties": {
  138. "obj1_prop1": { "type": "string" },
  139. "obj1_prop2": { "type": "string" },
  140. "obj_switch": { "enum": ["obj1"] }
  141. },
  142. "required": ["obj_switch", "obj1_prop1", "obj1_prop2"],
  143. "additionalProperties": false
  144. },
  145. {
  146. "type": "object",
  147. "properties": {
  148. "obj2_prop1": { "type": "integer" },
  149. "obj2_prop2": { "type": "integer" },
  150. "obj_switch": { "enum": ["obj2"] }
  151. },
  152. "required": ["obj_switch", "obj2_prop1", "obj2_prop2"],
  153. "additionalProperties": false
  154. },
  155. {
  156. "type": "object",
  157. "properties": {
  158. "obj3_prop1": { "type": "number" },
  159. "obj3_prop2": { "type": "boolean" },
  160. "obj_switch": { "enum": ["obj3"] }
  161. },
  162. "required": ["obj_switch", "obj3_prop1"],
  163. "additionalProperties": false
  164. }
  165. ]
  166. },
  167. "allOf_test": {
  168. "type": "object",
  169. "description": "Property used to test behavior when an allOf construct exists",
  170. "allOf": [
  171. {
  172. "type": "object",
  173. "properties": {
  174. "obj1_prop1": { "type": "string" },
  175. "obj1_prop2": { "type": "string" },
  176. "obj1_switch": { "enum": ["obj1"] }
  177. },
  178. "required": ["obj1_switch", "obj1_prop1", "obj1_prop2"]
  179. },
  180. {
  181. "type": "object",
  182. "properties": {
  183. "obj2_prop1": { "type": "integer" },
  184. "obj2_prop2": { "type": "integer" },
  185. "obj2_switch": { "enum": ["obj2"] }
  186. },
  187. "required": ["obj2_switch", "obj2_prop1", "obj2_prop2"]
  188. },
  189. {
  190. "type": "object",
  191. "properties": {
  192. "obj3_prop1": { "type": "number" },
  193. "obj3_prop2": { "type": "boolean" },
  194. "obj3_switch": { "enum": ["obj3"] }
  195. },
  196. "required": ["obj3_switch", "obj3_prop1"]
  197. }
  198. ]
  199. },
  200. "defs_test": { "$ref": "#/$defs/defs_entry" }
  201. },
  202. "required": ["required_test"]
  203. }
  204. },
  205. "required": ["schema_name", "display_name", "metadata"],
  206. "$defs": {
  207. "defs_entry": {
  208. "title": "Defs Test",
  209. "description": "Property used to test $defs elements",
  210. "type": "integer"
  211. }
  212. }
  213. }