Reorganize JSON schemas under `barectf/schemas/config`
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Thu, 3 Sep 2020 16:03:35 +0000 (12:03 -0400)
committerPhilippe Proulx <eeppeliteloop@gmail.com>
Thu, 3 Sep 2020 16:03:35 +0000 (12:03 -0400)
Instead of:

    2/
      config/
    3/
      config/
    common/
      config/

Use:

    config/
      2/
      3/
      common/

This requires less inodes.

On a more serious note, barectf might have schemas for other things than
configuration in the future, so all the existing schemas currently
really belong to the configuration domain.

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
49 files changed:
barectf/config_parse_common.py
barectf/config_parse_v2.py
barectf/config_parse_v3.py
barectf/schemas/2/config/clock-type-pre-include.yaml [deleted file]
barectf/schemas/2/config/config-min.yaml [deleted file]
barectf/schemas/2/config/config-pre-field-type-expansion.yaml [deleted file]
barectf/schemas/2/config/config-pre-include.yaml [deleted file]
barectf/schemas/2/config/config.yaml [deleted file]
barectf/schemas/2/config/event-type-pre-include.yaml [deleted file]
barectf/schemas/2/config/field-type.yaml [deleted file]
barectf/schemas/2/config/include-prop.yaml [deleted file]
barectf/schemas/2/config/metadata-pre-include.yaml [deleted file]
barectf/schemas/2/config/stream-type-pre-include.yaml [deleted file]
barectf/schemas/2/config/trace-type-pre-include.yaml [deleted file]
barectf/schemas/3/config/clock-type-pre-include.yaml [deleted file]
barectf/schemas/3/config/config-pre-field-type-expansion.yaml [deleted file]
barectf/schemas/3/config/config-pre-include.yaml [deleted file]
barectf/schemas/3/config/config-pre-log-level-alias-sub.yaml [deleted file]
barectf/schemas/3/config/config.yaml [deleted file]
barectf/schemas/3/config/event-type-pre-include.yaml [deleted file]
barectf/schemas/3/config/field-type.yaml [deleted file]
barectf/schemas/3/config/include-prop.yaml [deleted file]
barectf/schemas/3/config/stream-type-pre-include.yaml [deleted file]
barectf/schemas/3/config/trace-pre-include.yaml [deleted file]
barectf/schemas/3/config/trace-type-pre-include.yaml [deleted file]
barectf/schemas/common/config/common.yaml [deleted file]
barectf/schemas/config/2/clock-type-pre-include.yaml [new file with mode: 0644]
barectf/schemas/config/2/config-min.yaml [new file with mode: 0644]
barectf/schemas/config/2/config-pre-field-type-expansion.yaml [new file with mode: 0644]
barectf/schemas/config/2/config-pre-include.yaml [new file with mode: 0644]
barectf/schemas/config/2/config.yaml [new file with mode: 0644]
barectf/schemas/config/2/event-type-pre-include.yaml [new file with mode: 0644]
barectf/schemas/config/2/field-type.yaml [new file with mode: 0644]
barectf/schemas/config/2/include-prop.yaml [new file with mode: 0644]
barectf/schemas/config/2/metadata-pre-include.yaml [new file with mode: 0644]
barectf/schemas/config/2/stream-type-pre-include.yaml [new file with mode: 0644]
barectf/schemas/config/2/trace-type-pre-include.yaml [new file with mode: 0644]
barectf/schemas/config/3/clock-type-pre-include.yaml [new file with mode: 0644]
barectf/schemas/config/3/config-pre-field-type-expansion.yaml [new file with mode: 0644]
barectf/schemas/config/3/config-pre-include.yaml [new file with mode: 0644]
barectf/schemas/config/3/config-pre-log-level-alias-sub.yaml [new file with mode: 0644]
barectf/schemas/config/3/config.yaml [new file with mode: 0644]
barectf/schemas/config/3/event-type-pre-include.yaml [new file with mode: 0644]
barectf/schemas/config/3/field-type.yaml [new file with mode: 0644]
barectf/schemas/config/3/include-prop.yaml [new file with mode: 0644]
barectf/schemas/config/3/stream-type-pre-include.yaml [new file with mode: 0644]
barectf/schemas/config/3/trace-pre-include.yaml [new file with mode: 0644]
barectf/schemas/config/3/trace-type-pre-include.yaml [new file with mode: 0644]
barectf/schemas/config/common/common.yaml [new file with mode: 0644]

index e7906940599034ebbd90217a23bf012904d6771c..010ff8a2a39951016abe67a0fcb4602d40a34ae9 100644 (file)
@@ -355,7 +355,7 @@ class _Parser:
         self._ignore_include_not_found = ignore_include_not_found
         self._include_stack: List[str] = []
         self._resolved_ft_aliases: Set[str] = set()
-        self._schema_validator = _SchemaValidator({'common/config', f'{major_version}/config'})
+        self._schema_validator = _SchemaValidator({'config/common', f'config/{major_version}'})
         self._major_version = major_version
 
     @property
index 2fbf898addc0b1273557b7c2ea03db42295da494..9118562dfdb6c8679fd0b278799d51cd6e2cca82 100644 (file)
@@ -658,7 +658,7 @@ class _Parser(config_parse_common._Parser):
         # Make sure that the current configuration node is valid
         # considering field types are not expanded yet.
         self._schema_validator.validate(self._root_node,
-                                        '2/config/config-pre-field-type-expansion')
+                                        'config/2/config-pre-field-type-expansion')
 
         meta_node = self._root_node['metadata']
         ft_aliases_node = meta_node.get('type-aliases')
@@ -679,7 +679,7 @@ class _Parser(config_parse_common._Parser):
     def _process_ev_type_node_include(self, ev_type_node: _MapNode) -> _MapNode:
         # Make sure the event type node is valid for the inclusion
         # processing stage.
-        self._schema_validator.validate(ev_type_node, '2/config/event-type-pre-include')
+        self._schema_validator.validate(ev_type_node, 'config/2/event-type-pre-include')
 
         # process inclusions
         return self._process_node_include(ev_type_node, self._process_ev_type_node_include)
@@ -698,7 +698,7 @@ class _Parser(config_parse_common._Parser):
 
         # Make sure the stream type node is valid for the inclusion
         # processing stage.
-        self._schema_validator.validate(stream_type_node, '2/config/stream-type-pre-include')
+        self._schema_validator.validate(stream_type_node, 'config/2/stream-type-pre-include')
 
         # process inclusions
         return self._process_node_include(stream_type_node, self._process_stream_type_node_include,
@@ -709,7 +709,7 @@ class _Parser(config_parse_common._Parser):
     def _process_trace_type_node_include(self, trace_type_node: _MapNode) -> _MapNode:
         # Make sure the trace type node is valid for the inclusion
         # processing stage.
-        self._schema_validator.validate(trace_type_node, '2/config/trace-type-pre-include')
+        self._schema_validator.validate(trace_type_node, 'config/2/trace-type-pre-include')
 
         # process inclusions
         return self._process_node_include(trace_type_node, self._process_trace_type_node_include)
@@ -719,7 +719,7 @@ class _Parser(config_parse_common._Parser):
     def _process_clk_type_node_include(self, clk_type_node: _MapNode) -> _MapNode:
         # Make sure the clock type node is valid for the inclusion
         # processing stage.
-        self._schema_validator.validate(clk_type_node, '2/config/clock-type-pre-include')
+        self._schema_validator.validate(clk_type_node, 'config/2/clock-type-pre-include')
 
         # process inclusions
         return self._process_node_include(clk_type_node, self._process_clk_type_node_include)
@@ -751,7 +751,7 @@ class _Parser(config_parse_common._Parser):
 
         # Make sure the metadata node is valid for the inclusion
         # processing stage.
-        self._schema_validator.validate(meta_node, '2/config/metadata-pre-include')
+        self._schema_validator.validate(meta_node, 'config/2/metadata-pre-include')
 
         # process inclusions
         return self._process_node_include(meta_node, self._process_meta_node_include,
@@ -779,7 +779,7 @@ class _Parser(config_parse_common._Parser):
         # First, make sure the configuration node itself is valid for
         # the inclusion processing stage.
         self._schema_validator.validate(self._root_node,
-                                        '2/config/config-pre-include')
+                                        'config/2/config-pre-include')
 
         # Process metadata node inclusions.
         #
@@ -799,7 +799,7 @@ class _Parser(config_parse_common._Parser):
         #
         # * Process inclusions.
         # * Expand field types (aliases and inheritance).
-        self._schema_validator.validate(self._root_node, '2/config/config-min')
+        self._schema_validator.validate(self._root_node, 'config/2/config-min')
 
         # process configuration node inclusions
         self._process_config_includes()
@@ -839,7 +839,7 @@ class _Parser(config_parse_common._Parser):
         # event type nodes can be log level aliases. Log level aliases
         # are also a feature of a barectf 3 configuration node,
         # therefore this is compatible.
-        self._schema_validator.validate(self._root_node, '2/config/config')
+        self._schema_validator.validate(self._root_node, 'config/2/config')
 
         # Transform the current configuration node into a valid v3
         # configuration node.
index fccf1a12237a6389ed09380a6f53317e7f8f9f6a..5977809902d05b98964a6efce4e6fb40e6e4cfa0 100644 (file)
@@ -964,7 +964,7 @@ class _Parser(barectf_config_parse_common._Parser):
         # Make sure that the current configuration node is valid
         # considering field types are not expanded yet.
         self._schema_validator.validate(self.config_node,
-                                        '3/config/config-pre-field-type-expansion')
+                                        'config/3/config-pre-field-type-expansion')
 
         prop_name = '$field-type-aliases'
         ft_aliases_node = self._trace_type_node.get(prop_name)
@@ -995,7 +995,7 @@ class _Parser(barectf_config_parse_common._Parser):
         # Make sure that the current configuration node is valid
         # considering log level aliases are not substituted yet.
         self._schema_validator.validate(self.config_node,
-                                        '3/config/config-pre-log-level-alias-sub')
+                                        'config/3/config-pre-log-level-alias-sub')
 
         log_level_aliases_prop_name = '$log-level-aliases'
         log_level_aliases_node = self._trace_type_node.get(log_level_aliases_prop_name)
@@ -1234,7 +1234,7 @@ class _Parser(barectf_config_parse_common._Parser):
     def _process_ev_type_node_include(self, ev_type_node: _MapNode) -> _MapNode:
         # Make sure the event type node is valid for the inclusion
         # processing stage.
-        self._schema_validator.validate(ev_type_node, '3/config/event-type-pre-include')
+        self._schema_validator.validate(ev_type_node, 'config/3/event-type-pre-include')
 
         # process inclusions
         return self._process_node_include(ev_type_node, self._process_ev_type_node_include)
@@ -1253,7 +1253,7 @@ class _Parser(barectf_config_parse_common._Parser):
 
         # Make sure the stream type node is valid for the inclusion
         # processing stage.
