You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have complex structure of Pydantic models. I have one model that inherits 5-6 fields from another model and adds its two fields. However, when docuemntation is generated, in fields section, only two fields are shown, BUT the rest of the doc with all attributes is okay, even inherited ones.
To Reproduce
from pydantic import AliasGenerator, BaseModel, ConfigDict, Field, field_validator, model_validator
class AuthCallbackSchema(BaseModel):
model_config = ConfigDict(alias_generator=AliasGenerator(validation_alias=str.upper))
rc: str = Field(min_length=2, max_length=2)
"""Əməliyyat cavab kodu (ISO-8583 Sahə 39)"""
approval: Optional[str] = Field(..., min_length=6, max_length=6)
"""Müştəri bankının təsdiq kodu (ISO-8583 Sahə 38). Kart idarəetmə sistemi
tərəfindən təmin edilmədikdə boş ola bilər."""
rrn: str = Field(min_length=12, max_length=12)
"""Müştəri bankının axtarış istinad nömrəsi (ISO-8583 Sahə 37)"""
int_ref: str = Field(min_length=1, max_length=128)
"""Elektron ticarət şlüzünün daxili istinad nömrəsi"""
p_sign: str = Field(min_length=1, max_length=256)
"""16-lıq formatda Merchant MAC"""
class AuthCallbackWithCardDataSchema(AuthCallbackSchema):
card: Optional[str]
"""Masklanmış kart nömrəsi"""
token: Optional[str]
"""Saxlanılacaq kartın TOKEN parametri"""
Description of the bug
I have complex structure of Pydantic models. I have one model that inherits 5-6 fields from another model and adds its two fields. However, when docuemntation is generated, in
fields
section, only two fields are shown, BUT the rest of the doc with all attributes is okay, even inherited ones.To Reproduce
and in MD file:
Result:
Notice how
fields
section has only two, but in the ToC you can see all inherited fields as well, documented and all right.Full traceback
Full traceback
Expected behavior
All of the fields should be showin in
fields
section as it does in ToCEnvironment information
PASTE MARKDOWN OUTPUT HERE
Additional context
The text was updated successfully, but these errors were encountered: