-
Notifications
You must be signed in to change notification settings - Fork 661
genschema.go shouldn't import multiple jsonschema libraries #3510
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
Comments
There is one library (called "jsonschema") to generate the jsonschema from the comments in the Go code. We could perhaps move the validation into a separate util directory? That would make the separation clearer. |
Should we remove the validation code from Lima, or how do you want to handle not using the commit 157f7a4 We can call the
|
I don't understand what the desired action is for this issue. Given that the 2 jsonschema libraries perform different functions, it sounds like they are both needed (or can both be removed). I have not checked; do they add significantly to the size of I think the json schema should be an artifact that is included in the release, like the man pages. That way a user could install it in their IDE to validate I don't see any need why a user would ever need to generate the schema themselves. The same argument can be made for the man pages. So maybe both the |
I wished there might be a single jsonschema library that covers both validation and generation, but not a high priority issue. |
It is supposed to be published on a website, and then the URL made available to include in the JSON Schema "store"... https://www.schemastore.org/json/ But you can work around that, by rendering a local file or using the git browser directly or something similar - like so:
That is why the commands are hidden, and only used by make rules for producing artifacts. But the schema is more intended for a web site, and the manpages better included with binaries |
I see. As I wrote in that issue, "I have no problem with removing the dependency from our code base as much as reasonably possible", but I don't think we need to go out of our way to remove dependencies that in turn rely on From a legal perspective we are covered by the decision of CNCF that no action is necessary. From a supply chain perspective I think there are enough eyes on this particular module now that it seems unlikely it will be exploited in the future (especially since it doesn't have a lot of activity anymore anyways). So I think the "reasonably possible" part comes into play here: how much effort would it take, and what does it actually gain us. To me it is still not clear what the next action should be on this issue. |
I've checked now, and removing the |
lima/cmd/limactl/genschema.go
Lines 13 to 15 in 00e3398
Shouldn't need both "github.com/invopop/jsonschema" and "github.com/santhosh-tekuri/jsonschema/v6
The text was updated successfully, but these errors were encountered: