Azure / Azure/azure-rest-api-specs

[HorizonDB] Private endpoint connection update should use PUT, not PATCH

Open Beginner friendly
#44,392 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeSpec
Stars
3.1k
Forks
5.9k
Avg merge
2d 22h
Merged PRs (30d)
444

Description

Follow-up to Azure/azure-sdk-for-python#47688 (which reported the missing cluster name in the private endpoint connection URL). The **route is now correctly cluster-scoped**, but the **update operation is still generated as `PATCH`**, while the HorizonDB backend private endpoint connection (PEC) controller and the Azure CLI extension use **`PUT`** for approve/reject.

### Current behavior

Generated OpenAPI for `2026-01-20-preview` emits `patch` under the cluster-scoped path:

```
/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/clusters/{clusterName}/privateEndpointConnections/{privateEndpointConnectionName}
```

with operationId `HorizonDbPrivateEndpointConnections_Update`.

### Expected behavior

The same path / operationId should emit `put`.

### Precedent

The sibling service **PostgreSQL Flexible Server** models this operation as `PUT` (full `PrivateEndpointConnection` body, `202`-only response, `final-state-via: azure-async-operation`) in both `stable/2025-08-01` and `preview/2026-04-01-preview`:

- `specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/openapi.json`

### Root cause

`specification/horizondb/resource-manager/Microsoft.HorizonDb/HorizonDb/routes.tsp` uses a PATCH template:

```typespec
update is HorizonDbPrivateEndpointOperations.CustomPatchAsync<
HorizonDbCluster,
PrivateEndpointConnectionResource
>;
```

It should use a PUT-capable template (e.g. `CreateOrUpdateAsync`) so the generated verb is `PUT`.

### Impact

SDK regeneration reverts downstream consumers back to PATCH until the spec is fixed. The Azure CLI extension (`azure-cli-extensions/src/horizondb`) currently hand-patches the vendored Python SDK to force `method="PUT"`; that workaround can be removed once the spec emits PUT and the SDK is regenerated.

Contributor guide

Open the contributing guide

Research direction

Start in specification/horizondb/resource-manager/Microsoft.HorizonDb/HorizonDb/routes.tsp at the cluster-scoped private endpoint connection update definition, then compare the PostgreSQL Flexible Server OpenAPI precedent. Replace the PATCH-capable template with the PUT-capable one and verify that the generated 2026-01-20-preview operation keeps the same path and operationId while emitting PUT.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, openapi, python
Domain
api
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
78/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.