-
Notifications
You must be signed in to change notification settings - Fork 238
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
feat(http-client-csharp): add InputOperation.OperationId
#5479
base: main
Are you sure you want to change the base?
feat(http-client-csharp): add InputOperation.OperationId
#5479
Conversation
45c7044
to
994d614
Compare
API change check API changes are not detected in this pull request. |
- add `InputOperation.OperationId` - invoke `resolveOperationId()` to initialize it part of Azure/autorest.csharp#5117
994d614
to
de848fc
Compare
@@ -74,6 +75,7 @@ export function fromSdkServiceMethod( | |||
getResourceOperation(sdkContext.program, method.operation.__raw.operation)?.resourceType | |||
.name ?? | |||
getOperationGroupName(sdkContext, method.operation, sdkContext.sdkPackage.rootNamespace), | |||
OperationId: resolveOperationId(sdkContext.program, method.operation.__raw.operation), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there are 3 ways to resolve the operation id:
@typespec/openapi
will use the original resource name, e.g. ignoring renaming by@clientName
:typespec/packages/openapi/src/helpers.ts
Line 137 in ecf61f1
export function resolveOperationId(program: Program, operation: Operation) { @typespec-azure/typespec-generator-client-core
will honor renaming: https://github.com/Azure/typespec-azure/blob/9d16af124e507f7194d4f378637c9ca557bd6d2e/packages/typespec-client-generator-core/src/example.ts#L142@typespec-azure/typespec-autorest
will honor renaming and make it pascal: https://github.com/Azure/typespec-azure/blob/9d16af124e507f7194d4f378637c9ca557bd6d2e/packages/typespec-autorest/src/utils.ts#L72
I thought we should use option 1 which should be closest to original operation id in swagger. Any thought?
Hi @archerzz. Your PR has had no update for 30 days and it is marked as a stale PR. If it is not updated within 30 days, the PR will automatically be closed. If you want to refresh the PR, please remove the |
InputOperation.OperationId
resolveOperationId()
to initialize itpart of Azure/autorest.csharp#5117