Skip to content

Latest commit

 

History

History
67 lines (62 loc) · 1.52 KB

1036.md

File metadata and controls

67 lines (62 loc) · 1.52 KB

1036 - ConstraintChanged

Description: Checks whether any property's constraint like maximum, minimum, minLength, maxLength etc. has changed from the previous specification.

Cause: This is considered a breaking change.

Example: Value of maxItems element of property a is changed from 5000 to 2000 in the new version.

Old specification

{
  "swagger": "2.0",
  "info": {
    "title": "swagger",
    "description": "The Azure Management API.",
    "version": "2016-12-01",
    ...
    ...
  "definitions": {
    ...
    "CreateParameters": {
      "properties": {
        "a": {
          "type": "array",
          "description": "Property a.",
          "minItems": 11,
          "maxItems": 5000,
          "collectionFormat": "pipes",
          "items": {
            "type": "integer",
            "minimum": 11,
            "maximum": 21,
            "multipleOf": 4
          }
        },
        ... 

New specification

{
  "swagger": "2.0",
  "info": {
    "title": "swagger",
    "description": "The Azure Management API.",
    "version": "2016-12-01",
    ...
    ...
  "definitions": {
    ...
    "CreateParameters": {
      "properties": {
        "a": {
          "type": "array",
          "description": "Property a.",
          "minItems": 11,
          "maxItems": 2000,
          "collectionFormat": "pipes",
          "items": {
            "type": "integer",
            "minimum": 11,
            "maximum": 21,
            "multipleOf": 4
          }
        },
        ...