PHPackages                             eugene-erg/open-api - 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. eugene-erg/open-api

ActiveProject[API Development](/categories/api)

eugene-erg/open-api
===================

OpenApi Builder

1.0.0(1y ago)09MITPHPPHP ^8.3

Since Aug 5Pushed 1y ago1 watchersCompare

[ Source](https://github.com/EugeneErg/OpenApi)[ Packagist](https://packagist.org/packages/eugene-erg/open-api)[ RSS](/packages/eugene-erg-open-api/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (3)Versions (2)Used By (0)

eugene-erg/open-api
===================

[](#eugene-ergopen-api)

`eugene-erg/open-api` is a PHP package designed to facilitate the creation of OpenAPI configurations in an object-oriented manner. This package allows developers to define and manage OpenAPI schemas, security schemes, and other components using a clean and expressive API.

Features
--------

[](#features)

- **Object-Oriented Configuration**: Define OpenAPI schemas, security schemes, and components using PHP classes and objects.
- **Rich Schema Support**: Create complex schemas for `integer`, `number`, `string`, `boolean`, `object`, and `untyped` data types.
- **Security Schemes**: Support for multiple security schemes including `API Key`, `Bearer`, and `OAuth2`.
- **Flexible Builders**: Use builder classes to create and manage schemas and security schemes.

Advantages
----------

[](#advantages)

- **Type Safety**: Leverage PHP’s strong typing for more robust and error-free code.
- **Readability**: The object-oriented approach makes configurations more readable and maintainable.
- **Extensibility**: Easily extend and customize components as needed.

Comparison
----------

[](#comparison)

Featureeugene-erg/open-apiOther Popular PackagesObject-Oriented APIYesVaries (often procedural)Schema DefinitionYes (detailed support)Limited or requires manual setupSecurity Scheme ConfigurationYes (OAuth2, API Key, Bearer)Varies, often less flexibleBuilder ClassesYesLimited or non-existentInstallation
------------

[](#installation)

To install the package, run the following command:

```
composer require eugene-erg/open-api
```

Usage
-----

[](#usage)

Creating Schemas

```
