Skip to content

Commit

Permalink
Add default config output to match pre: 2.0.0 schema
Browse files Browse the repository at this point in the history
  • Loading branch information
Jkovarik committed Jan 10, 2022
1 parent 2091a63 commit 9e42c23
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
5 changes: 3 additions & 2 deletions examples/messages/basic_no_config.output.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"foo": "bar"
},
"payload": {
"input": { "anykey": "anyvalue" }
},
"input": { "anykey": "anyvalue" },
"config": {}
},
"exception": "None"
}
3 changes: 3 additions & 0 deletions examples/schemas/examples-messages-no-config.output.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
"properties": {
"input": {
"type": "object"
},
"config": {
"type": "object"
}
},
"additionalProperties": false
Expand Down
2 changes: 2 additions & 0 deletions message_adapter/message_adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,8 @@ def load_nested_event(self, event):
if final_config:
self.__validate_json(final_config, 'config')
response['config'] = final_config
else:
response['config'] = {}
if 'cumulus_message' in config:
response['messageConfig'] = config['cumulus_message']

Expand Down
2 changes: 1 addition & 1 deletion message_adapter/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = 'v2.0.1'
__version__ = 'v2.0.2'

0 comments on commit 9e42c23

Please sign in to comment.