PHPackages                             jdifool/tempest-openapi-tools - 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. jdifool/tempest-openapi-tools

ActiveLibrary[API Development](/categories/api)

jdifool/tempest-openapi-tools
=============================

OpenAPI tools for Tempest PHP.

02PHP

Since Dec 25Pushed 4mo agoCompare

[ Source](https://github.com/jdifool/tempest-openapi-tools)[ Packagist](https://packagist.org/packages/jdifool/tempest-openapi-tools)[ RSS](/packages/jdifool-tempest-openapi-tools/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

OpenAPI tools for Tempest PHP
=============================

[](#openapi-tools-for-tempest-php)

OpenAPI specification generator and interactive documentation UI for the Tempest framework.

Requirements
------------

[](#requirements)

- PHP 8.4+
- Tempest framework v2.0

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

[](#installation)

```
composer require jdifool/tempest-openapi-tools
```

Features
--------

[](#features)

- Generate OpenAPI specification from PHP code annotations using [zircote/swagger-php](https://github.com/zircote/swagger-php)
- Serve OpenAPI spec dynamically via HTTP endpoint
- Interactive API documentation with Swagger UI or Scalar

Usage
-----

[](#usage)

### Command Line

[](#command-line)

Generate an OpenAPI specification file:

```
./tempest openapi:generate
./tempest openapi:generate --path=src --output=public/openapi.json
```

### HTTP Endpoints

[](#http-endpoints)

The package registers two routes (configurable):

RouteDescription`/documentation/openapi.json`OpenAPI specification (JSON)`/documentation/openapi`Interactive API documentation UIConfiguration
-------------

[](#configuration)

Create `openapi.config.php` in your project:

```
