MLopezJ / LWM2M-JSONSchema

LWM2M protocol From XML to JSON Schema
0 stars 0 forks source link

RangeEnumeration is not M2M friendly #18

Open MLopezJ opened 1 year ago

MLopezJ commented 1 year ago

Here is described the issue: https://github.com/OpenMobileAlliance/lwm2m-registry/issues/690

And here is a possible solution to it: https://github.com/OpenMobileAlliance/lwm2m-registry/pull/685

However, the solution is not contemplated all the cases exposed on the issue description, and in other hand, I have not the certainty if all the cases exposed on the issue are all the cases on the repo or if there are others similar cases.

To get the response of that uncertainty is desired to create an script to get all the RangeEnumeration values in the LwM2M protocol, with their respective IDs and Units

MLopezJ commented 1 year ago

WIP: https://github.com/MLopezJ/LWM2M-JSONSchema/tree/rangeEnumeration-not-m2m-friendly . Script: https://github.com/MLopezJ/LWM2M-JSONSchema/blob/rangeEnumeration-not-m2m-friendly/rangeEnumeration.ts

MLopezJ commented 1 year ago

Solution: Set generic value as Number or String (depending of the case) when RangeEnumeration does not follow the expected format.

The expected format is:

For option 2 and 3, VALUE could be String or Number. For option 1 just a Number.

For detailed information about the specification refer here, pag 110

For those cases when the value does not follow the format, add an explanation on its description.

MLopezJ commented 1 year ago

Solution provided here: https://github.com/MLopezJ/LWM2M-JSONSchema/pull/19