* [PHP] ObjectSerializer fix for array of objects
Array of objects translate to "map[string,object][]" and they fail to deserialize. This is because the deserialization does not parse the mapping string correctly. A quick fix is trying moving array deserialization before object deserialization.
Example object
ObjectExample:
type: object
properties:
data:
type: array
items:
type: object
additionalProperties: true
* Update sample
Co-authored-by: Alexandru Negrila <alex@arntech.ro>
* Bump PHP version to 7.1 in readme
* Bump PHP version to 7.1 in class templates
* Remove HHVM from Travis CI config
PHPUnit dropped support of hhvm, so build unlikely will pass tests.
https://github.com/sebastianbergmann/phpunit/issues/3320#issuecomment-426325646
* Remove sudo: false from Travis-CI config
Official doc recommendation:
https://docs.travis-ci.com/user/reference/trusty/#container-based-infrastructure
* Change tested versions to 7.1, 7.2 in Travis-CI
* Remove PHP_CodeSniffer from dev dependencies
There is another linter(PHP CS Fixer) which is fully configured while
CodeSniffer isn't configured at all.
* Use caret instead of tilde in dependencies
^2.12 equals (>= 2.12.0 && <3.0.0) while ~2.12 is (>=2.12.0 && <2.13.0)
* Refresh samples
* fix php tests
* fix scala tests
* update ts angular v6 rest
* fix user create test
* fix spring cloud test
* comment out user delete
* fix angular v7 tests
* fix user test
* fix tests
* fix go exp tests
* commented out delete user tests
* comment out delete user tests in go openapi 3
* fix clojure tests
* Example of broken multi-level hierarchy
* Support for multiple levels of hierarchy in model objects
* Support for multiple levels of hierarchy in generators
* Regenerated samples
* Temporarily skip scalaz sample verification, which is having issue with Java version in CI container
* Re-enable scalaz in verify samples
Co-authored-by: Rob Oxspring <roxspring@imapmail.org>
* [PHP] Correctly format JSON in headers
`ObjectSerializer::toHeaderValue()` in the generated PHP code calls
`toString()` on the values, which formats JSON with the `JSON_PRETTY_PRINT`
option. This will result in a multi-line header which cannot be parsed
since linebreaks aren't allowed by RFC 7230.
In my case I have a header schema called `UpdateUser` which I had hoped
would be serialized as `{"type":"staff","id":123}`.
Every single `__toString()` in the generator does the same thing, so I
figured it's safe to change `toHeaderValue()` to convert to JSON directly,
without `JSON_PRETTY_PRINT`. This fix works for me.
* More sensible approach to providing a header value
* Just strip the newlines
* Go back to previous solution
* fixed bug where nullApi.java would be generated. Instead, generated DefaultApi.java to match the default path /{pathParam}
* fix to bug #3157
* update samples