Skip to content

Commit

Permalink
Fix bool in schema bug (#160)
Browse files Browse the repository at this point in the history
* check object is a dict before looking for `type` key.

---------

Co-authored-by: Jordan <[email protected]>
  • Loading branch information
jordlay and Jordan authored Mar 19, 2024
1 parent a73a246 commit 54b02ea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/aosm/azext_aosm/build_processors/base_processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 54b02ea

Please sign in to comment.