You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Support discriminator for oneOf in OpenApiValidationPlugin #2040
OpenApiValidationPlugin (#2037) validates oneOf strictly: a body that matches more than one branch is reported. That's correct per spec, but many real-world specs have overlapping oneOf branches and rely on discriminator to pick one, so valid payloads get flagged.
Proposal: when a discriminator is present, select the branch from the discriminator property's value, using mapping (or the implicit schema name if there's no mapping), and validate only that branch. Report a clear error when the discriminator value is missing or unknown.
Activity
Support discriminator for oneOf in OpenApiValidationPlugin