Skip to content

Latest commit

 

History

History
72 lines (67 loc) · 1.54 KB

1034.md

File metadata and controls

72 lines (67 loc) · 1.54 KB

1034 - AddedRequiredProperty

Description: Checks whether a new required property has added from the previous specification.

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

Example: Property b is being added 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" ]
        }
      },
      "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" ]
        }
      },
      "required": [
        "a",
        "b"
      ],
      "description": "The parameters used when create operation."
    },
    ...