From 899f4511812d47ae49c351ad1da8c16f710d53c8 Mon Sep 17 00:00:00 2001 From: mle Date: Mon, 24 Jul 2023 14:33:51 +0200 Subject: [PATCH] [FIX] base_rest_pydantic: to_json_schema --- 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 dc06c955e..995ca4510 100644 --- a/base_rest_pydantic/restapi.py +++ b/base_rest_pydantic/restapi.py @@ -117,7 +117,7 @@ def to_json_schema(self, service, spec, direction): schema = self._model_cls.model_json_schema() schema_name = schema["title"] if schema_name not in spec.components.schemas: - definitions = schema.get("definitions", {}) + definitions = schema.get("$defs", {}) for name, sch in definitions.items(): if name in spec.components.schemas: continue