Skip to content
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

Generated samples in README.md should instantiate the client by reflecting on the parameters in the constructor #369

Closed
amarzavery opened this issue Nov 9, 2018 · 1 comment

Comments

@amarzavery
Copy link
Contributor

amarzavery commented Nov 9, 2018

Today the samples in README.md assume credentials and subscriptionId are the two required parameters for any generated TS Client. It is true for most of the clients generated for Azure. However it is not true for generic TS generator and some dataplane clients like Azure Graph where the second parameter is tenantId and not subscriptionId.

A proper way to do this would be to reflect on the parameters provided to the constructor. The goal is to generate a correct minimal sample. Hence we need to focus only on the required parameters provided to the constructor and use their names and types in proper order to instantiate the client.

Please take a look at this commit for the manual changes made to the graph sdk to get an idea about the problem.

@amarzavery amarzavery assigned ghost Nov 9, 2018
@joheredi
Copy link
Member

joheredi commented Oct 9, 2020

Consolidating README related issues in #594

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants