All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
- RFC 6839 support: Content types with
+jsonsuffix (e.g.,application/vnd.api+json,application/hal+json,application/problem+json) are now recognized as JSON-based formats
- Fixed content type construction parameter generation - issue #128, fixed
- with multiple content type values
- with content type value received from parameters
- Enum with invalid PHP constant value
- README.md with multiline description in operations
- Acessing nullable enum with
?->valueinstead of->value?->value
- Support for array of enum elements in Schemas
- Support for OpenAPI 3.1
- cebe/php-openapi dependency to devizzent/cebe-php-openapi
- avoid having
&in request body when usingapplication/x-www-form-urlencoded
Specification::getVersion()method, which optionally might be used in a composer.json.twig"version": "{{ specification.getVersion() }}"
- Array to string conversion in maxItems in minItems constraints
INCLUDE_TAGSandEXCLUDE_TAGSto whitelist/blacklist client generation based on operation tags
- Enums for path parameters
- Readonly properties (php 8.1)
- Enums (php 8.1)
- Missing DateTimeInterface import for php 8.1+
- Added support for php 8.1, 8.2, 8.3 constraints
- operationId containing dashes is converted to camel case
- Api key authentication strategy added
- X-WSSE authentication strategy added
oneOfschema support
- Added generated code support for php 8.0
- php-cs-fixer rules
not_operator_with_successor_space,phpdoc_to_comment,native_function_invocation
- Added support for multiple responses
- Added support for PHP 8
- Added missing null check for optional nullable object mapping
- Avoid new DateTimeImmutable(null) - adding support for nullable optional datetime
- OpenAPI spec copied forcefully to destination directory
- support for guzzlehttp/psr7 version 2.0 to generated composer.json
- null verification for nullable properties before validating constraints
- support for optional nullable scheme properties
- docler-labs/api-client-exception v2 to generated composer.json
- Generator now fails if field in spec is nullable and optional (unsupported feature)
- Nullable is now supported with allOf
- Return type for ::toSchema cannot be nullable
- Added support for non string enums (no constant for enum value is generated in this case)
- API Client Generation triggers a full regeneration of src folder.
- Basic Authentication strategy added
- Bearer Authentication strategy added
- Request parameters with same name but different $ref should not override each other
- ext- in generated clients composer.json is added according to what is actually being used
- Changed default php-cs-fixer configuration to remove blank lines after class opening, according to PSR12 (
no_blank_lines_after_class_opening)
- Remove virtual package dependency (psr/http-client-implementation)
- Changed default php-cs-fixer configuration to add blank line after opening tag, according to PSR12 (
blank_line_after_opening_tag)
- Support for free-form object in response
- Added
ext-intlto composer.json. It was missing since 7.0.0.
- Using
grapheme_strlento properly count string lengths.
- The array of serializers in BodySerializer depends on both requests and responses content type
- Fix preg_match pattern by adding a slash (/) as a delimiter.
enumtype are not anymore validated from generated client side.
nullable: truefor mandatory $ref was not checking for null before trying to map
- Support for
application/vnd.api+jsonMIME type.
- Minimum and Maximum constraints work for floats
- Api Client Generator version to README generation
- Support for
defaultproperty on required request parameters.
- Support for
licenseinfo. Use it in the default composer.json tpl.
- Support for
mixedparameter type - Support for anyOf
mixedparameter type
mixedarrays rendered incorrectly- Wrong typehint in case of nullable arrays
- Support for
minimum,maximum,exclusiveMinimum,exclusiveMaximum,minItems,maxItems,pattern,maxLength,minLengthvalidations
- Example generated with 7.4
- Only content type serializers which are used are included
- By default, the PHP version used in the generated client is 7.4.
- Acceptance test to generate example from canonical pet store OpenApi specification
- Content-type argument if multiple specified for request
- Literal type JSON response body
- Multiple content-type per request and response with the same schema allowed
- Changed non-existing successful response error to a warning
- Nullable mandatory DateTime properties in schema now work correctly without doing
new DateTimeImmutable(null) - Proper nullable typehint and default value in properties for 7.4 schemas to avoid non initialized errors
- Changed default php-cs-fixer configuration to remove superfluous docblocks, to improve generated code readability
- Makefile with standard routines to easy development / contribution (run tests, analyse code, fix code style)
- Guzzle 6/7 dependency removed altogether in favor of PSR-18 interfaces for Http Client
- Breaking change!
*ClientFactorydoes not accept URI and Guzzle configuration anymore, but rather PSR-18 implementation - Guzzle 6/7 CookieJar dependency removed in favor of simplified CookieJar class
DateTimeInterfaceserialization inQuerySerializer
- Query parameters which implement
JsonSerializablewill be converted accordingly.
- Fix collections
toArraydocblock
- Schemas implement
JsonSerializableto be easily encoded with nativejson_encode
- Fix/improve Progress Bar output
- Collection methods use property
itemsdirectly, without callingtoArray
- Fix
Content-typeheader handling.
- Serialize items from collection manually, since
json_encodewon't calltoArrayautomatically as it used to do withjsonSerialize
- Send
RequestInterfaceinstance to Guzzle instead ofServerRequestInterface
- Request object is immutable so must be assigned back when using
withmethods
- Progress bar added
- PHP version dependant syntax resolution
- PHP version 7.2, 7.3 support
- Service provider generator added
- Content-type property added to the Request
- Request mapper generator added
- Specification file is copied to the client directory
- Breaking change! getResponse request renamed to sendRequest and return PSR7 ResponseInterface instead of DoclerLabs\ApiClientBase\Response\Response
- Most of the static code copied to the client instead of depending on docler-labs/api-client-base
- Headers removed from default Guzzle config
- Http client implementation abstracted behind PSR-17 interface
- Http message implementation abstracted behind PSR-7 interface
- Container implementation abstracted behind PSR-11 interface
- Source directory name is configurable
- Json and form-encoded serializers instead of built-in json
- SerializableInterface added
- ResponseMapper renamed to SchemaMapper
- Client dependencies initialization moved to service provider
- OperationId is no longer mandatory
- CS Fixer fails on invalid generated PHP file
- Nullable fields schema mapper fix
- Naming collisions in embedded objects handled
- docler-labs/api-client-base updated to 3.0.0
- Response 'data' key handling from
Response.
- docler-labs/api-client-base updated to 2.0.0
- The
getResponsemethod exposed in the generated Client class. Could be used to retrieve response headers.
- README.md meta template
- Any number of allOf schemas allowed
- allOf schemas joined to one schema without inheritance
- Response mapper invocation reused in the client factory
- Empty object handling
- Fix for date and date-time fields parsing
- Initial API client generator release