[TypeScript-RXJS] Unable to build project sample
Created by: karismann
Bug Report Checklist
-
Have you provided a full/minimal spec to reproduce the issue? -
Have you validated the input using an OpenAPI validator (example)? -
What's the version of OpenAPI Generator used? -
Have you search for related issues/PRs? -
What's the actual output vs expected output? -
[Optional] Bounty to sponsor the fix (example)
Description
When i try to install TypeScript RXJS sample with npm version, i have an error :
npm install
runtime.ts:123:9 - error TS2322: Type 'Observable<{}>' is not assignable to type 'Observable<AjaxResponse>'.
Type '{}' is not assignable to type 'AjaxResponse'.
Property 'originalEvent' is missing in type '{}'.
123 return of(params).pipe(
~~~~~~~~~~~~~~~~~~~~~~~
124 map((args) => {
~~~~~~~~~~~~~~~~~~~~~~~~~~~
...
139 )
~~~~~~~~~~~~~
140 );
~~~~~~~~~~
runtime.ts:131:22 - error TS2345: Argument of type '{ body?: string | Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | ...' is not assignable to parameter of type 'string | AjaxRequest'.
Object literal may only specify known properties, and 'cache' does not exist in type 'string | AjaxRequest'.
131 ajax({ url: args.url, ...args.options }).pipe(
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
runtime.ts:134:81 - error TS2345: Argument of type '{ response: {}; url: string; options: RequestInit; }' is not assignable to parameter of type 'ResponseContext'.
Types of property 'response' are incompatible.
Type '{}' is not assignable to type 'AjaxResponse'.
134 postMiddlewares.forEach((mw) => (response = mw.post({ ...params, response })));
npm-version : 5.6.0
does anyone has the same issue ?
openapi-generator version
latest master
OpenAPI declaration file content or url
modules/openapi-generator/src/test/resources/2_0/petstore.yaml
Command line used for generation
generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g typescript-rxjs -c bin/typescript-rxjs-petstore-with-npm-version.json -o samples/client/petstore/typescript-rxjs/builds/with-npm-version
Steps to reproduce
Related issues/PRs
None