A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/swagger-api/swagger-codegen/issues/9353 below:

[php] property of number type incorrectly typed as BigDecimal instead of float · Issue #9353 · swagger-api/swagger-codegen · GitHub

Description

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.

Swagger-codegen version

v3.0.7

Swagger declaration file content or url

The schema can be taken from a similar issue #8855

here is a part of my schema:

Command line used for generation
java -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

Related issues/PRs

#8855

Suggest a fix/enhancement

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