Description
grape-swagger is a Ruby gem that adds Swagger documentation to APIs built with Grape, the Ruby REST API framework. It reads your Grape routes, parameters, responses and entities and generates an OpenAPI v2.0 compliant Swagger specification. The README covers how to configure the output, including the host, base path, mount path, API version, security definitions, tags and API info. Individual endpoints can be hidden, given custom summaries, tags, nicknames or deprecation notices, and parameters can be typed, given defaults and example values, or hidden. Response documentation covers status codes, file responses, headers, examples and root elements. Models can be described through Grape Entities, including relationships and inheritance with allOf, and custom model parsers can be written when the built-in ones are not enough. The project is open source, and the README lists related projects.…
Highlights
- Swagger OpenAPI v2.0 docs from Grape routes
- Configure host, base path, security and tags
- Hide, rename or deprecate endpoints
- Response, header and example documentation
- Grape Entities for model definitions
Ratings & Reviews
No ratings yet
Be the first to rate Grape Swagger.
People also visit

agent-docs-api-openapi
Agent skill for docs-api-openapi - invoke with $agent-docs-api-openapi
Grape Swagger FAQ
What is grape-swagger?
A Ruby gem that generates Swagger API documentation from a Grape API.
What does it need?
A Grape API, the Ruby framework for building REST APIs.
Can it document my models?
Yes. Grape Entities and custom model parsers describe the models, including relationships and inheritance.
Can I hide endpoints or parameters?
Yes. The README has sections on hiding an endpoint and hiding parameters.
Is it open source?
Yes. The code is public on GitHub under the ruby-grape organisation.
What are the best Grape Swagger alternatives?
Popular alternatives to Grape Swagger include Oas Rails, RapiDoc and L5-Swagger. See all Grape Swagger alternatives





