PHPackages                             1martinkarlsen/apilyser - 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. 1martinkarlsen/apilyser

ActiveLibrary[API Development](/categories/api)

1martinkarlsen/apilyser
=======================

API documentation and code validator

v0.0.1(2mo ago)084MITPHPPHP ^8.1CI passing

Since Dec 25Pushed 5d agoCompare

[ Source](https://github.com/1martinkarlsen/apilyser-php)[ Packagist](https://packagist.org/packages/1martinkarlsen/apilyser)[ RSS](/packages/1martinkarlsen-apilyser/feed)WikiDiscussions main Synced today

READMEChangelog (7)Dependencies (8)Versions (10)Used By (0)

Apilyser php
============

[](#apilyser-php)

A PHP static analysis tool to discover misalignment between the code and the OpenApi documentation

Getting started
---------------

[](#getting-started)

### Installation

[](#installation)

Install using composer
`composer require --dev 1martinkarlsen/apilyser`

### Configuration

[](#configuration)

After installation, a `apilyzer.yaml` file is required for the library to work.

ConfigurationdescriptioncodePathpath to the codeopenApiPathpath to the open api documentation yaml fileUsage
-----

[](#usage)

You can run the simple validation command by typing
`./vendor/bin/apilyser validate`

This command will analyse both the OpenApi dokumentation and the project code and run the alignment rules.

### Add custom routing parsers.

[](#add-custom-routing-parsers)

Apilyser allows you to add custom routing parsers to support different routing systems or frameworks.

To add a custom parser, create a class that implements the `RouteStrategy` interface and add it to your `apilyser.yaml` configuration:

```
codePath: src/
openApiPath: openapi.yaml
customRouteParser:
  - 'App\ApilyserExtensions\MyCustomParser'
  - 'App\ApilyserExtensions\AnotherParser'
```

Your custom parser class should implement the `RouteStrategy` interface and be autoloaded in your project.

Example custom parser:

```
namespace App\ApilyserExtensions;

use Apilyser\Parser\Route\RouteStrategy;

class MyCustomParser implements RouteStrategy
{
    public function canHandle(string $rootPath): bool
    {
        return true;
    }

    public function parseRoutes(string $rootPath): array
    {
        return $routes;
    }
}
```

Contribution
------------

[](#contribution)

Contributions are very welcome!
For major changes, please open an issue to discuss first. Otherwise feel free to create pull requests.

###  Health Score

39

—

LowBetter than 87% of packages

Maintenance92

Actively maintained with recent releases

Popularity11

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity38

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.

###  Release Activity

Cadence

Every ~10 days

Recently: every ~5 days

Total

7

Last Release

21d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/cb7f057f6636a41770e20fd8c01dce9209dd690dbd755aa048ae7f695dd81643?d=identicon)[1martinkarlsen](/maintainers/1martinkarlsen)

---

Top Contributors

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

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/1martinkarlsen-apilyser/health.svg)

```
[![Health](https://phpackages.com/badges/1martinkarlsen-apilyser/health.svg)](https://phpackages.com/packages/1martinkarlsen-apilyser)
```

###  Alternatives

[phpdocumentor/phpdocumentor

Documentation Generator for PHP

4.4k3.1M803](/packages/phpdocumentor-phpdocumentor)[ezsystems/ezplatform-graphql

GraphQL server for the eZ Platform Open Source CMS Repository.

31647.4k10](/packages/ezsystems-ezplatform-graphql)[onmoon/openapi-server-bundle

Symfony bundle to create a fully-featured API server from an OpenAPI v3 specification

1117.3k](/packages/onmoon-openapi-server-bundle)[adrenalinkin/swagger-resolver-bundle

Provides possibility for validate data according to Swagger documentation

1013.3k](/packages/adrenalinkin-swagger-resolver-bundle)

PHPackages © 2026

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