I am generating a C# REST service client via AutoRest (OpenAPI v3). I'm generating the client by running the following command:
autorest --input-file="./Resources/swagger.json" --output-folder="./SomeService/Generated" --namespace="SomeService.Client" --override-client-name="SomeServiceClient" --skip-csproj --public-clients=true --add-credential --csharp
The generated client I get seems to have two issues:
- The ctor is generated as internal, even though I specified that the client should be public:
internal SomeServiceClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Uri endpoint = null)
{
RestClient = new SomeServiceRestClient(clientDiagnostics, pipeline, endpoint);
_clientDiagnostics = clientDiagnostics;
_pipeline = pipeline;
}
- The generated client ctor does not accept credentials, even though I specified the --add-credential flag, why's that?
I followed the instructions mentioned on https://github.com/Azure/autorest . What am I doing wrong?