Use JSON schemas to validate the layout and types of the YAML config.
[barectf.git] / barectf / schemas / 2 / config / config-pre-log-level-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/2/config/config-pre-log-level-expansion.json
26 title: Configuration object before log level expansions
27 definitions:
28 opt-log-levels:
29 title: Log level values object
30 oneOf:
31 - type: object
32 patternProperties:
33 '':
34 type: integer
35 minimum: 0
36 - type: 'null'
37 type: object
38 properties:
39 metadata:
40 title: Metadata object before log level expansions
41 type: object
42 oneOf:
43 - required:
44 - $log-levels
45 - required:
46 - log-levels
47 - allOf:
48 - not:
49 required:
50 - $log-levels
51 - not:
52 required:
53 - log-levels
54 properties:
55 $log-levels:
56 $ref: '#/definitions/opt-log-levels'
57 log-levels:
58 $ref: '#/definitions/opt-log-levels'
59 streams:
60 title: Streams object before log level expansions
61 type: object
62 patternProperties:
63 '':
64 title: Stream object before log level expansions
65 type: object
66 properties:
67 events:
68 type: object
69 patternProperties:
70 '':
71 type: object
72 properties:
73 log-level:
74 oneOf:
75 - type: string
76 - type: integer
77 minimum: 0
78 - type: 'null'
79 required:
80 - events
81 required:
82 - streams
83 required:
84 - metadata
This page took 0.031227 seconds and 4 git commands to generate.