azure-sdk-for-js
azure-sdk-for-js copied to clipboard
[ai-vision-image-analysis] README sample issues
It looks that the samples are copied from C#? For Rest Level Client (RLC) we don't have constructors to create client instances. We use the factory/builder method instead. Looks that the package has correct samples, but the example snippets are untested and wrong. For example,
https://github.com/Azure/azure-sdk-for-js/blob/31b76c94f5bb633dfa73fe9c20d1ba88a0e9228e/sdk/vision/ai-vision-image-analysis-rest/README.md#L86
Sample snippets in README.md should be valid and are expected to work with minimal effort after copying and pasting them into a project.
To get the benefits of build and run samples, please refer to template package for how we could use a snippets.spec.ts and the dev-tool's update-snippets command
https://github.com/Azure/azure-sdk-for-js/blob/31b76c94f5bb633dfa73fe9c20d1ba88a0e9228e/sdk/template/template/test/snippets.spec.ts#L10
https://github.com/Azure/azure-sdk-for-js/blob/31b76c94f5bb633dfa73fe9c20d1ba88a0e9228e/sdk/template/template/README.md#L78
https://github.com/Azure/azure-sdk-for-js/blob/31b76c94f5bb633dfa73fe9c20d1ba88a0e9228e/sdk/template/template/package.json#L59
@dnaeon, have you tried to call the REST API directly to list all the load balancer and check the result? I am trying to understand whether this is a service side issue or client SDK issue. thanks
Hey @lirenhe ,
Using az network lb list returns the LBs with correct info. I haven't tried calling the REST API directly. This one appears to be an issue with the Go SDK.
Thanks!
@dnaeon cli has different logic to sdk. if the rest response does not contain the value you needed, sdk will not do any additional call to get that like cli.
Hi @dnaeon. Thank you for opening this issue and giving us the opportunity to assist. To help our team better understand your issue and the details of your scenario please provide a response to the question asked above or the information requested above. This will help us more accurately address your issue.
Hi @dnaeon, we're sending this friendly reminder because we haven't heard back from you in 7 days. We need more information about this issue to help address it. Please be sure to give us your input. If we don't hear back from you within 14 days of this comment the issue will be automatically closed. Thank you!