PHPackages                             switon/openapi - 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. switon/openapi

ActiveLibrary[API Development](/categories/api)

switon/openapi
==============

Split OpenAPI YAML workflow with route sync, merged export, and spec quality lint for Switon Framework

v1.0.0(1mo ago)00MITPHPPHP &gt;=8.3CI passing

Since Jun 6Pushed 2mo agoCompare

[ Source](https://github.com/switon-php/openapi)[ Packagist](https://packagist.org/packages/switon/openapi)[ Docs](https://github.com/switon-php/openapi)[ RSS](/packages/switon-openapi/feed)WikiDiscussions main Synced 3w ago

READMEChangelogDependencies (8)Versions (2)Used By (0)

Switon OpenAPI Package
======================

[](#switon-openapi-package)

[![OpenAPI CI](https://camo.githubusercontent.com/93458cde2c62a9fb19318de1c6662864b21a382eb306d7fec495e3b33e2eef8b/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f737769746f6e2d7068702f6f70656e6170692f63692e796d6c3f6272616e63683d6d61696e266c6162656c3d4f70656e4150492532304349)](https://github.com/switon-php/openapi/actions/workflows/ci.yml) [![PHP 8.3+](https://camo.githubusercontent.com/c03f51341eebaefabbf137e291b20523fc74b4ffd084406d88524d266d95085d/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e332532422d373737424234)](https://www.php.net/)

Switon's OpenAPI pipeline for collecting routes, merging YAML fragments, syncing stubs, and exporting JSON specs.

Highlights
----------

[](#highlights)

- **Document assembly:** route metadata and YAML fragments are merged into one OpenAPI document.
- **Route collection:** HTTP controllers can be scanned into OpenAPI entries.
- **Stub sync:** discovered routes can generate missing controller and component stubs.
- **CLI workflow:** `open-api:init`, `open-api:sync`, `open-api:export`, and `open-api:lint` cover the spec loop.
- **Spec helpers:** response schema guessing and sample-to-schema conversion reduce manual work.

Installation
------------

[](#installation)

```
composer require switon/openapi
```

Quick Start
-----------

[](#quick-start)

```
bash bin/console open-api:init
bash bin/console open-api:sync
bash bin/console open-api:export
bash bin/console open-api:lint
```

Docs:

License
-------

[](#license)

MIT.

###  Health Score

37

—

LowBetter than 81% of packages

Maintenance87

Actively maintained with recent releases

Popularity0

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 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

Unknown

Total

1

Last Release

48d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/dc0f20ad15b0ae9fbf9c6e2cd3008692b0c88a877ec8d3e0119211314bf86fc8?d=identicon)[switon](/maintainers/switon)

---

Top Contributors

[![switon-php](https://avatars.githubusercontent.com/u/247358032?v=4)](https://github.com/switon-php "switon-php (7 commits)")

---

Tags

apiopenapiswaggerswitonapiswaggeropenapiswiton

###  Code Quality

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/switon-openapi/health.svg)

```
[![Health](https://phpackages.com/badges/switon-openapi/health.svg)](https://phpackages.com/packages/switon-openapi)
```

###  Alternatives

[swagger-api/swagger-ui

 Swagger UI is a collection of HTML, Javascript, and CSS assets that dynamically generate beautiful documentation from a Swagger-compliant API.

28.9k49.5M114](/packages/swagger-api-swagger-ui)[darkaonline/l5-swagger

OpenApi or Swagger integration to Laravel

2.9k37.6M141](/packages/darkaonline-l5-swagger)[jolicode/slack-php-api

An up to date PHP client for Slack's API

2554.7M13](/packages/jolicode-slack-php-api)[darkaonline/swagger-lume

OpenApi or Swagger integration to Lumen

3302.4M3](/packages/darkaonline-swagger-lume)[harmbandstra/swagger-ui-bundle

Exposes swagger UI inside your Symfony project through a route (eg. /docs)

42888.4k](/packages/harmbandstra-swagger-ui-bundle)

PHPackages © 2026

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