Inherit configs in pydantic v2 #7778
Unanswered
ilija-lazoroski
asked this question in
Question
Replies: 1 comment 1 reply
-
I have the exact same problem with a very banal issue, how can I change the "title" value in the config: from uuid import UUID
from pydantic import BaseModel, ConfigDict
class Base(BaseModel):
model_config = ConfigDict(
from_attributes=True,
populate_by_name=True,
title='parent'
)
class BaseId(Base):
id: UUID
class Child(BaseId):
pass how can I give a custom title to the class Child? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey,
In version 1 we could do the following:
I don't really see a way to do a similar thing using
model_config: ConfigDict.
Beta Was this translation helpful? Give feedback.
All reactions