PHPackages                             byteit/openapi-spec-generator - 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. byteit/openapi-spec-generator

ActiveLibrary[API Development](/categories/api)

byteit/openapi-spec-generator
=============================

Creates Open API spec for a Laravel JSON:API

0.3.0(4y ago)31.1k6[5 issues](https://github.com/byte-it/openapi-spec-generator/issues)[2 PRs](https://github.com/byte-it/openapi-spec-generator/pulls)Apache-2.0PHPPHP &gt;=7.4|^8.0

Since Jun 27Pushed 4y ago2 watchersCompare

[ Source](https://github.com/byte-it/openapi-spec-generator)[ Packagist](https://packagist.org/packages/byteit/openapi-spec-generator)[ RSS](/packages/byteit-openapi-spec-generator/feed)WikiDiscussions master Synced 6d ago

READMEChangelog (3)Dependencies (7)Versions (4)Used By (0)

OpenAPI v3 Spec Generator
=========================

[](#openapi-v3-spec-generator)

Designed to work with [Laravel JSON:API](https://laraveljsonapi.io/)

!!! Disclaimer: this project is work in progress and likely contains many bugs, etc !!!

What it can and can't
---------------------

[](#what-it-can-and-cant)

### Can

[](#can)

- Generate Schemas/Responses/Request/Errors for all default [Laravel JSON:API](https://laraveljsonapi.io/) routes
- Use a seeded database to generate examples

### Can't yet

[](#cant-yet)

- Customisation of the generation
- Generation for custom actions
- Generation for custom filters
- Generation for anything custom
- Generation for MorphTo relations (MorphToMany works)
- Generation of Pagination Meta
- Generation of Includes
- Generation of Authentication/Authorization

TODO
----

[](#todo)

- Command to generate to storage folder
- Get basic test suite running with GitHub Actions
- Add extra operation descriptions via config
- Add in tags &amp; x-tagGroups (via config)
- Add tests (Use the dummy by laraveljsonapi to integrate all features)
- Add custom actions
- Split schemas/requests/responses by action
- Consider field attributes
    - bool readonly
    - bool hidden
    - closure based readonly (create/update)
    - closure based hidden
- List sortable fields
- Fix includes and relations
    - Add relationship routes
    - Add includes
- Add authentication
- Add custom queries/filters
- Add a way to document custom actions
- Tidy up the code!!
- Replace `cebe/php-openapi` with `goldspecdigital/oooas`
- Move to an architecture inspired by `vyuldashev/laravel-openapi`
- Use php8 attributes on actions/classes to generate custom docs

🙏 Based upon initial prototype by [martianatwork](https://github.com/martianatwork) and [glennjacobs](https://github.com/glennjacobs)

Usage
-----

[](#usage)

Install package

```
composer require byteit/openapi-spec-generator

```

Publish the config file

```
php artisan vendor:publish --provider="LaravelJsonApi\OpenApiSpec\OpenApiServiceProvider"

```

Generate the Open API spec

```
php artisan jsonapi:openapi:generate v1

```

Note that a seeded DB is required! The seeded data will be used to generate Samples.

Generating Documentation
------------------------

[](#generating-documentation)

A quick way to preview your documentation is to use [Speccy](https://speccy.io/). Ensure you have installed Speccy globally and then you can use the following command.

```
speccy serve storage/app/v1_openapi.yaml

```

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 90.9% 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 ~22 days

Total

3

Last Release

1742d ago

PHP version history (2 changes)0.0.1PHP ^8.0

0.3.0PHP &gt;=7.4|^8.0

### Community

Maintainers

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

---

Top Contributors

[![bbrala](https://avatars.githubusercontent.com/u/3294970?v=4)](https://github.com/bbrala "bbrala (20 commits)")[![captnCC](https://avatars.githubusercontent.com/u/5840945?v=4)](https://github.com/captnCC "captnCC (2 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/byteit-openapi-spec-generator/health.svg)

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

###  Alternatives

[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M651](/packages/sylius-sylius)[darkaonline/l5-swagger

OpenApi or Swagger integration to Laravel

2.9k34.0M112](/packages/darkaonline-l5-swagger)[statamic/cms

The Statamic CMS Core Package

4.8k3.2M720](/packages/statamic-cms)[cebe/php-openapi

Read and write OpenAPI yaml/json files and make the content accessable in PHP objects.

49815.4M86](/packages/cebe-php-openapi)[devizzent/cebe-php-openapi

Read and write OpenAPI yaml/json files and make the content accessable in PHP objects.

379.0M49](/packages/devizzent-cebe-php-openapi)[swisnl/openapi-spec-generator

Creates Open API spec for a Laravel JSON:API

2338.1k](/packages/swisnl-openapi-spec-generator)

PHPackages © 2026

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