swagger-codegen icon indicating copy to clipboard operation
swagger-codegen copied to clipboard

[Typescript-Angular]DataType Number and its equivalent in typescript-angular

Open vidyas78 opened this issue 8 years ago • 1 comments

Description

YAML file had a data field defined as type "Number", when we generate client code for typescript-angular, this got generated as "BigDecimal" with the below import statement, import { BigDecimal } from './bigDecimal';

What is the equivalent data type for Number in typescript. How to overcome this error type.

Swagger-codegen version

3.0.0 SNAPSHOT

Swagger declaration file content or url
Command line used for generation
Steps to reproduce

Generate ts file lines of code,

import { BigDecimal } from './bigDecimal';

/**

  • A descriptor for a parameter. */ export interface Sample {

    /**

    • The name . */
      name?: string;

    /**

    • The value . */
      value?: BigDecimal; }
Related issues/PRs
Suggest a fix/enhancement

vidyas78 avatar Oct 16 '18 20:10 vidyas78

We have the same problem on Swaggerhub with openapi: 3.0.0

hokkaido avatar Oct 23 '18 12:10 hokkaido