instrumenta / openapi2jsonschema

Convert OpenAPI definitions into JSON schemas for all types in the API
Other
226 stars 87 forks source link

Tool doesn't work if json is indented with tabs. #30

Open klmz opened 4 years ago

klmz commented 4 years ago

I was trying to use your tool, and ran into some issues. My problem was with this line:

https://github.com/instrumenta/openapi2jsonschema/blob/1ca501f01e103685223d9153fa1bd3cf2042e5d8/openapi2jsonschema/command.py#L66-L68

This is only true if the JSON is indented with spaces instead of tabs.

I would propose to just convert indentation to spaces before using the yaml parser. Agreed?