Search code examples
c#asp.net-web-apiswaggerautorest

Automatic vs manual WebApi client generation


I am planning to create a client for existed Restful API and choosing rather to do it manually or automatically using such tools as Autorest or Swagger codegen.
What is pros and cons of both ways?
Are there any disadvantages of generating client automatically?


Solution

  • In fact, I don't think there is no breaking reason why you shouldn't use a code generater.

    I propose that you have a look into the open issues for the generators (e.g. https://github.com/swagger-api/swagger-codegen/issues)

    In general one thing comes in to my mind on external codegeneration. If you use style cop or any other coding style validator, it can be that the generated code doesn't match your defined coding style rules.

    Just give it a try, you save much time.