mikelgoig / codeception-openapi
Codeception module for contract testing with OpenAPI.
2.2.1
2025-01-18 19:19 UTC
Requires
- php: 8.3.*
- codeception/codeception: ^5.1
- codeception/module-rest: ^3.4
- codeception/module-symfony: ^3.5
- guzzlehttp/psr7: ^2.7
- league/openapi-psr7-validator: ^0.22.0
- symfony/browser-kit: ^7.2
- symfony/http-foundation: ^7.2
- symfony/http-kernel: ^7.2
- webmozart/assert: ^1.11
Requires (Dev)
- captainhook/captainhook-phar: ^5.24
- captainhook/hook-installer: ^1.0
- mikelgoig/easy-coding-standard-rules: ^1.0
- phpstan/extension-installer: ^1.4
- phpstan/phpstan: ^2.1
- phpstan/phpstan-deprecation-rules: ^2.0
- phpstan/phpstan-strict-rules: ^2.0
- phpstan/phpstan-webmozart-assert: ^2.0
- ramsey/conventional-commits: ^1.5
- symplify/easy-coding-standard: ^12.5
README
Codeception Module for contract testing with OpenAPI
Created by Mikel Goig.
This Codeception module provides you with actions to validate API requests and responses with an OpenAPI Specification.
It requires REST and Symfony modules.
It supports Gherkin format.
😎 Installation
-
Install this package using Composer:
composer require --dev mikelgoig/codeception-openapi
🛠️ Configuration
-
Add the Codeception module to your config file:
modules: enabled: - MikelGoig\Codeception\Module\OpenApi: depends: [ REST, Symfony ] openapi: path/to/openapi.yaml multipart_boundary: foo
openapi
- the path of the OpenAPI filemultipart_boundary
optional - the boundary parameter for multipart requests
-
To set up Gherkin steps, enable the
gherkin
part of the module:modules: enabled: - MikelGoig\Codeception\Module\OpenApi: # ... part: gherkin