You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I generated the TSP project for keyvault using the command "npx TSP client convert - swagger readme [path to readme. md] - arm - fully compatible The generated TSP project contains the following code:
/** * Permanently deletes the specified managed HSM.*/#suppress"@azure-tools/typespec-azure-core/no-openapi""non-standard operations"@action("purge")
@operationId("ManagedHsms_PurgeDeleted")
purgeDeleted is ArmResourceActionAsync<
DeletedManagedHsm,
void,
void,
BaseParameters = Azure.ResourceManager.Foundations.SubscriptionBaseParameters
>;
The swagger generated using this code contains two response codes: 202 and 204. But in the original swagger, the response code should only be 202, so I tried to modify void to AcceptedResponse or ArmAcceptedLroResponse, but this modification would result in an error: Error: Multiple responses are not supported.
So I tried another modification method, changing ArmResourceActionAsync to ArmResourceActionAsyncBase.
Describe the bug
I generated the TSP project for keyvault using the command
"npx TSP client convert - swagger readme [path to readme. md] - arm - fully compatible
The generated TSP project contains the following code:The swagger generated using this code contains two response codes:
202
and204
. But in the original swagger, the response code should only be202
, so I tried to modifyvoid
toAcceptedResponse
orArmAcceptedLroResponse
, but this modification would result in an error:Error: Multiple responses are not supported
.So I tried another modification method, changing
ArmResourceActionAsync
toArmResourceActionAsyncBase
.Is this modification reasonable?
The original swagger:
https://github.com/Azure/azure-rest-api-specs/blob/main/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2024-11-01/managedHsm.json#L510
Expected behavior
The generated swagger only contains 202
Actual behavior
The generated swagger contains 202 and 204
The text was updated successfully, but these errors were encountered: