From 35b66e19361b9bd056cae7d0cae00b945f967e51 Mon Sep 17 00:00:00 2001 From: DerManoMann Date: Wed, 14 Oct 2026 12:28:49 +1300 Subject: [PATCH] Say what the package does, and where it hooks in --- README.md | 12 +++++++++--- composer.json | 15 ++++++++++++++- 2 files changed, 23 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index ec56863..87cf464 100644 --- a/README.md +++ b/README.md @@ -4,8 +4,14 @@ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) ## Introduction -Allows to validate a controller response from your API project against a given [OpenAPI](https://www.openapis.org/) -specification. +Verifies API responses against an [OpenAPI](https://www.openapis.org/) specification. A response body that does not +match its documented schema is reported as a mismatch, so the specification and the API cannot drift apart unnoticed. + +Supported ways to hook in: +* **Laravel and Slim tests**: a trait for the framework's test case. Every response a test receives is verified. +* **PSR-15 middleware**: verifies the responses of any PSR-15 stack, such as Slim or Mezzio. +* **Guzzle and PSR-18 clients**: verifies responses on the client side, against a running server or a mock. +* **The verifier on its own**: `OpenApiVerifier` needs only a request and its response. ## Requirements * [PHP 8.2 or higher](http://www.php.net/) @@ -24,7 +30,7 @@ Once composer is installed, execute the following command in your project root t ```sh composer require radebatz/openapi-verifier ``` -After that all required classes should be availabe in your project to add routing support. +After that all required classes should be available in your project. ## Usage ### The verifier diff --git a/composer.json b/composer.json index 2b0d34b..c0c92ce 100644 --- a/composer.json +++ b/composer.json @@ -1,6 +1,19 @@ { "name": "radebatz/openapi-verifier", - "description": "Verify JSON (api response) against OpenAPI specification.", + "description": "Verifies API responses against an OpenAPI specification, in Laravel and Slim tests, as PSR-15 middleware or in a Guzzle or PSR-18 client.", + "keywords": [ + "openapi", + "swagger", + "api", + "testing", + "phpunit", + "validation", + "psr-15", + "psr-18", + "guzzle", + "laravel", + "slim" + ], "license": [ "MIT" ],