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

Constraint

Type: Rego Validation
TypeRuleset
OrganizationMuleSoft
Published by
MuleSoft Organization
Published onNov 29, 2023
Asset overview

Asset versions for 1.1.x

Asset versions
VersionActions
1.1.0

Tags