I'm running Autorest against this endpoint:
https://directtrust-issuer-api-us-southcentral.azurewebsites.net//swagger/v1/swagger.json
and getting this error, how do I resolve it?
devs-mbp:havenclient dev$ autorest --input-file readme.md --csharp --output-folder=csharp --namespace=Vanish.Haven
AutoRest code generation utility [version: 2.0.4262; node: v9.10.1]
(C) 2018 Microsoft Corporation.
https://aka.ms/autorest
Loading AutoRest core '/Users/dev/.autorest/@[email protected]/node_modules/@microsoft.azure/autorest-core/dist' (2.0.4272)
Installing AutoRest extension '@microsoft.azure/autorest.csharp' (~2.2.51)
Installing AutoRest extension '@microsoft.azure/autorest.modeler' (2.3.43)
Process() cancelled due to exception : path.match is not a function
TypeError: path.match is not a function
if you are using a readme.md configuration file, don't use --input-file (which would have to have an = and a value ) ... the configuration file would have to have the input-file section in it.
I used :
autorest --input-file=https://directtrust-issuer-api-us-southcentral.azurewebsites.net//swagger/v1/swagger.json output-folder=./generated --csharp
and it works fine.
Issue answered. Closing.
Most helpful comment
if you are using a
readme.mdconfiguration file, don't use--input-file(which would have to have an=and a value ) ... the configuration file would have to have theinput-filesection in it.I used :
autorest --input-file=https://directtrust-issuer-api-us-southcentral.azurewebsites.net//swagger/v1/swagger.json output-folder=./generated --csharpand it works fine.