Azure / Azure/azure-rest-api-specs
`null` value should not be returned in response if the swagger does not specify `x-nullable: true` in `web` RP
- Dominant language
- TypeSpec
- Stars
- 3.1k
- Forks
- 5.9k
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 424
Description
This blocks the test cases for DotNet SDK.
According to the extension documentation here: https://github.com/Azure/autorest/tree/main/docs/extensions#x-nullable
`null` value is not allowed in the response if the corresponding swagger is not marked by `x-nullable: true`.
For instance, we see a lot of cases in resource `Microsoft.Web/sites`:
```
{
"id": "/subscriptions/xxxx/resourceGroups/testRG-5336/providers/Microsoft.Web/sites/testSite-5704",
"name": "testSite-5704",
"type": "Microsoft.Web/sites",
"kind": "app",
"location": "East US",
"tags": {},
"properties": {
"name": "testSite-5704",
"state": "Running",
"hostNames": [
"testsite-5704.azurewebsites.net"
],
"webSpace": "testRG-5336-EastUSwebspace",
"selfLink": "https://waws-prod-blu-293.api.azurewebsites.windows.net:454/subscriptions/xxxx/webspaces/testRG-5336-EastUSwebspace/sites/testSite-5704",
"repositorySiteName": "testSite-5704",
"owner": null,
"usageState": "Normal",
"enabled": true,
"adminEnabled": true,
"enabledHostNames": [
"testsite-5704.azurewebsites.net",
"testsite-5704.scm.azurewebsites.net"
],
"siteProperties": {
"metadata": null,
"properties": [
{
"name": "LinuxFxVersion",
"value": ""
},
{
"name": "WindowsFxVersion",
"value": null
}
],
"appSettings": null
},
// other properties...
}
```
Contributor guide
Research direction
Start with the x-nullable extension documentation linked in the issue, then inspect the Microsoft.Web/sites response definitions and the DotNet SDK test cases that are blocked. Done means the affected non-nullable response fields no longer produce null values and the blocked tests pass.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- openapi
- Domain
- api
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100