config_test.schema.yml

Same filename and directory in other branches
  1. 9 core/modules/config/tests/config_test/config/schema/config_test.schema.yml
  2. 8.9.x core/modules/config/tests/config_test/config/schema/config_test.schema.yml
  3. 11.x core/modules/config/tests/config_test/config/schema/config_test.schema.yml
core/modules/config/tests/config_test/config/schema/config_test.schema.yml

File

core/modules/config/tests/config_test/config/schema/config_test.schema.yml

View source
  1. # Schema for the configuration files of the Configuration Test module.
  2. config_test_dynamic:
  3. type: config_entity
  4. mapping:
  5. id:
  6. type: string
  7. label: 'ID'
  8. label:
  9. type: label
  10. label: 'Label'
  11. weight:
  12. type: weight
  13. label: 'Weight'
  14. style:
  15. type: string
  16. label: 'style'
  17. size:
  18. type: string
  19. label: 'Size'
  20. size_value:
  21. type: string
  22. label: 'Size value'
  23. protected_property:
  24. type: string
  25. label: 'Protected property'
  26. config_test.dynamic.*:
  27. type: config_test_dynamic
  28. label: 'Config test dynamic settings'
  29. config_test.dynamic.*.*:
  30. type: config_test_dynamic
  31. label: 'Config test dynamic settings'
  32. config_test.dynamic.*.third_party.node:
  33. type: mapping
  34. mapping:
  35. foo:
  36. type: string
  37. config_test.query.*:
  38. type: config_entity
  39. mapping:
  40. id:
  41. type: string
  42. label: 'ID'
  43. label:
  44. type: label
  45. label: 'Label'
  46. array:
  47. type: sequence
  48. label: 'Array level 1'
  49. sequence:
  50. type: sequence
  51. label: 'Array level 2'
  52. sequence:
  53. type: integer
  54. label: 'Value'
  55. number:
  56. type: integer
  57. label: 'number'
  58. config_test.types:
  59. type: config_object
  60. label: 'Configuration type'
  61. mapping:
  62. array:
  63. type: sequence
  64. label: 'Array'
  65. sequence:
  66. type: string
  67. label: 'Item'
  68. boolean:
  69. type: boolean
  70. label: 'Boolean'
  71. exp:
  72. type: float
  73. label: 'Exponential'
  74. float:
  75. type: float
  76. label: 'Float'
  77. float_as_integer:
  78. type: float
  79. label: 'Float'
  80. hex:
  81. type: integer
  82. label: 'Hexadecimal'
  83. int:
  84. type: integer
  85. label: 'Integer'
  86. octal:
  87. # Symfony 5.1's YAML parser issues a deprecation when reading octal with a
  88. # leading zero, to comply with YAML 1.2. However PECL YAML is still YAML 1.1
  89. # compliant.
  90. # @see core/modules/config/tests/config_test/config/install/config_test.types.yml
  91. # @see \Drupal\KernelTests\Core\Config\ConfigCRUDTest::testDataTypes()
  92. # @todo Mark as required again in https://www.drupal.org/project/drupal/issues/3205480
  93. requiredKey: false
  94. type: integer
  95. label: 'Octal'
  96. string:
  97. type: string
  98. label: 'String'
  99. string_int:
  100. type: string
  101. label: 'String integer'
  102. # All the above types, but now nullable.
  103. nullable_array:
  104. type: sequence
  105. label: 'Nullable array'
  106. nullable: true
  107. sequence:
  108. type: string
  109. label: 'Item'
  110. nullable_boolean:
  111. type: boolean
  112. label: 'Nullable boolean'
  113. nullable: true
  114. nullable_exp:
  115. type: float
  116. label: 'Nullable exponential'
  117. nullable: true
  118. nullable_float:
  119. type: float
  120. label: 'Nullable float'
  121. nullable: true
  122. nullable_float_as_integer:
  123. type: float
  124. label: 'Float'
  125. nullable: true
  126. nullable_hex:
  127. type: integer
  128. label: 'Nullable hexadecimal'
  129. nullable: true
  130. nullable_int:
  131. type: integer
  132. label: 'Nullable integer'
  133. nullable: true
  134. nullable_octal:
  135. type: integer
  136. label: 'Nullable octal'
  137. nullable: true
  138. nullable_string:
  139. type: string
  140. label: 'Nullable string'
  141. nullable: true
  142. nullable_string_int:
  143. type: string
  144. label: 'Nullable string integer'
  145. nullable: true
  146. # To test required vs optional keys.
  147. mapping_with_only_required_keys:
  148. type: mapping
  149. label: 'Mapping with only required keys'
  150. mapping:
  151. north: { type: string }
  152. east: { type: string }
  153. south: { type: string }
  154. west: { type: string }
  155. mapping_with_some_required_keys:
  156. type: mapping
  157. label: 'Mapping with only required keys'
  158. mapping:
  159. north: { type: string }
  160. east: { type: string, requiredKey: false }
  161. south: { type: string }
  162. west: { type: string, requiredKey: false }
  163. mapping_with_only_optional_keys:
  164. type: mapping
  165. label: 'Mapping with only optional keys'
  166. mapping:
  167. north: { type: string, requiredKey: false }
  168. east: { type: string, requiredKey: false }
  169. south: { type: string, requiredKey: false }
  170. west: { type: string, requiredKey: false }
  171. config_test.types.fully_validatable:
  172. type: config_test.types
  173. constraints:
  174. FullyValidatable: ~
  175. config_test.no_status.default:
  176. type: config_object
  177. label: 'Configuration no status default'
  178. mapping:
  179. id:
  180. type: string
  181. label: 'ID'
  182. label:
  183. type: label
  184. label: 'Label'
  185. uuid:
  186. type: string
  187. label: 'UUID'
  188. config_test.system:
  189. type: config_object
  190. label: 'Configuration system'
  191. mapping:
  192. foo:
  193. type: string
  194. label: 'Foo'
  195. baz:
  196. type: string
  197. label: 'Baz'
  198. '404':
  199. type: string
  200. label: '404'
  201. config_test.new:
  202. type: config_object
  203. label: 'Configuration test'
  204. mapping:
  205. key:
  206. type: string
  207. label: 'Test setting'
  208. new_key:
  209. type: string
  210. label: 'Test setting'
  211. uuid:
  212. type: uuid
  213. config_test.old:
  214. type: config_test.new
  215. config_test.foo:
  216. type: config_object
  217. label: 'Configuration test'
  218. mapping:
  219. value:
  220. type: mapping
  221. label: 'Value'
  222. mapping:
  223. key:
  224. type: string
  225. label: 'Key'
  226. label:
  227. type: label
  228. label: 'Label'
  229. config_test.bar:
  230. type: config_test.foo
  231. system.action.*.third_party.config_test:
  232. type: mapping
  233. label: 'Third party setting for action entity'
  234. mapping:
  235. integer:
  236. type: integer
  237. label: 'Integer'
  238. config_test.validation:
  239. type: config_object
  240. label: 'Configuration type'
  241. constraints:
  242. Callback:
  243. callback: [\Drupal\config_test\ConfigValidation, validateMapping]
  244. mapping:
  245. llama:
  246. type: string
  247. constraints:
  248. Callback:
  249. callback: [\Drupal\config_test\ConfigValidation, validateLlama]
  250. cat:
  251. type: mapping
  252. mapping:
  253. type:
  254. type: string
  255. constraints:
  256. Callback:
  257. callback: [\Drupal\config_test\ConfigValidation, validateCats]
  258. count:
  259. type: integer
  260. constraints:
  261. Callback:
  262. callback: [\Drupal\config_test\ConfigValidation, validateCatCount]
  263. giraffe:
  264. type: sequence
  265. constraints:
  266. Callback:
  267. callback: [\Drupal\config_test\ConfigValidation, validateSequence]
  268. sequence:
  269. type: string
  270. constraints:
  271. Callback:
  272. callback: [\Drupal\config_test\ConfigValidation, validateGiraffes]
  273. uuid:
  274. type: uuid
  275. # @see \Drupal\KernelTests\Config\TypedConfigTest::testNotBlankInteractionWithNotNull()
  276. string__not_blank:
  277. type: string
  278. constraints:
  279. NotBlank: {}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.