Skip to content
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

NgsiPayloadAttr model in subcriptions should not validate value type #350

Open
djs0109 opened this issue Nov 15, 2024 · 1 comment · May be fixed by #351
Open

NgsiPayloadAttr model in subcriptions should not validate value type #350

djs0109 opened this issue Nov 15, 2024 · 1 comment · May be fixed by #351
Assignees
Labels
bug Something isn't working

Comments

@djs0109
Copy link
Contributor

djs0109 commented Nov 15, 2024

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.

@djs0109 djs0109 added the bug Something isn't working label Nov 15, 2024
@djs0109 djs0109 self-assigned this Nov 15, 2024
Copy link

@djs0109 djs0109 linked a pull request Nov 15, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant