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
from odmantic import Field, Model
class CoreModel(Model):
created_at: int = Field(
default_factory=lambda: int(time.time()),
description="Unix timestamp when the user was created",
)
updated_at: int = Field(
default_factory=lambda: int(time.time()),
description="Unix timestamp of the last update",
)
class User(CoreModel):
first_name: str
last_name: str
Bug
Current Behavior
The response model in FastAPI swagger for CurrentUser only has the
token
field,username
andpassword
in parent class is missing.Expected behavior
The response model in FastAPI swagger for CurrentUser should contains
username
,password
andtoken
.Environment
python -c "import pydantic.utils; print(pydantic.utils.version_info())
):pydantic version: 1.10.9
pydantic compiled: True
install path: ...
python version: 3.11.3 (main, Apr 7 2023, 20:13:31) [Clang 14.0.0 (clang-1400.0.29.202)]
platform: macOS-13.4-arm64-arm-64bit
optional deps. installed: ['typing-extensions']
Additional context
The text was updated successfully, but these errors were encountered: