config_schema_test.schema.yml 6.22 KB
Newer Older
1
2
3
# Schema for the configuration files of the Configuration Schema Test module.

config_schema_test.someschema:
4
  type: config_object
5
6
7
8
9
10
11
12
13
  label: 'Schema test data'
  mapping:
    testitem:
      label: 'Test item'
    testlist:
      label: 'Test list'

config_schema_test.someschema.with_parents:
  label: 'Schema test data with parenting'
14
  type: config_object
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
  mapping:
    one_level:
      label: 'Parenting one level up'
      type: mapping
      mapping:
        target_key:
          label: 'Key used in parent relation'
          type: string
        testitem:
          type: config_schema_test.someschema.with_parents.[%parent.target_key]
    two_levels:
      label: 'Parenting two levels up'
      type: mapping
      mapping:
        target_key:
          label: 'Key used in parent relation'
          type: string
        wrapper:
          label: 'Wrapper'
          type: mapping
          mapping:
            testitem:
              type: config_schema_test.someschema.with_parents.[%parent.%parent.target_key]
    three_levels:
      label: 'Parenting three levels up'
      type: mapping
      mapping:
        target_key:
          label: 'Key used in parent relation'
          type: string
        wrapper_1:
          label: 'Wrapper 1'
          type: mapping
          mapping:
            wrapper_2:
              label: 'Wrapper 2'
              type: mapping
              mapping:
                testitem:
                  type: config_schema_test.someschema.with_parents.[%parent.%parent.%parent.target_key]

config_schema_test.someschema.with_parents.key_1:
  label: 'Test item nested one level'
  type: string
config_schema_test.someschema.with_parents.key_2:
  label: 'Test item nested two levels'
  type: string
config_schema_test.someschema.with_parents.key_3:
  label: 'Test item nested three levels'
  type: string

config_schema_test.someschema.somemodule.*.*:
67
  type: config_object
68
  label: 'Schema multiple filesystem marker test'
69
70
71
72
73
74
75
76
77
  mapping:
    testid:
      type: string
      label: 'ID'
    testdescription:
      type: text
      label: 'Description'

config_schema_test.wildcard_fallback.*:
78
  type: config_object
79
80
81
82
83
84
85
86
87
88
  label: 'Schema wildcard fallback test'
  mapping:
    testid:
      type: string
      label: 'ID'
    testdescription:
      type: text
      label: 'Description'

config_schema_test.schema_data_types:
89
  type: config_object
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
  label: 'Config test schema'
  mapping:
    config_schema_test_integer:
      type: config_schema_test_integer
    config_schema_test_integer_empty_string:
      type: config_schema_test_integer
    integer:
      type: integer
    null_integer:
      type: integer
    float:
      type: float
    null_float:
      type: float
    string:
      type: string
    null_string:
      type: string
    empty_string:
      type: string
    boolean:
      type: boolean
    no_type:
      label: 'No label'
    mapping:
      type: mapping
      mapping:
        string:
          type: string
    sequence:
120
121
122
123
      type: sequence
      sequence:
        type: boolean
    sequence_bc:
124
125
126
127
128
129
130
      type: sequence
      sequence:
        - type: boolean

config_schema_test_integer:
  type: integer
  label: 'Config test integer'
131
132

config_schema_test.ignore:
133
  type: config_object
134
135
136
137
138
139
140
141
142
143
144
145
146
147
  label: 'Ignore test'
  mapping:
    label:
      type: label
      label: 'Label'
    irrelevant:
      type: ignore
      label: 'Irrelevant'
    indescribable:
      type: ignore
      label: 'Indescribable'
    weight:
      type: integer
      label: 'Weight'
148
149

config_schema_test.plugin_types:
150
  type: config_object
151
152
153
154
  mapping:
    tests:
      type: sequence
      sequence:
155
        type: test.plugin_types.[plugin_id]
156
157
158
    test_with_parents:
      type: sequence
      sequence:
159
160
161
162
163
164
        type: mapping
        mapping:
          plugin_id:
            type: string
          settings:
            type: test_with_parents.plugin_types.[%parent.plugin_id]
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205

test.plugin_types:
  type: mapping
  mapping:
    plugin_id:
      type: string

test.plugin_types.boolean:
  type: mapping
  mapping:
    plugin_id:
      type: string
    value:
      type: boolean

test.plugin_types.boolean:*:
  type: test.plugin_types.boolean

test_with_parents.plugin_types.boolean:
  type: mapping
  mapping:
    value:
      type: boolean

test_with_parents.plugin_types.boolean:*:
  type: test_with_parents.plugin_types.boolean

test.plugin_types.*:
  type: mapping
  mapping:
    plugin_id:
      type: string
    value:
      type: string

test_with_parents.plugin_types.*:
  type: mapping
  mapping:
    value:
      type: string

206
207
config_schema_test.hook:
  type: string
208
209
210
211
212
213
214
215

config_test.dynamic.*.third_party.config_schema_test:
  type: mapping
  mapping:
    integer:
      type: integer
    string:
      type: string
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260

wrapping.config_schema_test.plugin_types:
  type: config_object
  mapping:
    tests:
      type: sequence
      sequence:
        - type: wrapping.test.plugin_types.[plugin_id]

wrapping.test.plugin_types.*:
  type: test.plugin_types.[plugin_id]
  mapping:
    wrapper_value:
      type: string

test.plugin_types.wrapper:*:
  type: test.plugin_types
  mapping:
    internal_value:
      type: string

wrapping.config_schema_test.double_brackets:
  type: config_object
  mapping:
    tests:
      type: sequence
      sequence:
        - type: wrapping.test.double_brackets.[another_key]

wrapping.test.double_brackets.*:
  type: test.double_brackets.[foo].[bar]
  mapping:
    wrapper_value:
      type: string

test.double_brackets.cat.dog:
  type: test.double_brackets
  mapping:
    another_key:
      type: string
    foo:
      type: string
    bar:
      type: string

catch's avatar
catch committed
261
262
263
264
265
266
267
268
269
270
test.double_brackets.turtle.horse:
  type: test.double_brackets
  mapping:
    another_key:
      type: integer
    foo:
      type: string
    bar:
      type: string

271
272
test.double_brackets.*:
  type: mapping
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299

wrapping.config_schema_test.other_double_brackets:
  type: config_object
  mapping:
    tests:
      type: sequence
      sequence:
        - type: wrapping.test.other_double_brackets.[id]

wrapping.test.other_double_brackets.*:
  type: test.double_brackets.[id]
  mapping:
    id:
      type: string
    foo:
      type: string
    bar:
      type: string

test.double_brackets.cat:*.*:
  type: test.double_brackets.breed

test.double_brackets.breed:
  type: test.double_brackets
  mapping:
    breed:
      type: string