Nested extensions can be defined for primitive data types or for complex data types.
For nested extensions, define a wrapper extension. The sub-extensions are defined and included in the wrapper extension. The wrapper extension along with the sub-extensions are included in the resource type.
Nested Extensions for Primitive Data Type
You can define nested extensions for primitive data types:
Primitive extensions are defined as part of a separate file and while referencing use different slice names.
Wrapper extension pointing to multiple extensions of type primitives.
Primitive extensions can be with 0..1 or 0..N cardinalities.
Extension Definition: Sub-Extension 1
Extension Definition: Sub-Extension 2
Extension Definition: Wrapper Extension
Payload for the Account resource having nested extensions:
Nested Extensions for Complex Data Type
You can define nested extensions for complex data types:
Complex-type extensions are defined as part of a separate file and while referencing use different slice names.
Wrapper extension pointing to multiple extensions of complex-type
Complex-type extensions can be with 0..1 or 0..N cardinalities.
Extension Definition: Wrapper Extension with In-place Child Definitions
Payload for the Account resource having nested extensions: