Skip to content

Commit

Permalink
fix syntax in schema merging
Browse files Browse the repository at this point in the history
  • Loading branch information
cognifloyd committed Jul 5, 2022
1 parent 62761ca commit 7110c75
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion st2common/st2common/util/config_loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,9 @@ def _get_object_properties_schema(object_schema, object_keys=None):
# This naive schema composition approximates allOf.
# We can improve this later if someone provides examples that need
# a better allOf schema implementation for patternProperties.
composed_schema = {**schema for schema in key_schemas}
composed_schema = {}
for schema in key_schemas:
composed_schema.update(schema)
# update matched key
flattened_properties_schema[key] = composed_schema
# don't overwrite matched key's schema with additionalProperties
Expand Down

0 comments on commit 7110c75

Please sign in to comment.