Morning Twitter! I'm gonna share something I've been working on the past couple of weeks
4 years ago, I worked on a project using OpenAPI definitions for the first time (it was still called Swagger at the time), to describe an API built with Laravel and to expose an interactive documentation using Swagger UI https://swagger.io/specification
I've reused the same process a few times since then, and a couple of years ago I've also started using these OpenAPI definitions in my integration tests, to validate the API responses against them and to guarantee that the API's behaviour conforms to the provided documentation
As I mostly ended up copying the same code again and again in each new project to do this, I've now extracted that logic to a package that I've published a few days ago https://github.com/osteel/openapi-httpfoundation-testing
The package works with the HttpFoundation component, which is used in Symfony, Laravel, Drupal, and many other big projects (see the list here https://symfony.com/components/HttpFoundation). I'll probably publish a blog post about it in the coming days. Enjoy!