Skip to content

Latest commit

 

History

History
109 lines (104 loc) · 2.26 KB

1025.md

File metadata and controls

109 lines (104 loc) · 2.26 KB

1025 - RequiredStatusChange

Description: Checks whether an existing property's required status is changed from the previous specification.

Cause: This is considered a breaking change in the same api-version but not breaking in new api-version .

Example: required status for parameter b is changed from false to true without revising api-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"
          },
          {
            "name": "c",
            "in": "query",
            "type": "string"
          }
        ]
        ...
        ...
      },
      "put": {
        ...
      }
    }
    ...
    ...  

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": "query",
            "required": true,
            "type": "string"
          },
          {
            "name": "c",
            "in": "query",
            "type": "string"
          }
        ]
        ...
        ...
      },
      "put": {
        ...
      }
    }
    ...
    ...