From d9086ea76446e735f447c2a201d2c133564514c9 Mon Sep 17 00:00:00 2001 From: Eduardo Rodrigues Date: Sun, 18 Oct 2020 23:22:11 +0200 Subject: [PATCH 1/2] ensure required in docs from flattened schema --- src/rpdk/core/project.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/rpdk/core/project.py b/src/rpdk/core/project.py index 05517eb5..67aa0c30 100644 --- a/src/rpdk/core/project.py +++ b/src/rpdk/core/project.py @@ -421,6 +421,7 @@ def generate_docs(self): name: self._set_docs_properties(name, value, (name,)) for name, value in self._flattened_schema[()]["properties"].items() } + docs_schema["required"] = self._flattened_schema[()].get("required") LOG.debug("Finished documenting nested properties") From e66f8cf95b56e873530411f8ade85cd83b02b0ae Mon Sep 17 00:00:00 2001 From: Eduardo Rodrigues Date: Thu, 22 Oct 2020 21:59:01 +0200 Subject: [PATCH 2/2] fallback schema required property to empty array --- src/rpdk/core/project.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rpdk/core/project.py b/src/rpdk/core/project.py index 67aa0c30..72c31b4a 100644 --- a/src/rpdk/core/project.py +++ b/src/rpdk/core/project.py @@ -421,7 +421,7 @@ def generate_docs(self): name: self._set_docs_properties(name, value, (name,)) for name, value in self._flattened_schema[()]["properties"].items() } - docs_schema["required"] = self._flattened_schema[()].get("required") + docs_schema["required"] = self._flattened_schema[()].get("required", []) LOG.debug("Finished documenting nested properties")