utopia-php/openapi
Framework-independent OpenAPI 2.0, 3.0, and 3.1 parser with an immutable canonical model
0.2.0
9.3K downloads/mo
#4450 most downloaded on Packagist
utopia-php/openapi
What this package is like to depend on
Last release 2 days ago
21 Aug 2026
Too new to tell
only 1 release windows
Nearly every release is documented
notes for 7 of 7 stable releases
Nothing withdrawn
no release was ever pulled
0 months old
7 releases · first in 2026
7 releases in the last 12 months
see the full history below
Release timeline
7 releases · Aug 2026 to Aug 2026Releases
latest 7-
0.2.021 Aug 2026Release notes
Open source →- Map annotated string enumerations onto synthesized
StringSchemametadata while preserving theirCompositeSchematree. - Add
CompositeSchema::stringEnum()for closed and open annotated enums. - Derive enum type names from composite titles and value names from branch titles.
- Keep vendor extensions opaque instead of interpreting enum metadata from
x-enum-nameandx-enum-keys. - Reject malformed annotated enum unions with source JSON Pointer context.
This is a breaking release. Consumers using enum vendor extensions should migrate their specifications to annotated enumerations before upgrading.
- Map annotated string enumerations onto synthesized
-
0.1.520 Aug 2026Release notes
Open source →- Preserve empty enum-key lists as the signal to derive identifiers.
- Continue rejecting partial non-empty enum-key mappings.
-
0.1.420 Aug 2026Release notes
Open source →- Preserve typed enum metadata for OpenAPI 2 inline parameters.
- Reject partial enum-key mappings.
- Restrict open-enum recognition to unrestricted string branches.
-
0.1.320 Aug 2026Release notes
Open source →- Expose typed enum names and keys on
StringSchema. - Preserve open string-enum provenance on extracted enum branches.
- Validate every
x-enum-keysentry as a string.
- Expose typed enum names and keys on
-
0.1.220 Aug 2026Release notes
Open source →What's changed
- Expose the enum-bearing branch for open string enum
anyOfschemas throughCompositeSchema::openStringEnumBranch().
Full changelog: 0.1.1...0.1.2
- Expose the enum-bearing branch for open string enum
-
0.1.119 Aug 2026Release notes
Open source →Changed
- Stop interpreting the unofficial
x-nullableextension as schema nullability. - Preserve
x-nullableonly as an uninterpreted vendor extension where extensions are captured.
- Stop interpreting the unofficial
-
0.1.014 Aug 2026Release notes
Open source →First tagged release.
A framework-independent OpenAPI parser with an immutable canonical model. A 2.0, 3.0 or 3.1 document reads into the same
Specificationshape, so consumers do not branch on the source version.What it gives you
- One model for three versions.
Utopia\OpenAPI\Parser::parse()detects the version and returns aSpecification. A Swagger 2 document and the OpenAPI 3.1 document describing the same service produce the same shape. - Typed schemas. One class per kind —
ObjectSchema,ArraySchema,StringSchema,CompositeSchema,ReferenceSchema, and so on — all extendingSchema, all readonly. - References left intact. A
$refbetween schemas is preserved as aReferenceSchemarather than expanded, because recursive schema graphs are legal. Object references (parameters, responses, examples, security schemes) are resolved. - Extensions preserved. Any
x-prefixed key is captured on every model that can carry one, and never interpreted. - Located errors. Parse failures name their position as a JSON Pointer, so a bad value is traceable to where it came from.
Requirements
PHP 8.5+,
ext-json.Install
composer require utopia-php/openapi - One model for three versions.