Skip to content

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

@hasezoey

Description

@hasezoey

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementThis issue is a user-facing general improvement that doesn't fix a bug or add a new featurenew featureThis change adds new functionality, like a new method or class

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions