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 1w 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 40% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity57

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

1457d 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.2k555.0M2.8k](/packages/aws-aws-sdk-php)[guzzlehttp/psr7

PSR-7 message implementation that also provides common utility methods

7.9k1.1B4.4k](/packages/guzzlehttp-psr7)[google/cloud-core

Google Cloud PHP shared dependency, providing functionality useful to all components.

346137.0M126](/packages/google-cloud-core)[typo3/cms

TYPO3 CMS is a free open source Content Management Framework initially created by Kasper Skaarhoj and licensed under GNU/GPL.

1.2k1.9M122](/packages/typo3-cms)[oat-sa/tao-core

TAO core extension

64147.9k151](/packages/oat-sa-tao-core)[laravel/nightwatch

The official Laravel Nightwatch package.

36911.6M45](/packages/laravel-nightwatch)

PHPackages © 2026

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