-
Notifications
You must be signed in to change notification settings - Fork 13
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
Replace json schema with go validation #781
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we only allow ascii in fields like description?
UTF will be better, but I can't find validator for this, we need to create custom validator for utf
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it really necessary, I agree that it would be almost required but it's not something totally useless to have services without any tasks/event. We could have a service that basically just have one or multiple dependencies like a |
The question is - if someone will need a service without |
I just worked on an IPFS this weekend that runs in a MESG service but that actually didn't expose anything except the dependency port to the IPFS node. I agree that this is not the best use of MESG (and I'm actually trying to merge it in the core directly) but this is a use case, just accessing a server from a dependency. But again both are fine to me |
Co-Authored-By: antho1404 <anthony@mesg.com>
If there is a use-case (event as you describe not the best) then we should allow such configuration 💪 |
Also it will close #695 |
I will replace gopkg.in/go-playground/validator.v9 with github.com/asaskevich/govalidator motiviationŁ
EDIT: |
@NicolasMahe have you tested each rule manually? Or I need to do that because we don't have full test cov. Code seems fine. |
I tested a lot manually. |
Ok, let me do one more in case if we miss something and then I'll merge. |
@NicolasMahe I cannot merge because some commits are not signed. |
i fixed the optional SID and added some test please review |
finished my tests and everything is fine :) |
Remove the json schema to replace it with a validation in go with https://github.com/go-playground/validator
It will be easier to plug some specific validation if we want too and it remove some extra complexity.