Closed mapedraza closed 1 year ago
expressionLanguage has not being removed completely. expressionLanguage is still part of model of Devices, Groups, an checked in some many places of the library:
https://github.com/telefonicaid/iotagent-node-lib/blob/1e31766d876a7b0d720a08984ca82f27440a9e59/lib/model/Device.js#L54 https://github.com/telefonicaid/iotagent-node-lib/blob/1e31766d876a7b0d720a08984ca82f27440a9e59/lib/services/devices/deviceService.js#L181
But anyway we can remove all references to expresionLanguage, even in model assuming that always is jexl
expressionLanguage has not being removed completely. expressionLanguage is still part of model of Devices, Groups, an checked in some many places of the library:
In my opinion, it should be removed in these cases. It doesn't make sense to have a field which value can take only one possibility. That's equivalent to not having the field, which is a much simpler solution.
@mapedraza maybe you could propose a PR with such removel to see how it likes?
After removing expressionLanguage, should those fields be removed from the following files?
https://github.com/telefonicaid/iotagent-node-lib/blob/2f87e77240a722c2dcd9d0db9f2b064db9343afc/lib/templates/createDevice.json#L39-L42
https://github.com/telefonicaid/iotagent-node-lib/blob/2f87e77240a722c2dcd9d0db9f2b064db9343afc/lib/templates/createDeviceLax.json#L39-L42
https://github.com/telefonicaid/iotagent-node-lib/blob/1e31766d876a7b0d720a08984ca82f27440a9e59/lib/templates/deviceGroup.json#L40-L43
https://github.com/telefonicaid/iotagent-node-lib/blob/1e31766d876a7b0d720a08984ca82f27440a9e59/lib/model/Device.js#L30-L57
https://github.com/telefonicaid/iotagent-node-lib/blob/1e31766d876a7b0d720a08984ca82f27440a9e59/lib/services/groups/groupRegistryMongoDB.js#L39-L62
CC: @AlvaroVega