openapi-generator -l typescript-angular not working

3.6k Views Asked by At

I am issues while generating angular code run using the openapi-generator for language typescript-angular any idea how to fix it? I even tried openapi-generator help meta -l is a valid option, not sure why I am getting the below error when I run the below command in angular terminal

command using: openapi-generator generate -i <WebAPI_Swagger_EndPoint> -l typescript-angular -o ./angular --config angular.conf eg, WebAPI_Swagger_EndPoint: https://test/swagger/v2/swagger.json

Error: [error] Found unexpected parameters: [-l, typescript-angular]

See 'openapi-generator-cli help' for usage

Version using: 4.3.1

Any help or options available? Many Thanks!

1

There are 1 best solutions below

2
William Cheng On

Please use -g instead to specify the generator name

e.g.

openapi-generator generate -i <WebAPI_Swagger_EndPoint> -g typescript-angular -o ./angular --config angular.conf