Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG][typescript-angular] Generating client library with ngVersion=10.2 #8013

Closed
5 of 6 tasks
DmytroMysak opened this issue Nov 24, 2020 · 1 comment
Closed
5 of 6 tasks

Comments

@DmytroMysak
Copy link

Bug Report Checklist

  • Have you provided a full/minimal spec to reproduce the issue?
  • Have you validated the input using an OpenAPI validator (example)?
  • Have you tested with the latest master to confirm the issue still exists?
  • Have you searched for related issues/PRs?
  • What's the actual output vs expected output?
  • [Optional] Sponsorship to speed up the bug fix or feature request (example)
Description

Generator typescript-angular delivers incompatible versions for Angular 10.x in package.json. This causes npm run build to fail.

New dependencies in Angular Compiler requires TypeScript >=4.0.0 and <4.1.0.

openapi-generator version

v4.3.1 / The last stable version of OpenAPITools/openapi-generator using openapi-generator-cli

OpenAPI declaration file content or url
Example: https://github.com/OAI/OpenAPI-Specification/edit/master/examples/v3.0/petstore.yaml
Command line used for generation

openapi-generator-cli generate -i petstore.yaml -g typescript-angular -o petstore --additional-properties="npmName=petstore,npmVersion=0.9.0,withInterfaces=true,providedInRoot=true,ngVersion=10.2.0"

Generation Details
Steps to reproduce
  • Run the command to generate the output (see above)
  • Install the dependencies npm install, which creates these warnings:

image

  • Run npm run build and error in result:
    ERROR: The Angular Compiler requires TypeScript >=3.9.2 and <4.1.0 but 3.7.5 was found instead.

image

Expected result:
image

Suggest a fix

Update typescript version in package.json from "typescript": ">=3.6.0 <3.8.0", to "typescript": ">=3.9.2 <=4.1.0"

@macjohnny
Copy link
Member

this is already implemented and will be released in version 5.0.0. it is already part of version 5.0.0-beta3

https://github.com/OpenAPITools/openapi-generator/blob/master/samples/client/petstore/typescript-angular-v10-provided-in-root/builds/with-npm/package.json#L19-L28

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants