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

$ref in generated files are mixed case, but generated files are lower case #63

Open
jonahgraham opened this issue Nov 2, 2022 · 1 comment

Comments

@jonahgraham
Copy link

The files generated by the tool are all lowercase file names because of this .lower() (and the subsequent ones?):

kind = title.split(".")[-1].lower()

But the $refs are the case of the input, in my case mixed case:

{"$ref": (title.replace("#/components/schemas/", "") + ".json")}

The result is a schema that doesn't load properly.

This tool pretty much did exactly what I needed, thanks!

As a workaround, I lowercased the $ref lines in all the json files.

@jonahgraham
Copy link
Author

This is the sed I use after running the generator:

sed -i '-es,\($ref.*\),\L\1,' schemas/*.json

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

1 participant