Search by

ez-php / swagger-ui

AU9500

Serves Swagger UI / ReDoc documentation for the OpenAPI spec produced by ez-php/openapi

Package info

github.com/ez-php/swagger-ui

pkg:composer/ez-php/swagger-ui

Statistics

Installs: 11

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

2.4.0 2026-09-14 23:33 UTC

This package is auto-updated.

Last update: 2026-09-14 23:38:07 UTC


README

Serves Swagger UI / ReDoc documentation for the OpenAPI spec produced by ez-php/openapi

Installation

composer require ez-php/swagger-ui

Usage

Register the service provider (typically in provider/modules.php):

$app->register(\EzPhp\SwaggerUI\SwaggerUiServiceProvider::class);

This registers GET /docs, rendering a Swagger UI page that fetches its spec from GET /openapi.json (see ez-php/openapi). Configure via config/swagger-ui.php or environment:

return [
    'endpoint' => env('SWAGGER_UI_ENDPOINT', '/docs'),
    'spec_url' => env('SWAGGER_UI_SPEC_URL', '/openapi.json'),
    'renderer' => env('SWAGGER_UI_RENDERER', 'swagger-ui'), // or 'redoc'
];

Both renderers load their assets from a CDN (jsDelivr) — nothing is vendored by this module. Apply authentication or rate limiting to the /docs route in your own application's service provider if the documentation should not be publicly accessible.

License

MIT