-
Notifications
You must be signed in to change notification settings - Fork 167
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
Operation ID changed after tsp 0.61 #5117
Comments
- add `InputOperation.OperationId` - invoke `resolveOperationId()` to initialize it part of Azure/autorest.csharp#5117
- add `InputOperation.OperationId` - invoke `resolveOperationId()` to initialize it part of Azure/autorest.csharp#5117
- add `InputOperation.OperationId` - invoke `resolveOperationId()` to initialize it part of Azure/autorest.csharp#5117
Previously we use resource name to guess operation id, which doesn't work well in some cases. Instead of gussing operation id in generator, we try best to get the id in emitter and pass it to generator. resolve Azure#5117
The impact of this change is non-trivial. See the regen preview: Azure/azure-sdk-for-net#47714 |
After trial and discussion, we thought we could choose to not do this item due to:
We have 3 types of inputs right now. And for each of them, there is a corresponding issue regarding operation id:
All in all, if we want to fix the operation id, we must have Since there is no obvious negative outcome, maybe we can choose to not do this item. |
Description
In tsp 0.60 and prior, getResourceOperation will return undefined for some mgmt cases, like
autorest.csharp/test/TestProjects/MgmtTypeSpec/foo.tsp
Lines 10 to 15 in ab56c7d
So, previous the
ResourceName
isFoos
which is the interface name:autorest.csharp/test/TestProjects/MgmtTypeSpec/foo.tsp
Line 36 in ab56c7d
But in 0.61,
getResourceOperation
can return the resource operation, which seems the correct behavior. However, that will return differentResourceName
. Check this PR: https://github.com/Azure/autorest.csharp/pull/5110/files#diff-81dc15d9aacc476e7f1fc431451c064ac2727e5c09cde422e3ddc362b7b57981L2714I think the upstream actually has fixed an issue, but unfortunately cause regression in some cases.
The text was updated successfully, but these errors were encountered: