Skip to content

Releases: utopia-php/openapi

0.2.0

Choose a tag to compare

@ChiragAgg5k ChiragAgg5k released this 21 Aug 04:57
d74fe62
  • Map annotated string enumerations onto synthesized StringSchema metadata while preserving their CompositeSchema tree.
  • 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-name and x-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.

0.1.5

Choose a tag to compare

@ChiragAgg5k ChiragAgg5k released this 20 Aug 16:03
0d95889
  • Preserve empty enum-key lists as the signal to derive identifiers.
  • Continue rejecting partial non-empty enum-key mappings.

0.1.4

Choose a tag to compare

@ChiragAgg5k ChiragAgg5k released this 20 Aug 15:59
a69a897
  • Preserve typed enum metadata for OpenAPI 2 inline parameters.
  • Reject partial enum-key mappings.
  • Restrict open-enum recognition to unrestricted string branches.

0.1.3

Choose a tag to compare

@ChiragAgg5k ChiragAgg5k released this 20 Aug 15:21
fa12ba2
  • Expose typed enum names and keys on StringSchema.
  • Preserve open string-enum provenance on extracted enum branches.
  • Validate every x-enum-keys entry as a string.

0.1.2

Choose a tag to compare

@ChiragAgg5k ChiragAgg5k released this 20 Aug 13:35
84115cc

What's changed

  • Expose the enum-bearing branch for open string enum anyOf schemas through CompositeSchema::openStringEnumBranch().

Full changelog: 0.1.1...0.1.2

0.1.1

Choose a tag to compare

@ChiragAgg5k ChiragAgg5k released this 19 Aug 07:16
cb7367e

Changed

  • Stop interpreting the unofficial x-nullable extension as schema nullability.
  • Preserve x-nullable only as an uninterpreted vendor extension where extensions are captured.

0.1.0

Choose a tag to compare

@ChiragAgg5k ChiragAgg5k released this 14 Aug 07:24
5962baf

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 Specification shape, 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 a Specification. 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 extending Schema, all readonly.
  • References left intact. A $ref between schemas is preserved as a ReferenceSchema rather 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