-
Notifications
You must be signed in to change notification settings - Fork 268
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
Update kube schema url to v1.14.0 #108
Update kube schema url to v1.14.0 #108
Conversation
Does autocompletion still work on kind/apiVersion also validation? The problem is that the official schema has this "x-kubernetes-group-version-kind" field in that holds different apiVersion, kind, and group they can be associated with e.g. https://github.com/garethr/kubernetes-json-schema/blob/master/v1.9.9-local/_definitions.json#L24. The problem with this is that it isn't supported by json schema spec and when I was trying to get it to work in the parser I ran into some issue (I cannot remember what the issue was) that made it so you had to transform the schema. IIRC I have a python script somewhere that basically took the "x-kubernetes-group-version-kind" and put it inside of the properties field in a different format that made the schema work correctly. Thats why there is the patched schema in there. Here is an example of what had to be done. apiVersion became its own field inside of properties with type string and enum v1 (basically the transformed version of x-kubernetes-group-version-kind below). |
Ah ok, that makes sense. You're right, that does break autocompletion for apiVersion/kind. I knew I had to be missing something 😃 |
I'd be interested in that script if you can find it. Might be worthwhile to commit it to source somewhere too. |
I'll try to look for it but if I can't I'll have to wait until after my exams and I'll create a repo or a gist of the code |
@JPinkney I am also interested in the script you mentioned here. And good luck to your exams :D |
@pengx17 I couldn't find the script and was going to write a new one but it looks like @jburianek already has a PR open on the schema side for all the fixes (garethr/kubernetes-json-schema#16). Awesome work @jburianek ! |
e02ded1
to
a3cf2fc
Compare
Things have been fixed upstream, so I've updated this PR to point to the JSON schema that should resolve this. |
@JPinkney Now that the schema side has been fixed, any chance we could merge this to pick up the latest schema? |
@jburianek Have you played around with it to make sure everything is okay? (I haven't checked it out yet so I was just wondering if there were any other issues found). If we can't find anything I'll try and cut a release near the end of this week with it in it! |
@JPinkney Thanks, yeah I've played around with it and things seem to work as expected. |
This seems to fix #58 for me.
Is the fix that straightforward, or is there something I'm missing? Thanks!