PHPackages                             ebln/guzzle-openapi-middleware - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [HTTP &amp; Networking](/categories/http)
4. /
5. ebln/guzzle-openapi-middleware

ActiveLibrary[HTTP &amp; Networking](/categories/http)

ebln/guzzle-openapi-middleware
==============================

A Guzzle middleware validating against openapi schema using league/openapi-psr7-validator

v1.0.0(3y ago)216MITPHPPHP ^7.4 || ^8.0 || ^8.1

Since Aug 20Pushed 3y ago1 watchersCompare

[ Source](https://github.com/ebln/guzzle-openapi-middleware)[ Packagist](https://packagist.org/packages/ebln/guzzle-openapi-middleware)[ RSS](/packages/ebln-guzzle-openapi-middleware/feed)WikiDiscussions main Synced today

READMEChangelog (1)Dependencies (10)Versions (2)Used By (0)

OpenAPI Validation Middleware for Guzzle
========================================

[](#openapi-validation-middleware-for-guzzle)

[This middleware only adapts league/openapi-psr7-validator for Guzzle, please see their project for documentation](https://github.com/thephpleague/openapi-psr7-validator#readme)

Installation
------------

[](#installation)

```
composer require ebln/guzzle-openapi-middleware

```

Usage
-----

[](#usage)

```
use GuzzleHttp\Client;
use GuzzleHttp\HandlerStack;
use League\OpenAPIValidation\PSR7\ValidatorBuilder;

$builder = new ValidatorBuilder();
// call either setSchemaFactory() or one of the from*() methods optionally add a PSR6 cache
// @see https://github.com/thephpleague/openapi-psr7-validator#readme

$middleware = new Middleware($builder->getRequestValidator(), $builder->getResponseValidator());

// @see https://docs.guzzlephp.org/en/stable/handlers-and-middleware.html#middleware
$stack = HandlerStack::create();
$stack->push($middleware, 'openapi_validation');
$client = new Client(['handler' => $stack]);

```

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

1412d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/34722048?v=4)[ebln](/maintainers/ebln)[@ebln](https://github.com/ebln)

---

Top Contributors

[![ebln](https://avatars.githubusercontent.com/u/34722048?v=4)](https://github.com/ebln "ebln (7 commits)")

---

Tags

guzzleguzzle-middlewaremiddlewareopenapiopenapi3phpvalidationvalidatormiddlewarevalidatorGuzzleopenapi

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan, Psalm

Type Coverage Yes

### Embed Badge

![Health badge](/badges/ebln-guzzle-openapi-middleware/health.svg)

```
[![Health](https://phpackages.com/badges/ebln-guzzle-openapi-middleware/health.svg)](https://phpackages.com/packages/ebln-guzzle-openapi-middleware)
```

###  Alternatives

[aws/aws-sdk-php

AWS SDK for PHP - Use Amazon Web Services in your PHP project

6.3k543.5M2.6k](/packages/aws-aws-sdk-php)[guzzlehttp/psr7

PSR-7 message implementation that also provides common utility methods

8.0k1.1B4.0k](/packages/guzzlehttp-psr7)[kevinrob/guzzle-cache-middleware

A HTTP/1.1 Cache for Guzzle 6. It's a simple Middleware to be added in the HandlerStack. (RFC 7234)

44018.6M133](/packages/kevinrob-guzzle-cache-middleware)[oat-sa/tao-core

TAO core extension

66143.7k121](/packages/oat-sa-tao-core)[mezzio/mezzio

PSR-15 Middleware Microframework

3923.8M125](/packages/mezzio-mezzio)[telnyx/telnyx-php

Official Telnyx PHP SDK — APIs for Voice, SMS, MMS, WhatsApp, Fax, SIP Trunking, Wireless IoT, Call Control, and more. Build global communications on Telnyx's private carrier-grade network.

35789.4k2](/packages/telnyx-telnyx-php)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
