Option to not merge the base schema onto the input schema for Model.discriminator
#12473
Open
2 tasks done
Labels
enhancement
This issue is a user-facing general improvement that doesn't fix a bug or add a new feature
new feature
This change adds new functionality, like a new method or class
Milestone
Prerequisites
🚀 Feature Proposal
A option to disable the current behavior of always merging the base schema onto the input schema
Motivation
Because when manually cloning the schemas beforehand this may result in duplicate things, or if not cloned at all from the base schema but with the same schema definition (not schema instance), it would create duplicate entries (for example hooks)
the current behavior runs into things like #12472
For example the documentation at Apply Plugins Before Compiling Models would not apply anymore with the current implementation
Example
With the option it would be up to the user to clone the schema or define a new schema from the ground up (with maybe a same schema definition), but still apply all required options for a discriminator
fixes #12472
The text was updated successfully, but these errors were encountered: