mikelgoig/codeception-openapi

Codeception module for contract testing with OpenAPI.

This package is auto-updated.

Last update: 2025-05-18 20:04:43 UTC


README

Codeception Module for contract testing with OpenAPI

Created by Mikel Goig.

View Repository

Packagist Version Packagist Downloads Packagist PHP Version

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

  1. Install this package using Composer:

    composer require --dev mikelgoig/codeception-openapi

🛠️ Configuration

  1. 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 file
    • multipart_boundary optional - the boundary parameter for multipart requests
  2. To set up Gherkin steps, enable the gherkin part of the module:

    modules:
      enabled:
        - MikelGoig\Codeception\Module\OpenApi:
            # ...
            part: gherkin