cyclosproject / ng-openapi-gen

An OpenAPI 3.0 codegen for Angular
MIT License
397 stars 132 forks source link

float/int not converting to number type #300

Closed GeorgeKnap closed 11 months ago

GeorgeKnap commented 11 months ago

one of ou API endpoints (openapi 3.0.0) defined a model property as

"max": {
                        "type": "float"
}

it was generated by ApiPlatform from annotation #[OA\Property(type: 'float')]

In Angular it was generated in inteface as max?: float;

This breaks compiler as it should be a number type in typescript.

luisfpg commented 11 months ago

Those are not valid openapi 3 types. See https://swagger.io/docs/specification/data-models/data-types/