-
Notifications
You must be signed in to change notification settings - Fork 2k
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
chore: consider switching JSON-schema dependency to github.com/santhosh-tekuri/jsonschema #5884
Comments
Hi, I am trying to implement this. But now has a problem. This new dependency: cli/cli/compose/schema/schema_test.go Line 13 in 2eec746
The new schema validator take So I am wondering can we replace all Also we can wait until https://github.com/santhosh-tekuri/jsonschema fix this, but not sure how long it will takes. If changing test is ok, I can make PR for this transfer to new dependency. |
Thanks for looking at this! In all honesty, I haven't looked closely yet how easy the transition would be (and if the new one provides all functionality we need); I saw the move of other projects to this new module, and (as we tend to have common dependencies between those projects), wanted to explore if we could switch as well. If you're interested, it may also be worth looking at compose-spec/compose-go#749 first; the compose-spec is a more modern codebase, and if we want to switch, we likely want to make sure the new dependency works for that project (if it does, we can switch cc @ndeloof @glours ☝️ if you agree, that is (I'm not a core maintainer of the compose-spec, so let me know if you think that makes sense)
I guess this depends a bit; does the new module provide an alternative to maintain existing behavior, and to still have a test covering what's tested? (If so, then I think updating the test should not be a problem). |
👍 |
Thanks for replying.
the new module need to modify it's behavior. In many case, provided json data is ok but validator fail. I am trying a PR to fix this. As the switch is still on discussing, So I think currently the change of test code is not needed.
got it. I will do some experiment to see if switch is ok on |
Description
The github.com/xeipuuv/gojsonschema module used for JSON-schema validation has not been maintained for a long time, and because of that, ended on the "avoid" list in kubernetes; kubernetes/kubernetes#128572 (comment)
The OCI image-spec has now transitioned to a new dependency (github.com/santhosh-tekuri/jsonschema) as replacement in v1.1.1, and we should look if we can follow so that we don't end up with two separate dependencies performing the same task;
The text was updated successfully, but these errors were encountered: