############### Extensions ############### Extensions are integral part of SDC, allowing developers to enhance the data model provided with additional information. protoSDC supports extensions using the [Any](https://protobuf.dev/programming-guides/proto3/#any) well-known type. Specifying Extensions ##################### `protoSDC Converter` supports generating both standalone extensions as well as extensions that reference elements from the BICEPS data model. Generating the `BICEPS` data model using `proto-converter` produces a file called an `Episode`, which contains information about the generated model. This file can be used in subsequent executions of `proto-converter` to allow newly generated output to reference the already generated data model. Take this example: .. literalinclude:: ../example_schemas/example_extension.xsd :language: xml :linenos: It imports a schema for which we might already have a generated data model and we do not want to generate it again. If so, we can configure the `proto-converter` to associate all references to `example.xsd` by changing our configuration to load the episode for example.xsd. .. literalinclude:: ../config.toml.example.episode :language: toml :linenos: :lines: -13 This tells the converter to enhance the data model with data from the `episode_out.json` file, which contains the references to the existing `example.xsd` data model. Extension best practices ======================== `proto-converter` only supports a subset of XML schema. For compatibility purposes, follow these rules: - no `xsd:any` - no `xsd:anyAttribute` - no nested extensions - ...