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

Scope files by version and group #11

Closed

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.
@@ -151,6 +151,8 @@ def default(output, schema, prefix, stand_alone, kubernetes, strict):

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.

None yet

3 participants