Azure / Azure/azure-rest-api-specs
Allow Only supported content types in swagger specs
Open
- Dominant language
- TypeSpec
- Stars
- 3.1k
- Forks
- 5.9k
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 424
Description
Currently their is a rule that catches content type that has been set to anything other than application/json and marks it as a warning.
After discussing with ARM team, they have confirmed that all new API versions should enforce a linter rule that will mark unsupported content-types as error.
So what we need is a way to stop RPs using text/json (which is not even a valid content type) to be used in swagger.
The down level impact is, in case if an RP is using an unsupported content-type, it will result in runtime errors and usually by that time it's too late to make any changes to the service.
Contributor guide
Assessment
This issue has not been assessed yet.