smart-data-models / dataModel.Transportation

Transportation Data Model
37 stars 35 forks source link

remove minimum from amperage and voltage #11

Closed modularTaco closed 3 years ago

modularTaco commented 3 years ago

A schema validation of an instance of EVChargingStation always fails. If the value is 0 (or even not present) and minimum and exclusiveMinimum conditions are set to 0, a jsonschema validator will check for minimum 0 >= 0 -> True and for exclusiveMinimum 0 > 0 -> False.
As long as one condition evaluates to False the instance is not considered valid.

https://json-schema.org/understanding-json-schema/reference/numeric.html states that

While you can specify both of minimum and exclusiveMinimum or both of maximum and exclusiveMaximum, it doesn’t really make sense to do so.

As a result, I removed the minimum condition from fields where exclusiveMinimum is already specified (amperage and voltage field)

albertoabellagarcia commented 3 years ago

So your pull Request is right, but it cannot be accepted this way. Anyhow your changes have been implemented. thanks