Closed AndersBennedsgaard closed 8 months ago
I needed a tool to convert Kubernetes CRDs into JSON schemas, and found your awesome openapi2jsonschema.py script. Looking through it, I noticed
openapi2jsonschema.py
https://github.com/yannh/kubeconform/blob/b7d7b4d0dc2f0206c6a682247cbab6364d544e7b/scripts/openapi2jsonschema.py#L124-L127
As I understand sys.argv this if-statement will never be true since the first entry in the sys.argv list will always be the file name, and therefore the length of the list will never be 0.
sys.argv
Thanks for the report, that seems correct! :+1:
Fixed in https://github.com/yannh/kubeconform/pull/244
I needed a tool to convert Kubernetes CRDs into JSON schemas, and found your awesome
openapi2jsonschema.py
script. Looking through it, I noticedhttps://github.com/yannh/kubeconform/blob/b7d7b4d0dc2f0206c6a682247cbab6364d544e7b/scripts/openapi2jsonschema.py#L124-L127
As I understand
sys.argv
this if-statement will never be true since the first entry in thesys.argv
list will always be the file name, and therefore the length of the list will never be 0.