faucetsdn / udmi

Universal Device Management Interface (UDMI) provides a high-level specification for the management and operation of physical IoT systems.

Home Page:https://faucetsdn.github.io/udmi/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Validator does not allow null present_value

DollyGodet opened this issue · comments

Here is the pointset_event I am trying to validate with the validator :

  
{
  "timestamp": "2022-06-30T13:48:13.375Z",
  "version": "1.3.13",
  "points": {
    "schedule1": {
      "present_value": null
    },
    "binary_value1": {
      "present_value": "Active"
    },
    "analog_value1": {
      "present_value": 6.0
    },
    "multi_state_value1": {
      "present_value": 1
    }
  }
}
  

It looks like the validator does not accept null present_value.
Here is the content of the event_pointset.out file :

  
While converting to json node: 1 schema violations found
  1 schema violations found
    object has missing required properties (["present_value"])
  

I think the validator should accept a null present_value, because some BACnet object can have a null present_value (and it is valid).
For exemple, a schedule object can have a null present_value.
The present_value field is required, but the ObjectMapper of the validator considers a null value as a missing property.

I agree with you, I think null should be acceptable value. Tagging @grafnu