#openapi_first

Andreas Hallerahx@ruby.social
2025-06-19

openapi_first 2.8.0 will make it very simple to turn your existing integration tests into contract tests against an OpenAPI API description. No extra middlewares. No custom test assertions.

#ruby #openapi #openapi_first

A very short Ruby code snippet to turn your integration tests into contract tests to validate all requests / responses against an OpenAPI API Description
Andreas Hallerahx@ruby.social
2025-05-07

Here is a discussion how the request validation middleware should handle paths that are not defined in your #openapi API description. – Return 404 or skip the validation and pass the request to the upstream app?

Your thoughts would be very much appreciated.

github.com/ahx/openapi_first/i

#ruby #rack #apifirst #openapi_first

Andreas Hallerahx@ruby.social
2025-05-04

openapi_first 2.7.0 was released with better support for handling multiple APIs, including an RSpec integration, and an option to adjust the request path used for validation.

github.com/ahx/openapi_first

#Ruby #Rack #APIfirst #openapi #openapi_first

Ruby code that shows how to set testing coverage of multiple OpenAPI API descriptions.
2025-02-14

openapi_first 2.3.0 adds a new feature: API coverage testing

It checks if all requests/responses that are defined in your API description have been called during your test run. This is a key feature to avoid API drift.

Please check it out: github.com/ahx/openapi_first?t

#openapi #apifirst #ruby #rack #openapi_first

Andreas Hallerahx@ruby.social
2024-07-14

I just released version 2.0.3 of openapi_first, which makes the test assertion method work as described and adds an option to the request validation middleware to skip the error response. This option can be useful in a code-first scenario where you want to subscribe to invalid requests / responses according to your API description.

#ruby #openapi #apifirst #openapi_first

github.com/ahx/openapi_first

Client Info

Server: https://mastodon.social
Version: 2025.04
Repository: https://github.com/cyevgeniy/lmst