-
Notifications
You must be signed in to change notification settings - Fork 75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Invalid client constructor generated. #1724
Comments
@mvrius Thanks for the reporting! I think this is a bug for autorest.typescript and I will fix it in future. To non-block your testing you could disable authentication explicitly with below configs:
|
@mvrius This issue won't happen in my side when I use the latest autorest.typescript. Could you have a try? I will close this issue considering it's resolved. Feel free to reopen it if still existing. |
Hello @MaryGao , while using the latet autorest typescript version I had the same issue. Here are the logs from my generation:
The credentials variable is wrongly used in the following generated statement:
|
We are also running into this issue using the latest autorest which installs the latest autorest.typescript that you mention @MaryGao Should I be looking for a different tool for generation of a TS client? |
@aklt @raphael-verdier Sorry for the late reply I re-opened this issue and let me take a look again. |
Great! Please let me know if further info can be helpful |
@aklt I am working on the fix, as a workaround you could directly add
|
@MaryGao Thank you for the suggestion, this gets me further and I can start using the TS client it seems. Before adding to this issue I tried adding: add-credentials: true To the |
Hi,
I used the sample YAML from here: https://github.com/Azure/autorest/tree/main/Samples/openapi-v3/1a-code-generation-minimal but tried to generate the Typescript version.
This generates the following code for constructor:
Error is that the
credentials
variable is not defined. Build error:Here's the autorest command output which has versions listed:
Is this expected? Are other flags needed for Typescript client generation?
Thanks,
Marius
The text was updated successfully, but these errors were encountered: