PHPackages                             temirkhann/openapi-validator-bundle - 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. [API Development](/categories/api)
4. /
5. temirkhann/openapi-validator-bundle

ActiveSymfony-bundle[API Development](/categories/api)

temirkhann/openapi-validator-bundle
===================================

An OpenAPI specification validator for a symfony application

0.1.0(4y ago)03MITPHPPHP ^7.4|~8.0|~8.1

Since Jun 17Pushed 4y ago1 watchersCompare

[ Source](https://github.com/TemirkhanN/openapi-validator-bundle)[ Packagist](https://packagist.org/packages/temirkhann/openapi-validator-bundle)[ RSS](/packages/temirkhann-openapi-validator-bundle/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (13)Versions (2)Used By (0)

openapi-validator-bundle
========================

[](#openapi-validator-bundle)

An OpenAPI specification validator for a symfony application

It checks if the request and response from your symfony application matches your openapi documentation file.
If the endpoint is not documented, receives or responds with mismatching payload it will throw `ValidationError`.
This comes in handy when application has integration/functional/manual tests because it will alert early that documentation is outdated.

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

[](#installation)

```
composer require temirkhann/openapi-validator-bundle
```

Usage
-----

[](#usage)

Enable bundle in `config/bundles.php`

```
// Usually you don't want validation to work on your production server.
// So, enable it for all envs and disable for prod
return [
    Symfony\Bundle\FrameworkBundle\FrameworkBundle::class => ['test' => true],
    ....
    TemirkhanN\OpenapiValidatorBundle\OpenapiValidatorBundle::class => ['all' => true, 'prod' => false],
];
```

Declare configuration in `config/packages/openapi_validator.yaml` as follows:

```
openapi_validator:
  # Path to your openapi specification (json or yaml)
  # Only local file is accepted (http links won't work)
  specification: '%kernel.project_dir%/openapi.yaml'
```

Configuration
-------------

[](#configuration)

If you have multiple sections in your application or for some reason don't want to apply validation to some particular
endpoints you can use exclusion policy

```
openapi_validator:
  specification: '%kernel.project_dir%/openapi.yaml'
  policy:
    exclude:
      paths:
        - '#^/some-internal/#'
      status_codes:
        - 304
        - 500
```

`paths` accepts list of regexp patterns. If the request path(not URI) matches pattern then validation will be omitted.

> defaults value is empty list - validation is applied to every single route.

`status_codes` accepts list of integer values which represent http status-codes. If response code matches any of these
then validation will be omitted.

> default value is 500. There should never be 500 in API documentation.

###  Health Score

21

—

LowBetter than 18% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity47

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

1477d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/49de4e214ba94d2a32a9e14a45822c3f9f758e89098cf837d23c51e509e10e92?d=identicon)[TemirkhanN](/maintainers/TemirkhanN)

---

Top Contributors

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

---

Tags

openapisymfony-bundle

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/temirkhann-openapi-validator-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/temirkhann-openapi-validator-bundle/health.svg)](https://phpackages.com/packages/temirkhann-openapi-validator-bundle)
```

###  Alternatives

[easycorp/easyadmin-bundle

Admin generator for Symfony applications

4.3k17.9M388](/packages/easycorp-easyadmin-bundle)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

585.6M574](/packages/shopware-core)[symfony/security-bundle

Provides a tight integration of the Security component into the Symfony full-stack framework

2.5k185.6M2.4k](/packages/symfony-security-bundle)[shopware/platform

The Shopware e-commerce core

3.4k1.5M3](/packages/shopware-platform)[drupal/core

Drupal is an open source content management platform powering millions of websites and applications.

21866.0M1.7k](/packages/drupal-core)[prestashop/prestashop

PrestaShop is an Open Source e-commerce platform, committed to providing the best shopping cart experience for both merchants and customers.

9.1k17.8k](/packages/prestashop-prestashop)

PHPackages © 2026

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