An object oriented approach to generating OpenAPI specs, implemented in PHP.
develop
branch. Instead all feature/hotfix branches should be based off of master
.test
script now makes reference to the individual test:style
and test:unit
scripts.autoload-dev
within the composer.json
file.$ref
can now be used in place of all objects.Components
object now supports all fields (with exception to callbacks).create()
static method has now been moved to the BaseObject
class with a return type also being BaseObject
. If you are extending any object classes and overriding the create()
method, then be sure to update your return type. DocBlock type hinting has been provided to indicate a static return type, so your IDE should still be able to provide autocompletion for child class members.composer.json
.composer.json
scripts.SecurityRequirement
object now accepts a single SecurityScheme
along with an array of scopes. This is because it was outputting incorrect data, and its purpose was misleading. It now acts as a way to specify a single SecurityScheme
along with any scopes. Any object that accepts a SecurityRequirement
object, always accepts an array of them, so you can still specify several SecurityScheme
objects by wrapping them in a SecurityRequirement
.Response
class now has helper methods for common HTTP responses.3.0.2
spec.create()
methods) now only accept the optional $objectId
parameter which is used in several scenarios.Paths
class and instead the OpenApi
class has a variadic paths()
method which takes any number of PathItem
instances.OpenApi
class is now immutable like all the other object classes.