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

How do you generate a swagger yaml file instead of json? #467

Closed
sboagibm opened this issue Sep 29, 2017 · 4 comments
Closed

How do you generate a swagger yaml file instead of json? #467

sboagibm opened this issue Sep 29, 2017 · 4 comments

Comments

@sboagibm
Copy link

It's not clear to me how to generate a yaml file, instead of a json file. Is that possible, or do I need a converter?

@fmovlex
Copy link

fmovlex commented Oct 1, 2017

Seems like the json format is the only output available.
The online editor offers a quick JSON to YAML conversion though.

@achew22
Copy link
Collaborator

achew22 commented Oct 25, 2017

Can you elaborate on your need for a YAML file instead of JSON? I believe anything that reads YAML should read JSON.

@sboagibm
Copy link
Author

It's been a while since I made this issue, and I've since moved on. My recollection is that our overall swagger file is YAML, and I wanted to embed the swagger generation from the grpc-gateway tool into the larger rest api, and the JSON was problematic for that purpose. The pattern I'm working with is a rest api proxying to multiple gRPC services. I was hoping to do some sort of auto-embedding, but have since given up on the notion, at least for now.

@achew22
Copy link
Collaborator

achew22 commented Nov 6, 2017

JSON is a strict subset of YAML so your YAML parser should be able to just read this for whenever you get back around to it. If you have problems feel free to reopen/open a new issue.

@achew22 achew22 closed this as completed Nov 6, 2017
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

3 participants