Download the PHP package alexkramse/filament-openapi-docs without Composer

On this page you can find all versions of the php package alexkramse/filament-openapi-docs. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package filament-openapi-docs

Filament OpenAPI Docs - Filament Plugin

Latest Version on Packagist [Laravel]() [Filament]() [Tests]()

Introduction

A Native Filament plugin for OpenAPI documentation powered by Scramble. Filament OpenAPI Docs adds a dashboard page to your Filament panel where authenticated dashboard users can browse your generated OpenAPI specification, inspect endpoints, view request examples, and test API calls without leaving the admin area.

Features

Screenshots

Filament-native OpenAPI docs page with endpoint navigation, request documentation, request samples, and responses.

More screenshots are available in docs/screenshots.md.

Requirements

This package currently requires dedoc/scramble and is tested only with Scramble-generated OpenAPI documents. Scramble is installed as a package dependency, but your Laravel application still needs a working Scramble configuration so the OpenAPI document can be generated correctly.

Installation

Install the package with Composer:

Publish Filament assets so the package CSS and async Alpine component are available in the browser:

You should also run php artisan filament:assets after package updates and during deployment if your application does not already run Filament's asset upgrade command automatically.

Register The Plugin

Register the plugin in the Filament panel where the API documentation should appear:

The default page slug is api-docs. For example, if your panel is available at /admin, the documentation page will be available at /admin/api-docs.

Access is handled by your Filament panel. Users must pass the same authentication, middleware, and authorization rules that protect the panel.

Usage

After registration, open your Filament dashboard and select the API Docs navigation item.

The page displays your OpenAPI document as a Filament-native interface:

When request samples are enabled, each endpoint includes generated request snippets and a request sender. The request sender sends requests from the browser, so the selected server URL, CORS rules, cookies, and API authentication must allow the request.

Developer mode is available inside the request sender when developer options are enabled. It allows trusted dashboard users to add custom headers and query parameters before sending a request.

Security, headers, query parameters, body, and path parameters remain visible as request sections regardless of developer mode. Developer mode only controls the advanced add/edit controls for custom headers and query parameters.

Configuration

You may publish the config file:

Panel-level fluent configuration overrides the config file:

versions() accepts the aliases registered with Scramble::registerApi(). A page with multiple aliases shows a version selector. To show one version on a dedicated docs page, use ->version('v2'). When neither option is configured, the plugin discovers all named Scramble APIs automatically. If only Scramble's default API exists, the plugin keeps the existing single-document behavior and uses ->scrambleGenerator('default').

Use a unique plugin ID when registering more than one docs page.

Available Options

Method Config key Description
slug() slug Changes the Filament page slug.
navigationLabel() navigation.label Changes the navigation label.
navigationIcon() navigation.icon Changes the navigation icon.
navigationGroup() navigation.group Places the page in a navigation group.
navigationSort() navigation.sort Controls navigation ordering.
navigationBadge() navigation.badge Shows version, count, or no badge with null.
navigationBadgePrefix() navigation.badge_prefix Adds text before the badge value.
navigationBadgeSuffix() navigation.badge_suffix Adds text after the badge value.
subNavigationPosition() sub_navigation.position Uses left or right endpoint navigation.
title() page.title Overrides the page title.
description() page.description Overrides the page description.
enabledInProduction() page.enabled_in_production Registers the docs page in production.
fullWidth() layout.full_width Uses Filament's full-width page layout.
requestSamples() request_samples.enabled Enables or disables snippets and request testing.
developerOptions() request_samples.developer_options Enables developer mode for custom headers and query parameters.
defaultServer() request_samples.default_server Sets the default server for generated requests.
scrambleGenerator() scramble.generator Selects the Scramble generator name.
versions() — Explicitly lists named Scramble APIs for a version selector.
version() — Restricts this docs page to one Scramble API.

Supported navigation badge modes are version, count, and null.

The docs page is hidden in production by default. Enable page.enabled_in_production or call enabledInProduction() only when trusted production panel users should be able to access API documentation.

Developer options are disabled by default. Enable them when dashboard users should be able to toggle developer mode and add or edit custom request headers and query parameters.

Translations

The package ships with UI translations for all 62 locales currently shipped by Filament Panels. It uses Laravel's current locale and fallback locale.

Supported Locales

The package supports the following locale codes:

am, ar, az, bg, bn, bs, ca, ckb, cs, da, de, el, en, es, et, eu, fa, fi, fr, he, hi, hr, hu, hy, id, it, ja, ka, km, ko, ku, lt, lus, lv, mk, mn, ms, my, nb, ne, nl, pl, pt, pt_BR, ro, ru, sk, sl, sq, sr_Cyrl, sr_Latn, sv, sw, th, tr, uk, ur, uz, vi, zh_CN, zh_HK, and zh_TW.

If a translation is unavailable in the active locale, Laravel resolves it through APP_FALLBACK_LOCALE.

Switching the Active Locale

For example, configure Ukrainian as the active locale and English as its fallback:

OpenAPI content from your specification, such as endpoint summaries, descriptions, schemas, examples, and server URLs, is rendered as provided by the specification.

Customize Package Translations

Publish the translation files when you want to customize labels or add your own locale:

Published files are placed in:

To add a new locale, create a directory such as lang/vendor/filament-openapi-docs/eo/ui.php, copy the structure from resources/lang/en/ui.php, and translate only the values. Keep the array keys unchanged.

To update local overrides after a package upgrade, compare the newest package resources/lang/en/ui.php file with your files in lang/vendor/filament-openapi-docs/{locale}/ui.php and copy any missing keys. Use vendor:publish --tag=filament-openapi-docs-translations --force only when you intentionally want to replace local customizations.

Custom Spec Providers

Scramble is the supported and tested OpenAPI source. If you need to load a specification from another source, you may bind a custom provider through the config file, but non-Scramble providers are not tested by this package yet.

Your provider must implement Alexkramse\FilamentOpenapiDocs\Support\SpecProvider:

Then update config/filament-openapi-docs.php:

Assets

The package follows Filament's asset manager conventions:

For application installation and deployment, run:

For local package development, rebuild package assets after changing files in resources/js or resources/css:

You do not need to run npm run build in a consuming Laravel application unless you are developing this package locally or changing its frontend source files.

Security Notes

This package is intended for trusted dashboard users. The request sender can send custom headers, parameters, auth values, and request bodies from the browser.

You can disable request samples and request testing while keeping the documentation page:

Support

If this package helps you, consider supporting its development:

Bug reports and feature requests are welcome in the issue tracker.

About Me

Senior Laravel and Full-Stack Developer focused on building applications from scratch, modernizing legacy systems, and creating practical solutions that improve business operations.

I like a pragmatic approach to well-optimized code, efficient database queries, use coding best practices and principles.

Available now for remote full-time, part-time, and freelance opportunities in Laravel, PHP, Filament, API development, backend engineering, and application modernization.

If you need someone to build, maintain, modernize, and evolve production-ready software, I’d be glad to connect.

LinkedIn: Connect with me on LinkedIn

License

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


All versions of filament-openapi-docs with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
dedoc/scramble Version ^0.13.30
filament/filament Version ^4.0 || ^5.0
spatie/laravel-package-tools Version ^1.16
illuminate/contracts Version ^11.0 || ^12.0 || ^13.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package alexkramse/filament-openapi-docs contains the following files

Loading the files please wait ...