Skip to content

Latest commit

 

History

History
48 lines (31 loc) · 1.36 KB

required-read-only-system-data.md

File metadata and controls

48 lines (31 loc) · 1.36 KB

RequiredReadOnlySystemData

Category

ARM Error

Applies to

ARM OpenAPI(swagger) specs

Output Message

  1. if missing the systemData , output: The response of operation '{operationId}' is defined without 'systemData'. Consider adding the systemData to the response.

  2. if the systemData is not read only, output: The property systemData in the response of operation:'${operationId}' is not read only. Please add the readonly for the systemData.

Description

Per common-api-contracts, all Azure resources should implement the systemData object property in new api-version. The systemData should be readonly.

CreatedAt

May 21, 2020

LastModifiedAt

February 26, 2021

How to fix the violation

For each response in the GET/PUT/PATCH operation add a readonly systemData property. It's recommended to refer to the 'systemData' defined in v2/types.json which is provided for fixing the error.

"MyResource": {
  "properties": {
    ...
    ...
    "systemData": {
      "$ref": "v2/types.json#/definitions/systemData",
       "readOnly" : true
    }
  }
}