Search code examples
c#swaggerautorest

AutoRest Code Generation with Gulp Task


We use AutoRest to generate C# classes off the swagger file. At the moment we manually run command below:

AutoRest.exe -Input [-Namespace ] [-OutputDirectory ] [-CodeGenerator ] [-Modeler ] [-ClientName ] [-OutputFileName ]

The problem with manual approach is that every developers will need to make sure that correct parameters are passed etc.

Wondering if anyone has successfully managed to create a gulp task to automate above so that task can be run from VS Task Runner.


Solution

  • Check the CommandTaskRunner extension: https://github.com/madskristensen/CommandTaskRunner