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.
For ex:
from pydantic import BaseModel as pydanticBaseModel
class BaseModel(pydanticBaseModel):
name: str
class Config:
allow_population_by_field_name = True
extra = Extra.allow
I pass below JSON:
{
"name": "Name",
"address": "bla bla",
"post": "post"
}
I need a function from pydantic, if available which will return all extra fields passed.
like: {"address", "post"}