ARM Error
ARM OpenAPI(swagger) specs
- RPC-Async-V1-16
This is a rule introduced to validate if provisioningState property is set to readOnly.
Set the provisioningState
property readOnly
, i.e, "readOnly": true
should be added to "provisioningState" property.
Make sure to add the "readOnly": true
to the actual "provisioningState" definition and not to the envelope property(i.e, property that references the actual definition)
provisioningState without readOnly
"put": {
"responses": {
"200": {
"description": "Success",
"schema": {
"$ref": "#/definitions/FooProps",
},
},
}
}
"definitions": {
"FooProps": {
"properties": {
"provisioningState": {
"type": "string",
"description": "Provisioning state of the foo rule.",
"enum": ["Creating", "Canceled", "Deleting", "Failed"],
},
},
},
}
provisioningState with readOnly defined in the envelope property and not in the actual definition
"put": {
"responses": {
"200": {
"description": "Success",
"schema": {
"$ref": "#/definitions/FooRule",
},
},
}
}
"definitions": {
"ProvisioningState": {
"type": "string",
"enum": ["Succeeded", "Failed", "Canceled"],
"x-ms-enum": {
"name": "ProvisioningState",
"modelAsString": true,
},
},
"FooRule": {
"type": "object",
"properties": {
"properties": {
"$ref": "#/definitions/FooProps",
"x-ms-client-flatten": true,
},
},
},
"FooProps": {
"properties": {
"provisioningState": {
"$ref": "#/definitions/ProvisioningState",
"readOnly": true,
},
},
}
}
provisioningState with readOnly defined
"put": {
"responses": {
"200": {
"description": "Success",
"schema": {
"$ref": "#/definitions/FooProps",
},
},
}
}
"definitions": {
"FooProps": {
"properties": {
"provisioningState": {
"type": "string",
"readOnly": true,
"description": "Provisioning state of the foo rule.",
"enum": ["Creating", "Canceled", "Deleting", "Failed"],
},
},
},
}
provisioningState with readOnly defined in the actual definition
"put": {
"responses": {
"200": {
"description": "Success",
"schema": {
"$ref": "#/definitions/FooRule",
},
},
}
}
"definitions": {
"ProvisioningState": {
"type": "string",
"description": "Provisioning state of the foo rule.",
"readOnly": true,
"enum": ["Succeeded", "Failed", "Canceled"],
},
"FooRule": {
"type": "object",
"properties": {
"properties": {
"$ref": "#/definitions/FooProps",
"x-ms-client-flatten": true,
},
},
},
"FooProps": {
"properties": {
"provisioningState": {
"$ref": "#/definitions/ProvisioningState",
},
},
}
}