Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • O openapi-generator
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 3,476
    • Issues 3,476
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 402
    • Merge requests 402
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • OpenAPI Tools
  • openapi-generator
  • Issues
  • #2667
Closed
Open
Issue created Apr 15, 2019 by Administrator@rootContributor4 of 6 checklist items completed4/6 checklist items

[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

Suggest a fix
Assignee
Assign to
Time tracking