cydrickn / openapi-validator-bundle
Open Api Generator and Validator
v0.2.0
2022-01-20 14:37 UTC
Requires
- php: ^7.4|^8.0
- ext-json: *
- league/openapi-psr7-validator: ^0.16.0
- nyholm/psr7: ^1.3
- psr/http-message: ^1.0
- symfony/framework-bundle: ^5.1
- symfony/psr-http-message-bridge: ^2.0
Requires (Dev)
- ext-pcov: *
- phpunit/phpunit: ^9.2
- symfony/phpunit-bridge: ^5.1
This package is auto-updated.
Last update: 2024-12-20 20:59:48 UTC
README
Symfony Bundle for validating Request and Response based on open api specification 3.
Requirements
- Symfony >= 5
- PHP >= 7.4
- PHP Extension JSON
Optional
- nelmio/api-doc-bundle >= 4.0 (Currently in Beta)
- Why 4.0, version 3 and below only supports version 2 of OpenAPI Specification.
Installation
composer require cydrickn/openapi-validator-bundle
Setting Up
Add the bundle in your config/bundles.php
<?php return [ // ... Cydrickn\OpenApiValidatorBundle\CydricknOpenApiValidatorBundle::class => ['all' => true], ];
Add configuration config/packages/cydrickn_openapi_validator.yml
cydrickn_open_api_validator: validate_request: true validate_response: true schema: factory: yaml-file file: %kernel.project_dir%/config/openapi/spec.yaml
Configurations
TODO
- Add Nelmio Api Schema Factory
- Add Dynamic Configuration
- Add document
- Add Route Schema Factory
- Add PHP file Schema Factory
- Code coverage of 100%
- Add CI
- Support Lower PHP Version >= 7.1
- Support Lower Symfony Version >= 3