From 664d9b57051af3035101c42ab6a057667ab77149 Mon Sep 17 00:00:00 2001 From: James Parkhurst Date: Thu, 13 Jun 2024 15:45:47 +0100 Subject: [PATCH] Fixing schema --- docs/source/ext/pydantic_settings.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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):