Skip to content

Latest commit

 

History

History
71 lines (66 loc) · 1.57 KB

1019.md

File metadata and controls

71 lines (66 loc) · 1.57 KB

1019 - RemovedEnumValue

Description: Checks whether an existing enum property has removed allowed values from the previous specification.

Cause: This is considered a breaking change. This change requires new api-version.

Example: Enum Property b is removing allowed values without revising api-version.

Old specification

{
  "swagger": "2.0",
  "info": {
    "title": "swagger",
    "description": "The Azure Management API.",
    "version": "2016-12-01",
    ...
    ...
  "definitions": {
    ...
    "CreateParameters": {
      "properties": {
        "a": {
          "type": "string",
          "description": "Required. Property a."
        },
        "b": {
          "type": "string",
          "description": "Required. Enum Property b.",
          "enum": [ "b1", "b2", "b3", "b4" ]
        }
      },
      "required": [
        "a"
      ],
      "description": "The parameters used when create operation."
    },
    ...  

New specification

{
  "swagger": "2.0",
  "info": {
    "title": "swagger",
    "description": "The Azure Management API.",
    "version": "2016-12-01",
    ...
    ...
  "definitions": {
    ...
    "CreateParameters": {
      "properties": {
        "a": {
          "type": "string",
          "description": "Required. Property a."
        },
        "b": {
          "type": "string",
          "description": "Required. Enum Property b.",
          "enum": [ "b1", "b2", "b4" ]
        }
      },
      "required": [
        "a"
      ],
      "description": "The parameters used when create operation."
    },
    ...