I am using the Swagger Generator website to generate the code for an API in Java. The API specifications are public and available here. As you can see, seems like the JSON doesn't have any Authentication configuration in it, but the API actually uses an OAuth authentication using "Microsoft Identity Platform" as authority and using an Application ID and Secret to get a JWT. I can obtain the token in Java using external libraries, but I'd like to integrate the process in Swagger as much as possible.
By importing into the generator the previous JSON, obviously no Authorization is configured and all API calls fail. I modified the JSON and added these parameters:
You don't need React specific code generation. If you use swagger-codegen v2.4.x you can generate Typescript for a bunch of flavours like Angular1.x, Angular2.x, Fetch, jQuery, Node. Only v3.x supports Angular only. I don't know what it does that's Angular specific but maybe dependency injection related?! I don't know.