Closed MattGrouchy closed 1 year ago
Should be fixed by @Yuanzjls in the MR above (your suspicion was correct), let me know if the issue persists.
A release will follow in the next few days containing lots of bugfixes and improvements, so you don't have to target master branch.
It's fixed now, thanks for merging in @Yuanzjls PR @lorenzodonini !
Tagged co-worker - @jonesywolf
Hello! Thanks for looking at the issue and helping out.
Issue
We are implementing OCPP 2.0 (as the charging station) and testing with the official OCA OCTT2.0 tool. When the tool sends a ResetRequest with the following format:
The validator raises an error and does not call our handler. As far as we can determine, this request is valid and the validator should pass it.
Possible solution
It looks like someone found this earlier and commented on a old merged pull request.
https://github.com/lorenzodonini/ocpp-go/pull/204#issuecomment-1602504832
It may be using the 1.6 validator
I tested the validator by making a struct and using the types.Validate.Struct() method. Here is the code that I used:
And the resulting output of the file.
Here are the ocpp imports in the top of the file. We have an implementation of both 1.6 and 2.0.1. This is from the root file that calls this method.
Are you able to help us debug the issue and determine why the validator is not working correctly?
Versions