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.
- 202 responses can now return a body.
- Removed PHP
7.2
and7.3
from Travis includes
- Changed Requirements section in README.md
- Updated PHP version requirement from
^7.2
to>=7.4
- Updated
sebastian/diff
dependency from^2.0
to^4.0
- Updated
phpunit/phpunit
dependency from^6.5
to^9.4
- Removed
sensio/distribution-bundle
dependency - Updated composer scripts
- MAC authentication support in client factory configuration
- PHP version requirement in composer.json changed from ">=7.2" to "^7.2"
- Fixed authentication type comments in README templates (changed "it API" to "if API")
- Changed TypeScript interface declarations to class declarations in .d.ts files
- Added export keyword to interface declarations in .d.ts files
- Updated @paysera/http-client-common dependency to "^2.6.4"
- exports for properties
- methods types export to type declaration
- library
paysera/lib-rest-client-common
version bump to 2.6.4
- Added requirements to readme
- Updated dependencies
- Added options for defining
library_version
andplatform_version
- Added library version and platform version to composer.json and package.json
apiClient
property is changed from private to protected, to be able to extend factory class
Paysera.File
now gets properly generated.
- Removed demo generation from js client.
- Generate tree shakable js clients. JS skeleton based on github.com/paysera/js-lib-skeleton.
exec: raml-code-generator: not found
bug fixed forrelease:clients
command
- Fix generated php method return type when using annotation
(stream_response)
- Support content type
text/csv
- Support stream response by using annotation type
(stream_response)
in raml method
- Wrong new release version for javascript clients
- Generate clients with
"evp/money": "^1.0 || ^2.0"
. - Support filters without any own fields, just inherited.
- The compiled
raml-code-generator.phar
command now does not report any errors.
- Use another encrypted Travis CI token, as encryption is related to the repository.
N/A (empty version)
- Requires at least PHP 7.2, updates used internal libraries.
- Use
rawurlencode()
instead ofurlencode()
for encoding URL arguments when generating PHP clients. - Bring back the generation and upload of
raml-code-generator.phar
when creating a release. Now the process is automated.
release:clients
ability to delete old source files that are not present in generated files
php-generator:rest-client
now can correctly generate API methods, which uses plainMoney
as argument
- Removed angular-js client wrapper and
angular
as a dependency.
- Experimental
index.d.ts
generation for JS clients.
release:clients
command now overwrites dependencies
- Removed not necessary static method to get all available entity enum values.
- Properties in Javascript entities which hold enums, generates as static properties.
- Ability to provide method name with
(generator_method_name_override)
annotation
- In JS package generator replaced
phar
file withbin/console
- File entity for application/octet-stream content type (only for js client)
- raml-code-generator phar
- URI Generation of urls with multiple params - /smt/{p1}/{p2}/{etc.}
- Support of
file
property type
- In JS package generator use
TypeConfigurationProvider
to properly createMoney
from response.
- In JS package generator property remove namespaces of imported libraries.
- Do not singularize words shorter or equal than 3 chars
- In
ReplaceFilesStep
switchedgetSourceDir
togetGeneratedDir
. - Added missing
sprintf
argument.
- In
ReplaceFilesStep
provide custom Iterator to skip VCS files removal.
- Fixed
file not found
warning when creating new package. - Added
package-lock.json
to ignored files when comparing changes.
- Removed
.
from.babelrc.json.twig
as such naming causedThere are no registered paths for namespace "__main__".
errors in Phar env.
- Escaping reserved keywords, like
public
injavascript
- Ability to return Paysera.Money as a response of an endpoint, not only to use it as property of another type.
- Added
release:clients
command - it automates RAML client generation, repository cloning and other manual stuff. - Improved readme.
- Support or
url_parameters
: https://github.com/raml-org/raml-spec/blob/master/versions/raml-10/raml-10.md#base-uri-and-base-uri-parameters Defaults will be used from RAML spec, if missing - exception will be thrown. You should pass required url parameters aroptions
- Restored backwards-compatibility with
paysera/lib-rest-client-common 1.0
inClientFactory__construct()
.
- JS and PHP clients now support scalar items type in Results.
php-generator:symfony-bundle
added tophar
- support of raml date formats.
- support of
luxon
injs
client for date handling.
- In
js
removedDateFactory.js
in favour ofluxon
.
- In
js
client all date instances now areDateTime
fromluxon
.
php client
generated clients now supportspaysera/lib-rest-client-common 2.0
. Clients will havewithOptions
method. Be aware that you needpaysera/lib-rest-client-common 2.0
to use this method.
php-generator:symfony-bundle
command now generates Symfony Bundle with most of API-specific classes configured.
- paths like
/resources/{id}/{verb-ish-word}
are treated as verbs if word can have verb meaning in WordNet db.
- Generated Javascript clients for
Money
type are using the@paysera/money
library now.
Money
properties now are stored as arrays ofamount
andcurrency
, not as two separate properties foramount
andcurrency
.
SQLSTATE[HY000] [14] unable to open database file
is not fixed -sqlite://phar://raml-code-generator.phar/app/Resources/word_net_sqlite-31.db
seems to be invalid path to Sqlite database, so it is copied to temp dir.
- Properly generates return types and return values of arrays. Previously instead of array,
null
was returned.
- Changes made to how singular/plural method names are resolved. Now if response is iterable and request method is
GET
- it should be in plural. PHP code generator
andJS code generator
now expects 3 arguments:- 1 - path to
raml
file - 2 - path to directory where to put generated code
- 3 - Client name in case of
JS code generator
and Client namespace in case ofPHP code generator
- 1 - path to
API name
now is resolved fromnamespace
in case ofPHP code generator
and fromclient_name
in case ofJS code generator
.
- Non-required properties now properly returns
null
. Previously instance of return type was created with no data.
- Support of
Libraries
- https://github.com/raml-org/raml-spec/blob/master/versions/raml-10/raml-10.md/#libraries - Support of 3-rd party types. Now it is possible to configure specific type pattern, for which
Entity
will not be generated, but instead imported from configured library.
- Inheritance in
Entities
andFilters
.- Generated
Entities
will extend class described in it's RAMLtype
facet. - Generated
Filters
will extend first class in it's RAMLis
facet. If nois
facets provided, generatedFilter
will extend baseEntity
.
- Generated
- Support of Discriminated types - https://github.com/raml-org/raml-spec/blob/master/versions/raml-10/raml-10.md#using-discriminator
- Both PHP and JS generators no longer generates base filters (matches
Filter
name) if there are both base filters and normal filters defined or more.
- Added support of
application/javascript
content-type. Returns string. - Added support for non-filter Traits.
- Generated javascript Entities now properly includes used Entities.