Azure / Azure/azure-rest-api-specs
Web: Wrong shape of response to PUT request to /sites/config/web
- Dominant language
- TypeSpec
- Stars
- 3.1k
- Forks
- 5.9k
- Avg merge
- 2d 22h
- Merged PRs (30d)
- 444
Description
I'm making a PUT request to a `Microsoft.Web/sites/config/web` resource, e.g. `/resourceGroups/rg4a3feff9/providers/Microsoft.Web/sites/myapp/config/web` endpoint. However, the response (see below) to this request has the shape of `/sites` endpoint (note the `id` is wrong, `type` is wrong, `location` is present, etc.)
In particular, we rely on the `id` response which is clearly wrong.
```
{
"id":"/subscriptions/***/resourceGroups/rg4a3feff9/providers/Microsoft.Web/sites/app2fd4926a",
"name":"app2fd4926a",
"type":"Microsoft.Web/sites",
"location":"East US 2",
"properties":{
"numberOfWorkers":1,
"defaultDocuments":[
"Default.htm",
"Default.html",
"Default.asp",
"index.htm",
"index.html",
"iisstart.htm",
"default.aspx",
"index.php",
"hostingstart.html"
],
"netFrameworkVersion":"v4.0",
"phpVersion":"5.6",
"pythonVersion":"",
"nodeVersion":"",
"powerShellVersion":"",
"linuxFxVersion":"",
"windowsFxVersion":null,
"requestTracingEnabled":false,
"remoteDebuggingEnabled":false,
"remoteDebuggingVersion":null,
"httpLoggingEnabled":false,
"azureMonitorLogCategories":null,
"acrUseManagedIdentityCreds":false,
"acrUserManagedIdentityID":null,
"logsDirectorySizeLimit":35,
"detailedErrorLoggingEnabled":false,
"publishingUsername":"$app2fd4926a",
"publishingPassword":null,
"appSettings":null,
"azureStorageAccounts":{
},
"metadata":null,
"connectionStrings":null,
"machineKey":null,
"handlerMappings":null,
"documentRoot":null,
"scmType":"None",
"use32BitWorkerProcess":true,
"webSocketsEnabled":false,
"alwaysOn":true,
"javaVersion":null,
"javaContainer":null,
"javaContainerVersion":null,
"appCommandLine":"",
"managedPipelineMode":"Integrated",
"virtualApplications":[
{
"virtualPath":"/",
"physicalPath":"site\\wwwroot",
"preloadEnabled":true,
"virtualDirectories":null
}
],
"winAuthAdminState":0,
"winAuthTenantState":0,
"customAppPoolIdentityAdminState":false,
"customAppPoolIdentityTenantState":false,
"runtimeADUser":null,
"runtimeADUserPassword":null,
"loadBalancing":"LeastRequests",
"routingRules":[
],
"experiments":{
"rampUpRules":[
]
},
"limits":null,
"autoHealEnabled":false,
"autoHealRules":null,
"tracingOptions":null,
"vnetName":"",
"vnetRouteAllEnabled":false,
"vnetPrivatePortsCount":0,
"siteAuthEnabled":false,
"siteAuthSettings":{
"enabled":null,
"configVersion":null,
"unauthenticatedClientAction":null,
"tokenStoreEnabled":null,
"allowedExternalRedirectUrls":null,
"defaultProvider":null,
"clientId":null,
"clientSecret":null,
"clientSecretSettingName":null,
"clientSecretCertificateThumbprint":null,
"issuer":null,
"allowedAudiences":null,
"additionalLoginParams":null,
"isAadAutoProvisioned":false,
"aadClaimsAuthorization":null,
"googleClientId":null,
"googleClientSecret":null,
"googleClientSecretSettingName":null,
"googleOAuthScopes":null,
"facebookAppId":null,
"facebookAppSecret":null,
"facebookAppSecretSettingName":null,
"facebookOAuthScopes":null,
"gitHubClientId":null,
"gitHubClientSecret":null,
"gitHubClientSecretSettingName":null,
"gitHubOAuthScopes":null,
"twitterConsumerKey":null,
"twitterConsumerSecret":null,
"twitterConsumerSecretSettingName":null,
"microsoftAccountClientId":null,
"microsoftAccountClientSecret":null,
"microsoftAccountClientSecretSettingName":null,
"microsoftAccountOAuthScopes":null
},
"cors":null,
"push":null,
"apiDefinition":null,
"apiManagementConfig":null,
"autoSwapSlotName":null,
"localMySqlEnabled":false,
"managedServiceIdentityId":null,
"xManagedServiceIdentityId":null,
"ipSecurityRestrictions":[
{
"ipAddress":"Any",
"action":"Allow",
"priority":1,
"name":"Allow all",
"description":"Allow all access"
}
],
"scmIpSecurityRestrictions":[
{
"ipAddress":"Any",
"action":"Allow",
"priority":1,
"name":"Allow all",
"description":"Allow all access"
}
],
"scmIpSecurityRestrictionsUseMain":false,
"http20Enabled":true,
"minTlsVersion":"1.2",
"scmMinTlsVersion":"1.0",
"ftpsState":"AllAllowed",
"preWarmedInstanceCount":0,
"functionAppScaleLimit":0,
"healthCheckPath":null,
"fileChangeAuditEnabled":false,
"functionsRuntimeScaleMonitoringEnabled":false,
"websiteTimeZone":null,
"minimumElasticInstanceCount":0
}
}
```
Contributor guide
Research direction
Start by locating the PUT definition for the Microsoft.Web/sites/config/web endpoint in the Azure REST API specification and compare its declared response with the reported Microsoft.Web/sites response. Reproduce the request or inspect the contract, then verify that the response identity and shape describe the config/web resource; done means it no longer returns the parent site representation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, openapi
- Domain
- api, cloud
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100