RWTH-EBC / FiLiP

FIWARE Library for Python (FiLiP) to work with FIWARE API
BSD 3-Clause "New" or "Revised" License
23 stars 14 forks source link

NgsiPayloadAttr model in subcriptions should not validate value type #350

Open djs0109 opened 4 hours ago

djs0109 commented 4 hours ago

Describe the bug NgsiPayloadAttr is now inheriting the BaseValueAttribute, where the value will be validated against the assigned data type. However, this causes problems for for example the following notification

  "notification": {
    "timesSent": 2,
    "mqttCustom": {
      "url": "mqtt://134.130.166.184:1883",
      "topic": "custom/mqtt/notification/ngsi",
      "qos": 0,
      "ngsi": {
        "id": "newId",
        "type": "newType",
        "attribute_ngsi": {
          "type": "Number",
          "value": "${attribute1}"
        }
      }
    },
    "attrs": [],
    "attrsFormat": "normalized",
    "onlyChangedAttrs": false,
    "covered": false
  }

"value": "${attribute1}" can not pass through the validation against number data type.

github-actions[bot] commented 4 hours ago

Branch 350-NgsiPayloadAttr-model-in-subcriptions-should-not-validate-value-type created!