cyclosproject / ng-openapi-gen

An OpenAPI 3.0 codegen for Angular
MIT License
403 stars 134 forks source link

float/int not converting to number type #300

Closed GeorgeKnap closed 1 year ago

GeorgeKnap commented 1 year 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 1 year ago

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