php-openapi

Read and write OpenAPI yaml/json files and make the content accessible in PHP objects.

MIT License

Downloads
11.2M
Stars
456
Committers
26
php-openapi - Version 1.7.0 Latest Release

Published by cebe over 2 years ago

Improvements:

  • Support for PHP 8.1, thanks @om4csaba, @shadowhand, @simPod
  • #160 Flags for json_encode() in Writer::writeToJson(), thanks @ValikoDorodnov
php-openapi - Version 1.6.0

Published by cebe over 2 years ago

Bugfixes:

  • #100 Fixed a bug with merging PathItems where extension properties (x-*) were not present in the merge result (thanks @marcelthole)
  • #131 Adjust default value for Schema::$nullable when no type is specified. nullable will be false by default when a type is specified but null when no type is specified.
  • #77 Fixes default value for exclusiveMinimum and exclusiveMaximum only return false when minimum or maximum is specified, defaults to null otherwise.
  • #125 Fix OpenAPI v3.0 Schema Violation: Array value found, but an object is required (thanks @om4james)
  • #119 Stricter type checking when resolving references, avoid trying to call methods on array
  • #144 Catch recursion when resolving inside included file

Dependencies:

  • #151, #134 Add Symfony 6 support (thanks @om4csaba)

Other changes:

  • Reworked CI (thanks @simPod)
  • Added Docker environment for local development
php-openapi - Version 1.5.2

Published by cebe over 3 years ago

Bugfixes:

  • #87, #102 Fix PathItem::resolveReferences() for array fields, a PHP Notice had been thrown (thanks @iZucken and @rv1971)
  • #107 Inline references does not resolve relative references (thanks @marcelthole)
  • #95 Adjust relative URLs for externalValue fields in Example Objects when inlining references.

Documentation:

  • Fixed typos in README and CLI help (thanks @ssfinney)
php-openapi - Version 1.5.1

Published by cebe over 3 years ago

Bugs

  • #94 Fixed resolving relative paths with multiple ../ (thanks @il-m-yamagishi)

Documentation

  • #98 Added PHPStan Template annotations (thanks @marcelthole)
  • #96 Added missing exeption annotation to readFromJsonFile() (thanks @yorickgirard)
php-openapi - Version 1.5.0

Published by cebe almost 4 years ago

Improvements:

  • Overall performance improvements and other optimization for loading references
  • #63 Added option to only resolve external references (inlining)

Bugfixes:

  • #74 Fix PHPDoc for exclusiveMinimum and exclusiveMaximum to boolean (thanks @canvural)
  • #92 Resolving references to external files did not work correctly on windows (thanks @Insolita)

Other changes:

  • #80 Changed minimum Symfony YAML version from 3.0 to 3.4 (thanks @marcelthole)
  • #83 Tests are green on PHP 8 (thanks @canvural)
php-openapi - Version 1.4.2

Published by cebe over 4 years ago

  • #61 Allow Symfony YAML 4.4 to be installed
php-openapi - Version 1.4.1

Published by cebe over 4 years ago

  • #68 Fix: Crash with unresolved reference while instantiating Encoding (@karsa-mistmere)
php-openapi - Version 1.4.0

Published by cebe over 4 years ago

  • #56 Added compatibility with symfony/yaml:^5.0
  • #49 Static Analysis using phpstan (@lookyman)
  • #53 Added extra validation messages for parameters (@lezhnev74)
  • #43 Improved command-line-tool output of bin/php-openapi validate (@mfrischbutter)
  • #42 Added --silent parameter to command-line-tool (@mfrischbutter)
  • #46, #52 Fix writing empty arrays to YAML file (@coatesap)
php-openapi - Version 1.3.4

Published by cebe over 4 years ago

  • #57 Fix transitive reference resolving in the current document context
php-openapi - Version 1.3.3

Published by cebe almost 5 years ago

  • #44 Fix recursion issue with reading references which are included multiple times
php-openapi - Version 1.3.2

Published by cebe almost 5 years ago

  • #47 Fixed crash when referencing a non-spec object or array
php-openapi - Version 1.3.1

Published by cebe almost 5 years ago

  • #41 Fixed an issue with loading references that point to a reference in another file.
php-openapi - Version 1.3.0

Published by cebe about 5 years ago

  • #35 Symfony YAML is not limited to version 4 anymore, you can now install php-openapi in your symfony 3 project.

  • #32 References failed to resolve in directory structures when referencing other files from file in subdirectories. These references where resolved in the context of the main OpenAPI file instead of the sub-directories.

    Before this change it was necessary to manually call resolveReferences() after loading a file.
    Now a single call will resolve all references regardless how many levels deep.

php-openapi - Version 1.2.1

Published by cebe about 5 years ago

  • #33 Ensure semantics of empty array and null are correctly presented for security objects.
  • #37 Fixes the problem that undefined properties did throw errors when they are accessed, now their default values are returned.
  • Improved error messages when reading or writing files fails.
php-openapi - Version 1.2.0

Published by cebe over 5 years ago

php-openapi - Version 1.1.0

Published by cebe over 5 years ago

This release brings the following changes:

  • #30 Added separate classes to implement JSON Reference and JSON pointer
  • #30 Improve error handling and document navigation by providing each object with context information.
    Context information contains the base document and the JSON pointer to the objects position in the document.
    This can be used to navigate to parent and sibling elements easily. Such navigation was not possible before.
    It also allows for more convenient error reporting as the errors are annotated with their position in the document.
  • #29 Fixed handling of recursive structures in Schema definitions.
  • correct PHPDoc for properties @property-read was used even though properties are writeable now.
php-openapi - Version 1.0.1

Published by cebe over 5 years ago

This release brings the following changes:

  • #24 Added array type to the list of constants in Type class (thanks, @scaytrase)
  • #22 Fixed normalisation of URIs on windows (thanks, @scaytrase)
  • #27 Improved overall Windows support and added tests for Windows
php-openapi - Version 1.0.0 (this thing should be stable now!)

Published by cebe over 5 years ago

OpenAPI v3 got a JSON Schema for validating OpenAPI 3 documents (https://github.com/OAI/OpenAPI-Specification/pull/1270 and https://github.com/OAI/OpenAPI-Specification/pull/1897).

This release adds a CLI tool for validating OpenAPI 3 documents against the JSON schema.

Bildschirmfoto von »2019-04-19 15-46-13«

Other improvements:

  • #19 improves handling of default values
  • #18 enables modifying and writing the schema
php-openapi - 0.9.3-beta

Published by cebe over 5 years ago

  • Bug 03c5e82 fix resolving references to a file without jsonPointer
  • Enh 2f1f736 allow settings context on references without resolving these (lazy resolving of references)
php-openapi - 0.9.2-beta

Published by cebe almost 6 years ago

  • 4018163 fix support for references in Responses object
Package Rankings
Top 0.61% on Packagist.org
Badges
Extracted from project README
Build Status