-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
288 filip support right now only paylaod in mqtt custom / http custom but orion already supports json and ngsi as further options #296
288 filip support right now only paylaod in mqtt custom / http custom but orion already supports json and ngsi as further options #296
Conversation
…). Also added some tests for the pydantic model.
…tCustom notifications
…w-only-paylaod-in-mqttCustom-/-httpCustom-but-Orion-already-supports-json-and-ngsi-as-further-options # Conflicts: # filip/models/ngsi_v2/subscriptions.py # tests/models/test_ngsi_v2_subscriptions.py
closes #288 |
I think it would be great if we can test the functionality of these fields too. @RCX112 Could you please implement a test that uses FiLiP/tests/clients/test_ngsi_v2_cb.py Line 832 in 7919664
|
@SystemsPurge When I implemented the HttpCustom model I also had the same warnings. I simply supressed them with the warnings library, because the json() method of pydantic is already outdated anyway:
|
…d, json and ngsi messages
@djs0109 Which version of Orion do we currently use for the tests, because the custom notifications don't work for version 3.7 for example? |
Hi @RCX112 , it should be Orion >= 3.8, I have tested with 3.8.1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@SystemsPurge @RCX112 LGTM, thank you!
The following warning pops up "UserWarning: Field name "json" shadows an attribute in parent "Mqtt"" ( due to the json fields in MqttCustom and HttpCustom ). Since the Http/Mqtt models do not have an explicit json field, i take it this is coming from some field/property in the base model.
Tried to circumvent the warning by the use of aliases which obviously did not work.
Not sure what model to specify for the json payload type, i just put a Dict[str, any] for now ( despite number/string being valid json , the orion manual specifies that it needs to be a JSON object and not an object of primitive type )
Any input on these two points is welcome.