Support unions with multiple mappings pointing to a single underlying type
Fixes https://github.com/oapi-codegen/oapi-codegen/issues/1530 Fixes https://github.com/oapi-codegen/oapi-codegen/issues/1664
This PR:
- Correctly generates the
ValueByDiscriminatorfunction when multiple discriminator values map to a single type - Prevents
From*/Merge*functions from setting an arbitrary discriminator in the case where there isn't a 1:1 mapping between type and discriminator value
Kusari Analysis Results:
✅ No Flagged Issues Detected
All values appear to be within acceptable risk parameters.
No pinned version dependency changes, code issues or exposed secrets detected!
@kusari-inspector rerun - Trigger a re-analysis of this PR @kusari-inspector feedback [your message] - Send feedback to our AI and team See Kusari's documentation for setup and configuration. Commit: 71958afa46343ea2343563dd11e3bed038e39ea7, performed at: 2025-09-02T12:57:33Z
Found this helpful? Give it a 👍 or 👎 reaction!
@jamietanna are you able to take a look at this one?