-
Notifications
You must be signed in to change notification settings - Fork 81
Description
1.Spec PR: Azure/azure-rest-api-specs#39837
response:
"responses": {
"200": {
"description": "OK"
},
"201": {
"description": "Partner Topic update request accepted.",
"schema": {
"$ref": "#/definitions/PartnerTopic"
}
},
-
original swagger link: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/eventgrid/resource-manager/Microsoft.EventGrid/EventGrid/preview/2025-07-15-preview/EventGrid.json#L8855
-
generated swagger link: https://github.com/welovej/azure-rest-api-specs/blob/52d7e2a38508770e1a686349d06aba81eb35fe28/specification/eventgrid/resource-manager/Microsoft.EventGrid/EventGrid/preview/2025-07-15-preview/EventGrid.json#L8867
-
hlc link in sdk repo: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/eventgrid/arm-eventgrid/src/operations/partnerTopics.ts#L306
-
typespec code:
update is ArmCustomPatchSync<
Employee,
Azure.ResourceManager.Foundations.ResourceUpdateModel<Employee, EmployeeProperties>,
Response = OkResponse | ArmResourceCreatedSyncResponse<Employee>
>;
- generated swagger:
responses": {
"200": {
"description": "The request has succeeded."
},
"201": {
"description": "Resource 'Employee' create operation succeeded",
"schema": {
"$ref": "#/definitions/Employee"
}
},
"default": {
...
}
in this case, tcgc will use the response type from 201 as the method.response

here is the playground
this issue is to confirm how to support optional response body