Skip to content

feat: add support for vendor and model specific validation#20

Merged
xBlaz3kx merged 1 commit into
mainfrom
feat/vendor-model-specific
May 7, 2026
Merged

feat: add support for vendor and model specific validation#20
xBlaz3kx merged 1 commit into
mainfrom
feat/vendor-model-specific

Conversation

@xBlaz3kx
Copy link
Copy Markdown
Contributor

@xBlaz3kx xBlaz3kx commented May 7, 2026

Proposed changes

Allows the user to register, remove and validate against vendor and model-specific schemas.

Types of changes

What types of changes does your code introduce?
Put an x in the boxes that apply

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation Update (if none of the other choices apply)

Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of
them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before
merging your code.

  • I have read the CONTRIBUTING doc
  • I have signed the CLA
  • Lint and unit tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)
  • Any dependent changes have been merged and published in downstream modules

Further comments

If this is a relatively large or complex change, kick off the discussion by explaining why you chose the solution you
did and what alternatives you considered, etc...

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 7, 2026

Merging this branch changes the coverage (4 decrease, 3 increase)

Impacted Packages Coverage Δ 🤖
github.com/ChargePi/chargeflow/cmd 5.96% (+0.01%) 👍
github.com/ChargePi/chargeflow/gen/mocks/pkg/schema_registry 5.69% (-2.16%) 👎
github.com/ChargePi/chargeflow/internal/validation 19.35% (+1.75%) 👍
github.com/ChargePi/chargeflow/pkg/ocpp 30.00% (-0.36%) 👎
github.com/ChargePi/chargeflow/pkg/schema_registry 0.00% (ø)
github.com/ChargePi/chargeflow/pkg/schema_registry/registries/file_registry 26.65% (-1.67%) 👎
github.com/ChargePi/chargeflow/pkg/schema_registry/registries/remote_registry 2.75% (-0.19%) 👎
github.com/ChargePi/chargeflow/pkg/validator 24.58% (+0.03%) 👍

Coverage by file

Changed files (no unit tests)

Changed File Coverage Δ Total Covered Missed 🤖
github.com/ChargePi/chargeflow/cmd/root.go 3.35% (-0.84%) 179 (+36) 6 173 (+36) 👎
github.com/ChargePi/chargeflow/cmd/schema_register.go 10.95% (+0.01%) 566 (+18) 62 (+2) 504 (+16) 👍
github.com/ChargePi/chargeflow/cmd/schema_remove.go 2.23% (-0.08%) 539 (+18) 12 527 (+18) 👎
github.com/ChargePi/chargeflow/cmd/validate.go 2.16% (+0.13%) 647 (-41) 14 633 (-41) 👍
github.com/ChargePi/chargeflow/gen/mocks/pkg/schema_registry/schema_registry_mock.go 5.69% (-2.16%) 844 (-112) 48 (-27) 796 (-85) 👎
github.com/ChargePi/chargeflow/internal/validation/opts.go 0.00% (ø) 16 0 16
github.com/ChargePi/chargeflow/internal/validation/service.go 20.76% (+3.19%) 655 (-227) 136 (-19) 519 (-208) 👍
github.com/ChargePi/chargeflow/pkg/ocpp/context.go 0.00% (ø) 0 0 0
github.com/ChargePi/chargeflow/pkg/schema_registry/registries/file_registry/file.go 26.91% (-1.55%) 498 (+115) 134 (+25) 364 (+90) 👎
github.com/ChargePi/chargeflow/pkg/schema_registry/registries/remote_registry/cache.go 0.00% (ø) 0 0 0
github.com/ChargePi/chargeflow/pkg/schema_registry/registries/remote_registry/memory_cache.go 0.79% (+0.17%) 127 (-34) 1 126 (-34) 👍
github.com/ChargePi/chargeflow/pkg/schema_registry/registries/remote_registry/remote.go 2.00% (-0.21%) 1599 (+154) 32 1567 (+154) 👎
github.com/ChargePi/chargeflow/pkg/schema_registry/registry.go 0.00% (ø) 0 0 0
github.com/ChargePi/chargeflow/pkg/validator/validator.go 22.51% (-0.32%) 431 (-29) 97 (-8) 334 (-21) 👎

Please note that the "Total", "Covered", and "Missed" counts above refer to code statements instead of lines of code. The value in brackets refers to the test coverage of that file in the old version of the code.

Changed unit test files

  • github.com/ChargePi/chargeflow/cmd/validate_test.go
  • github.com/ChargePi/chargeflow/internal/validation/service_test.go
  • github.com/ChargePi/chargeflow/pkg/schema_registry/registries/file_registry/file_test.go
  • github.com/ChargePi/chargeflow/pkg/schema_registry/registries/remote_registry/remote_test.go
  • github.com/ChargePi/chargeflow/pkg/validator/validator_test.go

@xBlaz3kx xBlaz3kx merged commit 62fa5a9 into main May 7, 2026
2 of 3 checks passed
@xBlaz3kx xBlaz3kx deleted the feat/vendor-model-specific branch May 7, 2026 21:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant