Skip to content

Commit 49df057

Browse files
committed
Fix ProvisioningStateMustBeReadOnly: add use-read-only-status-schema and remove suppressions
1 parent 5925a07 commit 49df057

File tree

4 files changed

+37
-42
lines changed

4 files changed

+37
-42
lines changed

specification/cognitiveservices/CognitiveServices.Management/tspconfig.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ options:
99
azure-resource-provider-folder: "resource-manager"
1010
output-file: "{azure-resource-provider-folder}/{service-name}/{version-status}/{version}/cognitiveservices.json"
1111
emit-lro-options: "all"
12+
use-read-only-status-schema: true
1213
examples-dir: "{project-root}/examples"
1314
"@azure-typespec/http-client-csharp-mgmt":
1415
namespace: "Azure.ResourceManager.CognitiveServices"

specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/preview/2025-10-01-preview/cognitiveservices.json

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10041,7 +10041,8 @@
1004110041
"description": "The deployment is being deleted."
1004210042
}
1004310043
]
10044-
}
10044+
},
10045+
"readOnly": true
1004510046
},
1004610047
"AgentDeploymentResourceArmPaginatedResult": {
1004710048
"type": "object",
@@ -10354,7 +10355,8 @@
1035410355
"description": "The application is being deleted."
1035510356
}
1035610357
]
10357-
}
10358+
},
10359+
"readOnly": true
1035810360
},
1035910361
"ApiKeyAuthConnectionProperties": {
1036010362
"type": "object",
@@ -10805,7 +10807,8 @@
1080510807
"value": "Deleting"
1080610808
}
1080710809
]
10808-
}
10810+
},
10811+
"readOnly": true
1080910812
},
1081010813
"CapabilityHostResourceArmPaginatedResult": {
1081110814
"type": "object",
@@ -11198,7 +11201,8 @@
1119811201
"value": "Canceled"
1119911202
}
1120011203
]
11201-
}
11204+
},
11205+
"readOnly": true
1120211206
},
1120311207
"CommitmentQuota": {
1120411208
"type": "object",
@@ -12778,7 +12782,8 @@
1277812782
"value": "Canceled"
1277912783
}
1278012784
]
12781-
}
12785+
},
12786+
"readOnly": true
1278212787
},
1278312788
"DeploymentScaleSettings": {
1278412789
"type": "object",
@@ -13066,7 +13071,8 @@
1306613071
"value": "Canceled"
1306713072
}
1306813073
]
13069-
}
13074+
},
13075+
"readOnly": true
1307013076
},
1307113077
"EncryptionScopeState": {
1307213078
"type": "string",
@@ -13328,7 +13334,8 @@
1332813334
"description": "Identity is being deleted."
1332913335
}
1333013336
]
13331-
}
13337+
},
13338+
"readOnly": true
1333213339
},
1333313340
"IpRule": {
1333413341
"type": "object",
@@ -13541,7 +13548,8 @@
1354113548
"value": "Deleted"
1354213549
}
1354313550
]
13544-
}
13551+
},
13552+
"readOnly": true
1354513553
},
1354613554
"ManagedNetworkSettings": {
1354713555
"type": "object",
@@ -14878,7 +14886,8 @@
1487814886
"value": "ResolvingDNS"
1487914887
}
1488014888
]
14881-
}
14889+
},
14890+
"readOnly": true
1488214891
},
1488314892
"PublicNetworkAccess": {
1488414893
"type": "string",

specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2025-12-01/cognitiveservices.json

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10041,7 +10041,8 @@
1004110041
"description": "The deployment is being deleted."
1004210042
}
1004310043
]
10044-
}
10044+
},
10045+
"readOnly": true
1004510046
},
1004610047
"AgentDeploymentResourceArmPaginatedResult": {
1004710048
"type": "object",
@@ -10354,7 +10355,8 @@
1035410355
"description": "The application is being deleted."
1035510356
}
1035610357
]
10357-
}
10358+
},
10359+
"readOnly": true
1035810360
},
1035910361
"ApiKeyAuthConnectionProperties": {
1036010362
"type": "object",
@@ -10805,7 +10807,8 @@
1080510807
"value": "Deleting"
1080610808
}
1080710809
]
10808-
}
10810+
},
10811+
"readOnly": true
1080910812
},
1081010813
"CapabilityHostResourceArmPaginatedResult": {
1081110814
"type": "object",
@@ -11198,7 +11201,8 @@
1119811201
"value": "Canceled"
1119911202
}
1120011203
]
11201-
}
11204+
},
11205+
"readOnly": true
1120211206
},
1120311207
"CommitmentQuota": {
1120411208
"type": "object",
@@ -12778,7 +12782,8 @@
1277812782
"value": "Canceled"
1277912783
}
1278012784
]
12781-
}
12785+
},
12786+
"readOnly": true
1278212787
},
1278312788
"DeploymentScaleSettings": {
1278412789
"type": "object",
@@ -13066,7 +13071,8 @@
1306613071
"value": "Canceled"
1306713072
}
1306813073
]
13069-
}
13074+
},
13075+
"readOnly": true
1307013076
},
1307113077
"EncryptionScopeState": {
1307213078
"type": "string",
@@ -13328,7 +13334,8 @@
1332813334
"description": "Identity is being deleted."
1332913335
}
1333013336
]
13331-
}
13337+
},
13338+
"readOnly": true
1333213339
},
1333313340
"IpRule": {
1333413341
"type": "object",
@@ -13541,7 +13548,8 @@
1354113548
"value": "Deleted"
1354213549
}
1354313550
]
13544-
}
13551+
},
13552+
"readOnly": true
1354513553
},
1354613554
"ManagedNetworkSettings": {
1354713555
"type": "object",
@@ -14878,7 +14886,8 @@
1487814886
"value": "ResolvingDNS"
1487914887
}
1488014888
]
14881-
}
14889+
},
14890+
"readOnly": true
1488214891
},
1488314892
"PublicNetworkAccess": {
1488414893
"type": "string",

specification/cognitiveservices/resource-manager/readme.md

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -41,18 +41,6 @@ These settings apply only when `--tag=package-2025-12-01` is specified on the co
4141
input-file:
4242
- Microsoft.CognitiveServices/stable/2025-12-01/cognitiveservices.json
4343
suppressions:
44-
- code: ProvisioningStateMustBeReadOnly
45-
reason: Schema ref is AgentApplicationResource -> AgenticApplication. AgenticApplication has a readonly provisioning state.
46-
where:
47-
- $.paths["/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/projects/{projectName}/applications/{name}"].get.responses.200.schema
48-
- $.paths["/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/projects/{projectName}/applications/{name}"].put.responses.200.schema
49-
- $.paths["/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/projects/{projectName}/applications/{name}"].put.responses.201.schema
50-
- code: ProvisioningStateMustBeReadOnly
51-
reason: Schema ref is AgentDeploymentResource -> AgentDeployment. AgentDeployment has a readonly provisioning state.
52-
where:
53-
- $.paths["/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/projects/{projectName}/applications/{appName}/agentDeployments/{deploymentName}"].get.responses.200.schema
54-
- $.paths["/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/projects/{projectName}/applications/{appName}/agentDeployments/{deploymentName}"].put.responses.200.schema
55-
- $.paths["/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/projects/{projectName}/applications/{appName}/agentDeployments/{deploymentName}"].put.responses.201.schema
5644
- code: ArmResourcePropertiesBag
5745
reason: This API is copied from Machine Learning Services RP where this behavior is already established.
5846
where:
@@ -144,18 +132,6 @@ These settings apply only when `--tag=package-2025-10-01-preview` is specified o
144132
input-file:
145133
- Microsoft.CognitiveServices/preview/2025-10-01-preview/cognitiveservices.json
146134
suppressions:
147-
- code: ProvisioningStateMustBeReadOnly
148-
reason: Schema ref is AgentApplicationResource -> AgenticApplication. AgenticApplication has a readonly provisioning state.
149-
where:
150-
- $.paths["/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/projects/{projectName}/applications/{name}"].get.responses.200.schema
151-
- $.paths["/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/projects/{projectName}/applications/{name}"].put.responses.200.schema
152-
- $.paths["/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/projects/{projectName}/applications/{name}"].put.responses.201.schema
153-
- code: ProvisioningStateMustBeReadOnly
154-
reason: Schema ref is AgentDeploymentResource -> AgentDeployment. AgentDeployment has a readonly provisioning state.
155-
where:
156-
- $.paths["/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/projects/{projectName}/applications/{appName}/agentDeployments/{deploymentName}"].get.responses.200.schema
157-
- $.paths["/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/projects/{projectName}/applications/{appName}/agentDeployments/{deploymentName}"].put.responses.200.schema
158-
- $.paths["/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/projects/{projectName}/applications/{appName}/agentDeployments/{deploymentName}"].put.responses.201.schema
159135
- code: ArmResourcePropertiesBag
160136
reason: This API is copied from Machine Learning Services RP where this behavior is already established.
161137
where:

0 commit comments

Comments
 (0)