cyclosproject / ng-openapi-gen

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

[Bug]: ApiService malformed types #288

Closed Roman991 closed 1 year ago

Roman991 commented 1 year ago

https://github.com/cyclosproject/ng-openapi-gen/blob/master/templates/apiService.handlebars 46 invoke<P, R>(fn: ApiFnRequired<P, R> | ApiFnOptional<P, R>, params?: P, context?: HttpContext): Observable<R></R> { Can you check dat </R> at line 46.

After removing it, the ide still complains about image

In my case I set every params to params: P (not optional) and it worked.

luisfpg commented 1 year ago

The point is that some operations can have optional parameters, while others, required parameters. We have several operation with both optional and required parameters and we don't see errors in the IDE. Can you post the operation definition (yaml or json)?