fix: OCPP 2.0.1 schema conformance fixes#418
Open
andig wants to merge 14 commits intolorenzodonini:masterfrom
Open
fix: OCPP 2.0.1 schema conformance fixes#418andig wants to merge 14 commits intolorenzodonini:masterfrom
andig wants to merge 14 commits intolorenzodonini:masterfrom
Conversation
* chore: fix typo * Update types.go --------- Co-authored-by: premultiply <4681172+premultiply@users.noreply.github.com>
CRITICAL fixes: - CompositeSchedule: Redesign struct to match schema (evseId, duration, scheduleStart, chargingRateUnit, chargingSchedulePeriod) - ChargingSchedulePeriod: Add missing phaseToUse field (1-3) - IdTokenInfo: Add missing evseId array field - GetVariableResult: Add attributeStatusInfo field - GetVariableResult: Fix attributeValue maxLength (1000 -> 2500) HIGH fixes: - OCSPRequestDataType: Make responderURL required per schema - ConsumptionCost.Cost: Add minItems=1 validation - SalesTariffEntry.ConsumptionCost: Add minItems=1 validation Updates tests to match new validation requirements. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
andig
commented
Apr 17, 2026
andig
commented
Apr 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes multiple OCPP 2.0.1 schema conformance issues discovered by validating Go types against the official JSON schemas.
CRITICAL fixes:
StartDateTime+ChargingSchedulewith correct flat structure:evseId,duration,scheduleStart,chargingRateUnit,chargingSchedulePeriodphaseToUsefield (integer 1-3) for AC phase switching supportevseIdarray field to restrict token validity to specific EVSEsattributeStatusInfofield for detailed status infoHIGH fixes:
Test plan
get_composite_schedule_test.gofor new CompositeSchedule structurecommon_test.gofor new validation constraintsget_variables_test.gofor new maxLengthgo build ./ocpp2.0.1/...passesgo test ./ocpp2.0.1_test/...passesRelated
Complements PR #386 which also addresses CompositeSchedule schema compliance.
Replaces #411
🤖 Generated with Claude Code