-
Notifications
You must be signed in to change notification settings - Fork 13
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
Improved support for JSON syntax incl. tab-indented JSON files #489
Comments
@elicoten, this is a restriction of the YAML syntax itself, which specifically says that leading tabs are not recognized as indents. So whatever editor or generator produced your existing Swagger documents was not producing legal YAML. Fortunately it's easy to fix this using a find and replace with regular expressions: You can choose any number of space characters, as long as the indents are consistent within a sibling group. |
Thanks for your detailed and helpful reply. However I was using JSON syntax rather than YAML syntax. I thought that that whitespaces and tabs are both meaningless to JSON syntax and therefore either should technically be acceptable? Is there a way to change so that instead of attempting to interpret as YAML, it treats the document as JSON? Thanks again |
@elicoten , the following support article is written for our commercial product, RepreZen API Studio. But most or all of the information and tips in that document are relevant to KaiZen OpenAPI Editor: Working with Swagger-OpenAPI in JSON Format If you are planning to maintain your OpenAPI v2 or v3 document in KaiZen Editor, we recommend reformatting it to YAML format as described in the support article. KaiZen, like most OpenAPI editors, works much better with YAML format. |
Ok, thanks for clarifying that, that does answer the question - at least insofar as what the editor currently supports. In that case this issue should perhaps be renamed to include "JSON syntax" in the title, and is more a question about whether you would consider adding JSON syntax support more generally. It sounds like you might not feel that's worthwhile in which case at least having this as a record may help someone else like me who was searching your github issues for information about indentation with tabs. |
@elicoten , please feel free to change the name and we can leave this issue open. We don't have plans to support full editing with JSON syntax at this time. |
Please could I request that the Swagger editor support Swagger files intended with tabs rather than spaces?
We have some existing Swagger files that are indented with tabs and it would be good to be able to open them and use them as-is in the editor.
Thanks!
The text was updated successfully, but these errors were encountered: