-
Notifications
You must be signed in to change notification settings - Fork 36
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
Unify schema validation with OpenSLO Schema #214
Comments
This ties into: OpenSLO/OpenSLO#113 OpenSLO/OpenSLO#20 OpenSLO/OpenSLO#87 #100 OpenSLO/OpenSLO#124 is the main issue on this topic The main issue at present is there is no agreement on what the "single source of truth" for the specification is within OpenSLO. Though there was initial work to create the JSON schema, it hasn't been updated in 5 months, where as the specification defined in the README has been updated. |
sorry for the (very) late response @kenfinnigan The problem I now see with JSON schema and embedding it in oslo via sth like gojsonchema is that the library is not maintained anymore, same goes for this one, and these are the only established options on the market right now. While forking is an option if issues arise, I wouldn't want us getting tied down with unmaintained libraries. I kinda like the idea with Going with plain Go structs will give us the most freedom in oslo, but that's about it I'm afraid, and I don't think convenience in building a single tool should influence the final choice much anyway. |
Problem to solve
Right now
oslo validate
relies on govalidator and it's struct level annotations to run the validation of the selected specs.This means we're maintaining the OpenSLO spec rules both inside
oslo
and in the main OpenSLO repo.I propose to get rid of that dualism and rely entirely on JSON Schema defined here.
There's a native Go library which implements JSON Schema called gojsonschema, which we can use to run the validation for
oslo validate
.Proposal
Use a tool like https://github.com/xeipuuv/gojsonschema to validate the spec and get rid of
govalidator
entirely.The text was updated successfully, but these errors were encountered: