FastAPI-Backend-Template
FastAPI-Backend-Template copied to clipboard
Validation errors on Run
Show this errors in console at run
pydantic_core._pydantic_core.ValidationError: 11 validation errors for BackendDevSettings
BACKEND_SERVER_HOST
Extra inputs are not permitted [type=extra_forbidden, input_value='127.0.0.1', input_type=str]
For further information visit https://errors.pydantic.dev/2.0.3/v/extra_forbidden
BACKEND_SERVER_PORT
Extra inputs are not permitted [type=extra_forbidden, input_value='8000', input_type=str]
For further information visit https://errors.pydantic.dev/2.0.3/v/extra_forbidden
BACKEND_SERVER_WORKERS
Extra inputs are not permitted [type=extra_forbidden, input_value='4', input_type=str]
For further information visit https://errors.pydantic.dev/2.0.3/v/extra_forbidden
I have the same problem, although a week ago when I ran another project based on this template, there was no such problem
Since pydantic.BaseConfig
is deprecated, use model_config = ConfigDict(extra='allow')
instead of subclass Config
More information: https://docs.pydantic.dev/latest/api/config/#pydantic.config.ConfigDict