From eb43f15b0a5b6849fc10a5449144dae833a7e44a Mon Sep 17 00:00:00 2001 From: Emad Shaaban Date: Thu, 7 Aug 2025 15:57:35 +0300 Subject: [PATCH] [FIX] base_rest_pydantic: restore pydantic field alias support --- base_rest_pydantic/restapi.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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", {})