From 54b02eaadcc540a7af22da95ee14a3ac375062e7 Mon Sep 17 00:00:00 2001 From: jordlay <72226943+jordlay@users.noreply.github.com> Date: Tue, 19 Mar 2024 16:09:02 +0000 Subject: [PATCH] Fix bool in schema bug (#160) * check object is a dict before looking for `type` key. --------- Co-authored-by: Jordan --- src/aosm/azext_aosm/build_processors/base_processor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/aosm/azext_aosm/build_processors/base_processor.py b/src/aosm/azext_aosm/build_processors/base_processor.py index 82de0a04a8e..a3495de7d41 100644 --- a/src/aosm/azext_aosm/build_processors/base_processor.py +++ b/src/aosm/azext_aosm/build_processors/base_processor.py @@ -185,7 +185,7 @@ def generate_values_mappings( # Loop through each property in the schema. for subschema_name, subschema in schema["properties"].items(): - if "type" not in subschema: + if isinstance(subschema, dict) and "type" not in subschema: if ["oneOf", "anyOf"] in subschema: raise InvalidArgumentValueError( f"The subschema '{subschema_name}' does not contain a type.\n"