// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`breaking changes ruleset invalid union type enum transition in request 1`] = `
[
  {
    "change": {
      "added": {
        "flatSchema": {
          "type": "string",
        },
        "key": "id",
        "required": false,
      },
      "changeType": "added",
      "location": {
        "conceptualLocation": {
          "inRequest": {
            "body": {
              "contentType": "application/json",
            },
          },
          "jsonSchemaTrail": [
            "id",
          ],
          "method": "get",
          "path": "/api/users",
        },
        "conceptualPath": [
          "operations",
          "/api/users",
          "get",
          "application/json",
          "oneOf",
          "1",
          "id",
        ],
        "jsonPath": "/paths/~1api~1users/get/requestBody/content/application~1json/schema/oneOf/1/properties/id",
        "kind": "field",
      },
    },
    "condition": undefined,
    "docsLink": undefined,
    "error": undefined,
    "expected": undefined,
    "isMust": true,
    "isShould": false,
    "name": "prevent changing request property to required",
    "passed": true,
    "received": undefined,
    "severity": 2,
    "type": "added",
    "where": "GET /api/users request body: application/json property: id",
  },
  {
    "change": {
      "added": {
        "flatSchema": {
          "enum": [
            "online",
          ],
          "type": "string",
        },
        "key": "status",
        "required": false,
      },
      "changeType": "added",
      "location": {
        "conceptualLocation": {
          "inRequest": {
            "body": {
              "contentType": "application/json",
            },
          },
          "jsonSchemaTrail": [
            "status",
          ],
          "method": "get",
          "path": "/api/users",
        },
        "conceptualPath": [
          "operations",
          "/api/users",
          "get",
          "application/json",
          "oneOf",
          "1",
          "status",
        ],
        "jsonPath": "/paths/~1api~1users/get/requestBody/content/application~1json/schema/oneOf/1/properties/status",
        "kind": "field",
      },
    },
    "condition": undefined,
    "docsLink": undefined,
    "error": undefined,
    "expected": undefined,
    "isMust": true,
    "isShould": false,
    "name": "prevent changing request property to required",
    "passed": true,
    "received": undefined,
    "severity": 2,
    "type": "added",
    "where": "GET /api/users request body: application/json property: status",
  },
  {
    "change": {
      "changeType": "changed",
      "changed": {
        "after": {
          "contentType": "application/json",
          "flatSchema": {
            "oneOf": [
              {
                "type": "number",
              },
              {
                "properties": {
                  "id": {
                    "type": "string",
                  },
                  "status": {
                    "enum": [
                      "online",
                    ],
                    "type": "string",
                  },
                },
                "type": "object",
              },
            ],
          },
        },
        "before": {
          "contentType": "application/json",
          "flatSchema": {
            "type": [
              "number",
              "object",
            ],
          },
        },
      },
      "location": {
        "conceptualLocation": {
          "inRequest": {
            "body": {
              "contentType": "application/json",
            },
          },
          "method": "get",
          "path": "/api/users",
        },
        "conceptualPath": [
          "operations",
          "/api/users",
          "get",
          "application/json",
        ],
        "jsonPath": "/paths/~1api~1users/get/requestBody/content/application~1json",
        "kind": "body",
      },
    },
    "condition": undefined,
    "docsLink": undefined,
    "error": undefined,
    "exempted": false,
    "expected": undefined,
    "isMust": true,
    "isShould": false,
    "name": "prevent request property type changes",
    "passed": true,
    "received": undefined,
    "severity": 2,
    "type": "changed",
    "where": "GET /api/users request body: application/json",
  },
  {
    "change": {
      "changeType": "changed",
      "changed": {
        "after": {
          "contentType": "application/json",
          "flatSchema": {
            "oneOf": [
              {
                "type": "number",
              },
              {
                "properties": {
                  "id": {
                    "type": "string",
                  },
                  "status": {
                    "enum": [
                      "online",
                    ],
                    "type": "string",
                  },
                },
                "type": "object",
              },
            ],
          },
        },
        "before": {
          "contentType": "application/json",
          "flatSchema": {
            "type": [
              "number",
              "object",
            ],
          },
        },
      },
      "location": {
        "conceptualLocation": {
          "inRequest": {
            "body": {
              "contentType": "application/json",
            },
          },
          "method": "get",
          "path": "/api/users",
        },
        "conceptualPath": [
          "operations",
          "/api/users",
          "get",
          "application/json",
        ],
        "jsonPath": "/paths/~1api~1users/get/requestBody/content/application~1json",
        "kind": "body",
      },
    },
    "condition": undefined,
    "docsLink": undefined,
    "error": "request body changed to oneOf did not overlap with the previous schema. oneOf/1/status: enums offline were added",
    "exempted": false,
    "expected": undefined,
    "isMust": true,
    "isShould": false,
    "name": "prevent expanded in request union types",
    "passed": false,
    "received": undefined,
    "severity": 2,
    "type": "changed",
    "where": "GET /api/users request body: application/json",
  },
]
`;

exports[`breaking changes ruleset invalid union type enum transition in response 1`] = `
[
  {
    "change": {
      "changeType": "removed",
      "location": {
        "conceptualLocation": {
          "inResponse": {
            "body": {
              "contentType": "application/json",
            },
            "statusCode": "200",
          },
          "jsonSchemaTrail": [
            "id",
          ],
          "method": "get",
          "path": "/api/users",
        },
        "conceptualPath": [
          "operations",
          "/api/users",
          "get",
          "responses",
          "200",
          "application/json",
          "id",
        ],
        "jsonPath": "/paths/~1api~1users/get/responses/200/content/application~1json/schema/properties/id",
        "kind": "field",
      },
      "removed": {
        "before": {
          "flatSchema": {
            "type": "string",
          },
          "key": "id",
          "required": false,
        },
      },
    },
    "condition": undefined,
    "docsLink": undefined,
    "error": undefined,
    "exempted": false,
    "expected": undefined,
    "isMust": true,
    "isShould": false,
    "name": "prevent removing response property",
    "passed": true,
    "received": undefined,
    "severity": 2,
    "type": "removed",
    "where": "GET /api/users response 200 response body: application/json property id",
  },
  {
    "change": {
      "changeType": "removed",
      "location": {
        "conceptualLocation": {
          "inResponse": {
            "body": {
              "contentType": "application/json",
            },
            "statusCode": "200",
          },
          "jsonSchemaTrail": [
            "status",
          ],
          "method": "get",
          "path": "/api/users",
        },
        "conceptualPath": [
          "operations",
          "/api/users",
          "get",
          "responses",
          "200",
          "application/json",
          "status",
        ],
        "jsonPath": "/paths/~1api~1users/get/responses/200/content/application~1json/schema/properties/status",
        "kind": "field",
      },
      "removed": {
        "before": {
          "flatSchema": {
            "enum": [
              "online",
            ],
            "type": "string",
          },
          "key": "status",
          "required": false,
        },
      },
    },
    "condition": undefined,
    "docsLink": undefined,
    "error": undefined,
    "exempted": false,
    "expected": undefined,
    "isMust": true,
    "isShould": false,
    "name": "prevent removing response property",
    "passed": true,
    "received": undefined,
    "severity": 2,
    "type": "removed",
    "where": "GET /api/users response 200 response body: application/json property status",
  },
  {
    "change": {
      "changeType": "changed",
      "changed": {
        "after": {
          "contentType": "application/json",
          "flatSchema": {
            "oneOf": [
              {
                "type": "number",
              },
              {
                "properties": {
                  "id": {
                    "type": "string",
                  },
                  "status": {
                    "enum": [
                      "online",
                      "offline",
                    ],
                    "type": "string",
                  },
                },
                "type": "object",
              },
            ],
          },
        },
        "before": {
          "contentType": "application/json",
          "flatSchema": {
            "type": [
              "number",
              "object",
            ],
          },
        },
      },
      "location": {
        "conceptualLocation": {
          "inResponse": {
            "body": {
              "contentType": "application/json",
            },
            "statusCode": "200",
          },
          "method": "get",
          "path": "/api/users",
        },
        "conceptualPath": [
          "operations",
          "/api/users",
          "get",
          "responses",
          "200",
          "application/json",
        ],
        "jsonPath": "/paths/~1api~1users/get/responses/200/content/application~1json",
        "kind": "body",
      },
    },
    "condition": undefined,
    "docsLink": undefined,
    "error": undefined,
    "exempted": false,
    "expected": undefined,
    "isMust": true,
    "isShould": false,
    "name": "prevent response property type changes",
    "passed": true,
    "received": undefined,
    "severity": 2,
    "type": "changed",
    "where": "GET /api/users response 200 response body: application/json",
  },
  {
    "change": {
      "changeType": "changed",
      "changed": {
        "after": {
          "contentType": "application/json",
          "flatSchema": {
            "oneOf": [
              {
                "type": "number",
              },
              {
                "properties": {
                  "id": {
                    "type": "string",
                  },
                  "status": {
                    "enum": [
                      "online",
                      "offline",
                    ],
                    "type": "string",
                  },
                },
                "type": "object",
              },
            ],
          },
        },
        "before": {
          "contentType": "application/json",
          "flatSchema": {
            "type": [
              "number",
              "object",
            ],
          },
        },
      },
      "location": {
        "conceptualLocation": {
          "inResponse": {
            "body": {
              "contentType": "application/json",
            },
            "statusCode": "200",
          },
          "method": "get",
          "path": "/api/users",
        },
        "conceptualPath": [
          "operations",
          "/api/users",
          "get",
          "responses",
          "200",
          "application/json",
        ],
        "jsonPath": "/paths/~1api~1users/get/responses/200/content/application~1json",
        "kind": "body",
      },
    },
    "condition": undefined,
    "docsLink": undefined,
    "error": "response body changed to oneOf did not overlap with the previous schema. /status: enums offline were removed",
    "exempted": false,
    "expected": undefined,
    "isMust": true,
    "isShould": false,
    "name": "prevent narrowing in response union types",
    "passed": false,
    "received": undefined,
    "severity": 2,
    "type": "changed",
    "where": "GET /api/users response 200 response body: application/json",
  },
]
`;

exports[`breaking changes ruleset invalid union type transition 1`] = `
[
  {
    "change": {
      "changeType": "removed",
      "location": {
        "conceptualLocation": {
          "inResponse": {
            "body": {
              "contentType": "application/json",
            },
            "statusCode": "200",
          },
          "jsonSchemaTrail": [
            "id",
          ],
          "method": "get",
          "path": "/api/users",
        },
        "conceptualPath": [
          "operations",
          "/api/users",
          "get",
          "responses",
          "200",
          "application/json",
          "id",
        ],
        "jsonPath": "/paths/~1api~1users/get/responses/200/content/application~1json/schema/properties/id",
        "kind": "field",
      },
      "removed": {
        "before": {
          "flatSchema": {
            "type": "string",
          },
          "key": "id",
          "required": true,
        },
      },
    },
    "condition": undefined,
    "docsLink": undefined,
    "error": undefined,
    "exempted": false,
    "expected": undefined,
    "isMust": true,
    "isShould": false,
    "name": "prevent removing response property",
    "passed": true,
    "received": undefined,
    "severity": 2,
    "type": "removed",
    "where": "GET /api/users response 200 response body: application/json property id",
  },
  {
    "change": {
      "changeType": "removed",
      "location": {
        "conceptualLocation": {
          "inResponse": {
            "body": {
              "contentType": "application/json",
            },
            "statusCode": "200",
          },
          "jsonSchemaTrail": [
            "name",
          ],
          "method": "get",
          "path": "/api/users",
        },
        "conceptualPath": [
          "operations",
          "/api/users",
          "get",
          "responses",
          "200",
          "application/json",
          "name",
        ],
        "jsonPath": "/paths/~1api~1users/get/responses/200/content/application~1json/schema/properties/name",
        "kind": "field",
      },
      "removed": {
        "before": {
          "flatSchema": {
            "type": "string",
          },
          "key": "name",
          "required": true,
        },
      },
    },
    "condition": undefined,
    "docsLink": undefined,
    "error": undefined,
    "exempted": false,
    "expected": undefined,
    "isMust": true,
    "isShould": false,
    "name": "prevent removing response property",
    "passed": true,
    "received": undefined,
    "severity": 2,
    "type": "removed",
    "where": "GET /api/users response 200 response body: application/json property name",
  },
  {
    "change": {
      "changeType": "changed",
      "changed": {
        "after": {
          "contentType": "application/json",
          "flatSchema": {
            "oneOf": [
              {
                "type": "number",
              },
              {
                "properties": {
                  "id": {
                    "type": "string",
                  },
                  "name": {
                    "type": "string",
                  },
                },
                "type": "object",
              },
            ],
          },
        },
        "before": {
          "contentType": "application/json",
          "flatSchema": {
            "type": [
              "number",
              "object",
            ],
          },
        },
      },
      "location": {
        "conceptualLocation": {
          "inResponse": {
            "body": {
              "contentType": "application/json",
            },
            "statusCode": "200",
          },
          "method": "get",
          "path": "/api/users",
        },
        "conceptualPath": [
          "operations",
          "/api/users",
          "get",
          "responses",
          "200",
          "application/json",
        ],
        "jsonPath": "/paths/~1api~1users/get/responses/200/content/application~1json",
        "kind": "body",
      },
    },
    "condition": undefined,
    "docsLink": undefined,
    "error": undefined,
    "exempted": false,
    "expected": undefined,
    "isMust": true,
    "isShould": false,
    "name": "prevent response property type changes",
    "passed": true,
    "received": undefined,
    "severity": 2,
    "type": "changed",
    "where": "GET /api/users response 200 response body: application/json",
  },
  {
    "change": {
      "changeType": "changed",
      "changed": {
        "after": {
          "contentType": "application/json",
          "flatSchema": {
            "oneOf": [
              {
                "type": "number",
              },
              {
                "properties": {
                  "id": {
                    "type": "string",
                  },
                  "name": {
                    "type": "string",
                  },
                },
                "type": "object",
              },
            ],
          },
        },
        "before": {
          "contentType": "application/json",
          "flatSchema": {
            "type": [
              "number",
              "object",
            ],
          },
        },
      },
      "location": {
        "conceptualLocation": {
          "inResponse": {
            "body": {
              "contentType": "application/json",
            },
            "statusCode": "200",
          },
          "method": "get",
          "path": "/api/users",
        },
        "conceptualPath": [
          "operations",
          "/api/users",
          "get",
          "responses",
          "200",
          "application/json",
        ],
        "jsonPath": "/paths/~1api~1users/get/responses/200/content/application~1json",
        "kind": "body",
      },
    },
    "condition": undefined,
    "docsLink": undefined,
    "error": "response body changed to oneOf did not overlap with the previous schema. /id: was made optional, /name: was made optional",
    "exempted": false,
    "expected": undefined,
    "isMust": true,
    "isShould": false,
    "name": "prevent narrowing in response union types",
    "passed": false,
    "received": undefined,
    "severity": 2,
    "type": "changed",
    "where": "GET /api/users response 200 response body: application/json",
  },
]
`;

exports[`breaking changes ruleset operation removal 1`] = `
[
  {
    "change": {
      "changeType": "removed",
      "location": {
        "conceptualLocation": {
          "method": "get",
          "path": "/api/users",
        },
        "conceptualPath": [
          "operations",
          "/api/users",
          "get",
        ],
        "jsonPath": "/paths/~1api~1users/get",
        "kind": "operation",
      },
      "removed": {
        "before": {
          "method": "get",
          "pathPattern": "/api/users",
        },
      },
    },
    "condition": undefined,
    "docsLink": undefined,
    "error": "cannot remove an operation. This is a breaking change.",
    "exempted": false,
    "expected": undefined,
    "isMust": true,
    "isShould": false,
    "name": "prevent operation removal",
    "passed": false,
    "received": undefined,
    "severity": 0,
    "type": "removed",
    "where": "GET /api/users",
  },
]
`;

exports[`breaking changes ruleset request property optional to required 1`] = `
[
  {
    "change": {
      "changeType": "changed",
      "changed": {
        "after": {
          "flatSchema": {
            "type": "string",
          },
          "key": "id",
          "required": true,
        },
        "before": {
          "flatSchema": {
            "type": "string",
          },
          "key": "id",
          "required": false,
        },
      },
      "location": {
        "conceptualLocation": {
          "inRequest": {
            "body": {
              "contentType": "application/json",
            },
          },
          "jsonSchemaTrail": [
            "id",
          ],
          "method": "get",
          "path": "/api/users",
        },
        "conceptualPath": [
          "operations",
          "/api/users",
          "get",
          "application/json",
          "id",
        ],
        "jsonPath": "/paths/~1api~1users/get/requestBody/content/application~1json/schema/properties/id",
        "kind": "field",
      },
    },
    "condition": undefined,
    "docsLink": undefined,
    "error": "cannot make a request property required. This is a breaking change.",
    "expected": undefined,
    "isMust": true,
    "isShould": false,
    "name": "prevent changing request property to required",
    "passed": false,
    "received": undefined,
    "severity": 2,
    "type": "changed",
    "where": "GET /api/users request body: application/json property: id",
  },
  {
    "change": {
      "changeType": "changed",
      "changed": {
        "after": {
          "flatSchema": {
            "type": "string",
          },
          "key": "id",
          "required": true,
        },
        "before": {
          "flatSchema": {
            "type": "string",
          },
          "key": "id",
          "required": false,
        },
      },
      "location": {
        "conceptualLocation": {
          "inRequest": {
            "body": {
              "contentType": "application/json",
            },
          },
          "jsonSchemaTrail": [
            "id",
          ],
          "method": "get",
          "path": "/api/users",
        },
        "conceptualPath": [
          "operations",
          "/api/users",
          "get",
          "application/json",
          "id",
        ],
        "jsonPath": "/paths/~1api~1users/get/requestBody/content/application~1json/schema/properties/id",
        "kind": "field",
      },
    },
    "condition": undefined,
    "docsLink": undefined,
    "error": undefined,
    "expected": undefined,
    "isMust": true,
    "isShould": false,
    "name": "prevent request property type changes",
    "passed": true,
    "received": undefined,
    "severity": 2,
    "type": "changed",
    "where": "GET /api/users request body: application/json property: id",
  },
  {
    "change": {
      "changeType": "changed",
      "changed": {
        "after": {
          "flatSchema": {
            "type": "string",
          },
          "key": "id",
          "required": true,
        },
        "before": {
          "flatSchema": {
            "type": "string",
          },
          "key": "id",
          "required": false,
        },
      },
      "location": {
        "conceptualLocation": {
          "inRequest": {
            "body": {
              "contentType": "application/json",
            },
          },
          "jsonSchemaTrail": [
            "id",
          ],
          "method": "get",
          "path": "/api/users",
        },
        "conceptualPath": [
          "operations",
          "/api/users",
          "get",
          "application/json",
          "id",
        ],
        "jsonPath": "/paths/~1api~1users/get/requestBody/content/application~1json/schema/properties/id",
        "kind": "field",
      },
    },
    "condition": undefined,
    "docsLink": undefined,
    "error": undefined,
    "expected": undefined,
    "isMust": true,
    "isShould": false,
    "name": "prevent expanded in request union types",
    "passed": true,
    "received": undefined,
    "severity": 2,
    "type": "changed",
    "where": "GET /api/users request body: application/json property: id",
  },
]
`;

exports[`breaking changes ruleset request property type change 1`] = `
[
  {
    "change": {
      "changeType": "changed",
      "changed": {
        "after": {
          "flatSchema": {
            "type": "number",
          },
          "key": "id",
          "required": true,
        },
        "before": {
          "flatSchema": {
            "type": "string",
          },
          "key": "id",
          "required": true,
        },
      },
      "location": {
        "conceptualLocation": {
          "inRequest": {
            "body": {
              "contentType": "application/json",
            },
          },
          "jsonSchemaTrail": [
            "id",
          ],
          "method": "get",
          "path": "/api/users",
        },
        "conceptualPath": [
          "operations",
          "/api/users",
          "get",
          "application/json",
          "id",
        ],
        "jsonPath": "/paths/~1api~1users/get/requestBody/content/application~1json/schema/properties/id",
        "kind": "field",
      },
    },
    "condition": undefined,
    "docsLink": undefined,
    "error": undefined,
    "expected": undefined,
    "isMust": true,
    "isShould": false,
    "name": "prevent changing request property to required",
    "passed": true,
    "received": undefined,
    "severity": 2,
    "type": "changed",
    "where": "GET /api/users request body: application/json property: id",
  },
  {
    "change": {
      "changeType": "changed",
      "changed": {
        "after": {
          "flatSchema": {
            "type": "number",
          },
          "key": "id",
          "required": true,
        },
        "before": {
          "flatSchema": {
            "type": "string",
          },
          "key": "id",
          "required": true,
        },
      },
      "location": {
        "conceptualLocation": {
          "inRequest": {
            "body": {
              "contentType": "application/json",
            },
          },
          "jsonSchemaTrail": [
            "id",
          ],
          "method": "get",
          "path": "/api/users",
        },
        "conceptualPath": [
          "operations",
          "/api/users",
          "get",
          "application/json",
          "id",
        ],
        "jsonPath": "/paths/~1api~1users/get/requestBody/content/application~1json/schema/properties/id",
        "kind": "field",
      },
    },
    "condition": undefined,
    "docsLink": undefined,
    "error": "expected request body property 'id' not to be narrowed. This is a breaking change.",
    "expected": undefined,
    "isMust": true,
    "isShould": false,
    "name": "prevent request property type changes",
    "passed": false,
    "received": undefined,
    "severity": 2,
    "type": "changed",
    "where": "GET /api/users request body: application/json property: id",
  },
  {
    "change": {
      "changeType": "changed",
      "changed": {
        "after": {
          "flatSchema": {
            "type": "number",
          },
          "key": "id",
          "required": true,
        },
        "before": {
          "flatSchema": {
            "type": "string",
          },
          "key": "id",
          "required": true,
        },
      },
      "location": {
        "conceptualLocation": {
          "inRequest": {
            "body": {
              "contentType": "application/json",
            },
          },
          "jsonSchemaTrail": [
            "id",
          ],
          "method": "get",
          "path": "/api/users",
        },
        "conceptualPath": [
          "operations",
          "/api/users",
          "get",
          "application/json",
          "id",
        ],
        "jsonPath": "/paths/~1api~1users/get/requestBody/content/application~1json/schema/properties/id",
        "kind": "field",
      },
    },
    "condition": undefined,
    "docsLink": undefined,
    "error": undefined,
    "expected": undefined,
    "isMust": true,
    "isShould": false,
    "name": "prevent expanded in request union types",
    "passed": true,
    "received": undefined,
    "severity": 2,
    "type": "changed",
    "where": "GET /api/users request body: application/json property: id",
  },
]
`;

exports[`breaking changes ruleset required request property added 1`] = `
[
  {
    "change": {
      "added": {
        "flatSchema": {
          "type": "string",
        },
        "key": "anotherKey",
        "required": true,
      },
      "changeType": "added",
      "location": {
        "conceptualLocation": {
          "inRequest": {
            "body": {
              "contentType": "application/json",
            },
          },
          "jsonSchemaTrail": [
            "anotherKey",
          ],
          "method": "get",
          "path": "/api/users",
        },
        "conceptualPath": [
          "operations",
          "/api/users",
          "get",
          "application/json",
          "anotherKey",
        ],
        "jsonPath": "/paths/~1api~1users/get/requestBody/content/application~1json/schema/properties/anotherKey",
        "kind": "field",
      },
    },
    "condition": undefined,
    "docsLink": undefined,
    "error": "cannot add a required request property 'anotherKey' to an existing operation. This is a breaking change.",
    "expected": undefined,
    "isMust": true,
    "isShould": false,
    "name": "prevent changing request property to required",
    "passed": false,
    "received": undefined,
    "severity": 2,
    "type": "added",
    "where": "GET /api/users request body: application/json property: anotherKey",
  },
]
`;

exports[`breaking changes ruleset response property removed 1`] = `
[
  {
    "change": {
      "changeType": "removed",
      "location": {
        "conceptualLocation": {
          "inResponse": {
            "body": {
              "contentType": "application/json",
            },
            "statusCode": "200",
          },
          "jsonSchemaTrail": [
            "name",
          ],
          "method": "get",
          "path": "/api/users",
        },
        "conceptualPath": [
          "operations",
          "/api/users",
          "get",
          "responses",
          "200",
          "application/json",
          "name",
        ],
        "jsonPath": "/paths/~1api~1users/get/responses/200/content/application~1json/schema/properties/name",
        "kind": "field",
      },
      "removed": {
        "before": {
          "flatSchema": {
            "type": "string",
          },
          "key": "name",
          "required": false,
        },
      },
    },
    "condition": undefined,
    "docsLink": undefined,
    "error": "cannot remove response property 'name'. This is a breaking change.",
    "exempted": false,
    "expected": undefined,
    "isMust": true,
    "isShould": false,
    "name": "prevent removing response property",
    "passed": false,
    "received": undefined,
    "severity": 2,
    "type": "removed",
    "where": "GET /api/users response 200 response body: application/json property name",
  },
]
`;

exports[`breaking changes ruleset response property required to optional 1`] = `
[
  {
    "change": {
      "changeType": "changed",
      "changed": {
        "after": {
          "flatSchema": {
            "type": "string",
          },
          "key": "id",
          "required": false,
        },
        "before": {
          "flatSchema": {
            "type": "string",
          },
          "key": "id",
          "required": true,
        },
      },
      "location": {
        "conceptualLocation": {
          "inResponse": {
            "body": {
              "contentType": "application/json",
            },
            "statusCode": "200",
          },
          "jsonSchemaTrail": [
            "id",
          ],
          "method": "get",
          "path": "/api/users",
        },
        "conceptualPath": [
          "operations",
          "/api/users",
          "get",
          "responses",
          "200",
          "application/json",
          "id",
        ],
        "jsonPath": "/paths/~1api~1users/get/responses/200/content/application~1json/schema/properties/id",
        "kind": "field",
      },
    },
    "condition": undefined,
    "docsLink": undefined,
    "error": "cannot make required response property 'id' optional. This is a breaking change.",
    "exempted": false,
    "expected": undefined,
    "isMust": true,
    "isShould": false,
    "name": "prevent making response property optional",
    "passed": false,
    "received": undefined,
    "severity": 2,
    "type": "changed",
    "where": "GET /api/users response 200 response body: application/json property id",
  },
  {
    "change": {
      "changeType": "changed",
      "changed": {
        "after": {
          "flatSchema": {
            "type": "string",
          },
          "key": "id",
          "required": false,
        },
        "before": {
          "flatSchema": {
            "type": "string",
          },
          "key": "id",
          "required": true,
        },
      },
      "location": {
        "conceptualLocation": {
          "inResponse": {
            "body": {
              "contentType": "application/json",
            },
            "statusCode": "200",
          },
          "jsonSchemaTrail": [
            "id",
          ],
          "method": "get",
          "path": "/api/users",
        },
        "conceptualPath": [
          "operations",
          "/api/users",
          "get",
          "responses",
          "200",
          "application/json",
          "id",
        ],
        "jsonPath": "/paths/~1api~1users/get/responses/200/content/application~1json/schema/properties/id",
        "kind": "field",
      },
    },
    "condition": undefined,
    "docsLink": undefined,
    "error": undefined,
    "exempted": false,
    "expected": undefined,
    "isMust": true,
    "isShould": false,
    "name": "prevent response property type changes",
    "passed": true,
    "received": undefined,
    "severity": 2,
    "type": "changed",
    "where": "GET /api/users response 200 response body: application/json property id",
  },
  {
    "change": {
      "changeType": "changed",
      "changed": {
        "after": {
          "flatSchema": {
            "type": "string",
          },
          "key": "id",
          "required": false,
        },
        "before": {
          "flatSchema": {
            "type": "string",
          },
          "key": "id",
          "required": true,
        },
      },
      "location": {
        "conceptualLocation": {
          "inResponse": {
            "body": {
              "contentType": "application/json",
            },
            "statusCode": "200",
          },
          "jsonSchemaTrail": [
            "id",
          ],
          "method": "get",
          "path": "/api/users",
        },
        "conceptualPath": [
          "operations",
          "/api/users",
          "get",
          "responses",
          "200",
          "application/json",
          "id",
        ],
        "jsonPath": "/paths/~1api~1users/get/responses/200/content/application~1json/schema/properties/id",
        "kind": "field",
      },
    },
    "condition": undefined,
    "docsLink": undefined,
    "error": undefined,
    "exempted": false,
    "expected": undefined,
    "isMust": true,
    "isShould": false,
    "name": "prevent narrowing in response union types",
    "passed": true,
    "received": undefined,
    "severity": 2,
    "type": "changed",
    "where": "GET /api/users response 200 response body: application/json property id",
  },
]
`;

exports[`breaking changes ruleset response property type change 1`] = `
[
  {
    "change": {
      "changeType": "changed",
      "changed": {
        "after": {
          "flatSchema": {
            "type": "number",
          },
          "key": "id",
          "required": false,
        },
        "before": {
          "flatSchema": {
            "type": "string",
          },
          "key": "id",
          "required": false,
        },
      },
      "location": {
        "conceptualLocation": {
          "inResponse": {
            "body": {
              "contentType": "application/json",
            },
            "statusCode": "200",
          },
          "jsonSchemaTrail": [
            "id",
          ],
          "method": "get",
          "path": "/api/users",
        },
        "conceptualPath": [
          "operations",
          "/api/users",
          "get",
          "responses",
          "200",
          "application/json",
          "id",
        ],
        "jsonPath": "/paths/~1api~1users/get/responses/200/content/application~1json/schema/properties/id",
        "kind": "field",
      },
    },
    "condition": undefined,
    "docsLink": undefined,
    "error": undefined,
    "exempted": false,
    "expected": undefined,
    "isMust": true,
    "isShould": false,
    "name": "prevent making response property optional",
    "passed": true,
    "received": undefined,
    "severity": 2,
    "type": "changed",
    "where": "GET /api/users response 200 response body: application/json property id",
  },
  {
    "change": {
      "changeType": "changed",
      "changed": {
        "after": {
          "flatSchema": {
            "type": "number",
          },
          "key": "id",
          "required": false,
        },
        "before": {
          "flatSchema": {
            "type": "string",
          },
          "key": "id",
          "required": false,
        },
      },
      "location": {
        "conceptualLocation": {
          "inResponse": {
            "body": {
              "contentType": "application/json",
            },
            "statusCode": "200",
          },
          "jsonSchemaTrail": [
            "id",
          ],
          "method": "get",
          "path": "/api/users",
        },
        "conceptualPath": [
          "operations",
          "/api/users",
          "get",
          "responses",
          "200",
          "application/json",
          "id",
        ],
        "jsonPath": "/paths/~1api~1users/get/responses/200/content/application~1json/schema/properties/id",
        "kind": "field",
      },
    },
    "condition": undefined,
    "docsLink": undefined,
    "error": "expected response body property 'id' not to be expanded. This is a breaking change.",
    "exempted": false,
    "expected": undefined,
    "isMust": true,
    "isShould": false,
    "name": "prevent response property type changes",
    "passed": false,
    "received": undefined,
    "severity": 2,
    "type": "changed",
    "where": "GET /api/users response 200 response body: application/json property id",
  },
  {
    "change": {
      "changeType": "changed",
      "changed": {
        "after": {
          "flatSchema": {
            "type": "number",
          },
          "key": "id",
          "required": false,
        },
        "before": {
          "flatSchema": {
            "type": "string",
          },
          "key": "id",
          "required": false,
        },
      },
      "location": {
        "conceptualLocation": {
          "inResponse": {
            "body": {
              "contentType": "application/json",
            },
            "statusCode": "200",
          },
          "jsonSchemaTrail": [
            "id",
          ],
          "method": "get",
          "path": "/api/users",
        },
        "conceptualPath": [
          "operations",
          "/api/users",
          "get",
          "responses",
          "200",
          "application/json",
          "id",
        ],
        "jsonPath": "/paths/~1api~1users/get/responses/200/content/application~1json/schema/properties/id",
        "kind": "field",
      },
    },
    "condition": undefined,
    "docsLink": undefined,
    "error": undefined,
    "exempted": false,
    "expected": undefined,
    "isMust": true,
    "isShould": false,
    "name": "prevent narrowing in response union types",
    "passed": true,
    "received": undefined,
    "severity": 2,
    "type": "changed",
    "where": "GET /api/users response 200 response body: application/json property id",
  },
]
`;

exports[`breaking changes ruleset root request body type change 1`] = `
[
  {
    "change": {
      "changeType": "changed",
      "changed": {
        "after": {
          "contentType": "application/json",
          "flatSchema": {
            "type": "string",
          },
        },
        "before": {
          "contentType": "application/json",
          "flatSchema": {
            "type": "object",
          },
        },
      },
      "location": {
        "conceptualLocation": {
          "inRequest": {
            "body": {
              "contentType": "application/json",
            },
          },
          "method": "get",
          "path": "/api/users",
        },
        "conceptualPath": [
          "operations",
          "/api/users",
          "get",
          "application/json",
        ],
        "jsonPath": "/paths/~1api~1users/get/requestBody/content/application~1json",
        "kind": "body",
      },
    },
    "condition": undefined,
    "docsLink": undefined,
    "error": "expected request body application/json root shape not to be narrowed. This is a breaking change.",
    "exempted": false,
    "expected": undefined,
    "isMust": true,
    "isShould": false,
    "name": "prevent request property type changes",
    "passed": false,
    "received": undefined,
    "severity": 2,
    "type": "changed",
    "where": "GET /api/users request body: application/json",
  },
  {
    "change": {
      "changeType": "changed",
      "changed": {
        "after": {
          "contentType": "application/json",
          "flatSchema": {
            "type": "string",
          },
        },
        "before": {
          "contentType": "application/json",
          "flatSchema": {
            "type": "object",
          },
        },
      },
      "location": {
        "conceptualLocation": {
          "inRequest": {
            "body": {
              "contentType": "application/json",
            },
          },
          "method": "get",
          "path": "/api/users",
        },
        "conceptualPath": [
          "operations",
          "/api/users",
          "get",
          "application/json",
        ],
        "jsonPath": "/paths/~1api~1users/get/requestBody/content/application~1json",
        "kind": "body",
      },
    },
    "condition": undefined,
    "docsLink": undefined,
    "error": undefined,
    "exempted": false,
    "expected": undefined,
    "isMust": true,
    "isShould": false,
    "name": "prevent expanded in request union types",
    "passed": true,
    "received": undefined,
    "severity": 2,
    "type": "changed",
    "where": "GET /api/users request body: application/json",
  },
]
`;

exports[`breaking changes ruleset root response body type change 1`] = `
[
  {
    "change": {
      "changeType": "changed",
      "changed": {
        "after": {
          "contentType": "application/json",
          "flatSchema": {
            "type": "string",
          },
        },
        "before": {
          "contentType": "application/json",
          "flatSchema": {
            "type": "number",
          },
        },
      },
      "location": {
        "conceptualLocation": {
          "inResponse": {
            "body": {
              "contentType": "application/json",
            },
            "statusCode": "200",
          },
          "method": "get",
          "path": "/api/users",
        },
        "conceptualPath": [
          "operations",
          "/api/users",
          "get",
          "responses",
          "200",
          "application/json",
        ],
        "jsonPath": "/paths/~1api~1users/get/responses/200/content/application~1json",
        "kind": "body",
      },
    },
    "condition": undefined,
    "docsLink": undefined,
    "error": "expected response body application/json root shape not to be expanded. This is a breaking change.",
    "exempted": false,
    "expected": undefined,
    "isMust": true,
    "isShould": false,
    "name": "prevent response property type changes",
    "passed": false,
    "received": undefined,
    "severity": 2,
    "type": "changed",
    "where": "GET /api/users response 200 response body: application/json",
  },
  {
    "change": {
      "changeType": "changed",
      "changed": {
        "after": {
          "contentType": "application/json",
          "flatSchema": {
            "type": "string",
          },
        },
        "before": {
          "contentType": "application/json",
          "flatSchema": {
            "type": "number",
          },
        },
      },
      "location": {
        "conceptualLocation": {
          "inResponse": {
            "body": {
              "contentType": "application/json",
            },
            "statusCode": "200",
          },
          "method": "get",
          "path": "/api/users",
        },
        "conceptualPath": [
          "operations",
          "/api/users",
          "get",
          "responses",
          "200",
          "application/json",
        ],
        "jsonPath": "/paths/~1api~1users/get/responses/200/content/application~1json",
        "kind": "body",
      },
    },
    "condition": undefined,
    "docsLink": undefined,
    "error": undefined,
    "exempted": false,
    "expected": undefined,
    "isMust": true,
    "isShould": false,
    "name": "prevent narrowing in response union types",
    "passed": true,
    "received": undefined,
    "severity": 2,
    "type": "changed",
    "where": "GET /api/users response 200 response body: application/json",
  },
]
`;

exports[`breaking changes ruleset valid changes 1`] = `
[
  {
    "change": {
      "changeType": "changed",
      "changed": {
        "after": {
          "in": "cookie",
          "name": "enum-widening",
          "schema": {
            "enum": [
              1,
              2,
              3,
            ],
            "type": "number",
          },
        },
        "before": {
          "in": "cookie",
          "name": "enum-widening",
          "schema": {
            "enum": [
              1,
              2,
            ],
            "type": "number",
          },
        },
      },
      "location": {
        "conceptualLocation": {
          "inRequest": {
            "cookie": "enum-widening",
          },
          "method": "get",
          "path": "/api/users",
        },
        "conceptualPath": [
          "operations",
          "/api/users",
          "get",
          "parameters",
          "cookie",
          "enum-widening",
        ],
        "jsonPath": "/paths/~1api~1users/get/parameters/3",
        "kind": "cookie-parameter",
      },
    },
    "condition": undefined,
    "docsLink": undefined,
    "error": undefined,
    "exempted": false,
    "expected": undefined,
    "isMust": true,
    "isShould": false,
    "name": "prevent cookie parameters enum breaking changes",
    "passed": true,
    "received": undefined,
    "severity": 2,
    "type": "changed",
    "where": "GET /api/users cookie parameter: enum-widening",
  },
  {
    "change": {
      "changeType": "changed",
      "changed": {
        "after": {
          "in": "cookie",
          "name": "enum-widening",
          "schema": {
            "enum": [
              1,
              2,
              3,
            ],
            "type": "number",
          },
        },
        "before": {
          "in": "cookie",
          "name": "enum-widening",
          "schema": {
            "enum": [
              1,
              2,
            ],
            "type": "number",
          },
        },
      },
      "location": {
        "conceptualLocation": {
          "inRequest": {
            "cookie": "enum-widening",
          },
          "method": "get",
          "path": "/api/users",
        },
        "conceptualPath": [
          "operations",
          "/api/users",
          "get",
          "parameters",
          "cookie",
          "enum-widening",
        ],
        "jsonPath": "/paths/~1api~1users/get/parameters/3",
        "kind": "cookie-parameter",
      },
    },
    "condition": undefined,
    "docsLink": undefined,
    "error": undefined,
    "exempted": false,
    "expected": undefined,
    "isMust": true,
    "isShould": false,
    "name": "prevent cookie parameters type changes",
    "passed": true,
    "received": undefined,
    "severity": 2,
    "type": "changed",
    "where": "GET /api/users cookie parameter: enum-widening",
  },
  {
    "change": {
      "changeType": "changed",
      "changed": {
        "after": {
          "in": "header",
          "name": "enum-removal",
          "schema": {
            "type": "number",
          },
        },
        "before": {
          "in": "header",
          "name": "enum-removal",
          "schema": {
            "enum": [
              1,
              2,
            ],
            "type": "number",
          },
        },
      },
      "location": {
        "conceptualLocation": {
          "inRequest": {
            "header": "enum-removal",
          },
          "method": "get",
          "path": "/api/users",
        },
        "conceptualPath": [
          "operations",
          "/api/users",
          "get",
          "parameters",
          "header",
          "enum-removal",
        ],
        "jsonPath": "/paths/~1api~1users/get/parameters/4",
        "kind": "header-parameter",
      },
    },
    "condition": undefined,
    "docsLink": undefined,
    "error": undefined,
    "exempted": false,
    "expected": undefined,
    "isMust": true,
    "isShould": false,
    "name": "prevent header parameters enum breaking changes",
    "passed": true,
    "received": undefined,
    "severity": 2,
    "type": "changed",
    "where": "GET /api/users header parameter: enum-removal",
  },
  {
    "change": {
      "changeType": "changed",
      "changed": {
        "after": {
          "in": "header",
          "name": "enum-removal",
          "schema": {
            "type": "number",
          },
        },
        "before": {
          "in": "header",
          "name": "enum-removal",
          "schema": {
            "enum": [
              1,
              2,
            ],
            "type": "number",
          },
        },
      },
      "location": {
        "conceptualLocation": {
          "inRequest": {
            "header": "enum-removal",
          },
          "method": "get",
          "path": "/api/users",
        },
        "conceptualPath": [
          "operations",
          "/api/users",
          "get",
          "parameters",
          "header",
          "enum-removal",
        ],
        "jsonPath": "/paths/~1api~1users/get/parameters/4",
        "kind": "header-parameter",
      },
    },
    "condition": undefined,
    "docsLink": undefined,
    "error": undefined,
    "exempted": false,
    "expected": undefined,
    "isMust": true,
    "isShould": false,
    "name": "prevent header parameters type changes",
    "passed": true,
    "received": undefined,
    "severity": 2,
    "type": "changed",
    "where": "GET /api/users header parameter: enum-removal",
  },
  {
    "change": {
      "changeType": "changed",
      "changed": {
        "after": {
          "in": "query",
          "name": "required",
          "schema": {
            "type": "string",
          },
        },
        "before": {
          "in": "query",
          "name": "required",
          "required": true,
          "schema": {
            "type": "string",
          },
        },
      },
      "location": {
        "conceptualLocation": {
          "inRequest": {
            "query": "required",
          },
          "method": "get",
          "path": "/api/users",
        },
        "conceptualPath": [
          "operations",
          "/api/users",
          "get",
          "parameters",
          "query",
          "required",
        ],
        "jsonPath": "/paths/~1api~1users/get/parameters/0",
        "kind": "query-parameter",
      },
    },
    "condition": undefined,
    "docsLink": undefined,
    "error": undefined,
    "exempted": false,
    "expected": undefined,
    "isMust": true,
    "isShould": false,
    "name": "prevent query parameters enum breaking changes",
    "passed": true,
    "received": undefined,
    "severity": 2,
    "type": "changed",
    "where": "GET /api/users query parameter: required",
  },
  {
    "change": {
      "changeType": "changed",
      "changed": {
        "after": {
          "in": "query",
          "name": "required",
          "schema": {
            "type": "string",
          },
        },
        "before": {
          "in": "query",
          "name": "required",
          "required": true,
          "schema": {
            "type": "string",
          },
        },
      },
      "location": {
        "conceptualLocation": {
          "inRequest": {
            "query": "required",
          },
          "method": "get",
          "path": "/api/users",
        },
        "conceptualPath": [
          "operations",
          "/api/users",
          "get",
          "parameters",
          "query",
          "required",
        ],
        "jsonPath": "/paths/~1api~1users/get/parameters/0",
        "kind": "query-parameter",
      },
    },
    "condition": undefined,
    "docsLink": undefined,
    "error": undefined,
    "exempted": false,
    "expected": undefined,
    "isMust": true,
    "isShould": false,
    "name": "prevent query parameters type changes",
    "passed": true,
    "received": undefined,
    "severity": 2,
    "type": "changed",
    "where": "GET /api/users query parameter: required",
  },
  {
    "change": {
      "changeType": "changed",
      "changed": {
        "after": {
          "in": "cookie",
          "name": "enum-widening",
          "schema": {
            "enum": [
              1,
              2,
              3,
            ],
            "type": "number",
          },
        },
        "before": {
          "in": "cookie",
          "name": "enum-widening",
          "schema": {
            "enum": [
              1,
              2,
            ],
            "type": "number",
          },
        },
      },
      "location": {
        "conceptualLocation": {
          "inRequest": {
            "cookie": "enum-widening",
          },
          "method": "get",
          "path": "/api/users",
        },
        "conceptualPath": [
          "operations",
          "/api/users",
          "get",
          "parameters",
          "cookie",
          "enum-widening",
        ],
        "jsonPath": "/paths/~1api~1users/get/parameters/3",
        "kind": "cookie-parameter",
      },
    },
    "condition": undefined,
    "docsLink": undefined,
    "error": undefined,
    "exempted": false,
    "expected": undefined,
    "isMust": true,
    "isShould": false,
    "name": "prevent requiring existing cookie parameters",
    "passed": true,
    "received": undefined,
    "severity": 2,
    "type": "changed",
    "where": "GET /api/users cookie parameter: enum-widening",
  },
  {
    "change": {
      "changeType": "changed",
      "changed": {
        "after": {
          "in": "header",
          "name": "enum-removal",
          "schema": {
            "type": "number",
          },
        },
        "before": {
          "in": "header",
          "name": "enum-removal",
          "schema": {
            "enum": [
              1,
              2,
            ],
            "type": "number",
          },
        },
      },
      "location": {
        "conceptualLocation": {
          "inRequest": {
            "header": "enum-removal",
          },
          "method": "get",
          "path": "/api/users",
        },
        "conceptualPath": [
          "operations",
          "/api/users",
          "get",
          "parameters",
          "header",
          "enum-removal",
        ],
        "jsonPath": "/paths/~1api~1users/get/parameters/4",
        "kind": "header-parameter",
      },
    },
    "condition": undefined,
    "docsLink": undefined,
    "error": undefined,
    "exempted": false,
    "expected": undefined,
    "isMust": true,
    "isShould": false,
    "name": "prevent requiring existing header parameters",
    "passed": true,
    "received": undefined,
    "severity": 2,
    "type": "changed",
    "where": "GET /api/users header parameter: enum-removal",
  },
  {
    "change": {
      "changeType": "changed",
      "changed": {
        "after": {
          "in": "query",
          "name": "required",
          "schema": {
            "type": "string",
          },
        },
        "before": {
          "in": "query",
          "name": "required",
          "required": true,
          "schema": {
            "type": "string",
          },
        },
      },
      "location": {
        "conceptualLocation": {
          "inRequest": {
            "query": "required",
          },
          "method": "get",
          "path": "/api/users",
        },
        "conceptualPath": [
          "operations",
          "/api/users",
          "get",
          "parameters",
          "query",
          "required",
        ],
        "jsonPath": "/paths/~1api~1users/get/parameters/0",
        "kind": "query-parameter",
      },
    },
    "condition": undefined,
    "docsLink": undefined,
    "error": undefined,
    "exempted": false,
    "expected": undefined,
    "isMust": true,
    "isShould": false,
    "name": "prevent requiring existing query parameters",
    "passed": true,
    "received": undefined,
    "severity": 2,
    "type": "changed",
    "where": "GET /api/users query parameter: required",
  },
  {
    "change": {
      "changeType": "changed",
      "changed": {
        "after": {
          "flatSchema": {
            "type": "string",
          },
          "key": "id",
          "required": false,
        },
        "before": {
          "flatSchema": {
            "type": "string",
          },
          "key": "id",
          "required": true,
        },
      },
      "location": {
        "conceptualLocation": {
          "inRequest": {
            "body": {
              "contentType": "application/json",
            },
          },
          "jsonSchemaTrail": [
            "id",
          ],
          "method": "get",
          "path": "/api/users",
        },
        "conceptualPath": [
          "operations",
          "/api/users",
          "get",
          "application/json",
          "id",
        ],
        "jsonPath": "/paths/~1api~1users/get/requestBody/content/application~1json/schema/properties/id",
        "kind": "field",
      },
    },
    "condition": undefined,
    "docsLink": undefined,
    "error": undefined,
    "expected": undefined,
    "isMust": true,
    "isShould": false,
    "name": "prevent changing request property to required",
    "passed": true,
    "received": undefined,
    "severity": 2,
    "type": "changed",
    "where": "GET /api/users request body: application/json property: id",
  },
  {
    "change": {
      "added": {
        "flatSchema": {
          "type": "number",
        },
        "key": "anotherId",
        "required": false,
      },
      "changeType": "added",
      "location": {
        "conceptualLocation": {
          "inRequest": {
            "body": {
              "contentType": "application/json",
            },
          },
          "jsonSchemaTrail": [
            "anotherId",
          ],
          "method": "get",
          "path": "/api/users",
        },
        "conceptualPath": [
          "operations",
          "/api/users",
          "get",
          "application/json",
          "anotherId",
        ],
        "jsonPath": "/paths/~1api~1users/get/requestBody/content/application~1json/schema/properties/anotherId",
        "kind": "field",
      },
    },
    "condition": undefined,
    "docsLink": undefined,
    "error": undefined,
    "expected": undefined,
    "isMust": true,
    "isShould": false,
    "name": "prevent changing request property to required",
    "passed": true,
    "received": undefined,
    "severity": 2,
    "type": "added",
    "where": "GET /api/users request body: application/json property: anotherId",
  },
  {
    "change": {
      "changeType": "changed",
      "changed": {
        "after": {
          "flatSchema": {
            "type": "string",
          },
          "key": "id",
          "required": false,
        },
        "before": {
          "flatSchema": {
            "type": "string",
          },
          "key": "id",
          "required": true,
        },
      },
      "location": {
        "conceptualLocation": {
          "inRequest": {
            "body": {
              "contentType": "application/json",
            },
          },
          "jsonSchemaTrail": [
            "id",
          ],
          "method": "get",
          "path": "/api/users",
        },
        "conceptualPath": [
          "operations",
          "/api/users",
          "get",
          "application/json",
          "id",
        ],
        "jsonPath": "/paths/~1api~1users/get/requestBody/content/application~1json/schema/properties/id",
        "kind": "field",
      },
    },
    "condition": undefined,
    "docsLink": undefined,
    "error": undefined,
    "expected": undefined,
    "isMust": true,
    "isShould": false,
    "name": "prevent request property type changes",
    "passed": true,
    "received": undefined,
    "severity": 2,
    "type": "changed",
    "where": "GET /api/users request body: application/json property: id",
  },
  {
    "change": {
      "changeType": "changed",
      "changed": {
        "after": {
          "flatSchema": {
            "type": "string",
          },
          "key": "id",
          "required": false,
        },
        "before": {
          "flatSchema": {
            "type": "string",
          },
          "key": "id",
          "required": true,
        },
      },
      "location": {
        "conceptualLocation": {
          "inRequest": {
            "body": {
              "contentType": "application/json",
            },
          },
          "jsonSchemaTrail": [
            "id",
          ],
          "method": "get",
          "path": "/api/users",
        },
        "conceptualPath": [
          "operations",
          "/api/users",
          "get",
          "application/json",
          "id",
        ],
        "jsonPath": "/paths/~1api~1users/get/requestBody/content/application~1json/schema/properties/id",
        "kind": "field",
      },
    },
    "condition": undefined,
    "docsLink": undefined,
    "error": undefined,
    "expected": undefined,
    "isMust": true,
    "isShould": false,
    "name": "prevent expanded in request union types",
    "passed": true,
    "received": undefined,
    "severity": 2,
    "type": "changed",
    "where": "GET /api/users request body: application/json property: id",
  },
  {
    "change": {
      "changeType": "changed",
      "changed": {
        "after": {
          "flatSchema": {
            "type": "string",
          },
          "key": "name",
          "required": true,
        },
        "before": {
          "flatSchema": {
            "type": "string",
          },
          "key": "name",
          "required": false,
        },
      },
      "location": {
        "conceptualLocation": {
          "inResponse": {
            "body": {
              "contentType": "application/json",
            },
            "statusCode": "200",
          },
          "jsonSchemaTrail": [
            "name",
          ],
          "method": "get",
          "path": "/api/users",
        },
        "conceptualPath": [
          "operations",
          "/api/users",
          "get",
          "responses",
          "200",
          "application/json",
          "name",
        ],
        "jsonPath": "/paths/~1api~1users/get/responses/200/content/application~1json/schema/properties/name",
        "kind": "field",
      },
    },
    "condition": undefined,
    "docsLink": undefined,
    "error": undefined,
    "exempted": false,
    "expected": undefined,
    "isMust": true,
    "isShould": false,
    "name": "prevent making response property optional",
    "passed": true,
    "received": undefined,
    "severity": 2,
    "type": "changed",
    "where": "GET /api/users response 200 response body: application/json property name",
  },
  {
    "change": {
      "changeType": "changed",
      "changed": {
        "after": {
          "flatSchema": {
            "type": "string",
          },
          "key": "name",
          "required": true,
        },
        "before": {
          "flatSchema": {
            "type": "string",
          },
          "key": "name",
          "required": false,
        },
      },
      "location": {
        "conceptualLocation": {
          "inResponse": {
            "body": {
              "contentType": "application/json",
            },
            "statusCode": "200",
          },
          "jsonSchemaTrail": [
            "name",
          ],
          "method": "get",
          "path": "/api/users",
        },
        "conceptualPath": [
          "operations",
          "/api/users",
          "get",
          "responses",
          "200",
          "application/json",
          "name",
        ],
        "jsonPath": "/paths/~1api~1users/get/responses/200/content/application~1json/schema/properties/name",
        "kind": "field",
      },
    },
    "condition": undefined,
    "docsLink": undefined,
    "error": undefined,
    "exempted": false,
    "expected": undefined,
    "isMust": true,
    "isShould": false,
    "name": "prevent response property type changes",
    "passed": true,
    "received": undefined,
    "severity": 2,
    "type": "changed",
    "where": "GET /api/users response 200 response body: application/json property name",
  },
  {
    "change": {
      "changeType": "changed",
      "changed": {
        "after": {
          "flatSchema": {
            "type": "string",
          },
          "key": "name",
          "required": true,
        },
        "before": {
          "flatSchema": {
            "type": "string",
          },
          "key": "name",
          "required": false,
        },
      },
      "location": {
        "conceptualLocation": {
          "inResponse": {
            "body": {
              "contentType": "application/json",
            },
            "statusCode": "200",
          },
          "jsonSchemaTrail": [
            "name",
          ],
          "method": "get",
          "path": "/api/users",
        },
        "conceptualPath": [
          "operations",
          "/api/users",
          "get",
          "responses",
          "200",
          "application/json",
          "name",
        ],
        "jsonPath": "/paths/~1api~1users/get/responses/200/content/application~1json/schema/properties/name",
        "kind": "field",
      },
    },
    "condition": undefined,
    "docsLink": undefined,
    "error": undefined,
    "exempted": false,
    "expected": undefined,
    "isMust": true,
    "isShould": false,
    "name": "prevent narrowing in response union types",
    "passed": true,
    "received": undefined,
    "severity": 2,
    "type": "changed",
    "where": "GET /api/users response 200 response body: application/json property name",
  },
]
`;

exports[`breaking changes ruleset valid request union type transition 1`] = `
[
  {
    "change": {
      "added": {
        "flatSchema": {
          "type": "string",
        },
        "key": "id",
        "required": true,
      },
      "changeType": "added",
      "location": {
        "conceptualLocation": {
          "inRequest": {
            "body": {
              "contentType": "application/json",
            },
          },
          "jsonSchemaTrail": [
            "id",
          ],
          "method": "get",
          "path": "/api/users",
        },
        "conceptualPath": [
          "operations",
          "/api/users",
          "get",
          "application/json",
          "id",
        ],
        "jsonPath": "/paths/~1api~1users/get/requestBody/content/application~1json/schema/properties/id",
        "kind": "field",
      },
    },
    "condition": undefined,
    "docsLink": undefined,
    "error": undefined,
    "expected": undefined,
    "isMust": true,
    "isShould": false,
    "name": "prevent changing request property to required",
    "passed": true,
    "received": undefined,
    "severity": 2,
    "type": "added",
    "where": "GET /api/users request body: application/json property: id",
  },
  {
    "change": {
      "changeType": "changed",
      "changed": {
        "after": {
          "contentType": "application/json",
          "flatSchema": {
            "type": "object",
          },
        },
        "before": {
          "contentType": "application/json",
          "flatSchema": {
            "oneOf": [
              {
                "properties": {
                  "id": {
                    "type": "string",
                  },
                },
                "required": [
                  "id",
                ],
                "type": "object",
              },
            ],
          },
        },
      },
      "location": {
        "conceptualLocation": {
          "inRequest": {
            "body": {
              "contentType": "application/json",
            },
          },
          "method": "get",
          "path": "/api/users",
        },
        "conceptualPath": [
          "operations",
          "/api/users",
          "get",
          "application/json",
        ],
        "jsonPath": "/paths/~1api~1users/get/requestBody/content/application~1json",
        "kind": "body",
      },
    },
    "condition": undefined,
    "docsLink": undefined,
    "error": undefined,
    "exempted": false,
    "expected": undefined,
    "isMust": true,
    "isShould": false,
    "name": "prevent request property type changes",
    "passed": true,
    "received": undefined,
    "severity": 2,
    "type": "changed",
    "where": "GET /api/users request body: application/json",
  },
  {
    "change": {
      "changeType": "changed",
      "changed": {
        "after": {
          "contentType": "application/json",
          "flatSchema": {
            "type": "object",
          },
        },
        "before": {
          "contentType": "application/json",
          "flatSchema": {
            "oneOf": [
              {
                "properties": {
                  "id": {
                    "type": "string",
                  },
                },
                "required": [
                  "id",
                ],
                "type": "object",
              },
            ],
          },
        },
      },
      "location": {
        "conceptualLocation": {
          "inRequest": {
            "body": {
              "contentType": "application/json",
            },
          },
          "method": "get",
          "path": "/api/users",
        },
        "conceptualPath": [
          "operations",
          "/api/users",
          "get",
          "application/json",
        ],
        "jsonPath": "/paths/~1api~1users/get/requestBody/content/application~1json",
        "kind": "body",
      },
    },
    "condition": undefined,
    "docsLink": undefined,
    "error": undefined,
    "exempted": false,
    "expected": undefined,
    "isMust": true,
    "isShould": false,
    "name": "prevent expanded in request union types",
    "passed": true,
    "received": undefined,
    "severity": 2,
    "type": "changed",
    "where": "GET /api/users request body: application/json",
  },
]
`;

exports[`breaking changes ruleset valid response union type transition 1`] = `
[
  {
    "change": {
      "changeType": "removed",
      "location": {
        "conceptualLocation": {
          "inResponse": {
            "body": {
              "contentType": "application/json",
            },
            "statusCode": "200",
          },
          "jsonSchemaTrail": [
            "id",
          ],
          "method": "get",
          "path": "/api/users",
        },
        "conceptualPath": [
          "operations",
          "/api/users",
          "get",
          "responses",
          "200",
          "application/json",
          "id",
        ],
        "jsonPath": "/paths/~1api~1users/get/responses/200/content/application~1json/schema/properties/id",
        "kind": "field",
      },
      "removed": {
        "before": {
          "flatSchema": {
            "type": "string",
          },
          "key": "id",
          "required": false,
        },
      },
    },
    "condition": undefined,
    "docsLink": undefined,
    "error": undefined,
    "exempted": false,
    "expected": undefined,
    "isMust": true,
    "isShould": false,
    "name": "prevent removing response property",
    "passed": true,
    "received": undefined,
    "severity": 2,
    "type": "removed",
    "where": "GET /api/users response 200 response body: application/json property id",
  },
  {
    "change": {
      "changeType": "changed",
      "changed": {
        "after": {
          "contentType": "application/json",
          "flatSchema": {
            "oneOf": [
              {
                "type": "number",
              },
              {
                "properties": {
                  "id": {
                    "type": "string",
                  },
                  "name": {
                    "type": "string",
                  },
                },
                "required": [
                  "id",
                  "name",
                ],
                "type": "object",
              },
            ],
          },
        },
        "before": {
          "contentType": "application/json",
          "flatSchema": {
            "type": "object",
          },
        },
      },
      "location": {
        "conceptualLocation": {
          "inResponse": {
            "body": {
              "contentType": "application/json",
            },
            "statusCode": "200",
          },
          "method": "get",
          "path": "/api/users",
        },
        "conceptualPath": [
          "operations",
          "/api/users",
          "get",
          "responses",
          "200",
          "application/json",
        ],
        "jsonPath": "/paths/~1api~1users/get/responses/200/content/application~1json",
        "kind": "body",
      },
    },
    "condition": undefined,
    "docsLink": undefined,
    "error": undefined,
    "exempted": false,
    "expected": undefined,
    "isMust": true,
    "isShould": false,
    "name": "prevent response property type changes",
    "passed": true,
    "received": undefined,
    "severity": 2,
    "type": "changed",
    "where": "GET /api/users response 200 response body: application/json",
  },
  {
    "change": {
      "changeType": "changed",
      "changed": {
        "after": {
          "contentType": "application/json",
          "flatSchema": {
            "oneOf": [
              {
                "type": "number",
              },
              {
                "properties": {
                  "id": {
                    "type": "string",
                  },
                  "name": {
                    "type": "string",
                  },
                },
                "required": [
                  "id",
                  "name",
                ],
                "type": "object",
              },
            ],
          },
        },
        "before": {
          "contentType": "application/json",
          "flatSchema": {
            "type": "object",
          },
        },
      },
      "location": {
        "conceptualLocation": {
          "inResponse": {
            "body": {
              "contentType": "application/json",
            },
            "statusCode": "200",
          },
          "method": "get",
          "path": "/api/users",
        },
        "conceptualPath": [
          "operations",
          "/api/users",
          "get",
          "responses",
          "200",
          "application/json",
        ],
        "jsonPath": "/paths/~1api~1users/get/responses/200/content/application~1json",
        "kind": "body",
      },
    },
    "condition": undefined,
    "docsLink": undefined,
    "error": undefined,
    "exempted": false,
    "expected": undefined,
    "isMust": true,
    "isShould": false,
    "name": "prevent narrowing in response union types",
    "passed": true,
    "received": undefined,
    "severity": 2,
    "type": "changed",
    "where": "GET /api/users response 200 response body: application/json",
  },
]
`;

exports[`breaking changes ruleset valid union type refactor 1`] = `
[
  {
    "change": {
      "changeType": "removed",
      "location": {
        "conceptualLocation": {
          "inResponse": {
            "body": {
              "contentType": "application/json",
            },
            "statusCode": "200",
          },
          "jsonSchemaTrail": [
            "id",
          ],
          "method": "get",
          "path": "/api/users",
        },
        "conceptualPath": [
          "operations",
          "/api/users",
          "get",
          "responses",
          "200",
          "application/json",
          "oneOf",
          "2",
          "id",
        ],
        "jsonPath": "/paths/~1api~1users/get/responses/200/content/application~1json/schema/oneOf/2/properties/id",
        "kind": "field",
      },
      "removed": {
        "before": {
          "flatSchema": {
            "type": "string",
          },
          "key": "id",
          "required": true,
        },
      },
    },
    "condition": undefined,
    "docsLink": undefined,
    "error": undefined,
    "exempted": false,
    "expected": undefined,
    "isMust": true,
    "isShould": false,
    "name": "prevent removing response property",
    "passed": true,
    "received": undefined,
    "severity": 2,
    "type": "removed",
    "where": "GET /api/users response 200 response body: application/json property id",
  },
  {
    "change": {
      "changeType": "removed",
      "location": {
        "conceptualLocation": {
          "inResponse": {
            "body": {
              "contentType": "application/json",
            },
            "statusCode": "200",
          },
          "jsonSchemaTrail": [
            "name",
          ],
          "method": "get",
          "path": "/api/users",
        },
        "conceptualPath": [
          "operations",
          "/api/users",
          "get",
          "responses",
          "200",
          "application/json",
          "oneOf",
          "2",
          "name",
        ],
        "jsonPath": "/paths/~1api~1users/get/responses/200/content/application~1json/schema/oneOf/2/properties/name",
        "kind": "field",
      },
      "removed": {
        "before": {
          "flatSchema": {
            "type": "string",
          },
          "key": "name",
          "required": true,
        },
      },
    },
    "condition": undefined,
    "docsLink": undefined,
    "error": undefined,
    "exempted": false,
    "expected": undefined,
    "isMust": true,
    "isShould": false,
    "name": "prevent removing response property",
    "passed": true,
    "received": undefined,
    "severity": 2,
    "type": "removed",
    "where": "GET /api/users response 200 response body: application/json property name",
  },
  {
    "change": {
      "changeType": "changed",
      "changed": {
        "after": {
          "contentType": "application/json",
          "flatSchema": {
            "oneOf": [
              {
                "type": "number",
              },
              {
                "properties": {
                  "id": {
                    "type": "string",
                  },
                  "name": {
                    "type": "string",
                  },
                },
                "required": [
                  "id",
                  "name",
                ],
                "type": "object",
              },
            ],
          },
        },
        "before": {
          "contentType": "application/json",
          "flatSchema": {
            "oneOf": [
              {
                "type": "number",
              },
              {
                "properties": {
                  "id": {
                    "type": "string",
                  },
                },
                "required": [
                  "id",
                ],
                "type": "object",
              },
              {
                "properties": {
                  "id": {
                    "type": "string",
                  },
                  "name": {
                    "type": "string",
                  },
                },
                "required": [
                  "id",
                  "name",
                ],
                "type": "object",
              },
            ],
          },
        },
      },
      "location": {
        "conceptualLocation": {
          "inResponse": {
            "body": {
              "contentType": "application/json",
            },
            "statusCode": "200",
          },
          "method": "get",
          "path": "/api/users",
        },
        "conceptualPath": [
          "operations",
          "/api/users",
          "get",
          "responses",
          "200",
          "application/json",
        ],
        "jsonPath": "/paths/~1api~1users/get/responses/200/content/application~1json",
        "kind": "body",
      },
    },
    "condition": undefined,
    "docsLink": undefined,
    "error": undefined,
    "exempted": false,
    "expected": undefined,
    "isMust": true,
    "isShould": false,
    "name": "prevent response property type changes",
    "passed": true,
    "received": undefined,
    "severity": 2,
    "type": "changed",
    "where": "GET /api/users response 200 response body: application/json",
  },
  {
    "change": {
      "changeType": "changed",
      "changed": {
        "after": {
          "contentType": "application/json",
          "flatSchema": {
            "oneOf": [
              {
                "type": "number",
              },
              {
                "properties": {
                  "id": {
                    "type": "string",
                  },
                  "name": {
                    "type": "string",
                  },
                },
                "required": [
                  "id",
                  "name",
                ],
                "type": "object",
              },
            ],
          },
        },
        "before": {
          "contentType": "application/json",
          "flatSchema": {
            "oneOf": [
              {
                "type": "number",
              },
              {
                "properties": {
                  "id": {
                    "type": "string",
                  },
                },
                "required": [
                  "id",
                ],
                "type": "object",
              },
              {
                "properties": {
                  "id": {
                    "type": "string",
                  },
                  "name": {
                    "type": "string",
                  },
                },
                "required": [
                  "id",
                  "name",
                ],
                "type": "object",
              },
            ],
          },
        },
      },
      "location": {
        "conceptualLocation": {
          "inResponse": {
            "body": {
              "contentType": "application/json",
            },
            "statusCode": "200",
          },
          "method": "get",
          "path": "/api/users",
        },
        "conceptualPath": [
          "operations",
          "/api/users",
          "get",
          "responses",
          "200",
          "application/json",
        ],
        "jsonPath": "/paths/~1api~1users/get/responses/200/content/application~1json",
        "kind": "body",
      },
    },
    "condition": undefined,
    "docsLink": undefined,
    "error": undefined,
    "exempted": false,
    "expected": undefined,
    "isMust": true,
    "isShould": false,
    "name": "prevent narrowing in response union types",
    "passed": true,
    "received": undefined,
    "severity": 2,
    "type": "changed",
    "where": "GET /api/users response 200 response body: application/json",
  },
]
`;
