REST API documentation for Sinatra

I spent the whole night looking for a stone to create API documentation from my sinatra routes. I must be able to point out using inline comments.

I found https://rubygems.org/gems/sinatra-api-docs and https://rubygems.org/gems/sinatra-croon

but both just don't work with my setup and are outdated too.

Another option was a yard with some sinatra plugin, but when creating documents it does not generate a specific REST API layout.

Does anyone have tools they know about?

All the information I want to indicate for each route:

Object: Groups

Route: POST / create

Params: group name

Output:

{ "name": "group", "members": [] } 

thanks

+7
source share
2 answers

I would look at Apiary.io , it looks pretty well designed and uses a Markdown domain-specific language to describe your API. In addition, it is free during beta testing.

+1
source

Have you tried Sinatra Yard ? I used it with some changes in Yard to create API documents.

+1
source

All Articles