Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Option to not merge the base schema onto the input schema for Model.discriminator #12473

Open
2 tasks done
hasezoey opened this issue Sep 26, 2022 · 0 comments
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

Comments

@hasezoey
Copy link
Collaborator

hasezoey commented Sep 26, 2022

Prerequisites

  • I have written a descriptive issue title
  • I have searched existing issues to ensure the feature has not already been requested

🚀 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

@hasezoey hasezoey added new feature This change adds new functionality, like a new method or class enhancement This issue is a user-facing general improvement that doesn't fix a bug or add a new feature labels Sep 26, 2022
@hasezoey hasezoey changed the title Option to not clone the base schma onto the input schema for Model.discriminator Option to not merge the base schma onto the input schema for Model.discriminator Sep 26, 2022
@vkarpov15 vkarpov15 added this to the 6.x Unprioritized milestone Oct 3, 2022
@hasezoey hasezoey changed the title Option to not merge the base schma onto the input schema for Model.discriminator Option to not merge the base schema onto the input schema for Model.discriminator Oct 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
None yet
Development

No branches or pull requests

2 participants