Azure / Azure/azure-rest-api-specs

[BUG] Machine Learning Batch Endpoint - invalid `endpointName` regex

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

Description

### API Spec link

https://github.com/Azure/azure-rest-api-specs/blob/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2025-09-01/mfe.json#L3628-L3633

### API Spec version

2025-06-01, 2025-09-01

### Describe the bug

The batch endpoint name has the following regex pattern defined:

```
"in": "path",
"name": "endpointName",
"description": "Name for the Batch inference endpoint.",
"required": true,
"type": "string",
"pattern": "^[a-zA-Z0-9][a-zA-Z0-9\\-_]{0,254}$"
```

But it throws all kind of errors for edge cases. Here are few examples:

```
Endpoint Name: "1dd"
│ "ErrorMessage": "Endpoint name must start with an alphabet, end with an alpha-numeric character and can contain alpha-numeric characters and dashes.",

Endpoint Name: "d1"
│ "ErrorMessage": "Endpoint name must be at least 3 characters long.",

Endpoint Name: "d1155555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555"
│ "ErrorMessage": "Endpoint name must not exceed 32 characters.",
```

### Expected behavior

The endpoint name follows the defined regex pattern. Here is the correct pattern - `"^[a-zA-Z][a-zA-Z0-9-]{1,30}[a-zA-Z0-9]$"`.

### Actual behavior

Errors mentioned above

### Reproduction Steps

Pass different `batchEndpointName`

```json
PUT https://management.azure.com/subscriptions/{subscriptionID}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{machineLearningWorkspaceName}/batchEndpoints/{batchEndpointName}?api-version=2025-09-01

{
"identity": {
"type": "SystemAssigned"
},
"location": "australiaeast",
"properties": {
"authMode": "AADToken",
"description": "Test batch endpoint"
},
"tags": {
"Environment": "Test"
}
}
```

### Environment

_No response_

Contributor guide

Open the contributing guide

Research direction

Open specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2025-09-01/mfe.json around lines 3628-3633 and compare the endpointName pattern with the documented validation errors and expected pattern. Update the API specification for the affected versions, then run the repository's relevant specification validation to confirm the regex is accepted.

Written by the indexing model from the issue text.

Assessment

Tech stack
json
Domain
api
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
65/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.