Skip to content

[BUG] [typescript-axios] Property of number type incorrectly typed as BigDecimal #5919

@faheem00

Description

@faheem00
Description

When generating an openapi using the typescript-axios tool, a property with type as string and format as number generates a type BigDecimal for the generated api.ts file. However, the BigDecimal type does not exist.

example -

properties:
    example:
        type: string
        format: number

generated code -

/**
 * 
 * @export
 * @interface Example
 */
export interface Example {
    /**
     * Example
     * @type {BigDecimal}
     * @memberof Example
     */
    example?: BigDecimal;
}
openapi-generator version

1.0.12-4.3.0

Command line used for generation

node node_modules/@openapitools/openapi-generator-cli/bin/openapi-generator generate -i ./src/openapi.yaml -g typescript-axios -o ./lib -c ./config.json

Related issues/PRs

This may be related - Link to an issue in swagger-codegen

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions