cline/openapi

Standalone OpenAPI document builder for explicit PHP specifications.

Maintainers

Package info

github.com/faustbrian/openapi

pkg:composer/cline/openapi

Statistics

Installs: 12

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

1.2.0 2026-04-04 06:15 UTC

This package is auto-updated.

Last update: 2026-04-04 06:30:32 UTC


README

GitHub Workflow Status Latest Version on Packagist Software License Total Downloads

OpenApi

Standalone OpenAPI 3.1 document builder for explicit PHP specifications, with optional Laravel route binding and Artisan generation support.

Requirements

Requires PHP 8.5+

Installation

composer require cline/openapi

Optional Laravel integration:

composer require laravel/framework

Features

  • Contract-first authoring: Define documents explicitly in PHP instead of relying on inferred annotations or reflection-heavy generation
  • Standalone core: No Laravel or framework dependency
  • Optional Laravel adapter: Bind endpoint specs to named Laravel routes, validate controller request handlers, scaffold explicit endpoint classes from real routes, and generate documents with php artisan openapi:generate
  • Versioned documents: Build one explicit OpenAPI document per API version
  • Typed builders: Use fluent builders for info, servers, operations, parameters, schemas, callbacks, links, request bodies, responses, and more
  • Reusable components: Register schemas, parameters, request bodies, responses, callbacks, examples, and links as named components
  • JSON:API helpers: Generate JSON:API collection contracts without coupling the core package to a framework
  • Escape hatches: Use merge(...), component(...), and extension(...) when you need unusual OpenAPI shapes
  • Built-in validation: Detect duplicate operationId values and unresolved component references during generation

Documentation

  • DOCS.md - Full in-depth usage guide
  • Includes standalone usage and optional Laravel integration
  • Includes the explicit Laravel scaffold workflow for large APIs

Change log

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING and CODE_OF_CONDUCT for details.

Security

If you discover any security related issues, please use the GitHub security reporting form rather than the issue queue.

Credits

License

The MIT License. Please see License File for more information.