From 21c70287fee7730a92db0fa9bf77132b2075dace Mon Sep 17 00:00:00 2001 From: "Keto D. Zhang" Date: Fri, 28 Jun 2024 02:51:38 -0700 Subject: [PATCH] Refactor yaml to safe load and pydantic schema() to model_json_schema() --- asdf_pydantic/model.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asdf_pydantic/model.py b/asdf_pydantic/model.py index f4e6ae3..0bdc49a 100644 --- a/asdf_pydantic/model.py +++ b/asdf_pydantic/model.py @@ -66,5 +66,5 @@ def schema_asdf( """ ) - body = yaml.dump(cls.schema()) + body = yaml.safe_dump(cls.model_json_schema()) return header + body