dd2280bdc1cabc7a7f901c32c3a0a27f1c4ed11c
[barectf.git] / barectf / schemas / config / 3 / config.yaml
1 # The MIT License (MIT)
2 #
3 # Copyright (c) 2020 Philippe Proulx <pproulx@efficios.com>
4 #
5 # Permission is hereby granted, free of charge, to any person obtaining
6 # a copy of this software and associated documentation files (the
7 # "Software"), to deal in the Software without restriction, including
8 # without limitation the rights to use, copy, modify, merge, publish,
9 # distribute, sublicense, and/or sell copies of the Software, and to
10 # permit persons to whom the Software is furnished to do so, subject to
11 # the following conditions:
12 #
13 # The above copyright notice and this permission notice shall be
14 # included in all copies or substantial portions of the Software.
15 #
16 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17 # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18 # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
19 # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
20 # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
21 # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
22 # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23
24 $schema: http://json-schema.org/draft-07/schema#
25 $id: https://barectf.org/schemas/config/3/config.json
26 title: Effective configuration object
27 definitions:
28 feature-uint-ft:
29 type: object
30 allOf:
31 - properties:
32 class:
33 enum:
34 - uint
35 - unsigned-int
36 - unsigned-integer
37 - uenum
38 - unsigned-enum
39 - unsigned-enumeration
40 - if:
41 properties:
42 class:
43 $ref: https://barectf.org/schemas/config/3/field-type.json#/definitions/uint-ft-class-prop
44 then:
45 $ref: https://barectf.org/schemas/config/3/field-type.json#/definitions/uint-ft
46 - if:
47 properties:
48 class:
49 $ref: https://barectf.org/schemas/config/3/field-type.json#/definitions/uenum-ft-class-prop
50 then:
51 $ref: https://barectf.org/schemas/config/3/field-type.json#/definitions/uenum-ft
52 opt-or-def-feature-uint-ft:
53 if:
54 type: object
55 then:
56 $ref: '#/definitions/feature-uint-ft'
57 else:
58 oneOf:
59 - type: boolean
60 - type: 'null'
61 opt-feature-uint-ft:
62 if:
63 type: object
64 then:
65 $ref: '#/definitions/feature-uint-ft'
66 else:
67 if:
68 type: boolean
69 then:
70 const: True
71 else:
72 type: 'null'
73 opt-struct-ft:
74 if:
75 type: object
76 then:
77 $ref: https://barectf.org/schemas/config/3/field-type.json#/definitions/struct-ft
78 else:
79 type: 'null'
80 trace:
81 title: Trace object
82 type: object
83 properties:
84 type:
85 $ref: '#/definitions/trace-type'
86 environment:
87 $ref: https://barectf.org/schemas/config/common/common.json#/definitions/opt-env-prop
88 required:
89 - type
90 trace-type:
91 title: Trace type object
92 type: object
93 properties:
94 native-byte-order:
95 $ref: https://barectf.org/schemas/config/common/common.json#/definitions/byte-order-prop
96 uuid:
97 $ref: https://barectf.org/schemas/config/common/common.json#/definitions/opt-trace-type-uuid-prop
98 $features:
99 if:
100 type: object
101 then:
102 properties:
103 magic-field-type:
104 allOf:
105 - $ref: '#/definitions/opt-or-def-feature-uint-ft'
106 - if:
107 type: object
108 then:
109 properties:
110 size:
111 const: 32
112 uuid-field-type:
113 if:
114 type: object
115 then:
116 allOf:
117 - $ref: https://barectf.org/schemas/config/3/field-type.json#/definitions/static-array-ft
118 - properties:
119 length:
120 const: 16
121 element-field-type:
122 allOf:
123 - $ref: '#/definitions/feature-uint-ft'
124 - properties:
125 size:
126 const: 8
127 alignment:
128 if:
129 type: integer
130 then:
131 const: 8
132 else:
133 if:
134 type: boolean
135 then:
136 const: false
137 else:
138 type: 'null'
139 data-stream-type-id-field-type:
140 $ref: '#/definitions/opt-or-def-feature-uint-ft'
141 additionalProperties: false
142 else:
143 type: 'null'
144 clock-types:
145 title: Clock types object
146 type: object
147 patternProperties:
148 '^[A-Za-z_][A-Za-z0-9_]*$':
149 $ref: '#/definitions/clock-type'
150 additionalProperties: false
151 data-stream-types:
152 title: Data stream types object
153 type: object
154 patternProperties:
155 '^[A-Za-z_][A-Za-z0-9_]*$':
156 $ref: '#/definitions/dst'
157 additionalProperties: false
158 minProperties: 1
159 required:
160 - native-byte-order
161 - data-stream-types
162 additionalProperties: false
163 clock-type:
164 title: Clock type object
165 type: object
166 properties:
167 uuid:
168 $ref: https://barectf.org/schemas/config/common/common.json#/definitions/opt-uuid-prop
169 description:
170 $ref: https://barectf.org/schemas/config/common/common.json#/definitions/opt-string
171 frequency:
172 $ref: https://barectf.org/schemas/config/common/common.json#/definitions/opt-int-min-1
173 precision:
174 $ref: https://barectf.org/schemas/config/common/common.json#/definitions/opt-int-min-0
175 offset:
176 $ref: https://barectf.org/schemas/config/common/common.json#/definitions/opt-clock-type-offset-prop
177 origin-is-unix-epoch:
178 $ref: https://barectf.org/schemas/config/common/common.json#/definitions/opt-bool
179 $c-type:
180 $ref: https://barectf.org/schemas/config/common/common.json#/definitions/opt-string
181 additionalProperties: false
182 dst:
183 title: Data stream type object
184 type: object
185 properties:
186 $is-default:
187 $ref: https://barectf.org/schemas/config/common/common.json#/definitions/opt-bool
188 $default-clock-type-name:
189 if:
190 type: string
191 then:
192 $ref: https://barectf.org/schemas/config/common/common.json#/definitions/iden-prop
193 else:
194 type: 'null'
195 $features:
196 if:
197 type: object
198 then:
199 properties:
200 packet:
201 if:
202 type: object
203 then:
204 properties:
205 total-size-field-type:
206 $ref: '#/definitions/opt-feature-uint-ft'
207 content-size-field-type:
208 $ref: '#/definitions/opt-feature-uint-ft'
209 beginning-timestamp-field-type:
210 $ref: '#/definitions/opt-or-def-feature-uint-ft'
211 end-timestamp-field-type:
212 $ref: '#/definitions/opt-or-def-feature-uint-ft'
213 discarded-event-records-counter-snapshot-field-type:
214 $ref: '#/definitions/opt-or-def-feature-uint-ft'
215 additionalProperties: false
216 else:
217 type: 'null'
218 event-record:
219 if:
220 type: object
221 then:
222 properties:
223 type-id-field-type:
224 $ref: '#/definitions/opt-or-def-feature-uint-ft'
225 timestamp-field-type:
226 $ref: '#/definitions/opt-or-def-feature-uint-ft'
227 additionalProperties: false
228 else:
229 type: 'null'
230 additionalProperties: false
231 else:
232 type: 'null'
233 packet-context-field-type-extra-members:
234 if:
235 type: array
236 then:
237 $ref: https://barectf.org/schemas/config/3/field-type.json#/definitions/struct-ft-members
238 else:
239 type: 'null'
240 event-record-common-context-field-type:
241 $ref: '#/definitions/opt-struct-ft'
242 event-record-types:
243 title: Event record types object
244 type: object
245 patternProperties:
246 '^[A-Za-z_][A-Za-z0-9_]*$':
247 $ref: '#/definitions/ert'
248 additionalProperties: false
249 minProperties: 1
250 required:
251 - event-record-types
252 additionalProperties: false
253 ert:
254 title: Event record type object
255 type: object
256 properties:
257 log-level:
258 $ref: https://barectf.org/schemas/config/common/common.json#/definitions/opt-int-min-0
259 specific-context-field-type:
260 $ref: '#/definitions/opt-struct-ft'
261 payload-field-type:
262 $ref: '#/definitions/opt-struct-ft'
263 additionalProperties: false
264 type: object
265 properties:
266 options:
267 title: Configuration options object
268 type: object
269 properties:
270 code-generation:
271 title: Code generation configuration options object
272 type: object
273 properties:
274 prefix:
275 if:
276 type: string
277 then:
278 $ref: https://barectf.org/schemas/config/common/common.json#/definitions/config-prefix-prop
279 else:
280 type: object
281 properties:
282 identifier:
283 $ref: https://barectf.org/schemas/config/common/common.json#/definitions/iden-prop
284 file-name:
285 type: string
286 required:
287 - identifier
288 - file-name
289 additionalProperties: false
290 header:
291 title: Header code generation configuration options object
292 type: object
293 properties:
294 identifier-prefix-definition:
295 type: boolean
296 default-data-stream-type-name-definition:
297 type: boolean
298 additionalProperties: false
299 additionalProperties: false
300 additionalProperties: false
301 trace:
302 $ref: '#/definitions/trace'
303 required:
304 - trace
305 additionalProperties: false
This page took 0.03489 seconds and 3 git commands to generate.