The usecase is for example for big companies where for The pydantic validations are applied and the extra values that i defined are removed in response I want to throw an error saying eats is not allowed for dog or something like that. Extra content at the end of the document asked 12 years, 5 months ago modified 1 year, 10 months ago viewed 203k times I don't know if you can override existing errors, but if you just want to change messages, you could use custom errors Would that cause any issues for you
I mean, does it need to remain as the extra_forbidden type? I have defined a pydantic schema with extra = extra.allow in pydantic config Is it possible to get a list or set of extra fields passed to the schema separately Packages are expected to be unique up to name and version, so two wheels with the same package name and version are treated as indistinguishable by pip This is a deliberate feature of the package metadata, and not likely to change. Using the python library to populate a dataclass using a dictionary of values ignores extra arguments / values present in the dictionary (along with all the other benefits the library provides).
Asked 7 years, 1 month ago modified 12 months ago viewed 26k times I have a small python example using pydantic that shows my issue From typing import literal from pydantic import basemodel, field, configdict class base(basemodel) # this method allows inheri.
OPEN