When a schema as some properties of number type, they are typed as BigDecimal
instead of number in the exported model. In php it must be float
.
v3.0.7
Swagger declaration file content or urlThe schema can be taken from a similar issue #8855
Command line used for generationjava -jar swagger-codegen-cli.jar generate \
-i http://127.0.0.1:8980/swagger.json \
-l php \
-o .
Steps to reproduce
the result will be
class Price {
protected static $swaggerTypes = [
'currency' => 'string',
'value' => 'BigDecimal'
];
And it will throw an error Class 'BigDecimal' not found
float must be used instead of BigDecimal
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4