PHPackages                             wakeapp/swagger-resolver-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. wakeapp/swagger-resolver-bundle

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

wakeapp/swagger-resolver-bundle
===============================

Provides possibility for validate data according to Swagger documentation

v0.4.10(5y ago)02.3k11MITPHPPHP ~7.1||~8.0

Since Aug 27Pushed 4y agoCompare

[ Source](https://github.com/wakeapp/swagger-resolver-bundle)[ Packagist](https://packagist.org/packages/wakeapp/swagger-resolver-bundle)[ RSS](/packages/wakeapp-swagger-resolver-bundle/feed)WikiDiscussions master Synced today

READMEChangelog (8)Dependencies (8)Versions (24)Used By (1)

Swagger Resolver Bundle [![На Русском](https://camo.githubusercontent.com/feb4c9ee227a5ee3a5d4e83a8a5b888b2e4b666d6cc2fb985c3bf404f8f271ac/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f2544302539462544302542352544312538302544302542352544302542392544312538322544302542385f2544302542442544302542302d2544302541302544312538332544312538312544312538312544302542412544302542382544302542392d677265656e2e7376673f7374796c653d666c61742d737175617265)](./README.RU.md)
===================================================================================================================================================================================================================================================================================================================================================================================================================================================================================

[](#swagger-resolver-bundle-)

WARNING: This repo is no longer actively maintained
===================================================

[](#warning-this-repo-is-no-longer-actively-maintained)

[![Latest Stable Version](https://camo.githubusercontent.com/a867a958cbe9cf28d9c828a232355be33558c7429c6421d11790f22ceccda8ad/68747470733a2f2f706f7365722e707567782e6f72672f616472656e616c696e6b696e2f737761676765722d7265736f6c7665722d62756e646c652f762f737461626c65)](https://packagist.org/packages/adrenalinkin/swagger-resolver-bundle)[![Total Downloads](https://camo.githubusercontent.com/22096d83de97f4138ecb70808d6e04537e23d4fdda4139783ec671e5ced29c31/68747470733a2f2f706f7365722e707567782e6f72672f616472656e616c696e6b696e2f737761676765722d7265736f6c7665722d62756e646c652f646f776e6c6f616473)](https://packagist.org/packages/adrenalinkin/swagger-resolver-bundle)

[![knpbundles.com](https://camo.githubusercontent.com/0b470e338d7bdba89642557bb9fa607d68b80d07d05118653781e80ff38ba4f2/687474703a2f2f6b6e7062756e646c65732e636f6d2f616472656e616c696e6b696e2f737761676765722d7265736f6c7665722d62756e646c652f62616467652d73686f7274)](http://knpbundles.com/adrenalinkin/swagger-resolver-bundle)

Introduction
------------

[](#introduction)

Bundle provides possibility for validate data according to the Swagger 2 documentation. You describe your API documentation by Swagger and provides verification of data for compliance with the described requirements. When documentation has been updated then verification will be updated too, all in one place!

**Documentation is cached** through the standard `Symfony Warmers` mechanism. In debug mode, the cache automatically warms up if you change the file containing the description of the documentation.

*Note:* as result bundle returns `SwaggerResolver` object - extension for the [OptionsResolver](https://github.com/symfony/options-resolver). In this way you get full control over created resolver.

*Attention:* remember, when you change generated `SwaggerResolver` object you risk to get divergence with actual documentation.

### Integrations

[](#integrations)

Bundle provides integration with [NelmioApiDocBundle](https://github.com/nelmio/NelmioApiDocBundle), supports configuration loading by [swagger-php](https://github.com/zircote/swagger-php) and also supports loading directly from the `json` or `yaml`(`yml`) configuration file. When used default bundle configuration then swagger documentation will be load in most optimal available way. Loaders priority:

1. `NelmioApiDocBundle` - do not require any additional configuration.
2. `swagger-php` - scan `src/` directory by default. Uses `swagger_php.scan` and `swagger_php.exclude` parameters.
3. `json` - looking for `web/swagger.json` by default. Uses `configuration_file` parameter.

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

[](#installation)

### Step 1: Download the Bundle

[](#step-1-download-the-bundle)

Open a command console, enter your project directory and execute the following command to download the latest stable version of this bundle:

```
    composer require adrenalinkin/swagger-resolver-bundle
```

*is command requires you to have [Composer](https://getcomposer.org) install globally.*

### Step 2: Enable the Bundle

[](#step-2-enable-the-bundle)

Then, enable the bundle by updating your `app/AppKernel.php` file to enable the bundle:

```
