Example Application Interface using Rails framework in Ruby
This example showcases Repository Pattern in Hexagonal Architecture (also known as Clean Architecture). Here we have two Entities - Books and Authors, whose relationships have been exploited to create CRUD endpoint in REST under OpenAPI standard.
-
Install all the project dependency:
$ bundle install
-
Run the application:
$ bundle exec rails s
-
Run test suite along with Coverage reporting:
$ bundle exec rspec spec
-
Generate OpenAPI specifications from RSpec:
$ RAILS_ENV=test bundle exec rails rswag
-
Open Swagger UI at
localhost:3000/api-docs
after running the application.
© MIT License