Skip to content

Latest commit

 

History

History
68 lines (63 loc) · 1.35 KB

1014.md

File metadata and controls

68 lines (63 loc) · 1.35 KB

1014 - RemovingHeader

Description: Checks whether any existing header is removed from the previous specification.

Cause: This is considered a breaking change.

Example: Response code 200 removed header x-b in the new version.

Old specification

{
  "swagger": "2.0",
  "info": {
    "title": "swagger",
    "description": "The Azure Management API.",
    "version": "2016-12-01",
    ...
    ...
  "paths": {
    "/subscriptions/{subscriptionId}/providers/Microsoft.Contoso/resource1/{a}": {
      "delete": {
        ...
        "responses": {
          "200" : { 
            ... 
            "headers": {
              "x-a": { "type": "string" },
              "x-b": { "type": "integer" }
            }
          },
          "204" : { ... }
        }
        ...
      }
    }
    ...
    ...  

New specification

{
  "swagger": "2.0",
  "info": {
    "title": "swagger",
    "description": "The Azure Management API.",
    "version": "2016-12-01",
    ...
    ...
  "paths": {
    "/subscriptions/{subscriptionId}/providers/Microsoft.Contoso/resource1/{a}": {
      "delete": {
        ...
        "responses": {
          "200" : { 
            ... 
            "headers": {
              "x-a": { "type": "string" }
            }
          },
          "204" : { ... }
        }
        ...
      }
    }
    ...
    ...