Skip to content

Latest commit

 

History

History
93 lines (88 loc) · 1.9 KB

1015.md

File metadata and controls

93 lines (88 loc) · 1.9 KB

1015 - ParameterInHasChanged

Description: Checks whether any parameter's in is changed from the previous specification.

Cause: This is considered a breaking change.

Example: Parameter b is changed from being query parameter to body parameter 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}": {
      "get": {
        ...
        ...
        "parameters": [
          {
            "name": "subscriptionId",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "a",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "b",
            "in": "query",
            "required": false,
            "type": "string"
          }
        ]
        ...
        ...
      }
    }
    ...
    ...  

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}": {
      "get": {
        ...
        ...
        "parameters": [
          {
            "name": "subscriptionId",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "a",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "b",
            "in": "body",
            "required": false,
            "type": "string"
          }
        ]
        ...
        ...
      }
    }
    ...
    ...