Skip to content

Conversation

johanneswuerbach
Copy link

Append the version of a kind instead of overriding the same file multiple times.

Required for instrumenta/kubeval#57

Append the version of a kind instead of overriding the same file multiple times.
info("Generating individual schemas")
for title in data['definitions']:
group = title.split('.')[-3].lower()
version = title.split('.')[-2].lower()

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will need to be called something else as version now reflects swagger/openapi version.

I just changed my fork of this to use api_version and it works well

@garethr
Copy link
Collaborator

garethr commented Apr 4, 2019

Finally getting some time to come back to maintaining these tools. I've just applied this patch with a few changes, in particular putting it behind a flag and restricting to the Kubernetes code path. Once I've generated the relevant schemas for all the versions, and reworked some of the publishing, I'll be updating kubeval to be able to use these. Thanks again.

@garethr garethr closed this Apr 4, 2019
lirik90 pushed a commit to lirik90/swagger2jsonschema that referenced this pull request Mar 30, 2024
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

Successfully merging this pull request may close these issues.

3 participants