1

Is there a way to get swagger codegen to generate files for Angular 5 specifically using the newer HTTPClientModule changes? At the moment I can't even get a version of the codegen to run and the online editor won't return codegen for https://esi.tech.ccp.is/latest/swagger.json and even if it did I think it wouldn't be angular 5.

Alex Bailey
  • 1,260
  • 12
  • 27
  • There is only up to Angular 2, you could extend swagger to work for Angular 5. This is explained here https://github.com/swagger-api/swagger-codegen/wiki/How-to-add-a-generator-for-a-new-language-or-framework – moondaisy Feb 24 '18 at 16:49
  • https://stackoverflow.com/a/48992298/9112752 –  Feb 27 '18 at 17:50

1 Answers1

3

This is now solved and can be done using the -c parameter for swagger codegen and using a config file similar to the below:

{
  "ngVersion": "5.1"
}
Alex Bailey
  • 1,260
  • 12
  • 27
  • Do you have a problem with the removed opaquetoken? Like in this question https://stackoverflow.com/questions/48260208/why-error-in-angular-5-as-has-no-exported-member-opaquetoken –  Feb 26 '18 at 10:06
  • Nope. There was no problem with it at all. – Alex Bailey Feb 27 '18 at 12:58