mobilityhouse / ocpp

Python implementation of the Open Charge Point Protocol (OCPP).
MIT License
766 stars 298 forks source link

Wrong type in ocpp.ocpp.v201.datatypes.ReportDataType.variable_attribute that yiedl a failure in the validation of the Payload #553

Closed AlfredoNaef closed 8 months ago

AlfredoNaef commented 8 months ago

Hello,

When sending the payload for NotifyReportRequest (with also the optional field report_data in the payload) it fails at the validation with the json schema. After some digging, I found out that the problem is due to the data type for ReportDataType.variable_attribute, that in the latets release of your code is defined as VariableAttributeType. However, it should be List[VariableAttributeType] because in the json schema for NotifyReportRequest the equivalent field variableAttribute is defined as array. As such, for easier usage by users of your library you should change the type as I suggested.

Jared-Newell-Mobility commented 8 months ago

Thanks for raising the issue - this is covered in the PR https://github.com/mobilityhouse/ocpp/pull/529 so I will close this for now