Azure / autorest.python

Extension for AutoRest (https://github.com/Azure/autorest) that generates Python code
MIT License
79 stars 57 forks source link

can't access operation group of preview api-version which is newer than default api version #2375

Open msyyc opened 8 months ago

msyyc commented 8 months ago

If latest api-version is preview instead of stable, the multiapi package can't access operation group which only exists in preview api version. For example: https://github.com/Azure/azure-rest-api-specs/pull/27473/files#diff-ad64caefc0b08c992cb9ed1b201db73adf06fae4992b8d3bb1606602a8ae71de image

https://github.com/azure-sdk/azure-sdk-for-python/pull/5816/files#diff-429eb7d201a17ee8e56f66b99f0461e0c9847d8fa617571f4d9dcb6573d5032e

image

latest api version of some service (e.g. authorization) is preview, so generated SDK can't access the operation group of the preview api version.

iscai-msft commented 8 months ago

I'm not sure the behavior you're suggesting is something we want. In cases like this I thought we previously would generate with the newest api version as the default version, and then updating the ogs that need an older api version in _PROFILE_TAG. Is there a reason we don't do that here?