Open
Description
CoRIM spec defines two types of extensibility:
- Map Extensions, indicated by
$$NAME-extension
, allow extending map structures defined in the spec by adding new data fields. This is already covered byExtensionMap
. - Data Type Extensions, indicated by
$NAME-type-choice
, allow extending structures defined in the spec with additional data types for existing fields. This is currently not supported.
(Note: there is also a third kind, due to CoSWID -- "enum extensions", indicated by $NAME
(without the -type-choice
suffix), which allows specifying addition values to defined enumerations, such as $role
. This, too, is already covered).
To support Data Type Extensions, we will need to
- Add
Extension(ExtensionValue<'a>)
variant to the type-choice enums. - On deserialisation, whenever we don't recognise the data, populate this variant, instead of raising an error.
- Add a
TaggedValue(u64, ExtensionsValue<'a>)
variant toExtensionValue
to support new tagged types (this would be the norm for type-choice extensions).
Metadata
Metadata
Assignees
Labels
No labels