Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/bump-sh-examples/rails-code-first

Add OpenAPI powered documentation to your Rails API with RSwag.
https://github.com/bump-sh-examples/rails-code-first

api api-code-first api-documentation api-rest code-first code-first-approach oas3 openapi openapi3 openapi31 rails rails-api swagger

Last synced: 3 days ago
JSON representation

Add OpenAPI powered documentation to your Rails API with RSwag.

Awesome Lists containing this project

README

        

# Rails Hello OpenAPI

A quick "Hello World" but for generating OpenAPI, using the Ruby on Rails extension [RSwag](https://github.com/rswag/rswag/).

This repository was built as sample code for the Bump.sh guide on [Generating OpenAPI docs for Ruby on Rails with RSwag](https://docs.bump.sh/guides/openapi/code-first-rails/).

## Usage

Clone the repository down to give it a try.

```
# Set everything up
$ bundle install

# Export the OpenAPI
$ rake rswag

# Take a look at the generated OpenAPI
cat swagger/api/swagger.yaml
```

Preview the API reference docs [on Bump.sh](https://bump.sh/bump-examples/hub/code-samples/doc/rails-hello-openapi).

## License

The contents of this repository are licensed under [CC BY-NC-SA
4.0](./LICENSE_CC-BY-NC-SA-4.0).