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 ninja import NinjaAPI
from typing import List
api = NinjaAPI()
@api.get("/yo")
def yo(request, response=List[int]):
return [1,2,3]
pydantic.errors.PydanticSchemaGenerationError: Unable to generate pydantic-core schema for <class 'typing._GenericAlias'>. Set arbitrary_types_allowed=Truein the model_config to ignore this error or implementget_pydantic_core_schema` on your type to fully support it.
If you got this error by calling handler() within __get_pydantic_core_schema__ then you likely need to call handler.generate_schema(<some type>) since we do not call __get_pydantic_core_schema__ on <some type> otherwise to avoid infinite recursion.
@uweschmitt will do that now, been bit busy with life as well as a major build taking my attention away from the other builds i have open. Thank you for the suggestion!!!! 😊
I get this error when setting response to be list
**Versions **
pydantic.errors.PydanticSchemaGenerationError: Unable to generate pydantic-core schema for <class 'typing._GenericAlias'>. Set
arbitrary_types_allowed=Truein the model_config to ignore this error or implement
get_pydantic_core_schema` on your type to fully support it.If you got this error by calling handler() within
__get_pydantic_core_schema__
then you likely need to callhandler.generate_schema(<some type>)
since we do not call__get_pydantic_core_schema__
on<some type>
otherwise to avoid infinite recursion.For further information visit https://errors.pydantic.dev/2.10/u/schema-for-unknown-type`
The text was updated successfully, but these errors were encountered: