diff --git a/docs/source/ext/pydantic_settings.py b/docs/source/ext/pydantic_settings.py index 7c57dc1b..cd428d67 100644 --- a/docs/source/ext/pydantic_settings.py +++ b/docs/source/ext/pydantic_settings.py @@ -85,7 +85,7 @@ def walk(obj): # Parse the definitions definitions = nodes.paragraph() - for key, value in schema["definitions"].items(): + for key, value in schema["$defs"].items(): definition = nodes.section(ids=[nodes.make_id(key)]) definition += nodes.title(text=key) definition += walk(value) @@ -108,7 +108,7 @@ def from_import(self, loc): raise e # Get the schema - return obj.schema() + return obj.model_json_schema() def setup(app):