Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I get problem on ocppj validator when implement CSMS and Central System in one project/package even though with different port and handler #181

Closed
dwibudut opened this issue Mar 23, 2023 · 1 comment

Comments

@dwibudut
Copy link
Contributor

dwibudut commented Mar 23, 2023

Hello,

I want run the Central System (ocpp1.6) and CSMS (copp2.0.1) in one project/package with different port and handler.
But I get problem on ocppj validator when implement CSMS and Central System in one project/package even though with different port and handler using this library:

var Validate = validator.New()

Called in ocpp2.0.1 :

var Validate = ocppj.Validate

Called in ocpp1.6 :

var Validate = ocppj.Validate

I found validator on the RegisterValidation will override with the last called(init) of ocpp1.6 or 2.0.1 (which one is called last will override)

For example on validator triggerMessageStatus :

_ = types.Validate.RegisterValidation("triggerMessageStatus", isValidTriggerMessageStatus)

_ = types.Validate.RegisterValidation("triggerMessageStatus", isValidTriggerMessageStatus)

It will override with the last one.

Is it designed like that or can someone give me a hint/guide for this case, please.

cc: @lorenzodonini

Thx

@lorenzodonini
Copy link
Owner

Would close the issue for now. In case more instances of conflicting validation tags between v1.6 and v2.0.1 are found, I'm happy to re-open the issue or simply accept more MRs.

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

No branches or pull requests

2 participants