Skip to content

Latest commit

 

History

History
75 lines (70 loc) · 1.93 KB

1029.md

File metadata and controls

75 lines (70 loc) · 1.93 KB

1029 - ReadonlyPropertyChanged

Description: Checks whether property's readonly has changed from the previous specification.

Cause: This is considered a breaking change.

Example: readonly of property message removed in the new version.

Old specification

{
  "swagger": "2.0",
  "info": {
    "title": "swagger",
    "description": "The Azure Management API.",
    "version": "2016-12-01",
    ...
    ...
  "definitions": {
    "CloudError": {
      "description": "Error from a REST request.",
      "type": "object",
      "properties": { "error": { "$ref": "#/definitions/CloudErrorBody" } },
      "x-ms-external": true
    },
    "CloudErrorBody": {
      "description": "Body of an error from a REST request.",
      "type": "object",
      "properties": {
        "code": { "type": "string" },
        "message": { "type": "string" },
        "target": { "type": "string" },
        "details": {
          "description": "Inner errors.",
          "type": "array",
          "items": { "$ref": "#/definitions/CloudErrorBody" }
        }
      }
    },
        ...  

New specification

{
  "swagger": "2.0",
  "info": {
    "title": "swagger",
    "description": "The Azure Management API.",
    "version": "2016-12-01",
    ...
    ...
 "definitions": {
    "CloudError": {
      "description": "Error from a REST request.",
      "type": "object",
      "properties": { "error": { "$ref": "#/definitions/CloudErrorBody" } },
      "x-ms-external": true
    },
    "CloudErrorBody": {
      "description": "Body of an error from a REST request.",
      "type": "object",
      "properties": {
        "code": { "type": "string" },
        "message": { "type": "string", "readOnly":  true},
        "target": { "type": "string" },
        "details": {
          "description": "Inner errors.",
          "type": "array",
          "items": { "$ref": "#/definitions/CloudErrorBody" }
        }
      }
    },
        ...