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 1mo ago

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 43% 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

1366d 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

[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)

43117.4M104](/packages/kevinrob-guzzle-cache-middleware)[caseyamcl/guzzle_retry_middleware

Guzzle v6+ retry middleware that handles 429/503 status codes and connection timeouts

21610.7M64](/packages/caseyamcl-guzzle-retry-middleware)[rtheunissen/guzzle-log-middleware

Guzzle middleware to log requests and responses

842.3M17](/packages/rtheunissen-guzzle-log-middleware)[hkarlstrom/openapi-validation-middleware

PSR-7 and PSR-15 OpenAPI Validation Middleware

95198.8k1](/packages/hkarlstrom-openapi-validation-middleware)[rtheunissen/guzzle-rate-limiter

Guzzle 6 middleware used to delay requests dynamically

52177.2k1](/packages/rtheunissen-guzzle-rate-limiter)[eljam/guzzle-jwt-middleware

A jwt authentication middleware for guzzle 6

28722.5k3](/packages/eljam-guzzle-jwt-middleware)

PHPackages © 2026

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