Closed xxmissingnoxx closed 2 years ago
Starting to work on this task. Will provide updates shortly.
Ok. I have done a quick analysis. The details are:
addCredentials
to true
by default. If it has to be set to false
, it has to be explicitly set. The specific piece of code is [Can be found here]:async function getAddCredentials(
host: AutorestExtensionHost
): Promise<boolean> {
const addCredentials = await host.getValue("add-credentials");
// Only set addCredentials to false if explicitly set to false
// otherwise default to true
if (addCredentials === false) {
return false;
} else {
return true;
}
}
I have created a PR to fix the documentation issue - https://github.com/Azure/autorest/pull/4562. Will update this issue once the PR is approved and merged.
The Documentation PR has been merged. No more action items pending on this issue. If you still face any issues, Please feel free to reopen this PR.
Before filling a bug
Expected behavior According to the documentation , the default behavior for generating a Typescript client should be for
--add-credentials=false
, but it appears to require credentials if you fail to explicitly add that flag. The documentation says "Is called --add-credentials. Defaults to false."The autorest command used was:
autorest --input-file=regular_error.yaml --typescript --output-folder=autorest/regular_error/typescript --clear-output-folder --generate-metadata=true
OpenAPI file is: