You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Currently the StaticDevice metadata field allows the type Optional[Dict[str, Dict]]. But Fiware only allows a very specific Dict structure. Giving any other structure results in a success in Filip, but an uncatched background error in Fiware.
To Reproduce
Steps to reproduce the behavior:
Create an ContextDevice containing a StaticDeviceAttribute with the metadata: {"meta": { "test": "1" }}
Filip allows this assignment, you can now post the device without error
But if you now look in Fiware, no device or corresponding ContextEntity appeared.
Expected behavior
FiLiP tells you, that the assignment of the metadata was not valid, and stops the execution
Fix
Change the type of the StaticDevice metadata field to a BaseModel modeling the allowed structure. The ContextMetadata and NamedContextMetadata modeld in context.py, can probably be reused for this task. The StaticDeviceAttribute metadata field would then have the same structure and logic as the ContextAttribute metadata field.
The text was updated successfully, but these errors were encountered:
Describe the bug
Currently the StaticDevice metadata field allows the type Optional[Dict[str, Dict]]. But Fiware only allows a very specific Dict structure. Giving any other structure results in a success in Filip, but an uncatched background error in Fiware.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
FiLiP tells you, that the assignment of the metadata was not valid, and stops the execution
Fix
Change the type of the StaticDevice metadata field to a BaseModel modeling the allowed structure. The ContextMetadata and NamedContextMetadata modeld in context.py, can probably be reused for this task. The StaticDeviceAttribute metadata field would then have the same structure and logic as the ContextAttribute metadata field.
The text was updated successfully, but these errors were encountered: