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

Trying to get JSON post documentation right. #93

Closed
BaconAndEggs opened this issue Mar 20, 2014 · 1 comment
Closed

Trying to get JSON post documentation right. #93

BaconAndEggs opened this issue Mar 20, 2014 · 1 comment

Comments

@BaconAndEggs
Copy link

I'm hoping this isn't an extremely stupid question...

I loaded up grape-swagger, and set some basic options, and for the most part it is working great! However, I've been stuck trying to figure out how to generate the documentation in a way to tell swagger-ui that my api expects post-data of a json.

Using the same swagger-ui code, I can point to the petstore example api, and see that it looks like it is acting the way I would like, with the param type as body, and they content type as application/json. Inspecting the example petstore endpoint swagger at http://petstore.swagger.wordnik.com:80/api/pet, I suspect that the "consumes: "application/json", and parameter paramType: "body", are the bits that I am not figuring out how to render, and would make the swagger-ui work this way.

Is there any chance someone could give an example of how to do this?

Thanks!

@dblock
Copy link
Member

dblock commented Jul 14, 2014

I think what you're asking is exactly the question in https://github.com/tim-vandecasteele/grape-swagger/pull/49, I'll close this one.

@dblock dblock closed this as completed Jul 14, 2014
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

2 participants