Hi everyone,
I noticed that if a property is set with a complex type (for example integer,null) that is allowed by OpenAPI spec, it is not converted as expected to the correct "number,null"
I guess the problem is in this line
|
return type === 'integer' ? 'number' : type; |
that is the only control. Probably the control should be changed to a regex match and replace. A quick and dirty proposal might be:
return "string" === typeof type ? type.replace(/^integer/, "number") : type;
I did not test this throughly but might work since once we have got to that line, most of the checks on the type have already been done
Hi everyone,
I noticed that if a property is set with a complex type (for example integer,null) that is allowed by OpenAPI spec, it is not converted as expected to the correct "number,null"
I guess the problem is in this line
ng-openapi-gen/lib/gen-utils.ts
Line 268 in c85bb58
that is the only control. Probably the control should be changed to a regex match and replace. A quick and dirty proposal might be:
I did not test this throughly but might work since once we have got to that line, most of the checks on the type have already been done