Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/ruslantolstov/rswag-example

Demo how to use rswag-api, rswag-specs.
https://github.com/ruslantolstov/rswag-example

api rswag rswag-api rswag-specs ruby swagger

Last synced: about 1 month ago
JSON representation

Demo how to use rswag-api, rswag-specs.

Awesome Lists containing this project

README

        

# README

Demo how to use rswag-api, rswag-specs.

### Setup

```
cp .env.example .env
rails db:create db:migrate
rails server
```

### Setup Docker
```
docker-compose build
docker-compose up
docker-compose run web rake db:create db:migrate
open http://localhost:3000/
```
Use `docker attach ID` to get into the running container, for detach without exit `Ctrl-p`, `Ctrl-q`

### Generate the Swagger JSON file

```
rake rswag:specs:swaggerize
open http://localhost:3000/api/docs/client/swagger.json
open http://localhost:3000/api/docs/backoffice/swagger.json
```