Azure / Azure/azure-rest-api-specs

[BUG] RAI Policy content filters array has non-unique x-ms-identifiers

Open
#29,288 1 comment 1 reaction 1 assignee Claimed by @tianxin-ms View on GitHub
bug customer-reported Mgmt question
Dominant language
TypeSpec
Stars
3.1k
Forks
5.9k
Avg merge
3d 37m
Merged PRs (30d)
446

Description

### API Spec link

https://github.com/Azure/azure-rest-api-specs/blob/main/specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/preview/2024-04-01-preview/cognitiveservices.json

### API Spec version

2024-04-01-preview

### Describe the bug

The property is defined as such:
```json
"contentFilters": {
"type": "array",
"items": {
"$ref": "#/definitions/RaiPolicyContentFilter"
},
"x-ms-identifiers": [
"name"
],
"description": "The list of Content Filters."
}
```

That should mean that `name` is [unique and sufficient to uniquely identify](http://azure.github.io/autorest/extensions/#x-ms-identifiers) a filter. But [Azure's own example](https://github.com/Azure/azure-rest-api-specs/blob/main/specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/preview/2024-04-01-preview/examples/PutRaiPolicy.json#L11) shows that it's not unique. The combination of `name` and `source` probably is?

### Expected behavior

`x-ms-identifiers` contains a combination of properties that uniquely identify content filters.

### Actual behavior

`x-ms-identifiers` contains a property whose values are shared between content filters.

### Reproduction Steps

visible in the spec

### Environment

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.