elifTech / cpd-ocpp

Open Charge Point Protocol
https://www.eliftech.com/blog/48-a-diy-charging-point-for-an-electric-car-perspective-protocol-and-prototype
MIT License
65 stars 48 forks source link

SetChargingProfile schema validation fails due to floating point arithmethic #12

Open foxriver76 opened 3 years ago

foxriver76 commented 3 years ago

the limit value is defined via multipleOf: 0.1 which will fail in many cases. When I set value of 0.1 everything is fine, else I will get an error, e.g. if I set 2000

Invalid value "[object Object]" for field csChargingProfiles

I think for validation purposes, the multipleOf requirement should be removed or the validator needs to be adjusted, else it makes it impossible to use the limit property.