Reorganize JSON schemas under `barectf/schemas/config`
[barectf.git] / barectf / schemas / config / 3 / config-pre-field-type-expansion.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-pre-field-type-expansion.json
26 title: Configuration object before field type expansions
27 definitions:
28 partial-ft:
29 title: Partial field type object
30 if:
31 type: object
32 then:
33 oneOf:
34 - properties:
35 class:
36 type: string
37 required:
38 - class
39 - properties:
40 $inherit:
41 type: string
42 required:
43 - $inherit
44 properties:
45 element-field-type:
46 $ref: '#/definitions/partial-ft'
47 members:
48 if:
49 type: array
50 then:
51 items:
52 type: object
53 patternProperties:
54 '^[A-Za-z_][A-Za-z0-9_]*$':
55 if:
56 type: object
57 then:
58 properties:
59 field-type:
60 $ref: '#/definitions/partial-ft'
61 required:
62 - field-type
63 else:
64 type: string
65 minProperties: 1
66 maxProperties: 1
67 else:
68 type: 'null'
69 else:
70 oneOf:
71 - type: string
72 - type: boolean
73 - type: 'null'
74 type: object
75 properties:
76 trace:
77 title: Trace object before field type expansions
78 type: object
79 properties:
80 type:
81 title: Trace type object before field type expansions
82 type: object
83 properties:
84 $field-type-aliases:
85 title: Field type aliases object before field type expansions
86 if:
87 type: object
88 then:
89 patternProperties:
90 '.*':
91 $ref: '#/definitions/partial-ft'
92 else:
93 type: 'null'
94 $features:
95 if:
96 type: object
97 then:
98 properties:
99 magic-field-type:
100 $ref: '#/definitions/partial-ft'
101 uuid-field-type:
102 $ref: '#/definitions/partial-ft'
103 stream-type-id-field-type:
104 $ref: '#/definitions/partial-ft'
105 else:
106 type: 'null'
107 stream-types:
108 title: Stream types object before field type expansions
109 type: object
110 patternProperties:
111 '.*':
112 title: Stream type object before field type expansions
113 type: object
114 properties:
115 $features:
116 if:
117 type: object
118 then:
119 properties:
120 packet:
121 if:
122 type: object
123 then:
124 properties:
125 total-size-field-type:
126 $ref: '#/definitions/partial-ft'
127 content-size-field-type:
128 $ref: '#/definitions/partial-ft'
129 beginning-time-field-type:
130 $ref: '#/definitions/partial-ft'
131 end-time-field-type:
132 $ref: '#/definitions/partial-ft'
133 discarded-events-counter-field-type:
134 $ref: '#/definitions/partial-ft'
135 else:
136 type: 'null'
137 event:
138 if:
139 type: object
140 then:
141 properties:
142 type-id-field-type:
143 $ref: '#/definitions/partial-ft'
144 time-field-type:
145 $ref: '#/definitions/partial-ft'
146 else:
147 type: 'null'
148 else:
149 type: 'null'
150 packet-context-field-type-extra-members:
151 if:
152 type: array
153 then:
154 items:
155 type: object
156 properties:
157 field-type:
158 $ref: '#/definitions/partial-ft'
159 else:
160 type: 'null'
161 event-common-context-field-type:
162 $ref: '#/definitions/partial-ft'
163 event-types:
164 title: Event types object before field type expansions
165 type: object
166 patternProperties:
167 '.*':
168 title: Event type object before field type expansions
169 type: object
170 properties:
171 specific-context-field-type:
172 $ref: '#/definitions/partial-ft'
173 payload-field-type:
174 $ref: '#/definitions/partial-ft'
175 required:
176 - event-types
177 required:
178 - stream-types
179 required:
180 - type
181 required:
182 - trace
This page took 0.036368 seconds and 4 git commands to generate.