-        self._schema_validator.validate(stream_type_node, '3/config/stream-type-pre-include')
+        self._schema_validator.validate(stream_type_node, 'config/3/stream-type-pre-include')
 
         # process inclusions
         return self._process_node_include(stream_type_node, self._process_stream_type_node_include,
@@ -1264,7 +1264,7 @@ class _Parser(barectf_config_parse_common._Parser):
     def _process_clk_type_node_include(self, clk_type_node: _MapNode) -> _MapNode:
         # Make sure the clock type node is valid for the inclusion
         # processing stage.
-        self._schema_validator.validate(clk_type_node, '3/config/clock-type-pre-include')
+        self._schema_validator.validate(clk_type_node, 'config/3/clock-type-pre-include')
 
         # process inclusions
         return self._process_node_include(clk_type_node, self._process_clk_type_node_include)
@@ -1291,7 +1291,7 @@ class _Parser(barectf_config_parse_common._Parser):
 
         # Make sure the trace type node is valid for the inclusion
         # processing stage.
-        self._schema_validator.validate(trace_type_node, '3/config/trace-type-pre-include')
+        self._schema_validator.validate(trace_type_node, 'config/3/trace-type-pre-include')
 
         # process inclusions
         return self._process_node_include(trace_type_node, self._process_trace_type_node_include,
@@ -1306,7 +1306,7 @@ class _Parser(barectf_config_parse_common._Parser):
 
         # Make sure the trace node is valid for the inclusion processing
         # stage.
-        self._schema_validator.validate(trace_node, '3/config/trace-pre-include')
+        self._schema_validator.validate(trace_node, 'config/3/trace-pre-include')
 
         # process inclusions
         return self._process_node_include(trace_node, self._process_trace_node_include,
@@ -1338,7 +1338,7 @@ class _Parser(barectf_config_parse_common._Parser):
         #
         # First, make sure the configuration node itself is valid for
         # the inclusion processing stage.
-        self._schema_validator.validate(self.config_node, '3/config/config-pre-include')
+        self._schema_validator.validate(self.config_node, 'config/3/config-pre-include')
 
         # Process trace node inclusions.
         #
@@ -1383,7 +1383,7 @@ class _Parser(barectf_config_parse_common._Parser):
 
         # At this point, the configuration node must be valid as an
         # effective configuration node.
-        self._schema_validator.validate(self.config_node, '3/config/config')
+        self._schema_validator.validate(self.config_node, 'config/3/config')
 
         # Normalize properties.
         #
diff --git a/barectf/schemas/2/config/clock-type-pre-include.yaml b/barectf/schemas/2/config/clock-type-pre-include.yaml
deleted file mode 100644 (file)
index 5ca2cf1..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2020 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining
-# a copy of this software and associated documentation files (the
-# "Software"), to deal in the Software without restriction, including
-# without limitation the rights to use, copy, modify, merge, publish,
-# distribute, sublicense, and/or sell copies of the Software, and to
-# permit persons to whom the Software is furnished to do so, subject to
-# the following conditions:
-#
-# The above copyright notice and this permission notice shall be
-# included in all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
-# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-$schema: http://json-schema.org/draft-07/schema#
-$id: https://barectf.org/schemas/2/config/clock-type-pre-include.json
-title: Clock type object before inclusions
-type: object
-properties:
-  $include:
-    $ref: https://barectf.org/schemas/2/config/include-prop.json
diff --git a/barectf/schemas/2/config/config-min.yaml b/barectf/schemas/2/config/config-min.yaml
deleted file mode 100644 (file)
index 1984f21..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2020 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining
-# a copy of this software and associated documentation files (the
-# "Software"), to deal in the Software without restriction, including
-# without limitation the rights to use, copy, modify, merge, publish,
-# distribute, sublicense, and/or sell copies of the Software, and to
-# permit persons to whom the Software is furnished to do so, subject to
-# the following conditions:
-#
-# The above copyright notice and this permission notice shall be
-# included in all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
-# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-$schema: http://json-schema.org/draft-07/schema#
-$id: https://barectf.org/schemas/2/config/config-min.json
-title: Minimal configuration object
-type: object
-properties:
-  version:
-    type: string
-    enum:
-      - '2.0'
-      - '2.1'
-      - '2.2'
-required:
-  - version
diff --git a/barectf/schemas/2/config/config-pre-field-type-expansion.yaml b/barectf/schemas/2/config/config-pre-field-type-expansion.yaml
deleted file mode 100644 (file)
index d310885..0000000
+++ /dev/null
@@ -1,119 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2020 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining
-# a copy of this software and associated documentation files (the
-# "Software"), to deal in the Software without restriction, including
-# without limitation the rights to use, copy, modify, merge, publish,
-# distribute, sublicense, and/or sell copies of the Software, and to
-# permit persons to whom the Software is furnished to do so, subject to
-# the following conditions:
-#
-# The above copyright notice and this permission notice shall be
-# included in all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
-# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-$schema: http://json-schema.org/draft-07/schema#
-$id: https://barectf.org/schemas/2/config/config-pre-field-type-expansion.json
-title: Configuration object before field type expansions
-definitions:
-  partial-ft:
-    title: Partial field type object
-    if:
-      type: object
-    then:
-      oneOf:
-        - properties:
-            class:
-              type: string
-          required:
-            - class
-        - properties:
-            inherit:
-              type: string
-          required:
-            - inherit
-        - properties:
-            $inherit:
-              type: string
-          required:
-            - $inherit
-      properties:
-        value-type:
-          $ref: '#/definitions/partial-ft'
-        element-type:
-          $ref: '#/definitions/partial-ft'
-        fields:
-          if:
-            type: object
-          then:
-            patternProperties:
-              '.*':
-                $ref: '#/definitions/partial-ft'
-          else:
-            type: 'null'
-    else:
-      oneOf:
-        - type: string
-        - type: 'null'
-type: object
-properties:
-  metadata:
-    title: Metadata object before field type expansions
-    type: object
-    properties:
-      type-aliases:
-        title: Field type aliases object before field type expansions
-        if:
-          type: object
-        then:
-          patternProperties:
-            '.*':
-              $ref: '#/definitions/partial-ft'
-        else:
-          type: 'null'
-      trace:
-        title: Trace type object before field type expansions
-        type: object
-        properties:
-          packet-header-type:
-            $ref: '#/definitions/partial-ft'
-      streams:
-        title: Stream types object before field type expansions
-        type: object
-        patternProperties:
-          '.*':
-            title: Stream type object before field type expansions
-            type: object
-            properties:
-              packet-context-type:
-                $ref: '#/definitions/partial-ft'
-              event-header-type:
-                $ref: '#/definitions/partial-ft'
-              event-context-type:
-                $ref: '#/definitions/partial-ft'
-              events:
-                type: object
-                patternProperties:
-                  '.*':
-                    type: object
-                    properties:
-                      context-type:
-                        $ref: '#/definitions/partial-ft'
-                      payload-type:
-                        $ref: '#/definitions/partial-ft'
-            required:
-              - events
-    required:
-      - trace
-      - streams
-required:
-  - metadata
diff --git a/barectf/schemas/2/config/config-pre-include.yaml b/barectf/schemas/2/config/config-pre-include.yaml
deleted file mode 100644 (file)
index afec6e1..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2020 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining
-# a copy of this software and associated documentation files (the
-# "Software"), to deal in the Software without restriction, including
-# without limitation the rights to use, copy, modify, merge, publish,
-# distribute, sublicense, and/or sell copies of the Software, and to
-# permit persons to whom the Software is furnished to do so, subject to
-# the following conditions:
-#
-# The above copyright notice and this permission notice shall be
-# included in all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
-# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-$schema: http://json-schema.org/draft-07/schema#
-$id: https://barectf.org/schemas/2/config/config-pre-include.json
-title: Configuration object before inclusions
-type: object
-properties:
-  metadata:
-    $ref: https://barectf.org/schemas/2/config/metadata-pre-include.json
-required:
-  - metadata
diff --git a/barectf/schemas/2/config/config.yaml b/barectf/schemas/2/config/config.yaml
deleted file mode 100644 (file)
index eb38c55..0000000
+++ /dev/null
@@ -1,297 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2020 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining
-# a copy of this software and associated documentation files (the
-# "Software"), to deal in the Software without restriction, including
-# without limitation the rights to use, copy, modify, merge, publish,
-# distribute, sublicense, and/or sell copies of the Software, and to
-# permit persons to whom the Software is furnished to do so, subject to
-# the following conditions:
-#
-# The above copyright notice and this permission notice shall be
-# included in all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
-# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-$schema: http://json-schema.org/draft-07/schema#
-$id: https://barectf.org/schemas/2/config/config.json
-title: Effective configuration object
-definitions:
-  opt-struct-ft:
-    if:
-      type: object
-    then:
-      $ref: https://barectf.org/schemas/2/config/field-type.json#/definitions/struct-ft
-    else:
-      type: 'null'
-  uint-ft:
-    allOf:
-      - $ref: https://barectf.org/schemas/2/config/field-type.json#/definitions/int-ft
-      - properties:
-          signed:
-            const: false
-  uint-ft-ts:
-    allOf:
-      - $ref: '#/definitions/uint-ft'
-      - properties:
-          property-mappings:
-            type: array
-        required:
-          - property-mappings
-  packet-header-ft-prop:
-    allOf:
-      - $ref: '#/definitions/opt-struct-ft'
-      - if:
-          type: object
-          properties:
-            fields:
-              type: object
-        then:
-          properties:
-            fields:
-              properties:
-                magic:
-                  allOf:
-                    - $ref: '#/definitions/uint-ft'
-                    - properties:
-                        size:
-                          const: 32
-                uuid:
-                  allOf:
-                    - $ref: https://barectf.org/schemas/2/config/field-type.json#/definitions/static-array-ft
-                    - properties:
-                        length:
-                          const: 16
-                        element-type:
-                          allOf:
-                            - $ref: https://barectf.org/schemas/2/config/field-type.json#/definitions/int-ft
-                            - properties:
-                                size:
-                                  const: 8
-                                signed:
-                                  const: false
-                                align:
-                                  enum:
-                                    - 1
-                                    - 2
-                                    - 4
-                                    - 8
-                stream_id:
-                  $ref: '#/definitions/uint-ft'
-                stream_instance_id:
-                  $ref: '#/definitions/uint-ft'
-  trace-type:
-    title: Trace type object
-    type: object
-    properties:
-      byte-order:
-        $ref: https://barectf.org/schemas/common/config/common.json#/definitions/byte-order-prop
-      uuid:
-        $ref: https://barectf.org/schemas/common/config/common.json#/definitions/opt-trace-type-uuid-prop
-      packet-header-type:
-        $ref: '#/definitions/packet-header-ft-prop'
-    required:
-      - byte-order
-    additionalProperties: false
-  clock-type:
-    title: Clock type object
-    type: object
-    oneOf:
-      - required:
-          - $return-ctype
-      - required:
-          - return-ctype
-      - allOf:
-          - not:
-              required:
-                - $return-ctype
-          - not:
-              required:
-                - return-ctype
-    properties:
-      uuid:
-        $ref: https://barectf.org/schemas/common/config/common.json#/definitions/opt-uuid-prop
-      description:
-        $ref: https://barectf.org/schemas/common/config/common.json#/definitions/opt-string
-      freq:
-        $ref: https://barectf.org/schemas/common/config/common.json#/definitions/opt-int-min-1
-      error-cycles:
-        $ref: https://barectf.org/schemas/common/config/common.json#/definitions/opt-int-min-0
-      offset:
-        $ref: https://barectf.org/schemas/common/config/common.json#/definitions/opt-clock-type-offset-prop
-      absolute:
-        $ref: https://barectf.org/schemas/common/config/common.json#/definitions/opt-bool
-      return-ctype:
-        $ref: https://barectf.org/schemas/common/config/common.json#/definitions/opt-string
-      $return-ctype:
-        $ref: https://barectf.org/schemas/common/config/common.json#/definitions/opt-string
-    additionalProperties: false
-  $default-stream:
-    if:
-      type: string
-    then:
-      pattern: '^[A-Za-z_][A-Za-z0-9_]*$'
-    else:
-      type: 'null'
-  packet-context-ft-prop:
-    allOf:
-      - $ref: https://barectf.org/schemas/2/config/field-type.json#/definitions/struct-ft
-      - properties:
-          fields:
-            properties:
-              packet_size:
-                $ref: '#/definitions/uint-ft'
-              content_size:
-                $ref: '#/definitions/uint-ft'
-              events_discarded:
-                $ref: '#/definitions/uint-ft'
-              packet_seq_num:
-                $ref: '#/definitions/uint-ft'
-              timestamp_begin:
-                $ref: '#/definitions/uint-ft-ts'
-              timestamp_end:
-                $ref: '#/definitions/uint-ft-ts'
-            required:
-              - packet_size
-              - content_size
-            dependencies:
-              timestamp_begin:
-                - timestamp_end
-              timestamp_end:
-                - timestamp_begin
-        required:
-          - fields
-  event-header-ft-prop:
-    allOf:
-      - $ref: '#/definitions/opt-struct-ft'
-      - if:
-          type: object
-          properties:
-            fields:
-              type: object
-        then:
-          properties:
-            fields:
-              properties:
-                id:
-                  $ref: '#/definitions/uint-ft'
-                timestamp:
-                  $ref: '#/definitions/uint-ft-ts'
-  stream-type:
-    title: Stream type object
-    type: object
-    properties:
-      $default:
-        $ref: https://barectf.org/schemas/common/config/common.json#/definitions/opt-bool
-      packet-context-type:
-        $ref: '#/definitions/packet-context-ft-prop'
-      event-header-type:
-        $ref: '#/definitions/event-header-ft-prop'
-      event-context-type:
-        $ref: '#/definitions/opt-struct-ft'
-      events:
-        title: Event types object
-        type: object
-        patternProperties:
-          '^[A-Za-z_][A-Za-z0-9_]*$':
-            $ref: '#/definitions/event-type'
-        additionalProperties: false
-        minProperties: 1
-    required:
-      - packet-context-type
-      - events
-    additionalProperties: false
-  event-type:
-    title: Event type object
-    type: object
-    properties:
-      log-level:
-        if:
-          type: integer
-        then:
-          minimum: 0
-        else:
-          oneOf:
-            - type: string
-            - type: 'null'
-      context-type:
-        $ref: '#/definitions/opt-struct-ft'
-      payload-type:
-        $ref: '#/definitions/opt-struct-ft'
-    additionalProperties: false
-type: object
-properties:
-  version:
-    type: string
-    enum:
-      - '2.0'
-      - '2.1'
-      - '2.2'
-  prefix:
-    $ref: https://barectf.org/schemas/common/config/common.json#/definitions/config-prefix-prop
-  options:
-    title: Configuration options object
-    type: object
-    properties:
-      gen-prefix-def:
-        type: boolean
-      gen-default-stream-def:
-        type: boolean
-    additionalProperties: false
-  metadata:
-    title: Metadata object
-    type: object
-    oneOf:
-      - required:
-          - $log-levels
-      - required:
-          - log-levels
-      - allOf:
-          - not:
-              required:
-                - $log-levels
-          - not:
-              required:
-                - log-levels
-    properties:
-      log-levels:
-        $ref: https://barectf.org/schemas/common/config/common.json#/definitions/opt-log-level-aliases-prop
-      $log-levels:
-        $ref: https://barectf.org/schemas/common/config/common.json#/definitions/opt-log-level-aliases-prop
-      trace:
-        $ref: '#/definitions/trace-type'
-      env:
-        $ref: https://barectf.org/schemas/common/config/common.json#/definitions/opt-env-prop
-      clocks:
-        title: Clock types object
-        type: object
-        patternProperties:
-          '^[A-Za-z_][A-Za-z0-9_]*$':
-            $ref: '#/definitions/clock-type'
-        additionalProperties: false
-      $default-stream:
-        $ref: https://barectf.org/schemas/common/config/common.json#/definitions/opt-string
-      streams:
-        title: Stream types object
-        type: object
-        patternProperties:
-          '^[A-Za-z_][A-Za-z0-9_]*$':
-            $ref: '#/definitions/stream-type'
-        additionalProperties: false
-        minProperties: 1
-    required:
-      - trace
-      - streams
-    additionalProperties: false
-required:
-  - version
-  - metadata
-additionalProperties: false
diff --git a/barectf/schemas/2/config/event-type-pre-include.yaml b/barectf/schemas/2/config/event-type-pre-include.yaml
deleted file mode 100644 (file)
index bf149b0..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2020 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining
-# a copy of this software and associated documentation files (the
-# "Software"), to deal in the Software without restriction, including
-# without limitation the rights to use, copy, modify, merge, publish,
-# distribute, sublicense, and/or sell copies of the Software, and to
-# permit persons to whom the Software is furnished to do so, subject to
-# the following conditions:
-#
-# The above copyright notice and this permission notice shall be
-# included in all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
-# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-$schema: http://json-schema.org/draft-07/schema#
-$id: https://barectf.org/schemas/2/config/event-type-pre-include.json
-title: Event type object before inclusions
-type: object
-properties:
-  $include:
-    $ref: https://barectf.org/schemas/2/config/include-prop.json
diff --git a/barectf/schemas/2/config/field-type.yaml b/barectf/schemas/2/config/field-type.yaml
deleted file mode 100644 (file)
index d399ba1..0000000
+++ /dev/null
@@ -1,312 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2020 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining
-# a copy of this software and associated documentation files (the
-# "Software"), to deal in the Software without restriction, including
-# without limitation the rights to use, copy, modify, merge, publish,
-# distribute, sublicense, and/or sell copies of the Software, and to
-# permit persons to whom the Software is furnished to do so, subject to
-# the following conditions:
-#
-# The above copyright notice and this permission notice shall be
-# included in all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
-# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-$schema: http://json-schema.org/draft-07/schema#
-$id: https://barectf.org/schemas/2/config/field-type.json
-title: Effective field type object
-definitions:
-  opt-encoding-prop:
-    title: Encoding property value
-    if:
-      type: string
-    then:
-      enum:
-        - utf8
-        - UTF8
-        - utf-8
-        - UTF-8
-        - Utf-8
-        - ascii
-        - Ascii
-        - ASCII
-        - none
-        - None
-        - NONE
-    else:
-      type: 'null'
-  int-ft-class-prop:
-    type: string
-    enum:
-      - int
-      - integer
-  int-ft:
-    title: Integer field type object
-    type: object
-    properties:
-      class:
-        $ref: '#/definitions/int-ft-class-prop'
-      size:
-        $ref: https://barectf.org/schemas/common/config/common.json#/definitions/int-ft-size-prop
-      signed:
-        oneOf:
-          - type: boolean
-          - type: 'null'
-      align:
-        $ref: https://barectf.org/schemas/common/config/common.json#/definitions/opt-int-min-1
-      byte-order:
-        $ref: https://barectf.org/schemas/common/config/common.json#/definitions/opt-byte-order-prop
-      base:
-        $ref: https://barectf.org/schemas/common/config/common.json#/definitions/opt-int-ft-preferred-display-base-prop
-      encoding:
-        $ref: '#/definitions/opt-encoding-prop'
-      property-mappings:
-        if:
-          type: array
-        then:
-          items:
-            type: object
-            properties:
-              type:
-                type: string
-                const: clock
-              name:
-                type: string
-                pattern: '^[A-Za-z_][A-Za-z0-9_]*$'
-              property:
-                type: string
-                const: value
-            required:
-              - type
-              - name
-              - property
-            additionalProperties: false
-          minItems: 1
-          maxItems: 1
-        else:
-          type: 'null'
-    required:
-      - class
-      - size
-    additionalProperties: false
-  real-ft-class-prop:
-    type: string
-    enum:
-      - flt
-      - float
-      - floating-point
-  real-ft:
-    title: Real field type object
-    type: object
-    properties:
-      class:
-        $ref: '#/definitions/real-ft-class-prop'
-      size:
-        type: object
-        properties:
-          exp:
-            type: integer
-          mant:
-            type: integer
-        oneOf:
-          - properties:
-              exp:
-                const: 8
-              mant:
-                const: 24
-          - properties:
-              exp:
-                const: 11
-              mant:
-                const: 53
-        required:
-          - exp
-          - mant
-        additionalProperties: false
-      align:
-        $ref: https://barectf.org/schemas/common/config/common.json#/definitions/opt-int-min-1
-      byte-order:
-        $ref: https://barectf.org/schemas/common/config/common.json#/definitions/opt-byte-order-prop
-    required:
-      - class
-      - size
-    additionalProperties: false
-  enum-ft-class-prop:
-    type: string
-    enum:
-      - enum
-      - enumeration
-  enum-ft:
-    title: Enumeration field type object
-    type: object
-    properties:
-      class:
-        $ref: '#/definitions/enum-ft-class-prop'
-      value-type:
-        $ref: '#/definitions/int-ft'
-      members:
-        type: array
-        items:
-          if:
-            type: object
-          then:
-            properties:
-              label:
-                type: string
-              value:
-                if:
-                  type: array
-                then:
-                  items:
-                    type: integer
-                  minItems: 2
-                  maxItems: 2
-                else:
-                  type: integer
-            additionalProperties: false
-            required:
-              - label
-              - value
-          else:
-            type: string
-    required:
-      - class
-      - value-type
-    additionalProperties: false
-  string-ft-class-prop:
-    type: string
-    enum:
-      - str
-      - string
-  string-ft:
-    title: String field type object
-    type: object
-    properties:
-      class:
-        $ref: '#/definitions/string-ft-class-prop'
-      encoding:
-        $ref: '#/definitions/opt-encoding-prop'
-    required:
-      - class
-    additionalProperties: false
-  static-array-ft-class-prop:
-    type: string
-    const: array
-  static-array-ft:
-    title: Static array field type object
-    type: object
-    properties:
-      class:
-        $ref: '#/definitions/static-array-ft-class-prop'
-      element-type:
-        $ref: '#/definitions/ft'
-      length:
-        type: integer
-        minimum: 0
-    required:
-      - class
-      - element-type
-      - length
-    additionalProperties: false
-  struct-ft-class-prop:
-    type: string
-    enum:
-      - struct
-      - structure
-  struct-ft:
-    title: Structure field type object
-    type: object
-    properties:
-      class:
-        $ref: '#/definitions/struct-ft-class-prop'
-      min-align:
-        $ref: https://barectf.org/schemas/common/config/common.json#/definitions/opt-int-min-1
-      fields:
-        if:
-          type: object
-        then:
-          patternProperties:
-            '^[A-Za-z_][A-Za-z0-9_]*$':
-              $ref: '#/definitions/ft'
-          additionalProperties: false
-        else:
-          type: 'null'
-    required:
-      - class
-    additionalProperties: false
-  ft:
-    type: object
-    properties:
-      class:
-        # This is used to make sure that the field type's class name is
-        # valid as any of the conditionals below can fail.
-        #
-        # Although we could use `oneOf` instead of this enumeration here
-        # and refer to each of the `*-ft-class-prop` definitions, it
-        # would be hard for the validator to show something useful for
-        # the user as all cases would fail.
-        #
-        # Using `enum` below makes the validator show a very clear
-        # validation failure message.
-        enum:
-          - int
-          - integer
-          - flt
-          - float
-          - floating-point
-          - enum
-          - enumeration
-          - str
-          - string
-          - array
-          - struct
-          - structure
-    allOf:
-      - if:
-          properties:
-            class:
-              $ref: '#/definitions/int-ft-class-prop'
-        then:
-          $ref: '#/definitions/int-ft'
-      - if:
-          properties:
-            class:
-              $ref: '#/definitions/real-ft-class-prop'
-        then:
-          $ref: '#/definitions/real-ft'
-      - if:
-          properties:
-            class:
-              $ref: '#/definitions/enum-ft-class-prop'
-        then:
-          $ref: '#/definitions/enum-ft'
-      - if:
-          properties:
-            class:
-              $ref: '#/definitions/string-ft-class-prop'
-        then:
-          $ref: '#/definitions/string-ft'
-      - if:
-          properties:
-            class:
-              $ref: '#/definitions/static-array-ft-class-prop'
-        then:
-          $ref: '#/definitions/static-array-ft'
-      - if:
-          properties:
-            class:
-              $ref: '#/definitions/struct-ft-class-prop'
-        then:
-          $ref: '#/definitions/struct-ft'
-    required:
-      - class
-$ref: '#/definitions/ft'
diff --git a/barectf/schemas/2/config/include-prop.yaml b/barectf/schemas/2/config/include-prop.yaml
deleted file mode 100644 (file)
index 23cc1df..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2020 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining
-# a copy of this software and associated documentation files (the
-# "Software"), to deal in the Software without restriction, including
-# without limitation the rights to use, copy, modify, merge, publish,
-# distribute, sublicense, and/or sell copies of the Software, and to
-# permit persons to whom the Software is furnished to do so, subject to
-# the following conditions:
-#
-# The above copyright notice and this permission notice shall be
-# included in all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
-# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-$schema: http://json-schema.org/draft-07/schema#
-$id: https://barectf.org/schemas/2/config/include-prop.json
-title: Inclusion property value
-if:
-  type: array
-then:
-  items:
-    type: string
-  minItems: 1
-else:
-  type: string
diff --git a/barectf/schemas/2/config/metadata-pre-include.yaml b/barectf/schemas/2/config/metadata-pre-include.yaml
deleted file mode 100644 (file)
index 679973a..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2020 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining
-# a copy of this software and associated documentation files (the
-# "Software"), to deal in the Software without restriction, including
-# without limitation the rights to use, copy, modify, merge, publish,
-# distribute, sublicense, and/or sell copies of the Software, and to
-# permit persons to whom the Software is furnished to do so, subject to
-# the following conditions:
-#
-# The above copyright notice and this permission notice shall be
-# included in all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
-# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-$schema: http://json-schema.org/draft-07/schema#
-$id: https://barectf.org/schemas/2/config/metadata-pre-include.json
-title: Metadata object before inclusions
-type: object
-properties:
-  $include:
-    $ref: https://barectf.org/schemas/2/config/include-prop.json
-  clocks:
-    title: Clock types object before inclusions
-    type: object
-    patternProperties:
-      '.*':
-        $ref: https://barectf.org/schemas/2/config/clock-type-pre-include.json
-  trace:
-    $ref: https://barectf.org/schemas/2/config/trace-type-pre-include.json
-  streams:
-    title: Stream types object before inclusions
-    type: object
-    patternProperties:
-      '.*':
-        $ref: https://barectf.org/schemas/2/config/stream-type-pre-include.json
diff --git a/barectf/schemas/2/config/stream-type-pre-include.yaml b/barectf/schemas/2/config/stream-type-pre-include.yaml
deleted file mode 100644 (file)
index 92be946..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2020 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining
-# a copy of this software and associated documentation files (the
-# "Software"), to deal in the Software without restriction, including
-# without limitation the rights to use, copy, modify, merge, publish,
-# distribute, sublicense, and/or sell copies of the Software, and to
-# permit persons to whom the Software is furnished to do so, subject to
-# the following conditions:
-#
-# The above copyright notice and this permission notice shall be
-# included in all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
-# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-$schema: http://json-schema.org/draft-07/schema#
-$id: https://barectf.org/schemas/2/config/stream-type-pre-include.json
-title: Stream type object before inclusions
-type: object
-properties:
-  $include:
-    $ref: https://barectf.org/schemas/2/config/include-prop.json
-  events:
-    title: Event types object before inclusions
-    type: object
-    patternProperties:
-      '.*':
-        $ref: https://barectf.org/schemas/2/config/event-type-pre-include.json
diff --git a/barectf/schemas/2/config/trace-type-pre-include.yaml b/barectf/schemas/2/config/trace-type-pre-include.yaml
deleted file mode 100644 (file)
index 136ad68..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2020 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining
-# a copy of this software and associated documentation files (the
-# "Software"), to deal in the Software without restriction, including
-# without limitation the rights to use, copy, modify, merge, publish,
-# distribute, sublicense, and/or sell copies of the Software, and to
-# permit persons to whom the Software is furnished to do so, subject to
-# the following conditions:
-#
-# The above copyright notice and this permission notice shall be
-# included in all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
-# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-$schema: http://json-schema.org/draft-07/schema#
-$id: https://barectf.org/schemas/2/config/trace-type-pre-include.json
-title: Trace type object before inclusions
-type: object
-properties:
-  $include:
-    $ref: https://barectf.org/schemas/2/config/include-prop.json
diff --git a/barectf/schemas/3/config/clock-type-pre-include.yaml b/barectf/schemas/3/config/clock-type-pre-include.yaml
deleted file mode 100644 (file)
index 4d400bf..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2020 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining
-# a copy of this software and associated documentation files (the
-# "Software"), to deal in the Software without restriction, including
-# without limitation the rights to use, copy, modify, merge, publish,
-# distribute, sublicense, and/or sell copies of the Software, and to
-# permit persons to whom the Software is furnished to do so, subject to
-# the following conditions:
-#
-# The above copyright notice and this permission notice shall be
-# included in all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
-# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-$schema: http://json-schema.org/draft-07/schema#
-$id: https://barectf.org/schemas/3/config/clock-type-pre-include.json
-title: Clock type object before inclusions
-type: object
-properties:
-  $include:
-    $ref: https://barectf.org/schemas/3/config/include-prop.json
diff --git a/barectf/schemas/3/config/config-pre-field-type-expansion.yaml b/barectf/schemas/3/config/config-pre-field-type-expansion.yaml
deleted file mode 100644 (file)
index 986570e..0000000
+++ /dev/null
@@ -1,182 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2020 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining
-# a copy of this software and associated documentation files (the
-# "Software"), to deal in the Software without restriction, including
-# without limitation the rights to use, copy, modify, merge, publish,
-# distribute, sublicense, and/or sell copies of the Software, and to
-# permit persons to whom the Software is furnished to do so, subject to
-# the following conditions:
-#
-# The above copyright notice and this permission notice shall be
-# included in all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
-# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-$schema: http://json-schema.org/draft-07/schema#
-$id: https://barectf.org/schemas/3/config/config-pre-field-type-expansion.json
-title: Configuration object before field type expansions
-definitions:
-  partial-ft:
-    title: Partial field type object
-    if:
-      type: object
-    then:
-      oneOf:
-        - properties:
-            class:
-              type: string
-          required:
-            - class
-        - properties:
-            $inherit:
-              type: string
-          required:
-            - $inherit
-      properties:
-        element-field-type:
-          $ref: '#/definitions/partial-ft'
-        members:
-          if:
-            type: array
-          then:
-            items:
-              type: object
-              patternProperties:
-                '^[A-Za-z_][A-Za-z0-9_]*$':
-                  if:
-                    type: object
-                  then:
-                    properties:
-                      field-type:
-                        $ref: '#/definitions/partial-ft'
-                    required:
-                      - field-type
-                  else:
-                    type: string
-              minProperties: 1
-              maxProperties: 1
-          else:
-            type: 'null'
-    else:
-      oneOf:
-        - type: string
-        - type: boolean
-        - type: 'null'
-type: object
-properties:
-  trace:
-    title: Trace object before field type expansions
-    type: object
-    properties:
-      type:
-        title: Trace type object before field type expansions
-        type: object
-        properties:
-          $field-type-aliases:
-            title: Field type aliases object before field type expansions
-            if:
-              type: object
-            then:
-              patternProperties:
-                '.*':
-                  $ref: '#/definitions/partial-ft'
-            else:
-              type: 'null'
-          $features:
-            if:
-              type: object
-            then:
-              properties:
-                magic-field-type:
-                  $ref: '#/definitions/partial-ft'
-                uuid-field-type:
-                  $ref: '#/definitions/partial-ft'
-                stream-type-id-field-type:
-                  $ref: '#/definitions/partial-ft'
-            else:
-              type: 'null'
-          stream-types:
-            title: Stream types object before field type expansions
-            type: object
-            patternProperties:
-              '.*':
-                title: Stream type object before field type expansions
-                type: object
-                properties:
-                  $features:
-                    if:
-                      type: object
-                    then:
-                      properties:
-                        packet:
-                          if:
-                            type: object
-                          then:
-                            properties:
-                              total-size-field-type:
-                                $ref: '#/definitions/partial-ft'
-                              content-size-field-type:
-                                $ref: '#/definitions/partial-ft'
-                              beginning-time-field-type:
-                                $ref: '#/definitions/partial-ft'
-                              end-time-field-type:
-                                $ref: '#/definitions/partial-ft'
-                              discarded-events-counter-field-type:
-                                $ref: '#/definitions/partial-ft'
-                          else:
-                            type: 'null'
-                        event:
-                          if:
-                            type: object
-                          then:
-                            properties:
-                              type-id-field-type:
-                                $ref: '#/definitions/partial-ft'
-                              time-field-type:
-                                $ref: '#/definitions/partial-ft'
-                          else:
-                            type: 'null'
-                    else:
-                      type: 'null'
-                  packet-context-field-type-extra-members:
-                    if:
-                      type: array
-                    then:
-                      items:
-                        type: object
-                        properties:
-                          field-type:
-                            $ref: '#/definitions/partial-ft'
-                    else:
-                      type: 'null'
-                  event-common-context-field-type:
-                    $ref: '#/definitions/partial-ft'
-                  event-types:
-                    title: Event types object before field type expansions
-                    type: object
-                    patternProperties:
-                      '.*':
-                        title: Event type object before field type expansions
-                        type: object
-                        properties:
-                          specific-context-field-type:
-                            $ref: '#/definitions/partial-ft'
-                          payload-field-type:
-                            $ref: '#/definitions/partial-ft'
-                required:
-                  - event-types
-          required:
-            - stream-types
-  required:
-    - type
-required:
-  - trace
diff --git a/barectf/schemas/3/config/config-pre-include.yaml b/barectf/schemas/3/config/config-pre-include.yaml
deleted file mode 100644 (file)
index 4c07594..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2020 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining
-# a copy of this software and associated documentation files (the
-# "Software"), to deal in the Software without restriction, including
-# without limitation the rights to use, copy, modify, merge, publish,
-# distribute, sublicense, and/or sell copies of the Software, and to
-# permit persons to whom the Software is furnished to do so, subject to
-# the following conditions:
-#
-# The above copyright notice and this permission notice shall be
-# included in all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
-# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-$schema: http://json-schema.org/draft-07/schema#
-$id: https://barectf.org/schemas/3/config/config-pre-include.json
-title: Configuration object before inclusions
-type: object
-properties:
-  trace:
-    $ref: https://barectf.org/schemas/3/config/trace-pre-include.json
-required:
-  - trace
diff --git a/barectf/schemas/3/config/config-pre-log-level-alias-sub.yaml b/barectf/schemas/3/config/config-pre-log-level-alias-sub.yaml
deleted file mode 100644 (file)
index 00d99d6..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2020 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining
-# a copy of this software and associated documentation files (the
-# "Software"), to deal in the Software without restriction, including
-# without limitation the rights to use, copy, modify, merge, publish,
-# distribute, sublicense, and/or sell copies of the Software, and to
-# permit persons to whom the Software is furnished to do so, subject to
-# the following conditions:
-#
-# The above copyright notice and this permission notice shall be
-# included in all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
-# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-$schema: http://json-schema.org/draft-07/schema#
-$id: https://barectf.org/schemas/3/config/config-pre-log-level-alias-sub.json
-title: Configuration object before log level alias substitutions
-type: object
-properties:
-  trace:
-    title: Trace object before log level alias substitutions
-    type: object
-    properties:
-      type:
-        title: Trace type object before log level alias substitutions
-        type: object
-        properties:
-          $log-level-aliases:
-            $ref: https://barectf.org/schemas/common/config/common.json#/definitions/opt-log-level-aliases-prop
-          stream-types:
-            title: Stream types object before log level alias substitutions
-            type: object
-            patternProperties:
-              '.*':
-                title: Stream type object before log level alias substitutions
-                type: object
-                properties:
-                  event-types:
-                    title: Event types object before log level alias substitutions
-                    type: object
-                    patternProperties:
-                      '.*':
-                        title: Event type object before log level alias substitutions
-                        type: object
-                        properties:
-                          log-level:
-                            $ref: https://barectf.org/schemas/common/config/common.json#/definitions/opt-log-level-or-alias-prop
-                required:
-                  - event-types
-          required:
-            - stream-types
-    required:
-      - type
-required:
-  - trace
diff --git a/barectf/schemas/3/config/config.yaml b/barectf/schemas/3/config/config.yaml
deleted file mode 100644 (file)
index 68f9797..0000000
+++ /dev/null
@@ -1,305 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2020 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining
-# a copy of this software and associated documentation files (the
-# "Software"), to deal in the Software without restriction, including
-# without limitation the rights to use, copy, modify, merge, publish,
-# distribute, sublicense, and/or sell copies of the Software, and to
-# permit persons to whom the Software is furnished to do so, subject to
-# the following conditions:
-#
-# The above copyright notice and this permission notice shall be
-# included in all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
-# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-$schema: http://json-schema.org/draft-07/schema#
-$id: https://barectf.org/schemas/3/config/config.json
-title: Effective configuration object
-definitions:
-  feature-uint-ft:
-    type: object
-    allOf:
-      - properties:
-          class:
-            enum:
-              - uint
-              - unsigned-int
-              - unsigned-integer
-              - uenum
-              - unsigned-enum
-              - unsigned-enumeration
-      - if:
-          properties:
-            class:
-              $ref: https://barectf.org/schemas/3/config/field-type.json#/definitions/uint-ft-class-prop
-        then:
-          $ref: https://barectf.org/schemas/3/config/field-type.json#/definitions/uint-ft
-      - if:
-          properties:
-            class:
-              $ref: https://barectf.org/schemas/3/config/field-type.json#/definitions/uenum-ft-class-prop
-        then:
-          $ref: https://barectf.org/schemas/3/config/field-type.json#/definitions/uenum-ft
-  opt-or-def-feature-uint-ft:
-    if:
-      type: object
-    then:
-      $ref: '#/definitions/feature-uint-ft'
-    else:
-      oneOf:
-        - type: boolean
-        - type: 'null'
-  opt-feature-uint-ft:
-    if:
-      type: object
-    then:
-      $ref: '#/definitions/feature-uint-ft'
-    else:
-      if:
-        type: boolean
-      then:
-        const: True
-      else:
-        type: 'null'
-  opt-struct-ft:
-    if:
-      type: object
-    then:
-      $ref: https://barectf.org/schemas/3/config/field-type.json#/definitions/struct-ft
-    else:
-      type: 'null'
-  trace:
-    title: Trace object
-    type: object
-    properties:
-      type:
-        $ref: '#/definitions/trace-type'
-      environment:
-        $ref: https://barectf.org/schemas/common/config/common.json#/definitions/opt-env-prop
-    required:
-      - type
-  trace-type:
-    title: Trace type object
-    type: object
-    properties:
-      uuid:
-        $ref: https://barectf.org/schemas/common/config/common.json#/definitions/opt-trace-type-uuid-prop
-      $default-byte-order:
-        $ref: https://barectf.org/schemas/common/config/common.json#/definitions/opt-byte-order-prop
-      $features:
-        if:
-          type: object
-        then:
-          properties:
-            magic-field-type:
-              allOf:
-                - $ref: '#/definitions/opt-or-def-feature-uint-ft'
-                - if:
-                    type: object
-                  then:
-                    properties:
-                      size:
-                        const: 32
-            uuid-field-type:
-              if:
-                type: object
-              then:
-                allOf:
-                  - $ref: https://barectf.org/schemas/3/config/field-type.json#/definitions/static-array-ft
-                  - properties:
-                      length:
-                        const: 16
-                      element-field-type:
-                        allOf:
-                          - $ref: '#/definitions/feature-uint-ft'
-                          - properties:
-                              size:
-                                const: 8
-                              alignment:
-                                if:
-                                  type: integer
-                                then:
-                                  const: 8
-              else:
-                if:
-                  type: boolean
-                then:
-                  const: false
-                else:
-                  type: 'null'
-            stream-type-id-field-type:
-              $ref: '#/definitions/opt-or-def-feature-uint-ft'
-          additionalProperties: false
-        else:
-          type: 'null'
-      clock-types:
-        title: Clock types object
-        type: object
-        patternProperties:
-          '^[A-Za-z_][A-Za-z0-9_]*$':
-            $ref: '#/definitions/clock-type'
-        additionalProperties: false
-      stream-types:
-        title: Stream types object
-        type: object
-        patternProperties:
-          '^[A-Za-z_][A-Za-z0-9_]*$':
-            $ref: '#/definitions/stream-type'
-        additionalProperties: false
-        minProperties: 1
-    required:
-      - stream-types
-      - $default-byte-order
-    additionalProperties: false
-  clock-type:
-    title: Clock type object
-    type: object
-    properties:
-      uuid:
-        $ref: https://barectf.org/schemas/common/config/common.json#/definitions/opt-uuid-prop
-      description:
-        $ref: https://barectf.org/schemas/common/config/common.json#/definitions/opt-string
-      frequency:
-        $ref: https://barectf.org/schemas/common/config/common.json#/definitions/opt-int-min-1
-      precision:
-        $ref: https://barectf.org/schemas/common/config/common.json#/definitions/opt-int-min-0
-      offset:
-        $ref: https://barectf.org/schemas/common/config/common.json#/definitions/opt-clock-type-offset-prop
-      origin-is-unix-epoch:
-        $ref: https://barectf.org/schemas/common/config/common.json#/definitions/opt-bool
-      $c-type:
-        $ref: https://barectf.org/schemas/common/config/common.json#/definitions/opt-string
-    additionalProperties: false
-  stream-type:
-    title: Stream type object
-    type: object
-    properties:
-      $is-default:
-        $ref: https://barectf.org/schemas/common/config/common.json#/definitions/opt-bool
-      $default-clock-type-name:
-        if:
-          type: string
-        then:
-          $ref: https://barectf.org/schemas/common/config/common.json#/definitions/iden-prop
-        else:
-          type: 'null'
-      $features:
-        if:
-          type: object
-        then:
-          properties:
-            packet:
-              if:
-                type: object
-              then:
-                properties:
-                  total-size-field-type:
-                    $ref: '#/definitions/opt-feature-uint-ft'
-                  content-size-field-type:
-                    $ref: '#/definitions/opt-feature-uint-ft'
-                  beginning-time-field-type:
-                    $ref: '#/definitions/opt-or-def-feature-uint-ft'
-                  end-time-field-type:
-                    $ref: '#/definitions/opt-or-def-feature-uint-ft'
-                  discarded-events-counter-field-type:
-                    $ref: '#/definitions/opt-or-def-feature-uint-ft'
-                additionalProperties: false
-              else:
-                type: 'null'
-            event:
-              if:
-                type: object
-              then:
-                properties:
-                  type-id-field-type:
-                    $ref: '#/definitions/opt-or-def-feature-uint-ft'
-                  time-field-type:
-                    $ref: '#/definitions/opt-or-def-feature-uint-ft'
-                additionalProperties: false
-              else:
-                type: 'null'
-          additionalProperties: false
-        else:
-          type: 'null'
-      packet-context-field-type-extra-members:
-        if:
-          type: array
-        then:
-          $ref: https://barectf.org/schemas/3/config/field-type.json#/definitions/struct-ft-members
-        else:
-          type: 'null'
-      event-common-context-field-type:
-        $ref: '#/definitions/opt-struct-ft'
-      event-types:
-        title: Event types object
-        type: object
-        patternProperties:
-          '^[A-Za-z_][A-Za-z0-9_]*$':
-            $ref: '#/definitions/event-type'
-        additionalProperties: false
-        minProperties: 1
-    required:
-      - event-types
-    additionalProperties: false
-  event-type:
-    title: Event type object
-    type: object
-    properties:
-      log-level:
-        $ref: https://barectf.org/schemas/common/config/common.json#/definitions/opt-int-min-0
-      specific-context-field-type:
-        $ref: '#/definitions/opt-struct-ft'
-      payload-field-type:
-        $ref: '#/definitions/opt-struct-ft'
-    additionalProperties: false
-type: object
-properties:
-  options:
-    title: Configuration options object
-    type: object
-    properties:
-      code-generation:
-        title: Code generation configuration options object
-        type: object
-        properties:
-          prefix:
-            if:
-              type: string
-            then:
-              $ref: https://barectf.org/schemas/common/config/common.json#/definitions/config-prefix-prop
-            else:
-              type: object
-              properties:
-                identifier:
-                  $ref: https://barectf.org/schemas/common/config/common.json#/definitions/iden-prop
-                file-name:
-                  type: string
-              required:
-                - identifier
-                - file-name
-              additionalProperties: false
-          header:
-            title: Header code generation configuration options object
-            type: object
-            properties:
-              identifier-prefix-definition:
-                type: boolean
-              default-stream-type-name-definition:
-                type: boolean
-            additionalProperties: false
-        additionalProperties: false
-    additionalProperties: false
-  trace:
-    $ref: '#/definitions/trace'
-required:
-  - trace
-additionalProperties: false
diff --git a/barectf/schemas/3/config/event-type-pre-include.yaml b/barectf/schemas/3/config/event-type-pre-include.yaml
deleted file mode 100644 (file)
index 4d8909b..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2020 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining
-# a copy of this software and associated documentation files (the
-# "Software"), to deal in the Software without restriction, including
-# without limitation the rights to use, copy, modify, merge, publish,
-# distribute, sublicense, and/or sell copies of the Software, and to
-# permit persons to whom the Software is furnished to do so, subject to
-# the following conditions:
-#
-# The above copyright notice and this permission notice shall be
-# included in all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
-# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-$schema: http://json-schema.org/draft-07/schema#
-$id: https://barectf.org/schemas/3/config/event-type-pre-include.json
-title: Event type object before inclusions
-type: object
-properties:
-  $include:
-    $ref: https://barectf.org/schemas/3/config/include-prop.json
diff --git a/barectf/schemas/3/config/field-type.yaml b/barectf/schemas/3/config/field-type.yaml
deleted file mode 100644 (file)
index 767b83e..0000000
+++ /dev/null
@@ -1,339 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2020 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining
-# a copy of this software and associated documentation files (the
-# "Software"), to deal in the Software without restriction, including
-# without limitation the rights to use, copy, modify, merge, publish,
-# distribute, sublicense, and/or sell copies of the Software, and to
-# permit persons to whom the Software is furnished to do so, subject to
-# the following conditions:
-#
-# The above copyright notice and this permission notice shall be
-# included in all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
-# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-$schema: http://json-schema.org/draft-07/schema#
-$id: https://barectf.org/schemas/3/config/field-type.json
-title: Effective field type object
-definitions:
-  ft-base:
-    type: object
-    required:
-      - class
-  bit-array-ft:
-    allOf:
-      - $ref: '#/definitions/ft-base'
-      - properties:
-          size:
-            $ref: https://barectf.org/schemas/common/config/common.json#/definitions/int-ft-size-prop
-          alignment:
-            $ref: https://barectf.org/schemas/common/config/common.json#/definitions/opt-int-min-1
-          byte-order:
-            $ref: https://barectf.org/schemas/common/config/common.json#/definitions/opt-byte-order-prop
-        required:
-          - size
-  int-ft-props:
-    properties:
-      class: true
-      size: true
-      alignment: true
-      byte-order: true
-      preferred-display-base: true
-    additionalProperties: false
-  int-ft:
-    allOf:
-      - $ref: '#/definitions/bit-array-ft'
-      - properties:
-          preferred-display-base:
-            $ref: https://barectf.org/schemas/common/config/common.json#/definitions/opt-int-ft-preferred-display-base-prop
-  uint-ft-class-prop:
-    type: string
-    enum:
-      - uint
-      - unsigned-int
-      - unsigned-integer
-  uint-ft:
-    title: Unsigned integer field type object
-    allOf:
-      - $ref: '#/definitions/int-ft'
-      - $ref: '#/definitions/int-ft-props'
-      - properties:
-          class:
-            $ref: '#/definitions/uint-ft-class-prop'
-  sint-ft-class-prop:
-    type: string
-    enum:
-      - sint
-      - signed-int
-      - signed-integer
-  sint-ft:
-    title: Signed integer field type object
-    allOf:
-      - $ref: '#/definitions/int-ft'
-      - $ref: '#/definitions/int-ft-props'
-      - properties:
-          class:
-            $ref: '#/definitions/sint-ft-class-prop'
-  enum-ft-props:
-    properties:
-      class: true
-      size: true
-      alignment: true
-      byte-order: true
-      preferred-display-base: true
-      mappings: true
-    additionalProperties: false
-  enum-ft:
-    properties:
-      mappings:
-        if:
-          type: object
-        then:
-          patternProperties:
-            '.*':
-              type: array
-              items:
-                if:
-                  type: array
-                then:
-                  items:
-                    type: integer
-                  minItems: 2
-                  maxItems: 2
-                else:
-                  type: integer
-        else:
-          type: 'null'
-    properties:
-      class: true
-      size: true
-      alignment: true
-      byte-order: true
-      preferred-display-base: true
-      mappings: true
-    additionalProperties: false
-  uenum-ft-class-prop:
-    type: string
-    enum:
-      - uenum
-      - unsigned-enum
-      - unsigned-enumeration
-  uenum-ft:
-    title: Unsigned enumeration field type object
-    allOf:
-      - $ref: '#/definitions/int-ft'
-      - $ref: '#/definitions/enum-ft'
-      - $ref: '#/definitions/enum-ft-props'
-      - properties:
-          class:
-            $ref: '#/definitions/uenum-ft-class-prop'
-  senum-ft-class-prop:
-    type: string
-    enum:
-      - senum
-      - signed-enum
-      - signed-enumeration
-  senum-ft:
-    title: Signed enumeration field type object
-    allOf:
-      - $ref: '#/definitions/int-ft'
-      - $ref: '#/definitions/enum-ft'
-      - $ref: '#/definitions/enum-ft-props'
-      - properties:
-          class:
-            $ref: '#/definitions/senum-ft-class-prop'
-  real-ft-class-prop:
-    type: string
-    const: real
-  real-ft:
-    title: Real field type object
-    allOf:
-      - $ref: '#/definitions/bit-array-ft'
-      - properties:
-          class:
-            $ref: '#/definitions/real-ft-class-prop'
-          size:
-            enum:
-              - 32
-              - 64
-    properties:
-      class: true
-      size: true
-      alignment: true
-      byte-order: true
-    additionalProperties: false
-  string-ft-class-prop:
-    type: string
-    enum:
-      - str
-      - string
-  string-ft:
-    title: String field type object
-    allOf:
-      - $ref: '#/definitions/ft-base'
-      - properties:
-          class:
-            $ref: '#/definitions/string-ft-class-prop'
-    properties:
-      class: true
-    additionalProperties: false
-  static-array-ft-class-prop:
-    type: string
-    const: static-array
-  static-array-ft:
-    title: Static array field type object
-    allOf:
-      - $ref: '#/definitions/ft-base'
-      - properties:
-          class:
-            $ref: '#/definitions/static-array-ft-class-prop'
-          element-field-type:
-            $ref: '#/definitions/ft'
-          length:
-            type: integer
-            minimum: 0
-        required:
-          - element-field-type
-          - length
-    properties:
-      class: true
-      element-field-type: true
-      length: true
-    additionalProperties: false
-  struct-ft-class-prop:
-    type: string
-    enum:
-      - struct
-      - structure
-  struct-ft-member:
-    type: object
-    properties:
-      field-type:
-        $ref: '#/definitions/ft'
-    required:
-      - field-type
-    additionalProperties: false
-  struct-ft-members:
-    type: array
-    items:
-      type: object
-      patternProperties:
-        '^[A-Za-z_][A-Za-z0-9_]*$':
-          $ref: '#/definitions/struct-ft-member'
-      minProperties: 1
-      maxProperties: 1
-  struct-ft:
-    title: Structure field type object
-    allOf:
-      - $ref: '#/definitions/ft-base'
-      - properties:
-          class:
-            $ref: '#/definitions/struct-ft-class-prop'
-          minimum-alignment:
-            $ref: https://barectf.org/schemas/common/config/common.json#/definitions/opt-int-min-1
-          members:
-            if:
-              type: array
-            then:
-              $ref: '#/definitions/struct-ft-members'
-            else:
-              type: 'null'
-    properties:
-      class: true
-      minimum-alignment: true
-      members: true
-    additionalProperties: false
-  ft:
-    allOf:
-      - $ref: '#/definitions/ft-base'
-      - properties:
-          # This is used to make sure that the field type's class name
-          # is valid as any of the conditionals below can fail.
-          #
-          # Although we could use `oneOf` instead of this enumeration
-          # here and refer to each of the `*-ft-class-prop` definitions,
-          # it would be hard for the validator to show something useful
-          # for the user as all cases would fail.
-          #
-          # Using `enum` below makes the validator show a very clear
-          # validation failure message.
-          class:
-            enum:
-              - uint
-              - unsigned-int
-              - unsigned-integer
-              - sint
-              - signed-int
-              - signed-integer
-              - uenum
-              - unsigned-enum
-              - unsigned-enumeration
-              - senum
-              - signed-enum
-              - signed-enumeration
-              - real
-              - str
-              - string
-              - static-array
-              - struct
-              - structure
-      - if:
-          properties:
-            class:
-              $ref: '#/definitions/uint-ft-class-prop'
-        then:
-          $ref: '#/definitions/uint-ft'
-      - if:
-          properties:
-            class:
-              $ref: '#/definitions/sint-ft-class-prop'
-        then:
-          $ref: '#/definitions/sint-ft'
-      - if:
-          properties:
-            class:
-              $ref: '#/definitions/uenum-ft-class-prop'
-        then:
-          $ref: '#/definitions/uenum-ft'
-      - if:
-          properties:
-            class:
-              $ref: '#/definitions/senum-ft-class-prop'
-        then:
-          $ref: '#/definitions/senum-ft'
-      - if:
-          properties:
-            class:
-              $ref: '#/definitions/real-ft-class-prop'
-        then:
-          $ref: '#/definitions/real-ft'
-      - if:
-          properties:
-            class:
-              $ref: '#/definitions/string-ft-class-prop'
-        then:
-          $ref: '#/definitions/string-ft'
-      - if:
-          properties:
-            class:
-              $ref: '#/definitions/static-array-ft-class-prop'
-        then:
-          $ref: '#/definitions/static-array-ft'
-      - if:
-          properties:
-            class:
-              $ref: '#/definitions/struct-ft-class-prop'
-        then:
-          $ref: '#/definitions/struct-ft'
-    required:
-      - class
-$ref: '#/definitions/ft'
diff --git a/barectf/schemas/3/config/include-prop.yaml b/barectf/schemas/3/config/include-prop.yaml
deleted file mode 100644 (file)
index 9a4d6e5..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2020 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining
-# a copy of this software and associated documentation files (the
-# "Software"), to deal in the Software without restriction, including
-# without limitation the rights to use, copy, modify, merge, publish,
-# distribute, sublicense, and/or sell copies of the Software, and to
-# permit persons to whom the Software is furnished to do so, subject to
-# the following conditions:
-#
-# The above copyright notice and this permission notice shall be
-# included in all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
-# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-$schema: http://json-schema.org/draft-07/schema#
-$id: https://barectf.org/schemas/3/config/include-prop.json
-title: Inclusion property value
-if:
-  type: array
-then:
-  items:
-    type: string
-  minItems: 1
-else:
-  type: string
diff --git a/barectf/schemas/3/config/stream-type-pre-include.yaml b/barectf/schemas/3/config/stream-type-pre-include.yaml
deleted file mode 100644 (file)
index b1c0a91..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2020 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining
-# a copy of this software and associated documentation files (the
-# "Software"), to deal in the Software without restriction, including
-# without limitation the rights to use, copy, modify, merge, publish,
-# distribute, sublicense, and/or sell copies of the Software, and to
-# permit persons to whom the Software is furnished to do so, subject to
-# the following conditions:
-#
-# The above copyright notice and this permission notice shall be
-# included in all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
-# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-$schema: http://json-schema.org/draft-07/schema#
-$id: https://barectf.org/schemas/3/config/stream-type-pre-include.json
-title: Stream type object before inclusions
-type: object
-properties:
-  $include:
-    $ref: https://barectf.org/schemas/3/config/include-prop.json
-  event-types:
-    title: Event types object before inclusions
-    type: object
-    patternProperties:
-      '.*':
-        $ref: https://barectf.org/schemas/3/config/event-type-pre-include.json
diff --git a/barectf/schemas/3/config/trace-pre-include.yaml b/barectf/schemas/3/config/trace-pre-include.yaml
deleted file mode 100644 (file)
index bcb5e94..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2020 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining
-# a copy of this software and associated documentation files (the
-# "Software"), to deal in the Software without restriction, including
-# without limitation the rights to use, copy, modify, merge, publish,
-# distribute, sublicense, and/or sell copies of the Software, and to
-# permit persons to whom the Software is furnished to do so, subject to
-# the following conditions:
-#
-# The above copyright notice and this permission notice shall be
-# included in all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
-# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-$schema: http://json-schema.org/draft-07/schema#
-$id: https://barectf.org/schemas/3/config/trace-pre-include.json
-title: Trace object before inclusions
-type: object
-properties:
-  $include:
-    $ref: https://barectf.org/schemas/3/config/include-prop.json
-  type:
-    $ref: https://barectf.org/schemas/3/config/trace-type-pre-include.json
diff --git a/barectf/schemas/3/config/trace-type-pre-include.yaml b/barectf/schemas/3/config/trace-type-pre-include.yaml
deleted file mode 100644 (file)
index ef9cb81..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2020 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining
-# a copy of this software and associated documentation files (the
-# "Software"), to deal in the Software without restriction, including
-# without limitation the rights to use, copy, modify, merge, publish,
-# distribute, sublicense, and/or sell copies of the Software, and to
-# permit persons to whom the Software is furnished to do so, subject to
-# the following conditions:
-#
-# The above copyright notice and this permission notice shall be
-# included in all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
-# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-$schema: http://json-schema.org/draft-07/schema#
-$id: https://barectf.org/schemas/3/config/trace-type-pre-include.json
-title: Trace type object before inclusions
-type: object
-properties:
-  $include:
-    $ref: https://barectf.org/schemas/3/config/include-prop.json
-  clock-types:
-    title: Clock types object before inclusions
-    type: object
-    patternProperties:
-      '.*':
-        $ref: https://barectf.org/schemas/3/config/clock-type-pre-include.json
-  stream-types:
-    title: Stream types object before inclusions
-    type: object
-    patternProperties:
-      '.*':
-        $ref: https://barectf.org/schemas/3/config/stream-type-pre-include.json
diff --git a/barectf/schemas/common/config/common.yaml b/barectf/schemas/common/config/common.yaml
deleted file mode 100644 (file)
index 0f7934b..0000000
+++ /dev/null
@@ -1,173 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2020 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining
-# a copy of this software and associated documentation files (the
-# "Software"), to deal in the Software without restriction, including
-# without limitation the rights to use, copy, modify, merge, publish,
-# distribute, sublicense, and/or sell copies of the Software, and to
-# permit persons to whom the Software is furnished to do so, subject to
-# the following conditions:
-#
-# The above copyright notice and this permission notice shall be
-# included in all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
-# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-$schema: http://json-schema.org/draft-07/schema#
-$id: https://barectf.org/schemas/common/config/common.json
-definitions:
-  opt-bool:
-    oneOf:
-      - type: boolean
-      - type: 'null'
-  opt-string:
-    oneOf:
-      - type: string
-      - type: 'null'
-  opt-int-min-0:
-    if:
-      type: integer
-    then:
-      minimum: 0
-    else:
-      type: 'null'
-  opt-int-min-1:
-    if:
-      type: integer
-    then:
-      minimum: 1
-    else:
-      type: 'null'
-  opt-log-level-aliases-prop:
-    title: Optional log level aliases object
-    if:
-      type: object
-    then:
-      patternProperties:
-        '':
-          $ref: '#/definitions/opt-int-min-0'
-    else:
-      type: 'null'
-  byte-order-prop:
-    title: Byte order property value
-    type: string
-    enum:
-      - le
-      - little
-      - little-endian
-      - be
-      - big
-      - big-endian
-  opt-byte-order-prop:
-    title: Optional byte order property value
-    if:
-      type: string
-    then:
-      $ref: '#/definitions/byte-order-prop'
-    else:
-      type: 'null'
-  int-ft-size-prop:
-    title: Integer field type's size property
-    type: integer
-    minimum: 1
-    maximum: 64
-  opt-int-ft-preferred-display-base-prop:
-    if:
-      type: string
-    then:
-      enum:
-        - bin
-        - binary
-        - oct
-        - octal
-        - dec
-        - decimal
-        - hex
-        - hexadecimal
-    else:
-      type: 'null'
-  opt-uuid-prop:
-    title: Optional UUID property value
-    if:
-      type: string
-    then:
-      pattern: '^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$'
-    else:
-      type: 'null'
-  opt-trace-type-uuid-prop:
-    title: Optional trace type UUID property value
-    if:
-      type: string
-    then:
-      oneOf:
-        - $ref: '#/definitions/opt-uuid-prop'
-        - type: string
-          const: auto
-    else:
-      type: 'null'
-  opt-clock-type-offset-prop:
-    if:
-      type: object
-    then:
-      properties:
-        cycles:
-          $ref: '#/definitions/opt-int-min-0'
-        seconds:
-          $ref: '#/definitions/opt-int-min-0'
-      additionalProperties: false
-    else:
-      type: 'null'
-  iden-prop:
-    type: string
-    allOf:
-      - pattern: '^[A-Za-z_][A-Za-z0-9_]*$'
-      - not:
-          enum:
-            - align
-            - callsite
-            - clock
-            - enum
-            - env
-            - event
-            - floating_point
-            - integer
-            - stream
-            - string
-            - struct
-            - trace
-            - typealias
-            - typedef
-            - variant
-  config-prefix-prop:
-    $ref: '#/definitions/iden-prop'
-  opt-env-prop:
-    title: Environment variables
-    if:
-      type: object
-    then:
-      patternProperties:
-        '^[A-Za-z_][A-Za-z0-9_]*$':
-          oneOf:
-            - type: string
-            - type: integer
-      additionalProperties: false
-    else:
-      type: 'null'
-  opt-log-level-or-alias-prop:
-    title: Optional log level (integral or alias) property
-    if:
-      type: integer
-    then:
-      minimum: 0
-    else:
-      oneOf:
-        - type: string
-        - type: 'null'
diff --git a/barectf/schemas/config/2/clock-type-pre-include.yaml b/barectf/schemas/config/2/clock-type-pre-include.yaml
new file mode 100644 (file)
index 0000000..86a1116
--- /dev/null
@@ -0,0 +1,30 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2020 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining
+# a copy of this software and associated documentation files (the
+# "Software"), to deal in the Software without restriction, including
+# without limitation the rights to use, copy, modify, merge, publish,
+# distribute, sublicense, and/or sell copies of the Software, and to
+# permit persons to whom the Software is furnished to do so, subject to
+# the following conditions:
+#
+# The above copyright notice and this permission notice shall be
+# included in all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+$schema: http://json-schema.org/draft-07/schema#
+$id: https://barectf.org/schemas/config/2/clock-type-pre-include.json
+title: Clock type object before inclusions
+type: object
+properties:
+  $include:
+    $ref: https://barectf.org/schemas/config/2/include-prop.json
diff --git a/barectf/schemas/config/2/config-min.yaml b/barectf/schemas/config/2/config-min.yaml
new file mode 100644 (file)
index 0000000..b90ca75
--- /dev/null
@@ -0,0 +1,36 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2020 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining
+# a copy of this software and associated documentation files (the
+# "Software"), to deal in the Software without restriction, including
+# without limitation the rights to use, copy, modify, merge, publish,
+# distribute, sublicense, and/or sell copies of the Software, and to
+# permit persons to whom the Software is furnished to do so, subject to
+# the following conditions:
+#
+# The above copyright notice and this permission notice shall be
+# included in all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+$schema: http://json-schema.org/draft-07/schema#
+$id: https://barectf.org/schemas/config/2/config-min.json
+title: Minimal configuration object
+type: object
+properties:
+  version:
+    type: string
+    enum:
+      - '2.0'
+      - '2.1'
+      - '2.2'
+required:
+  - version
diff --git a/barectf/schemas/config/2/config-pre-field-type-expansion.yaml b/barectf/schemas/config/2/config-pre-field-type-expansion.yaml
new file mode 100644 (file)
index 0000000..7cdcc6e
--- /dev/null
@@ -0,0 +1,119 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2020 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining
+# a copy of this software and associated documentation files (the
+# "Software"), to deal in the Software without restriction, including
+# without limitation the rights to use, copy, modify, merge, publish,
+# distribute, sublicense, and/or sell copies of the Software, and to
+# permit persons to whom the Software is furnished to do so, subject to
+# the following conditions:
+#
+# The above copyright notice and this permission notice shall be
+# included in all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+$schema: http://json-schema.org/draft-07/schema#
+$id: https://barectf.org/schemas/config/2/config-pre-field-type-expansion.json
+title: Configuration object before field type expansions
+definitions:
+  partial-ft:
+    title: Partial field type object
+    if:
+      type: object
+    then:
+      oneOf:
+        - properties:
+            class:
+              type: string
+          required:
+            - class
+        - properties:
+            inherit:
+              type: string
+          required:
+            - inherit
+        - properties:
+            $inherit:
+              type: string
+          required:
+            - $inherit
+      properties:
+        value-type:
+          $ref: '#/definitions/partial-ft'
+        element-type:
+          $ref: '#/definitions/partial-ft'
+        fields:
+          if:
+            type: object
+          then:
+            patternProperties:
+              '.*':
+                $ref: '#/definitions/partial-ft'
+          else:
+            type: 'null'
+    else:
+      oneOf:
+        - type: string
+        - type: 'null'
+type: object
+properties:
+  metadata:
+    title: Metadata object before field type expansions
+    type: object
+    properties:
+      type-aliases:
+        title: Field type aliases object before field type expansions
+        if:
+          type: object
+        then:
+          patternProperties:
+            '.*':
+              $ref: '#/definitions/partial-ft'
+        else:
+          type: 'null'
+      trace:
+        title: Trace type object before field type expansions
+        type: object
+        properties:
+          packet-header-type:
+            $ref: '#/definitions/partial-ft'
+      streams:
+        title: Stream types object before field type expansions
+        type: object
+        patternProperties:
+          '.*':
+            title: Stream type object before field type expansions
+            type: object
+            properties:
+              packet-context-type:
+                $ref: '#/definitions/partial-ft'
+              event-header-type:
+                $ref: '#/definitions/partial-ft'
+              event-context-type:
+                $ref: '#/definitions/partial-ft'
+              events:
+                type: object
+                patternProperties:
+                  '.*':
+                    type: object
+                    properties:
+                      context-type:
+                        $ref: '#/definitions/partial-ft'
+                      payload-type:
+                        $ref: '#/definitions/partial-ft'
+            required:
+              - events
+    required:
+      - trace
+      - streams
+required:
+  - metadata
diff --git a/barectf/schemas/config/2/config-pre-include.yaml b/barectf/schemas/config/2/config-pre-include.yaml
new file mode 100644 (file)
index 0000000..0a7a820
--- /dev/null
@@ -0,0 +1,32 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2020 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining
+# a copy of this software and associated documentation files (the
+# "Software"), to deal in the Software without restriction, including
+# without limitation the rights to use, copy, modify, merge, publish,
+# distribute, sublicense, and/or sell copies of the Software, and to
+# permit persons to whom the Software is furnished to do so, subject to
+# the following conditions:
+#
+# The above copyright notice and this permission notice shall be
+# included in all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+$schema: http://json-schema.org/draft-07/schema#
+$id: https://barectf.org/schemas/config/2/config-pre-include.json
+title: Configuration object before inclusions
+type: object
+properties:
+  metadata:
+    $ref: https://barectf.org/schemas/config/2/metadata-pre-include.json
+required:
+  - metadata
diff --git a/barectf/schemas/config/2/config.yaml b/barectf/schemas/config/2/config.yaml
new file mode 100644 (file)
index 0000000..55f8dc0
--- /dev/null
@@ -0,0 +1,297 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2020 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining
+# a copy of this software and associated documentation files (the
+# "Software"), to deal in the Software without restriction, including
+# without limitation the rights to use, copy, modify, merge, publish,
+# distribute, sublicense, and/or sell copies of the Software, and to
+# permit persons to whom the Software is furnished to do so, subject to
+# the following conditions:
+#
+# The above copyright notice and this permission notice shall be
+# included in all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+$schema: http://json-schema.org/draft-07/schema#
+$id: https://barectf.org/schemas/config/2/config.json
+title: Effective configuration object
+definitions:
+  opt-struct-ft:
+    if:
+      type: object
+    then:
+      $ref: https://barectf.org/schemas/config/2/field-type.json#/definitions/struct-ft
+    else:
+      type: 'null'
+  uint-ft:
+    allOf:
+      - $ref: https://barectf.org/schemas/config/2/field-type.json#/definitions/int-ft
+      - properties:
+          signed:
+            const: false
+  uint-ft-ts:
+    allOf:
+      - $ref: '#/definitions/uint-ft'
+      - properties:
+          property-mappings:
+            type: array
+        required:
+          - property-mappings
+  packet-header-ft-prop:
+    allOf:
+      - $ref: '#/definitions/opt-struct-ft'
+      - if:
+          type: object
+          properties:
+            fields:
+              type: object
+        then:
+          properties:
+            fields:
+              properties:
+                magic:
+                  allOf:
+                    - $ref: '#/definitions/uint-ft'
+                    - properties:
+                        size:
+                          const: 32
+                uuid:
+                  allOf:
+                    - $ref: https://barectf.org/schemas/config/2/field-type.json#/definitions/static-array-ft
+                    - properties:
+                        length:
+                          const: 16
+                        element-type:
+                          allOf:
+                            - $ref: https://barectf.org/schemas/config/2/field-type.json#/definitions/int-ft
+                            - properties:
+                                size:
+                                  const: 8
+                                signed:
+                                  const: false
+                                align:
+                                  enum:
+                                    - 1
+                                    - 2
+                                    - 4
+                                    - 8
+                stream_id:
+                  $ref: '#/definitions/uint-ft'
+                stream_instance_id:
+                  $ref: '#/definitions/uint-ft'
+  trace-type:
+    title: Trace type object
+    type: object
+    properties:
+      byte-order:
+        $ref: https://barectf.org/schemas/config/common/common.json#/definitions/byte-order-prop
+      uuid:
+        $ref: https://barectf.org/schemas/config/common/common.json#/definitions/opt-trace-type-uuid-prop
+      packet-header-type:
+        $ref: '#/definitions/packet-header-ft-prop'
+    required:
+      - byte-order
+    additionalProperties: false
+  clock-type:
+    title: Clock type object
+    type: object
+    oneOf:
+      - required:
+          - $return-ctype
+      - required:
+          - return-ctype
+      - allOf:
+          - not:
+              required:
+                - $return-ctype
+          - not:
+              required:
+                - return-ctype
+    properties:
+      uuid:
+        $ref: https://barectf.org/schemas/config/common/common.json#/definitions/opt-uuid-prop
+      description:
+        $ref: https://barectf.org/schemas/config/common/common.json#/definitions/opt-string
+      freq:
+        $ref: https://barectf.org/schemas/config/common/common.json#/definitions/opt-int-min-1
+      error-cycles:
+        $ref: https://barectf.org/schemas/config/common/common.json#/definitions/opt-int-min-0
+      offset:
+        $ref: https://barectf.org/schemas/config/common/common.json#/definitions/opt-clock-type-offset-prop
+      absolute:
+        $ref: https://barectf.org/schemas/config/common/common.json#/definitions/opt-bool
+      return-ctype:
+        $ref: https://barectf.org/schemas/config/common/common.json#/definitions/opt-string
+      $return-ctype:
+        $ref: https://barectf.org/schemas/config/common/common.json#/definitions/opt-string
+    additionalProperties: false
+  $default-stream:
+    if:
+      type: string
+    then:
+      pattern: '^[A-Za-z_][A-Za-z0-9_]*$'
+    else:
+      type: 'null'
+  packet-context-ft-prop:
+    allOf:
+      - $ref: https://barectf.org/schemas/config/2/field-type.json#/definitions/struct-ft
+      - properties:
+          fields:
+            properties:
+              packet_size:
+                $ref: '#/definitions/uint-ft'
+              content_size:
+                $ref: '#/definitions/uint-ft'
+              events_discarded:
+                $ref: '#/definitions/uint-ft'
+              packet_seq_num:
+                $ref: '#/definitions/uint-ft'
+              timestamp_begin:
+                $ref: '#/definitions/uint-ft-ts'
+              timestamp_end:
+                $ref: '#/definitions/uint-ft-ts'
+            required:
+              - packet_size
+              - content_size
+            dependencies:
+              timestamp_begin:
+                - timestamp_end
+              timestamp_end:
+                - timestamp_begin
+        required:
+          - fields
+  event-header-ft-prop:
+    allOf:
+      - $ref: '#/definitions/opt-struct-ft'
+      - if:
+          type: object
+          properties:
+            fields:
+              type: object
+        then:
+          properties:
+            fields:
+              properties:
+                id:
+                  $ref: '#/definitions/uint-ft'
+                timestamp:
+                  $ref: '#/definitions/uint-ft-ts'
+  stream-type:
+    title: Stream type object
+    type: object
+    properties:
+      $default:
+        $ref: https://barectf.org/schemas/config/common/common.json#/definitions/opt-bool
+      packet-context-type:
+        $ref: '#/definitions/packet-context-ft-prop'
+      event-header-type:
+        $ref: '#/definitions/event-header-ft-prop'
+      event-context-type:
+        $ref: '#/definitions/opt-struct-ft'
+      events:
+        title: Event types object
+        type: object
+        patternProperties:
+          '^[A-Za-z_][A-Za-z0-9_]*$':
+            $ref: '#/definitions/event-type'
+        additionalProperties: false
+        minProperties: 1
+    required:
+      - packet-context-type
+      - events
+    additionalProperties: false
+  event-type:
+    title: Event type object
+    type: object
+    properties:
+      log-level:
+        if:
+          type: integer
+        then:
+          minimum: 0
+        else:
+          oneOf:
+            - type: string
+            - type: 'null'
+      context-type:
+        $ref: '#/definitions/opt-struct-ft'
+      payload-type:
+        $ref: '#/definitions/opt-struct-ft'
+    additionalProperties: false
+type: object
+properties:
+  version:
+    type: string
+    enum:
+      - '2.0'
+      - '2.1'
+      - '2.2'
+  prefix:
+    $ref: https://barectf.org/schemas/config/common/common.json#/definitions/config-prefix-prop
+  options:
+    title: Configuration options object
+    type: object
+    properties:
+      gen-prefix-def:
+        type: boolean
+      gen-default-stream-def:
+        type: boolean
+    additionalProperties: false
+  metadata:
+    title: Metadata object
+    type: object
+    oneOf:
+      - required:
+          - $log-levels
+      - required:
+          - log-levels
+      - allOf:
+          - not:
+              required:
+                - $log-levels
+          - not:
+              required:
+                - log-levels
+    properties:
+      log-levels:
+        $ref: https://barectf.org/schemas/config/common/common.json#/definitions/opt-log-level-aliases-prop
+      $log-levels:
+        $ref: https://barectf.org/schemas/config/common/common.json#/definitions/opt-log-level-aliases-prop
+      trace:
+        $ref: '#/definitions/trace-type'
+      env:
+        $ref: https://barectf.org/schemas/config/common/common.json#/definitions/opt-env-prop
+      clocks:
+        title: Clock types object
+        type: object
+        patternProperties:
+          '^[A-Za-z_][A-Za-z0-9_]*$':
+            $ref: '#/definitions/clock-type'
+        additionalProperties: false
+      $default-stream:
+        $ref: https://barectf.org/schemas/config/common/common.json#/definitions/opt-string
+      streams:
+        title: Stream types object
+        type: object
+        patternProperties:
+          '^[A-Za-z_][A-Za-z0-9_]*$':
+            $ref: '#/definitions/stream-type'
+        additionalProperties: false
+        minProperties: 1
+    required:
+      - trace
+      - streams
+    additionalProperties: false
+required:
+  - version
+  - metadata
+additionalProperties: false
diff --git a/barectf/schemas/config/2/event-type-pre-include.yaml b/barectf/schemas/config/2/event-type-pre-include.yaml
new file mode 100644 (file)
index 0000000..ccc5d23
--- /dev/null
@@ -0,0 +1,30 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2020 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining
+# a copy of this software and associated documentation files (the
+# "Software"), to deal in the Software without restriction, including
+# without limitation the rights to use, copy, modify, merge, publish,
+# distribute, sublicense, and/or sell copies of the Software, and to
+# permit persons to whom the Software is furnished to do so, subject to
+# the following conditions:
+#
+# The above copyright notice and this permission notice shall be
+# included in all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+$schema: http://json-schema.org/draft-07/schema#
+$id: https://barectf.org/schemas/config/2/event-type-pre-include.json
+title: Event type object before inclusions
+type: object
+properties:
+  $include:
+    $ref: https://barectf.org/schemas/config/2/include-prop.json
diff --git a/barectf/schemas/config/2/field-type.yaml b/barectf/schemas/config/2/field-type.yaml
new file mode 100644 (file)
index 0000000..d34e558
--- /dev/null
@@ -0,0 +1,312 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2020 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining
+# a copy of this software and associated documentation files (the
+# "Software"), to deal in the Software without restriction, including
+# without limitation the rights to use, copy, modify, merge, publish,
+# distribute, sublicense, and/or sell copies of the Software, and to
+# permit persons to whom the Software is furnished to do so, subject to
+# the following conditions:
+#
+# The above copyright notice and this permission notice shall be
+# included in all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+$schema: http://json-schema.org/draft-07/schema#
+$id: https://barectf.org/schemas/config/2/field-type.json
+title: Effective field type object
+definitions:
+  opt-encoding-prop:
+    title: Encoding property value
+    if:
+      type: string
+    then:
+      enum:
+        - utf8
+        - UTF8
+        - utf-8
+        - UTF-8
+        - Utf-8
+        - ascii
+        - Ascii
+        - ASCII
+        - none
+        - None
+        - NONE
+    else:
+      type: 'null'
+  int-ft-class-prop:
+    type: string
+    enum:
+      - int
+      - integer
+  int-ft:
+    title: Integer field type object
+    type: object
+    properties:
+      class:
+        $ref: '#/definitions/int-ft-class-prop'
+      size:
+        $ref: https://barectf.org/schemas/config/common/common.json#/definitions/int-ft-size-prop
+      signed:
+        oneOf:
+          - type: boolean
+          - type: 'null'
+      align:
+        $ref: https://barectf.org/schemas/config/common/common.json#/definitions/opt-int-min-1
+      byte-order:
+        $ref: https://barectf.org/schemas/config/common/common.json#/definitions/opt-byte-order-prop
+      base:
+        $ref: https://barectf.org/schemas/config/common/common.json#/definitions/opt-int-ft-preferred-display-base-prop
+      encoding:
+        $ref: '#/definitions/opt-encoding-prop'
+      property-mappings:
+        if:
+          type: array
+        then:
+          items:
+            type: object
+            properties:
+              type:
+                type: string
+                const: clock
+              name:
+                type: string
+                pattern: '^[A-Za-z_][A-Za-z0-9_]*$'
+              property:
+                type: string
+                const: value
+            required:
+              - type
+              - name
+              - property
+            additionalProperties: false
+          minItems: 1
+          maxItems: 1
+        else:
+          type: 'null'
+    required:
+      - class
+      - size
+    additionalProperties: false
+  real-ft-class-prop:
+    type: string
+    enum:
+      - flt
+      - float
+      - floating-point
+  real-ft:
+    title: Real field type object
+    type: object
+    properties:
+      class:
+        $ref: '#/definitions/real-ft-class-prop'
+      size:
+        type: object
+        properties:
+          exp:
+            type: integer
+          mant:
+            type: integer
+        oneOf:
+          - properties:
+              exp:
+                const: 8
+              mant:
+                const: 24
+          - properties:
+              exp:
+                const: 11
+              mant:
+                const: 53
+        required:
+          - exp
+          - mant
+        additionalProperties: false
+      align:
+        $ref: https://barectf.org/schemas/config/common/common.json#/definitions/opt-int-min-1
+      byte-order:
+        $ref: https://barectf.org/schemas/config/common/common.json#/definitions/opt-byte-order-prop
+    required:
+      - class
+      - size
+    additionalProperties: false
+  enum-ft-class-prop:
+    type: string
+    enum:
+      - enum
+      - enumeration
+  enum-ft:
+    title: Enumeration field type object
+    type: object
+    properties:
+      class:
+        $ref: '#/definitions/enum-ft-class-prop'
+      value-type:
+        $ref: '#/definitions/int-ft'
+      members:
+        type: array
+        items:
+          if:
+            type: object
+          then:
+            properties:
+              label:
+                type: string
+              value:
+                if:
+                  type: array
+                then:
+                  items:
+                    type: integer
+                  minItems: 2
+                  maxItems: 2
+                else:
+                  type: integer
+            additionalProperties: false
+            required:
+              - label
+              - value
+          else:
+            type: string
+    required:
+      - class
+      - value-type
+    additionalProperties: false
+  string-ft-class-prop:
+    type: string
+    enum:
+      - str
+      - string
+  string-ft:
+    title: String field type object
+    type: object
+    properties:
+      class:
+        $ref: '#/definitions/string-ft-class-prop'
+      encoding:
+        $ref: '#/definitions/opt-encoding-prop'
+    required:
+      - class
+    additionalProperties: false
+  static-array-ft-class-prop:
+    type: string
+    const: array
+  static-array-ft:
+    title: Static array field type object
+    type: object
+    properties:
+      class:
+        $ref: '#/definitions/static-array-ft-class-prop'
+      element-type:
+        $ref: '#/definitions/ft'
+      length:
+        type: integer
+        minimum: 0
+    required:
+      - class
+      - element-type
+      - length
+    additionalProperties: false
+  struct-ft-class-prop:
+    type: string
+    enum:
+      - struct
+      - structure
+  struct-ft:
+    title: Structure field type object
+    type: object
+    properties:
+      class:
+        $ref: '#/definitions/struct-ft-class-prop'
+      min-align:
+        $ref: https://barectf.org/schemas/config/common/common.json#/definitions/opt-int-min-1
+      fields:
+        if:
+          type: object
+        then:
+          patternProperties:
+            '^[A-Za-z_][A-Za-z0-9_]*$':
+              $ref: '#/definitions/ft'
+          additionalProperties: false
+        else:
+          type: 'null'
+    required:
+      - class
+    additionalProperties: false
+  ft:
+    type: object
+    properties:
+      class:
+        # This is used to make sure that the field type's class name is
+        # valid as any of the conditionals below can fail.
+        #
+        # Although we could use `oneOf` instead of this enumeration here
+        # and refer to each of the `*-ft-class-prop` definitions, it
+        # would be hard for the validator to show something useful for
+        # the user as all cases would fail.
+        #
+        # Using `enum` below makes the validator show a very clear
+        # validation failure message.
+        enum:
+          - int
+          - integer
+          - flt
+          - float
+          - floating-point
+          - enum
+          - enumeration
+          - str
+          - string
+          - array
+          - struct
+          - structure
+    allOf:
+      - if:
+          properties:
+            class:
+              $ref: '#/definitions/int-ft-class-prop'
+        then:
+          $ref: '#/definitions/int-ft'
+      - if:
+          properties:
+            class:
+              $ref: '#/definitions/real-ft-class-prop'
+        then:
+          $ref: '#/definitions/real-ft'
+      - if:
+          properties:
+            class:
+              $ref: '#/definitions/enum-ft-class-prop'
+        then:
+          $ref: '#/definitions/enum-ft'
+      - if:
+          properties:
+            class:
+              $ref: '#/definitions/string-ft-class-prop'
+        then:
+          $ref: '#/definitions/string-ft'
+      - if:
+          properties:
+            class:
+              $ref: '#/definitions/static-array-ft-class-prop'
+        then:
+          $ref: '#/definitions/static-array-ft'
+      - if:
+          properties:
+            class:
+              $ref: '#/definitions/struct-ft-class-prop'
+        then:
+          $ref: '#/definitions/struct-ft'
+    required:
+      - class
+$ref: '#/definitions/ft'
diff --git a/barectf/schemas/config/2/include-prop.yaml b/barectf/schemas/config/2/include-prop.yaml
new file mode 100644 (file)
index 0000000..0a89cab
--- /dev/null
@@ -0,0 +1,34 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2020 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining
+# a copy of this software and associated documentation files (the
+# "Software"), to deal in the Software without restriction, including
+# without limitation the rights to use, copy, modify, merge, publish,
+# distribute, sublicense, and/or sell copies of the Software, and to
+# permit persons to whom the Software is furnished to do so, subject to
+# the following conditions:
+#
+# The above copyright notice and this permission notice shall be
+# included in all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+$schema: http://json-schema.org/draft-07/schema#
+$id: https://barectf.org/schemas/config/2/include-prop.json
+title: Inclusion property value
+if:
+  type: array
+then:
+  items:
+    type: string
+  minItems: 1
+else:
+  type: string
diff --git a/barectf/schemas/config/2/metadata-pre-include.yaml b/barectf/schemas/config/2/metadata-pre-include.yaml
new file mode 100644 (file)
index 0000000..fad2816
--- /dev/null
@@ -0,0 +1,44 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2020 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining
+# a copy of this software and associated documentation files (the
+# "Software"), to deal in the Software without restriction, including
+# without limitation the rights to use, copy, modify, merge, publish,
+# distribute, sublicense, and/or sell copies of the Software, and to
+# permit persons to whom the Software is furnished to do so, subject to
+# the following conditions:
+#
+# The above copyright notice and this permission notice shall be
+# included in all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+$schema: http://json-schema.org/draft-07/schema#
+$id: https://barectf.org/schemas/config/2/metadata-pre-include.json
+title: Metadata object before inclusions
+type: object
+properties:
+  $include:
+    $ref: https://barectf.org/schemas/config/2/include-prop.json
+  clocks:
+    title: Clock types object before inclusions
+    type: object
+    patternProperties:
+      '.*':
+        $ref: https://barectf.org/schemas/config/2/clock-type-pre-include.json
+  trace:
+    $ref: https://barectf.org/schemas/config/2/trace-type-pre-include.json
+  streams:
+    title: Stream types object before inclusions
+    type: object
+    patternProperties:
+      '.*':
+        $ref: https://barectf.org/schemas/config/2/stream-type-pre-include.json
diff --git a/barectf/schemas/config/2/stream-type-pre-include.yaml b/barectf/schemas/config/2/stream-type-pre-include.yaml
new file mode 100644 (file)
index 0000000..e550d20
--- /dev/null
@@ -0,0 +1,36 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2020 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining
+# a copy of this software and associated documentation files (the
+# "Software"), to deal in the Software without restriction, including
+# without limitation the rights to use, copy, modify, merge, publish,
+# distribute, sublicense, and/or sell copies of the Software, and to
+# permit persons to whom the Software is furnished to do so, subject to
+# the following conditions:
+#
+# The above copyright notice and this permission notice shall be
+# included in all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+$schema: http://json-schema.org/draft-07/schema#
+$id: https://barectf.org/schemas/config/2/stream-type-pre-include.json
+title: Stream type object before inclusions
+type: object
+properties:
+  $include:
+    $ref: https://barectf.org/schemas/config/2/include-prop.json
+  events:
+    title: Event types object before inclusions
+    type: object
+    patternProperties:
+      '.*':
+        $ref: https://barectf.org/schemas/config/2/event-type-pre-include.json
diff --git a/barectf/schemas/config/2/trace-type-pre-include.yaml b/barectf/schemas/config/2/trace-type-pre-include.yaml
new file mode 100644 (file)
index 0000000..0f72d09
--- /dev/null
@@ -0,0 +1,30 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2020 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining
+# a copy of this software and associated documentation files (the
+# "Software"), to deal in the Software without restriction, including
+# without limitation the rights to use, copy, modify, merge, publish,
+# distribute, sublicense, and/or sell copies of the Software, and to
+# permit persons to whom the Software is furnished to do so, subject to
+# the following conditions:
+#
+# The above copyright notice and this permission notice shall be
+# included in all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+$schema: http://json-schema.org/draft-07/schema#
+$id: https://barectf.org/schemas/config/2/trace-type-pre-include.json
+title: Trace type object before inclusions
+type: object
+properties:
+  $include:
+    $ref: https://barectf.org/schemas/config/2/include-prop.json
diff --git a/barectf/schemas/config/3/clock-type-pre-include.yaml b/barectf/schemas/config/3/clock-type-pre-include.yaml
new file mode 100644 (file)
index 0000000..6aecb46
--- /dev/null
@@ -0,0 +1,30 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2020 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining
+# a copy of this software and associated documentation files (the
+# "Software"), to deal in the Software without restriction, including
+# without limitation the rights to use, copy, modify, merge, publish,
+# distribute, sublicense, and/or sell copies of the Software, and to
+# permit persons to whom the Software is furnished to do so, subject to
+# the following conditions:
+#
+# The above copyright notice and this permission notice shall be
+# included in all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+$schema: http://json-schema.org/draft-07/schema#
+$id: https://barectf.org/schemas/config/3/clock-type-pre-include.json
+title: Clock type object before inclusions
+type: object
+properties:
+  $include:
+    $ref: https://barectf.org/schemas/config/3/include-prop.json
diff --git a/barectf/schemas/config/3/config-pre-field-type-expansion.yaml b/barectf/schemas/config/3/config-pre-field-type-expansion.yaml
new file mode 100644 (file)
index 0000000..a1e2e70
--- /dev/null
@@ -0,0 +1,182 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2020 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining
+# a copy of this software and associated documentation files (the
+# "Software"), to deal in the Software without restriction, including
+# without limitation the rights to use, copy, modify, merge, publish,
+# distribute, sublicense, and/or sell copies of the Software, and to
+# permit persons to whom the Software is furnished to do so, subject to
+# the following conditions:
+#
+# The above copyright notice and this permission notice shall be
+# included in all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+$schema: http://json-schema.org/draft-07/schema#
+$id: https://barectf.org/schemas/config/3/config-pre-field-type-expansion.json
+title: Configuration object before field type expansions
+definitions:
+  partial-ft:
+    title: Partial field type object
+    if:
+      type: object
+    then:
+      oneOf:
+        - properties:
+            class:
+              type: string
+          required:
+            - class
+        - properties:
+            $inherit:
+              type: string
+          required:
+            - $inherit
+      properties:
+        element-field-type:
+          $ref: '#/definitions/partial-ft'
+        members:
+          if:
+            type: array
+          then:
+            items:
+              type: object
+              patternProperties:
+                '^[A-Za-z_][A-Za-z0-9_]*$':
+                  if:
+                    type: object
+                  then:
+                    properties:
+                      field-type:
+                        $ref: '#/definitions/partial-ft'
+                    required:
+                      - field-type
+                  else:
+                    type: string
+              minProperties: 1
+              maxProperties: 1
+          else:
+            type: 'null'
+    else:
+      oneOf:
+        - type: string
+        - type: boolean
+        - type: 'null'
+type: object
+properties:
+  trace:
+    title: Trace object before field type expansions
+    type: object
+    properties:
+      type:
+        title: Trace type object before field type expansions
+        type: object
+        properties:
+          $field-type-aliases:
+            title: Field type aliases object before field type expansions
+            if:
+              type: object
+            then:
+              patternProperties:
+                '.*':
+                  $ref: '#/definitions/partial-ft'
+            else:
+              type: 'null'
+          $features:
+            if:
+              type: object
+            then:
+              properties:
+                magic-field-type:
+                  $ref: '#/definitions/partial-ft'
+                uuid-field-type:
+                  $ref: '#/definitions/partial-ft'
+                stream-type-id-field-type:
+                  $ref: '#/definitions/partial-ft'
+            else:
+              type: 'null'
+          stream-types:
+            title: Stream types object before field type expansions
+            type: object
+            patternProperties:
+              '.*':
+                title: Stream type object before field type expansions
+                type: object
+                properties:
+                  $features:
+                    if:
+                      type: object
+                    then:
+                      properties:
+                        packet:
+                          if:
+                            type: object
+                          then:
+                            properties:
+                              total-size-field-type:
+                                $ref: '#/definitions/partial-ft'
+                              content-size-field-type:
+                                $ref: '#/definitions/partial-ft'
+                              beginning-time-field-type:
+                                $ref: '#/definitions/partial-ft'
+                              end-time-field-type:
+                                $ref: '#/definitions/partial-ft'
+                              discarded-events-counter-field-type:
+                                $ref: '#/definitions/partial-ft'
+                          else:
+                            type: 'null'
+                        event:
+                          if:
+                            type: object
+                          then:
+                            properties:
+                              type-id-field-type:
+                                $ref: '#/definitions/partial-ft'
+                              time-field-type:
+                                $ref: '#/definitions/partial-ft'
+                          else:
+                            type: 'null'
+                    else:
+                      type: 'null'
+                  packet-context-field-type-extra-members:
+                    if:
+                      type: array
+                    then:
+                      items:
+                        type: object
+                        properties:
+                          field-type:
+                            $ref: '#/definitions/partial-ft'
+                    else:
+                      type: 'null'
+                  event-common-context-field-type:
+                    $ref: '#/definitions/partial-ft'
+                  event-types:
+                    title: Event types object before field type expansions
+                    type: object
+                    patternProperties:
+                      '.*':
+                        title: Event type object before field type expansions
+                        type: object
+                        properties:
+                          specific-context-field-type:
+                            $ref: '#/definitions/partial-ft'
+                          payload-field-type:
+                            $ref: '#/definitions/partial-ft'
+                required:
+                  - event-types
+          required:
+            - stream-types
+  required:
+    - type
+required:
+  - trace
diff --git a/barectf/schemas/config/3/config-pre-include.yaml b/barectf/schemas/config/3/config-pre-include.yaml
new file mode 100644 (file)
index 0000000..3bfa659
--- /dev/null
@@ -0,0 +1,32 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2020 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining
+# a copy of this software and associated documentation files (the
+# "Software"), to deal in the Software without restriction, including
+# without limitation the rights to use, copy, modify, merge, publish,
+# distribute, sublicense, and/or sell copies of the Software, and to
+# permit persons to whom the Software is furnished to do so, subject to
+# the following conditions:
+#
+# The above copyright notice and this permission notice shall be
+# included in all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+$schema: http://json-schema.org/draft-07/schema#
+$id: https://barectf.org/schemas/config/3/config-pre-include.json
+title: Configuration object before inclusions
+type: object
+properties:
+  trace:
+    $ref: https://barectf.org/schemas/config/3/trace-pre-include.json
+required:
+  - trace
diff --git a/barectf/schemas/config/3/config-pre-log-level-alias-sub.yaml b/barectf/schemas/config/3/config-pre-log-level-alias-sub.yaml
new file mode 100644 (file)
index 0000000..2a49a80
--- /dev/null
@@ -0,0 +1,64 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2020 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining
+# a copy of this software and associated documentation files (the
+# "Software"), to deal in the Software without restriction, including
+# without limitation the rights to use, copy, modify, merge, publish,
+# distribute, sublicense, and/or sell copies of the Software, and to
+# permit persons to whom the Software is furnished to do so, subject to
+# the following conditions:
+#
+# The above copyright notice and this permission notice shall be
+# included in all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+$schema: http://json-schema.org/draft-07/schema#
+$id: https://barectf.org/schemas/config/3/config-pre-log-level-alias-sub.json
+title: Configuration object before log level alias substitutions
+type: object
+properties:
+  trace:
+    title: Trace object before log level alias substitutions
+    type: object
+    properties:
+      type:
+        title: Trace type object before log level alias substitutions
+        type: object
+        properties:
+          $log-level-aliases:
+            $ref: https://barectf.org/schemas/config/common/common.json#/definitions/opt-log-level-aliases-prop
+          stream-types:
+            title: Stream types object before log level alias substitutions
+            type: object
+            patternProperties:
+              '.*':
+                title: Stream type object before log level alias substitutions
+                type: object
+                properties:
+                  event-types:
+                    title: Event types object before log level alias substitutions
+                    type: object
+                    patternProperties:
+                      '.*':
+                        title: Event type object before log level alias substitutions
+                        type: object
+                        properties:
+                          log-level:
+                            $ref: https://barectf.org/schemas/config/common/common.json#/definitions/opt-log-level-or-alias-prop
+                required:
+                  - event-types
+          required:
+            - stream-types
+    required:
+      - type
+required:
+  - trace
diff --git a/barectf/schemas/config/3/config.yaml b/barectf/schemas/config/3/config.yaml
new file mode 100644 (file)
index 0000000..6041099
--- /dev/null
@@ -0,0 +1,305 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2020 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining
+# a copy of this software and associated documentation files (the
+# "Software"), to deal in the Software without restriction, including
+# without limitation the rights to use, copy, modify, merge, publish,
+# distribute, sublicense, and/or sell copies of the Software, and to
+# permit persons to whom the Software is furnished to do so, subject to
+# the following conditions:
+#
+# The above copyright notice and this permission notice shall be
+# included in all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+$schema: http://json-schema.org/draft-07/schema#
+$id: https://barectf.org/schemas/config/3/config.json
+title: Effective configuration object
+definitions:
+  feature-uint-ft:
+    type: object
+    allOf:
+      - properties:
+          class:
+            enum:
+              - uint
+              - unsigned-int
+              - unsigned-integer
+              - uenum
+              - unsigned-enum
+              - unsigned-enumeration
+      - if:
+          properties:
+            class:
+              $ref: https://barectf.org/schemas/config/3/field-type.json#/definitions/uint-ft-class-prop
+        then:
+          $ref: https://barectf.org/schemas/config/3/field-type.json#/definitions/uint-ft
+      - if:
+          properties:
+            class:
+              $ref: https://barectf.org/schemas/config/3/field-type.json#/definitions/uenum-ft-class-prop
+        then:
+          $ref: https://barectf.org/schemas/config/3/field-type.json#/definitions/uenum-ft
+  opt-or-def-feature-uint-ft:
+    if:
+      type: object
+    then:
+      $ref: '#/definitions/feature-uint-ft'
+    else:
+      oneOf:
+        - type: boolean
+        - type: 'null'
+  opt-feature-uint-ft:
+    if:
+      type: object
+    then:
+      $ref: '#/definitions/feature-uint-ft'
+    else:
+      if:
+        type: boolean
+      then:
+        const: True
+      else:
+        type: 'null'
+  opt-struct-ft:
+    if:
+      type: object
+    then:
+      $ref: https://barectf.org/schemas/config/3/field-type.json#/definitions/struct-ft
+    else:
+      type: 'null'
+  trace:
+    title: Trace object
+    type: object
+    properties:
+      type:
+        $ref: '#/definitions/trace-type'
+      environment:
+        $ref: https://barectf.org/schemas/config/common/common.json#/definitions/opt-env-prop
+    required:
+      - type
+  trace-type:
+    title: Trace type object
+    type: object
+    properties:
+      uuid:
+        $ref: https://barectf.org/schemas/config/common/common.json#/definitions/opt-trace-type-uuid-prop
+      $default-byte-order:
+        $ref: https://barectf.org/schemas/config/common/common.json#/definitions/opt-byte-order-prop
+      $features:
+        if:
+          type: object
+        then:
+          properties:
+            magic-field-type:
+              allOf:
+                - $ref: '#/definitions/opt-or-def-feature-uint-ft'
+                - if:
+                    type: object
+                  then:
+                    properties:
+                      size:
+                        const: 32
+            uuid-field-type:
+              if:
+                type: object
+              then:
+                allOf:
+                  - $ref: https://barectf.org/schemas/config/3/field-type.json#/definitions/static-array-ft
+                  - properties:
+                      length:
+                        const: 16
+                      element-field-type:
+                        allOf:
+                          - $ref: '#/definitions/feature-uint-ft'
+                          - properties:
+                              size:
+                                const: 8
+                              alignment:
+                                if:
+                                  type: integer
+                                then:
+                                  const: 8
+              else:
+                if:
+                  type: boolean
+                then:
+                  const: false
+                else:
+                  type: 'null'
+            stream-type-id-field-type:
+              $ref: '#/definitions/opt-or-def-feature-uint-ft'
+          additionalProperties: false
+        else:
+          type: 'null'
+      clock-types:
+        title: Clock types object
+        type: object
+        patternProperties:
+          '^[A-Za-z_][A-Za-z0-9_]*$':
+            $ref: '#/definitions/clock-type'
+        additionalProperties: false
+      stream-types:
+        title: Stream types object
+        type: object
+        patternProperties:
+          '^[A-Za-z_][A-Za-z0-9_]*$':
+            $ref: '#/definitions/stream-type'
+        additionalProperties: false
+        minProperties: 1
+    required:
+      - stream-types
+      - $default-byte-order
+    additionalProperties: false
+  clock-type:
+    title: Clock type object
+    type: object
+    properties:
+      uuid:
+        $ref: https://barectf.org/schemas/config/common/common.json#/definitions/opt-uuid-prop
+      description:
+        $ref: https://barectf.org/schemas/config/common/common.json#/definitions/opt-string
+      frequency:
+        $ref: https://barectf.org/schemas/config/common/common.json#/definitions/opt-int-min-1
+      precision:
+        $ref: https://barectf.org/schemas/config/common/common.json#/definitions/opt-int-min-0
+      offset:
+        $ref: https://barectf.org/schemas/config/common/common.json#/definitions/opt-clock-type-offset-prop
+      origin-is-unix-epoch:
+        $ref: https://barectf.org/schemas/config/common/common.json#/definitions/opt-bool
+      $c-type:
+        $ref: https://barectf.org/schemas/config/common/common.json#/definitions/opt-string
+    additionalProperties: false
+  stream-type:
+    title: Stream type object
+    type: object
+    properties:
+      $is-default:
+        $ref: https://barectf.org/schemas/config/common/common.json#/definitions/opt-bool
+      $default-clock-type-name:
+        if:
+          type: string
+        then:
+          $ref: https://barectf.org/schemas/config/common/common.json#/definitions/iden-prop
+        else:
+          type: 'null'
+      $features:
+        if:
+          type: object
+        then:
+          properties:
+            packet:
+              if:
+                type: object
+              then:
+                properties:
+                  total-size-field-type:
+                    $ref: '#/definitions/opt-feature-uint-ft'
+                  content-size-field-type:
+                    $ref: '#/definitions/opt-feature-uint-ft'
+                  beginning-time-field-type:
+                    $ref: '#/definitions/opt-or-def-feature-uint-ft'
+                  end-time-field-type:
+                    $ref: '#/definitions/opt-or-def-feature-uint-ft'
+                  discarded-events-counter-field-type:
+                    $ref: '#/definitions/opt-or-def-feature-uint-ft'
+                additionalProperties: false
+              else:
+                type: 'null'
+            event:
+              if:
+                type: object
+              then:
+                properties:
+                  type-id-field-type:
+                    $ref: '#/definitions/opt-or-def-feature-uint-ft'
+                  time-field-type:
+                    $ref: '#/definitions/opt-or-def-feature-uint-ft'
+                additionalProperties: false
+              else:
+                type: 'null'
+          additionalProperties: false
+        else:
+          type: 'null'
+      packet-context-field-type-extra-members:
+        if:
+          type: array
+        then:
+          $ref: https://barectf.org/schemas/config/3/field-type.json#/definitions/struct-ft-members
+        else:
+          type: 'null'
+      event-common-context-field-type:
+        $ref: '#/definitions/opt-struct-ft'
+      event-types:
+        title: Event types object
+        type: object
+        patternProperties:
+          '^[A-Za-z_][A-Za-z0-9_]*$':
+            $ref: '#/definitions/event-type'
+        additionalProperties: false
+        minProperties: 1
+    required:
+      - event-types
+    additionalProperties: false
+  event-type:
+    title: Event type object
+    type: object
+    properties:
+      log-level:
+        $ref: https://barectf.org/schemas/config/common/common.json#/definitions/opt-int-min-0
+      specific-context-field-type:
+        $ref: '#/definitions/opt-struct-ft'
+      payload-field-type:
+        $ref: '#/definitions/opt-struct-ft'
+    additionalProperties: false
+type: object
+properties:
+  options:
+    title: Configuration options object
+    type: object
+    properties:
+      code-generation:
+        title: Code generation configuration options object
+        type: object
+        properties:
+          prefix:
+            if:
+              type: string
+            then:
+              $ref: https://barectf.org/schemas/config/common/common.json#/definitions/config-prefix-prop
+            else:
+              type: object
+              properties:
+                identifier:
+                  $ref: https://barectf.org/schemas/config/common/common.json#/definitions/iden-prop
+                file-name:
+                  type: string
+              required:
+                - identifier
+                - file-name
+              additionalProperties: false
+          header:
+            title: Header code generation configuration options object
+            type: object
+            properties:
+              identifier-prefix-definition:
+                type: boolean
+              default-stream-type-name-definition:
+                type: boolean
+            additionalProperties: false
+        additionalProperties: false
+    additionalProperties: false
+  trace:
+    $ref: '#/definitions/trace'
+required:
+  - trace
+additionalProperties: false
diff --git a/barectf/schemas/config/3/event-type-pre-include.yaml b/barectf/schemas/config/3/event-type-pre-include.yaml
new file mode 100644 (file)
index 0000000..9e16937
--- /dev/null
@@ -0,0 +1,30 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2020 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining
+# a copy of this software and associated documentation files (the
+# "Software"), to deal in the Software without restriction, including
+# without limitation the rights to use, copy, modify, merge, publish,
+# distribute, sublicense, and/or sell copies of the Software, and to
+# permit persons to whom the Software is furnished to do so, subject to
+# the following conditions:
+#
+# The above copyright notice and this permission notice shall be
+# included in all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+$schema: http://json-schema.org/draft-07/schema#
+$id: https://barectf.org/schemas/config/3/event-type-pre-include.json
+title: Event type object before inclusions
+type: object
+properties:
+  $include:
+    $ref: https://barectf.org/schemas/config/3/include-prop.json
diff --git a/barectf/schemas/config/3/field-type.yaml b/barectf/schemas/config/3/field-type.yaml
new file mode 100644 (file)
index 0000000..cf29e39
--- /dev/null
@@ -0,0 +1,339 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2020 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining
+# a copy of this software and associated documentation files (the
+# "Software"), to deal in the Software without restriction, including
+# without limitation the rights to use, copy, modify, merge, publish,
+# distribute, sublicense, and/or sell copies of the Software, and to
+# permit persons to whom the Software is furnished to do so, subject to
+# the following conditions:
+#
+# The above copyright notice and this permission notice shall be
+# included in all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+$schema: http://json-schema.org/draft-07/schema#
+$id: https://barectf.org/schemas/config/3/field-type.json
+title: Effective field type object
+definitions:
+  ft-base:
+    type: object
+    required:
+      - class
+  bit-array-ft:
+    allOf:
+      - $ref: '#/definitions/ft-base'
+      - properties:
+          size:
+            $ref: https://barectf.org/schemas/config/common/common.json#/definitions/int-ft-size-prop
+          alignment:
+            $ref: https://barectf.org/schemas/config/common/common.json#/definitions/opt-int-min-1
+          byte-order:
+            $ref: https://barectf.org/schemas/config/common/common.json#/definitions/opt-byte-order-prop
+        required:
+          - size
+  int-ft-props:
+    properties:
+      class: true
+      size: true
+      alignment: true
+      byte-order: true
+      preferred-display-base: true
+    additionalProperties: false
+  int-ft:
+    allOf:
+      - $ref: '#/definitions/bit-array-ft'
+      - properties:
+          preferred-display-base:
+            $ref: https://barectf.org/schemas/config/common/common.json#/definitions/opt-int-ft-preferred-display-base-prop
+  uint-ft-class-prop:
+    type: string
+    enum:
+      - uint
+      - unsigned-int
+      - unsigned-integer
+  uint-ft:
+    title: Unsigned integer field type object
+    allOf:
+      - $ref: '#/definitions/int-ft'
+      - $ref: '#/definitions/int-ft-props'
+      - properties:
+          class:
+            $ref: '#/definitions/uint-ft-class-prop'
+  sint-ft-class-prop:
+    type: string
+    enum:
+      - sint
+      - signed-int
+      - signed-integer
+  sint-ft:
+    title: Signed integer field type object
+    allOf:
+      - $ref: '#/definitions/int-ft'
+      - $ref: '#/definitions/int-ft-props'
+      - properties:
+          class:
+            $ref: '#/definitions/sint-ft-class-prop'
+  enum-ft-props:
+    properties:
+      class: true
+      size: true
+      alignment: true
+      byte-order: true
+      preferred-display-base: true
+      mappings: true
+    additionalProperties: false
+  enum-ft:
+    properties:
+      mappings:
+        if:
+          type: object
+        then:
+          patternProperties:
+            '.*':
+              type: array
+              items:
+                if:
+                  type: array
+                then:
+                  items:
+                    type: integer
+                  minItems: 2
+                  maxItems: 2
+                else:
+                  type: integer
+        else:
+          type: 'null'
+    properties:
+      class: true
+      size: true
+      alignment: true
+      byte-order: true
+      preferred-display-base: true
+      mappings: true
+    additionalProperties: false
+  uenum-ft-class-prop:
+    type: string
+    enum:
+      - uenum
+      - unsigned-enum
+      - unsigned-enumeration
+  uenum-ft:
+    title: Unsigned enumeration field type object
+    allOf:
+      - $ref: '#/definitions/int-ft'
+      - $ref: '#/definitions/enum-ft'
+      - $ref: '#/definitions/enum-ft-props'
+      - properties:
+          class:
+            $ref: '#/definitions/uenum-ft-class-prop'
+  senum-ft-class-prop:
+    type: string
+    enum:
+      - senum
+      - signed-enum
+      - signed-enumeration
+  senum-ft:
+    title: Signed enumeration field type object
+    allOf:
+      - $ref: '#/definitions/int-ft'
+      - $ref: '#/definitions/enum-ft'
+      - $ref: '#/definitions/enum-ft-props'
+      - properties:
+          class:
+            $ref: '#/definitions/senum-ft-class-prop'
+  real-ft-class-prop:
+    type: string
+    const: real
+  real-ft:
+    title: Real field type object
+    allOf:
+      - $ref: '#/definitions/bit-array-ft'
+      - properties:
+          class:
+            $ref: '#/definitions/real-ft-class-prop'
+          size:
+            enum:
+              - 32
+              - 64
+    properties:
+      class: true
+      size: true
+      alignment: true
+      byte-order: true
+    additionalProperties: false
+  string-ft-class-prop:
+    type: string
+    enum:
+      - str
+      - string
+  string-ft:
+    title: String field type object
+    allOf:
+      - $ref: '#/definitions/ft-base'
+      - properties:
+          class:
+            $ref: '#/definitions/string-ft-class-prop'
+    properties:
+      class: true
+    additionalProperties: false
+  static-array-ft-class-prop:
+    type: string
+    const: static-array
+  static-array-ft:
+    title: Static array field type object
+    allOf:
+      - $ref: '#/definitions/ft-base'
+      - properties:
+          class:
+            $ref: '#/definitions/static-array-ft-class-prop'
+          element-field-type:
+            $ref: '#/definitions/ft'
+          length:
+            type: integer
+            minimum: 0
+        required:
+          - element-field-type
+          - length
+    properties:
+      class: true
+      element-field-type: true
+      length: true
+    additionalProperties: false
+  struct-ft-class-prop:
+    type: string
+    enum:
+      - struct
+      - structure
+  struct-ft-member:
+    type: object
+    properties:
+      field-type:
+        $ref: '#/definitions/ft'
+    required:
+      - field-type
+    additionalProperties: false
+  struct-ft-members:
+    type: array
+    items:
+      type: object
+      patternProperties:
+        '^[A-Za-z_][A-Za-z0-9_]*$':
+          $ref: '#/definitions/struct-ft-member'
+      minProperties: 1
+      maxProperties: 1
+  struct-ft:
+    title: Structure field type object
+    allOf:
+      - $ref: '#/definitions/ft-base'
+      - properties:
+          class:
+            $ref: '#/definitions/struct-ft-class-prop'
+          minimum-alignment:
+            $ref: https://barectf.org/schemas/config/common/common.json#/definitions/opt-int-min-1
+          members:
+            if:
+              type: array
+            then:
+              $ref: '#/definitions/struct-ft-members'
+            else:
+              type: 'null'
+    properties:
+      class: true
+      minimum-alignment: true
+      members: true
+    additionalProperties: false
+  ft:
+    allOf:
+      - $ref: '#/definitions/ft-base'
+      - properties:
+          # This is used to make sure that the field type's class name
+          # is valid as any of the conditionals below can fail.
+          #
+          # Although we could use `oneOf` instead of this enumeration
+          # here and refer to each of the `*-ft-class-prop` definitions,
+          # it would be hard for the validator to show something useful
+          # for the user as all cases would fail.
+          #
+          # Using `enum` below makes the validator show a very clear
+          # validation failure message.
+          class:
+            enum:
+              - uint
+              - unsigned-int
+              - unsigned-integer
+              - sint
+              - signed-int
+              - signed-integer
+              - uenum
+              - unsigned-enum
+              - unsigned-enumeration
+              - senum
+              - signed-enum
+              - signed-enumeration
+              - real
+              - str
+              - string
+              - static-array
+              - struct
+              - structure
+      - if:
+          properties:
+            class:
+              $ref: '#/definitions/uint-ft-class-prop'
+        then:
+          $ref: '#/definitions/uint-ft'
+      - if:
+          properties:
+            class:
+              $ref: '#/definitions/sint-ft-class-prop'
+        then:
+          $ref: '#/definitions/sint-ft'
+      - if:
+          properties:
+            class:
+              $ref: '#/definitions/uenum-ft-class-prop'
+        then:
+          $ref: '#/definitions/uenum-ft'
+      - if:
+          properties:
+            class:
+              $ref: '#/definitions/senum-ft-class-prop'
+        then:
+          $ref: '#/definitions/senum-ft'
+      - if:
+          properties:
+            class:
+              $ref: '#/definitions/real-ft-class-prop'
+        then:
+          $ref: '#/definitions/real-ft'
+      - if:
+          properties:
+            class:
+              $ref: '#/definitions/string-ft-class-prop'
+        then:
+          $ref: '#/definitions/string-ft'
+      - if:
+          properties:
+            class:
+              $ref: '#/definitions/static-array-ft-class-prop'
+        then:
+          $ref: '#/definitions/static-array-ft'
+      - if:
+          properties:
+            class:
+              $ref: '#/definitions/struct-ft-class-prop'
+        then:
+          $ref: '#/definitions/struct-ft'
+    required:
+      - class
+$ref: '#/definitions/ft'
diff --git a/barectf/schemas/config/3/include-prop.yaml b/barectf/schemas/config/3/include-prop.yaml
new file mode 100644 (file)
index 0000000..4afa328
--- /dev/null
@@ -0,0 +1,34 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2020 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining
+# a copy of this software and associated documentation files (the
+# "Software"), to deal in the Software without restriction, including
+# without limitation the rights to use, copy, modify, merge, publish,
+# distribute, sublicense, and/or sell copies of the Software, and to
+# permit persons to whom the Software is furnished to do so, subject to
+# the following conditions:
+#
+# The above copyright notice and this permission notice shall be
+# included in all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+$schema: http://json-schema.org/draft-07/schema#
+$id: https://barectf.org/schemas/config/3/include-prop.json
+title: Inclusion property value
+if:
+  type: array
+then:
+  items:
+    type: string
+  minItems: 1
+else:
+  type: string
diff --git a/barectf/schemas/config/3/stream-type-pre-include.yaml b/barectf/schemas/config/3/stream-type-pre-include.yaml
new file mode 100644 (file)
index 0000000..ba9defb
--- /dev/null
@@ -0,0 +1,36 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2020 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining
+# a copy of this software and associated documentation files (the
+# "Software"), to deal in the Software without restriction, including
+# without limitation the rights to use, copy, modify, merge, publish,
+# distribute, sublicense, and/or sell copies of the Software, and to
+# permit persons to whom the Software is furnished to do so, subject to
+# the following conditions:
+#
+# The above copyright notice and this permission notice shall be
+# included in all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+$schema: http://json-schema.org/draft-07/schema#
+$id: https://barectf.org/schemas/config/3/stream-type-pre-include.json
+title: Stream type object before inclusions
+type: object
+properties:
+  $include:
+    $ref: https://barectf.org/schemas/config/3/include-prop.json
+  event-types:
+    title: Event types object before inclusions
+    type: object
+    patternProperties:
+      '.*':
+        $ref: https://barectf.org/schemas/config/3/event-type-pre-include.json
diff --git a/barectf/schemas/config/3/trace-pre-include.yaml b/barectf/schemas/config/3/trace-pre-include.yaml
new file mode 100644 (file)
index 0000000..dceb06f
--- /dev/null
@@ -0,0 +1,32 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2020 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining
+# a copy of this software and associated documentation files (the
+# "Software"), to deal in the Software without restriction, including
+# without limitation the rights to use, copy, modify, merge, publish,
+# distribute, sublicense, and/or sell copies of the Software, and to
+# permit persons to whom the Software is furnished to do so, subject to
+# the following conditions:
+#
+# The above copyright notice and this permission notice shall be
+# included in all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+$schema: http://json-schema.org/draft-07/schema#
+$id: https://barectf.org/schemas/config/3/trace-pre-include.json
+title: Trace object before inclusions
+type: object
+properties:
+  $include:
+    $ref: https://barectf.org/schemas/config/3/include-prop.json
+  type:
+    $ref: https://barectf.org/schemas/config/3/trace-type-pre-include.json
diff --git a/barectf/schemas/config/3/trace-type-pre-include.yaml b/barectf/schemas/config/3/trace-type-pre-include.yaml
new file mode 100644 (file)
index 0000000..3249977
--- /dev/null
@@ -0,0 +1,42 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2020 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining
+# a copy of this software and associated documentation files (the
+# "Software"), to deal in the Software without restriction, including
+# without limitation the rights to use, copy, modify, merge, publish,
+# distribute, sublicense, and/or sell copies of the Software, and to
+# permit persons to whom the Software is furnished to do so, subject to
+# the following conditions:
+#
+# The above copyright notice and this permission notice shall be
+# included in all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+$schema: http://json-schema.org/draft-07/schema#
+$id: https://barectf.org/schemas/config/3/trace-type-pre-include.json
+title: Trace type object before inclusions
+type: object
+properties:
+  $include:
+    $ref: https://barectf.org/schemas/config/3/include-prop.json
+  clock-types:
+    title: Clock types object before inclusions
+    type: object
+    patternProperties:
+      '.*':
+        $ref: https://barectf.org/schemas/config/3/clock-type-pre-include.json
+  stream-types:
+    title: Stream types object before inclusions
+    type: object
+    patternProperties:
+      '.*':
+        $ref: https://barectf.org/schemas/config/3/stream-type-pre-include.json
diff --git a/barectf/schemas/config/common/common.yaml b/barectf/schemas/config/common/common.yaml
new file mode 100644 (file)
index 0000000..5133169
--- /dev/null
@@ -0,0 +1,173 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2020 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining
+# a copy of this software and associated documentation files (the
+# "Software"), to deal in the Software without restriction, including
+# without limitation the rights to use, copy, modify, merge, publish,
+# distribute, sublicense, and/or sell copies of the Software, and to
+# permit persons to whom the Software is furnished to do so, subject to
+# the following conditions:
+#
+# The above copyright notice and this permission notice shall be
+# included in all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+$schema: http://json-schema.org/draft-07/schema#
+$id: https://barectf.org/schemas/config/common/common.json
+definitions:
+  opt-bool:
+    oneOf:
+      - type: boolean
+      - type: 'null'
+  opt-string:
+    oneOf:
+      - type: string
+      - type: 'null'
+  opt-int-min-0:
+    if:
+      type: integer
+    then:
+      minimum: 0
+    else:
+      type: 'null'
+  opt-int-min-1:
+    if:
+      type: integer
+    then:
+      minimum: 1
+    else:
+      type: 'null'
+  opt-log-level-aliases-prop:
+    title: Optional log level aliases object
+    if:
+      type: object
+    then:
+      patternProperties:
+        '':
+          $ref: '#/definitions/opt-int-min-0'
+    else:
+      type: 'null'
+  byte-order-prop:
+    title: Byte order property value
+    type: string
+    enum:
+      - le
+      - little
+      - little-endian
+      - be
+      - big
+      - big-endian
+  opt-byte-order-prop:
+    title: Optional byte order property value
+    if:
+      type: string
+    then:
+      $ref: '#/definitions/byte-order-prop'
+    else:
+      type: 'null'
+  int-ft-size-prop:
+    title: Integer field type's size property
+    type: integer
+    minimum: 1
+    maximum: 64
+  opt-int-ft-preferred-display-base-prop:
+    if:
+      type: string
+    then:
+      enum:
+        - bin
+        - binary
+        - oct
+        - octal
+        - dec
+        - decimal
+        - hex
+        - hexadecimal
+    else:
+      type: 'null'
+  opt-uuid-prop:
+    title: Optional UUID property value
+    if:
+      type: string
+    then:
+      pattern: '^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$'
+    else:
+      type: 'null'
+  opt-trace-type-uuid-prop:
+    title: Optional trace type UUID property value
+    if:
+      type: string
+    then:
+      oneOf:
+        - $ref: '#/definitions/opt-uuid-prop'
+        - type: string
+          const: auto
+    else:
+      type: 'null'
+  opt-clock-type-offset-prop:
+    if:
+      type: object
+    then:
+      properties:
+        cycles:
+          $ref: '#/definitions/opt-int-min-0'
+        seconds:
+          $ref: '#/definitions/opt-int-min-0'
+      additionalProperties: false
+    else:
+      type: 'null'
+  iden-prop:
+    type: string
+    allOf:
+      - pattern: '^[A-Za-z_][A-Za-z0-9_]*$'
+      - not:
+          enum:
+            - align
+            - callsite
+            - clock
+            - enum
+            - env
+            - event
+            - floating_point
+            - integer
+            - stream
+            - string
+            - struct
+            - trace
+            - typealias
+            - typedef
+            - variant
+  config-prefix-prop:
+    $ref: '#/definitions/iden-prop'
+  opt-env-prop:
+    title: Environment variables
+    if:
+      type: object
+    then:
+      patternProperties:
+        '^[A-Za-z_][A-Za-z0-9_]*$':
+          oneOf:
+            - type: string
+            - type: integer
+      additionalProperties: false
+    else:
+      type: 'null'
+  opt-log-level-or-alias-prop:
+    title: Optional log level (integral or alias) property
+    if:
+      type: integer
+    then:
+      minimum: 0
+    else:
+      oneOf:
+        - type: string
+        - type: 'null'
This page took 0.079124 seconds and 4 git commands to generate.