FastAPI-Backend-Template icon indicating copy to clipboard operation
FastAPI-Backend-Template copied to clipboard

Validation errors on Run

Open goyometeojorito opened this issue 1 year ago • 2 comments

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

goyometeojorito avatar Jul 16 '23 21:07 goyometeojorito

I have the same problem, although a week ago when I ran another project based on this template, there was no such problem

xIMRANx avatar Jul 29 '23 10:07 xIMRANx

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

duchuyvp avatar Nov 09 '23 04:11 duchuyvp