Skip to main content
Doctorine reference
On this pageOverview

A union has no usable discriminator

No single required const-tagged property discriminates every member, so the union was emitted as a plain union and is not forward-compatible.

output.union.discriminator-not-inferred

Category
Generated output
Default severity
Warning
Applies to
API specification
Default outcome
Completed with warnings
Recommended action
Fix the source
Grouped by
Defect code

Why it matters

No single required const-tagged property discriminates every member, so the union was emitted as a plain union and is not forward-compatible.

How to fix it

  1. Align every member on one required const property with distinct values (or set unions.discriminator_fallback: off).
Documentation menu