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

Consider crd2jsonschema #182

Closed
tricktron opened this issue Mar 23, 2023 · 5 comments
Closed

Consider crd2jsonschema #182

tricktron opened this issue Mar 23, 2023 · 5 comments

Comments

@tricktron
Copy link

Hi there,

I am the author of crd2jsonschema and this may be a good fit for an alternative to your openapi2jsonschema.py script.

crd2jsonschema uses openapi-schema-to-json-schema library under the hood which converts openAPI v3 to jsonschema draft 4. See also datreeio/CRDs-catalog#142 (comment) for more info.

@yannh
Copy link
Owner

yannh commented Mar 23, 2023

That's super interesting, thanks, will definitely consider! Def. could replace the script in the scripts/ in this repo.
Very similar, there is this https://github.com/yannh/openapi2jsonschema that generates the files in this repo https://github.com/yannh/kubernetes-json-schema/

If you were interested in evolving your script so it can be used to update the kubernetes-json-schema repo, I would be pretty delighted in retiring the Python version!

@tricktron
Copy link
Author

Yeah, I have seen your https://github.com/yannh/openapi2jsonschema script as well. What do you think about an incremental approach: First check and see if all works with crds and if all is well I think about extending it to support the kubernetes json schema use case.

@yannh
Copy link
Owner

yannh commented Mar 23, 2023

Definitely 🙇 no promises on a timeline, but I'll look into this at some point ❤️

@yannh
Copy link
Owner

yannh commented Apr 22, 2023

@tricktron I'll be closing this issue, but thanks for pointing this out. I am likely to ask people encountering issues to give it a shot and provide feedback 🙇 Thanks 🥇

@yannh yannh closed this as completed Apr 22, 2023
@eloo-abi
Copy link

eloo-abi commented Oct 19, 2023

hi i have tested your js script and it produces the same output as the script in this repository but add the dependency to the node_module

so right now i do not see any benefit here

update: i see the -a option could be a good reason for your script. or we can add this to the python script as well?

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

3 participants