diff --git a/.chronus/changes/add-tag-parameter-legacy-operations-2026-6-1-18-32-0.md b/.chronus/changes/add-tag-parameter-legacy-operations-2026-6-1-18-32-0.md new file mode 100644 index 0000000000..568a9a0647 --- /dev/null +++ b/.chronus/changes/add-tag-parameter-legacy-operations-2026-6-1-18-32-0.md @@ -0,0 +1,7 @@ +--- +changeKind: feature +packages: + - "@azure-tools/typespec-azure-resource-manager" +--- + +Add optional `Tag` template parameter to `Azure.ResourceManager.Legacy.Operations` to allow overriding the openapi tag value. diff --git a/packages/typespec-azure-resource-manager/lib/legacy-types/interfaces.tsp b/packages/typespec-azure-resource-manager/lib/legacy-types/interfaces.tsp index b542dff044..2f785ecc4f 100644 --- a/packages/typespec-azure-resource-manager/lib/legacy-types/interfaces.tsp +++ b/packages/typespec-azure-resource-manager/lib/legacy-types/interfaces.tsp @@ -17,13 +17,15 @@ using Rest; * @template Response The response returned by the operation list. * @template Error the error response returned by the operation list. * @template Parameters Additional request parameters for the list operation. + * @template Tag Optional. The openapi tag for the operation. */ interface Operations< Response extends {} = ArmResponse, Error extends {} = ErrorResponse, - Parameters extends {} = {} + Parameters extends {} = {}, + Tag extends valueof string = "Operations" > { - @tag("Operations") + @tag(Tag) @autoRoute @armUpdateProviderNamespace @doc("List the operations for the provider") diff --git a/website/src/content/docs/docs/libraries/azure-resource-manager/reference/interfaces.md b/website/src/content/docs/docs/libraries/azure-resource-manager/reference/interfaces.md index a5566796f7..7b931af710 100644 --- a/website/src/content/docs/docs/libraries/azure-resource-manager/reference/interfaces.md +++ b/website/src/content/docs/docs/libraries/azure-resource-manager/reference/interfaces.md @@ -2423,7 +2423,7 @@ Azure Resource Manager service. It implements GET "/providers/{provider-namespace}/operations" ```typespec -interface Azure.ResourceManager.Legacy.Operations +interface Azure.ResourceManager.Legacy.Operations ``` #### Template Parameters @@ -2433,11 +2433,12 @@ interface Azure.ResourceManager.Legacy.Operations | Response | The response returned by the operation list. | | Error | the error response returned by the operation list. | | Parameters | Additional request parameters for the list operation. | +| Tag | Optional. The openapi tag for the operation. | -#### `Operations.list` {#Azure.ResourceManager.Legacy.Operations.list} +#### `Operations.list` {#Azure.ResourceManager.Legacy.Operations.list} ```typespec -op Azure.ResourceManager.Legacy.Operations.list(apiVersion: string, provider: "Microsoft.ThisWillBeReplaced"): Response | Error +op Azure.ResourceManager.Legacy.Operations.list(apiVersion: string, provider: "Microsoft.ThisWillBeReplaced"): Response | Error ``` ### `RoutedOperations` {#Azure.ResourceManager.Legacy.RoutedOperations}