grape-swagger icon indicating copy to clipboard operation
grape-swagger copied to clipboard

Adding Request & Response example

Open arparthasarathi opened this issue 6 years ago • 4 comments

I would like to add an array of example requests and corresponding responses for my API. Swagger provides a way to add those examples as defined in the link below.

Adding Examples -Swagger

But I couldn't figure out how the same can be achieved in grape-swagger

arparthasarathi avatar Nov 13 '17 12:11 arparthasarathi

Hi @dblock,

Can this one be achieved or not? I could see regular updates in the repo but this issue being ignored. I would love to have this feature for our documentation purposes. Thanks in advance

arparthasarathi avatar Mar 21 '18 10:03 arparthasarathi

@arparthasarathi, #675, which just got merged, gets us halfway there. @LeFnord, what are the chances we could get a release of the current state so that we could at least start working with response examples?

jdmurphy avatar May 22 '18 16:05 jdmurphy

@jdmurphy I'm on … sometimes I have to work 😉

LeFnord avatar May 22 '18 16:05 LeFnord

@jdmurphy Thanks a lot for the update buddy and also many thanks to @LeFnord for this awesome library.

I have a quick question, am using grape-rabl for rendering the JSON instead of grape-entity. Is there any way that I could be able to include grape-rabl into the example description instead of grape-entity? Because there is a lot of rewrite to migrate to grape-entity and also I could see some performance issues as well.

arparthasarathi avatar May 24 '18 13:05 arparthasarathi