Skip to content

Conversation

@mohankumarelec
Copy link
Contributor

Summary

Extends the discriminator optimization from #292 to work with mixed schemas where only some alternatives have discriminators, rather than requiring all alternatives to have them.

Changes

  • Relaxed discriminator coverage requirement: The optimization now applies when at least 2 alternatives (instead of all) share a discriminator property with const values

Test Coverage

  • Added comprehensive tests with deeply nested self-referencing schemas (up to 1000 levels) to validate the optimization works correctly with complex discriminated unions.

Related

Extends #292

@mohankumarelec
Copy link
Contributor Author

@aeschli , Please take a loot into this and let me know if it looks good, Thanks.

Feel free to edit the PR if required

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant