diff --git a/base_rest_pydantic/restapi.py b/base_rest_pydantic/restapi.py index 245ec96a8..ff2cd7d84 100644 --- a/base_rest_pydantic/restapi.py +++ b/base_rest_pydantic/restapi.py @@ -122,7 +122,7 @@ def to_openapi_responses(self, service, spec): } def to_json_schema(self, service, spec, direction): - schema = self._model_cls.model_json_schema(by_alias=False) + schema = self._model_cls.model_json_schema() schema_name = schema["title"] if schema_name not in spec.components.schemas: definitions = schema.pop("$defs", {})