Datagraph Best Practices
non-homogeneous-union
general > non-homogeneous-union
Guidance
DataGraph does not support shapes containing unions of scalar and object types.
Instead, use object shapes with scalar flags and properties.
Message
DataGraph does not support shapes containing unions of scalar and object types.
Examples
valid
content:
application/json:
schema:
$ref: '#/components/schemas/CompliantObject'
invalid
content:
application/json:
schema:
oneOf:
- $ref: '#/components/schemas/ScalarType'
- $ref: '#/components/schemas/ObjectType'
Applies to AnyShape