Azure / Azure/azure-rest-api-specs
[OpenAI] Update swagger to add 'status' property in Error object model
- Dominant language
- TypeSpec
- Stars
- 3.1k
- Forks
- 5.9k
- Avg merge
- 2d 22h
- Merged PRs (30d)
- 444
Description
## [OpenAI] Update swagger to add 'status' property in Error model
### :information_source: Description
When generating an AzureOpenAI API client for versions of '2023-09-01-preview' or '2023-08-01-preview' an unexpected field is returned in the **Error model.**
The scenario where content_filter fails, an extra field called **"status"** is sent:

The "status" property does not exist in swagger definition:

### :information_source: Possible solutions:
- Add new property status
https://github.com/Azure/azure-rest-api-specs/blob/a26794fe26cdc68f4d18bc782e0b4f2f29e24b40/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2023-09-01-preview/inference.json#L803
- Add options: "additionalProperties": true to allow extra fields like this 'status' one.
### :pushpin: References
https://learn.microsoft.com/en-us/azure/ai-services/openai/concepts/content-filter#example-scenario-an-input-prompt-containing-content-that-is-classified-at-a-filtered-category-and-severity-level-is-sent-to-the-completions-api
Contributor guide
Research direction
Start by reading specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2023-09-01-preview/inference.json around line 803 and inspect the Error model. Apply the selected schema change for the cited preview API versions, then run the repository’s applicable specification validation; done means the model represents the returned status property.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, openapi
- Domain
- ai, api
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 48/100