PHPackages                             meetmatt/open-api-coverage - 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. meetmatt/open-api-coverage

ActiveLibrary[API Development](/categories/api)

meetmatt/open-api-coverage
==========================

OpenAPI specification coverage

10PHP

Since Sep 13Pushed 1y ago2 watchersCompare

[ Source](https://github.com/meetmatt/open-api-coverage)[ Packagist](https://packagist.org/packages/meetmatt/open-api-coverage)[ RSS](/packages/meetmatt-open-api-coverage/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (2)Used By (0)

OpenAPI specification coverage
==============================

[](#openapi-specification-coverage)

Purpose
-------

[](#purpose)

This package can be used to report the documented and record the executed parts of an Open API specification under test: which paths and operations were executed by the test, which parameters were passed, which content types were sent, which response status code classes, codes, body properties and content types were returned and asserted.

Glossary
--------

[](#glossary)

- Documented / undocumented: present in the specification / not present.
- Passed / not passed: sent in the request / not sent.
- Obtained / not obtained: received in the response / not received.
- Tested / not tested: obtained response was asserted against the expected value / not asserted or the given assertion failed.
- TCL: Test Coverage Level (per suite, per specification).
- Input criteria: related to the API requests.
- Output criteria: related to the API responses.

Criteria
--------

[](#criteria)

### Input criteria

[](#input-criteria)

Types of input criteria:

- Input parameters (optional or mandatory).
- Input parameter values (enums, booleans).
- Content-types (only applicable for operations with request body).
- Operation flows (not implemented, lacks formal definitions).

Request coverage:

1. Documented, passed - fully covered.
2. Documented, not passed - lacks API call.
3. Undocumented, passed - lacks documentation.
4. (Nonsense) Undocumented, not passed.

### Output criteria

[](#output-criteria)

Types of output criteria:

- Status code classes: 200 vs 400/500, should be explicitly defined.
- Status codes.
- Response body properties.
- Content-types.

Response coverage:

1. Documented, obtained, tested - fully covered.
2. Documented, not obtained, testing not applicable - lacks API call and tests.
3. Documented, obtained, not tested - lacks tests.
4. Undocumented, obtained, tested - lacks documentation.
5. Undocumented, obtained, not tested - lacks documentation and tests.
6. (Nonsense) Undocumented, not obtained, testing not relevant.

Test Coverage Levels (TCL)
--------------------------

[](#test-coverage-levels-tcl)

TCLInput criteriaOutput criteria01Paths2Operations3Content-typeContent-type4ParametersStatus code class5Status codes6Response body properties7Operation flowsObject Model
------------

[](#object-model)

### Coverage

[](#coverage)

```
Coverage:
  Spec: Specification
  Input: InputCriteria
  Output: OutputCriteria
```

### Specification

[](#specification)

```
Specification:
  ID: string
  Paths: URL -> Path
    URL: string
    Operations: HTTP Method -> Operation
      HTTP Method: string
      PathParameters: Name -> Values
        Name: string
        Values: array
      QueryParameters: Name -> Values
        Name: string
        Values: array
      RequestBodies: Content-type -> RequestBody
        Content-type: string
        Properties: Path -> Values
          Path: string
          Values: array
      Responses: HTTP Status Code -> Response
        HTTP Status Code: string
        ResponseBodies: Content-type -> ResponseBody
          Content-type: string
          Properties: Path -> Values
            Path: string
            Values: array
```

How the coverage works
----------------------

[](#how-the-coverage-works)

1. Parse specification.
2. On each HTTP call (REST Module) find the path and operation in the spec, mark it as documented and passed.
3. Dig deeper to the request parameters: infer path parameters from the URI path, by converting the path definition to regex according to the path parameter, mark the parameter as passed.
4. If there's a path, but no operation documented - then mark the path as called, and log an undocumented operation.
5. If there's no path, then log an undocumented path (plus operation, parameters (infer path parameters), query string parameters, request body contents).
6. Dig deeper to the request parameters: query parameters.

References
----------

[](#references)

[A. Martin-Lopez, S. Segura, A. Ruiz-Cortés. 2019. **Test Coverage Criteria for RESTful Web APIs.** ACM SIGSOFT International Workshop on Automating TEST Case Design, Selection, and Evaluation (A-TEST'19).](https://personal.us.es/amarlop/wp-content/uploads/2019/09/Test_Coverage_Criteria_for_RESTful_Web_APIs.pdf)

License
-------

[](#license)

`OpenAPI specification coverage` is open-sourced software licensed under the [MIT](/LICENSE) License.

###  Health Score

17

—

LowBetter than 6% of packages

Maintenance29

Infrequent updates — may be unmaintained

Popularity2

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity27

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/87966ff11d1a8df3887095bb776fd07aa7345250c2fd41dd100414171cc0ffaf?d=identicon)[meetmatt](/maintainers/meetmatt)

---

Top Contributors

[![meetmatt](https://avatars.githubusercontent.com/u/2766514?v=4)](https://github.com/meetmatt "meetmatt (1 commits)")

### Embed Badge

![Health badge](/badges/meetmatt-open-api-coverage/health.svg)

```
[![Health](https://phpackages.com/badges/meetmatt-open-api-coverage/health.svg)](https://phpackages.com/packages/meetmatt-open-api-coverage)
```

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M480](/packages/stripe-stripe-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M272](/packages/twilio-sdk)[knplabs/github-api

GitHub API v3 client

2.2k15.8M187](/packages/knplabs-github-api)[facebook/php-business-sdk

PHP SDK for Facebook Business

90121.9M34](/packages/facebook-php-business-sdk)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

73813.7M114](/packages/meilisearch-meilisearch-php)[google/gax

Google API Core for PHP

263103.1M454](/packages/google-gax)

PHPackages © 2026

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