Azure / autorest.java

Extension for AutoRest (https://github.com/Azure/autorest) that generates Java code
MIT License
32 stars 80 forks source link

tsp, generate PollingStrategy in emitter #2757

Closed weidongxu-microsoft closed 1 month ago

weidongxu-microsoft commented 1 month ago

fix https://github.com/Azure/autorest.java/issues/2385

typescript code https://github.com/Azure/autorest.java/pull/2757/commits/721c1bfeacfa9ccda3c19341137a18597fcabe4e java helper class https://github.com/Azure/autorest.java/pull/2757/commits/13896da03dcc1d38fd96b165a9913f361ad7417a java code https://github.com/Azure/autorest.java/pull/2757/commits/5b1ecfb66dcdf3bf776277f05bcfacec55eca0f0

The hope is that this PR can also handle case https://github.com/Azure/autorest.java/issues/2756, as long as LroMetadata from typespec-azure-core is correct.

haolingdong-msft commented 1 month ago

Could we list what polling strategy will we generate in emitter, and what will we use those in azure-core?

weidongxu-microsoft commented 1 month ago

Could we list what polling strategy will we generate in emitter, and what will we use those in azure-core?

Basically, this line (and func) const useNewPollStrategy = isLroNewPollingStrategy(httpOperation, lroMetadata);