Skip to content

Latest commit

 

History

History
44 lines (32 loc) · 1.17 KB

README.md

File metadata and controls

44 lines (32 loc) · 1.17 KB

Coverage Status

Open API Coverage Calculator Symfony Bundle

The Open API Coverage Calculator Symfony Bundle enables you to track another system metric - The API Documentation Coverage. The library extracts your application API endpoints via Symfony Routing and checks them against NelmioAPIDocBundle, the most popular library for Open API Specification in the Symfony ecosystem.

Installation

composer require --dev ferror/openapi-coverage
// bundles.php

return [
    Ferror\OpenapiCoverage\Symfony\Bundle::class => ['dev' => true, 'test' => true],
];

Usage

php bin/console ferror:check-openapi-coverage

You can also specify the --threshold or (--t) option to define coverage level below which the command will fail.

php bin/console ferror:check-openapi-coverage --threshold 0.70

Example Result

Open API coverage: 75%
+- Missing documentation -+
| path          | method  |
+---------------+---------+
| /products/:id | get     |
+---------------+---------+