lucky icon indicating copy to clipboard operation
lucky copied to clipboard

Add some way to generate API docs easily. Similar to Grape does

Open paulcsmith opened this issue 6 years ago • 3 comments

https://github.com/ruby-grape/grape#describing-methods

This might be better as a separate shard. But documenting here for now.

paulcsmith avatar Mar 07 '19 20:03 paulcsmith

My absolute favorite method for generating api docs is via the tests.. At least, whatever generates the docs should generate testable docs to help stave off the bitrot.

robacarp avatar Mar 07 '19 20:03 robacarp

Oh I love that idea. Ensures they stay in sync with what is actually working. Love it!

On Mar 7, 2019, at 3:27 PM, robacarp [email protected] wrote:

My absolute favorite method for generating api docs is (via the tests.](https://github.com/zipmark/rspec_api_documentation).

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

paulcsmith avatar Mar 07 '19 20:03 paulcsmith

Well with Grape's documentation way, you win the param/response validation at the same time while you're documenting your routes. I think it's a trade-off, generating doc from tests is also a huge win.

thegreyfellow avatar Mar 07 '19 23:03 thegreyfellow