Search code examples
c#asp.net-coreautorestswashbuckle.aspnetcore

Note: AutoRest core version selected from configuration: ~2.0.4413 when I have installed 3.06187


I have installed autorest 3.0.3187 on node v12.16.1 and I ran

autorest --reset 

to remove old versions

However when I run

autorest --input-file=https://myapplication/mydocs/v1/swagger.json --output-folder=generated --csharp --namespace=MyNameSpace

I get the following output

NOTE: AutoRest core version selected from configuration: ~2.0.4413.
Loading AutoRest core      
'C:\Users\kirst\.autorest\@microsoft.azure_autorest- 
core@2.0.4417\node_modules\@microsoft.azure\autorest-core\dist' (2.0.4417)
Loading AutoRest extension '@microsoft.azure/autorest.csharp' (~2.3.79- 
>2.3.84)
Loading AutoRest extension '@microsoft.azure/autorest.modeler' (2.3.55- 
>2.3.55)
FATAL: swagger-document/loader - FAILED

Solution

  • I added the --v3 switch

    autorest --v3 --input-file=https://myapplication/mydocs/v1/swagger.json --output-folder=generated --csharp --namespace=MyNameSpace