Skip to content

Commit

Permalink
[FIX] base_rest_pydantic: to_json_schema
Browse files Browse the repository at this point in the history
  • Loading branch information
marielejeune committed Jul 24, 2023
1 parent 8ec5c45 commit 899f451
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion base_rest_pydantic/restapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 899f451

Please sign in to comment.