Skip to content

Latest commit

 

History

History
95 lines (90 loc) · 2.23 KB

1016.md

File metadata and controls

95 lines (90 loc) · 2.23 KB

1016 - ConstantStatusHasChanged

Description: Checks whether any parameter that used to accept only one value now accepts more from the previous specification.

Cause: This is considered a breaking change.

Example: Property type of parameter Parameters is required and enum with one value Microsoft.Storage/storageAccounts in old specification and new version accepts more values.

Old specification

{
  "swagger": "2.0",
  "info": {
    "title": "swagger",
    "description": "The Azure Management API.",
    "version": "2016-12-01",
    ...
    ...
  "paths:" {
    "/subscriptions/{subscriptionId}/providers/Microsoft.Contoso/resource1": {
      "get": {
        ...
        "responses": {
          "200": {
            "schema": {
              "$ref": "#/definitions/Parameters"
            }
          }
        }
      }
  }
  "definitions": {
    ...
    ...
    "Parameters": {
      "properties": {
        "name": {
          "type": "string",
          "description": "Property name."
        },
        "type": {
          "type": "string",
          "description": "Enum Property type.",
          "enum": [ "Microsoft.Storage/storageAccounts" ],
          "required": true
        }
      },
      "description": "The parameters used when get operation."
    },
    ...  

New specification

{
  "swagger": "2.0",
  "info": {
    "title": "swagger",
    "description": "The Azure Management API.",
    "version": "2016-12-01",
    ...
    ...
  "paths:" {
    "/subscriptions/{subscriptionId}/providers/Microsoft.Contoso/resource1": {
      "get": {
        ...
        "responses": {
          "200": {
            "schema": {
              "$ref": "#/definitions/Parameters"
            }
          }
        }
      }
  }
  "definitions": {
    ...
    ...
    "Parameters": {
      "properties": {
        "name": {
          "type": "string",
          "description": "Property name."
        },
        "type": {
          "type": "string",
          "description": "Enum Property type.",
          "enum": [ "Microsoft.Storage/storageAccounts", "Microsoft.Storage/customStorageAccounts" ],
          "required": true
        }
      },
      "description": "The parameters used when get operation."
    },
    ...