PHPackages                             uuf6429/oas-php - 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. uuf6429/oas-php

ActiveLibrary[API Development](/categories/api)

uuf6429/oas-php
===============

OpenAPI Specification PHP implementation

v0.1-alpha(6y ago)02MITPHPPHP ^7.4

Since Mar 25Pushed 5y ago1 watchersCompare

[ Source](https://github.com/uuf6429/oas-php)[ Packagist](https://packagist.org/packages/uuf6429/oas-php)[ RSS](/packages/uuf6429-oas-php/feed)WikiDiscussions master Synced 1mo ago

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

OAS-PHP
=======

[](#oas-php)

[![Minimum PHP Version](https://camo.githubusercontent.com/0e9ac047546796cfdbe1423d1f4d91c8f37d2fbb11614a7900bb7686aaa5401f/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253345253344253230372e342d3838393242462e737667)](https://php.net/)[![License](https://camo.githubusercontent.com/7013272bd27ece47364536a221edb554cd69683b68a46fc0ee96881174c4214c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e737667)](https://raw.githubusercontent.com/uuf6429/oas-php/master/LICENSE)[![Packagist](https://camo.githubusercontent.com/3c1bb0e2bc166c1e667670c7d13ae50d95df9c3e6c8c1331b48e3d4c423dd5c9/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f757566363432392f6f61732d7068702e737667)](https://packagist.org/packages/uuf6429/oas-php)

OAS-PHP: PHP Implementation of the OpenAPI Spec.

This library is an implementation of the [OpenAPI v3 specification](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.3.md).

Usage
-----

[](#usage)

This library is just a bunch of value objects. The main entry point, (as is the case with the specification), is the **Document** class:

```
$document = new \uuf6429\OpenAPI\Spec\Document();
$path = new \uuf6429\OpenAPI\Path();
$document->paths->set('/resource', $path);
```

Rendering
---------

[](#rendering)

Ideally, it should be render with a YAML serializer (such as [symfony's](https://symfony.com/doc/current/components/yaml.html)). Since YAML is a superset of JSON, one can also do:

```
$document = new Document();
$json = json_encode($document, JSON_THROW_ON_ERROR | JSON_PRETTY_PRINT);

// save to file
file_put_contents('openapi.yaml', $json);

// or serve it out
header('Content-Type: application/x-yaml');
echo $json;
```

Why?
----

[](#why)

This library isn't better than the multitude of generators and whatnot out there. The idea is that existing and new PHP-based tools that handle OpenAPI could/should use this implementation instead of having their own version of OpenAPI spec.

###  Health Score

19

—

LowBetter than 10% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity2

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity42

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

2244d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/450767af6ef832ad662c169bf718d6d25c025c08b2d91b810959d190bccebba1?d=identicon)[uuf6429](/maintainers/uuf6429)

---

Top Contributors

[![uuf6429](https://avatars.githubusercontent.com/u/230049?v=4)](https://github.com/uuf6429 "uuf6429 (2 commits)")

---

Tags

oas3openapi3php7

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/uuf6429-oas-php/health.svg)

```
[![Health](https://phpackages.com/badges/uuf6429-oas-php/health.svg)](https://phpackages.com/packages/uuf6429-oas-php)
```

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M480](/packages/stripe-stripe-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M272](/packages/twilio-sdk)[knplabs/github-api

GitHub API v3 client

2.2k15.8M187](/packages/knplabs-github-api)[facebook/php-business-sdk

PHP SDK for Facebook Business

90121.9M34](/packages/facebook-php-business-sdk)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

73813.7M114](/packages/meilisearch-meilisearch-php)[google/gax

Google API Core for PHP

263103.1M454](/packages/google-gax)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
