telefonicaid / iotagent-node-lib

Module to enable IoT Agent developers to build custom agents for their devices that can easily connect to NGSI Context Brokers
https://iotagent-node-lib.rtfd.io/
GNU Affero General Public License v3.0
60 stars 85 forks source link

FIX: Remove measures with attributes name 'id' or 'type' (hotfix 3.4.3) #1483

Closed AlvaroVega closed 10 months ago

AlvaroVega commented 10 months ago

Issue https://github.com/telefonicaid/iotagent-node-lib/issues/1485

this should be tested

fgalan commented 10 months ago

We should include at same point of the documentation (any suggestion @mapedraza ?) something like this:

Note that id and type are not valid attribute names at Context Broker. Thus, although a id or type will not break the IOT Agent, they are silently ignored and never progress toward Context Broker entities.

or something with a similar meaning.

mapedraza commented 10 months ago

We should include at same point of the documentation (any suggestion @mapedraza ?) something like this:

Note that id and type are not valid attribute names at Context Broker. Thus, although a id or type will not break the IOT Agent, they are silently ignored and never progress toward Context Broker entities.

or something with a similar meaning.

Probably, instead of deleting, renaming them to _id or _type could be useful in the future. The note you propose sounds good

fgalan commented 10 months ago

Probably, instead of deleting, renaming them to _id or _type could be useful in the future

It depends on how strict we want to be with "illegal" measures. Deleting them will strongly disallow its use, while moving them to attributes _id and _type will somehow allow its usage.

In my opinion it's better to delete, but it's not a strong opinion.

mapedraza commented 10 months ago

LGTM