Azure / Azure/azure-rest-api-specs

Microsoft.Web/sites properties state should not be read-only

Open
#26,097 0 comments 0 reactions 0 assignees View on GitHub
customer-reported question Service Attention Web Apps
Dominant language
TypeSpec
Stars
3.1k
Forks
5.9k
Avg merge
2d 22h
Merged PRs (30d)
444

Description

According to the Bicep type definition of `Microsoft.Web/sites@2022-01-01` the `state` field in `properties` is read-only. (This
See:
https://github.com/Azure/bicep-types-az/blob/main/generated/web/microsoft.web/2022-09-01/types.md#siteproperties
and:
I followed their guidance (https://github.com/Azure/bicep-types-az/blob/main/docs/troubleshooting.md#api-spec-swagger-inaccuracies) and saw the corresponding swagger definition line:
https://github.com/Azure/azure-rest-api-specs/blob/969fd0c2634fbcc1975d7abe3749330a5145a97c/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/WebApps.json#L28460

However, prompted by this SO answer when attempting to deploy an Azure Function App in a "Stopped" state https://stackoverflow.com/a/67699248/2847307 I set the value to "Stopped" and, sure enough the (pre-existing) FunctionApp updated from Running to Stopped. I changed the value to "Running" and sure enough, the Status of the function app in Azure Portal changed to "Running".

![image](https://github.com/Azure/azure-rest-api-specs/assets/3879516/686216d9-96be-41fd-ab97-05cbc2d11e06)

Therefore I conclude that the property is not read-only and should not be marked as such!

Can you update the definition & possibly prompt the Azure documentation to show its usage?

Cheers,
Greg

Contributor guide

Open the contributing guide

Research direction

Start with the referenced WebApps.json line for the Microsoft.Web/sites properties state field, then compare its generated representation in the linked bicep-types-az types.md. Confirm the field's read-only metadata and how the generated definition is produced. Done means the API specification and generated type agree that state is writable, with any requested documentation usage addressed.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, openapi
Domain
api, cloud
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.