Our great sponsors
-
ruby-on-rails-openapi-example
Demo project showing how to use rswag to generate an OpenAPI spec for a Ruby on Rails API
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
-
swagger-ui
Swagger UI is a collection of HTML, JavaScript, and CSS assets that dynamically generate beautiful documentation from a Swagger-compliant API.
We will be creating a "Coffee Ordering API" using Ruby on Rails, and using a tool called rswag to create tests that verify the behaviour of our API and generate an OpenAPI reference.
Note: You can view the source code for this tutorial on GitHub
This is where rswag comes in. It is an extension to rspec-rails for "describing and testing API operations".
rswag also includes a bundled version of Swagger UI if you want to inspect your OpenAPI spec visually during testing.