Azure / Azure/azure-rest-api-specs

[BUG] Cognitive Services RaiPolicyContentFilter required properties not marked as such

Open
#27,778 1 comment 0 reactions 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
2d 22h
Merged PRs (30d)
444

Description

### API Spec link

https://github.com/Azure/azure-rest-api-specs/blob/main/specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/preview/2023-10-01-preview/cognitiveservices.json#L5562

### API Spec version

2023-10-01-preview

### Describe the bug

The `RaiPolicyContentFilter` definition has five properties, none of which is marked as required. Based on my experiments, at least `name`, `blocking`, and `source` are required, however.

### Expected behavior

Creating a RAI policy with a content filter with only a subset of properties should succeed, based on the spec.

### Actual behavior

When not all filter properties are specified, the endpoint responds with 400,
>"The request content was invalid and could not be deserialized."

### Reproduction Steps

The spec's own example PutRaiPolicy.json doesn't work until one adds the missing properties.

### 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.