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

exports[`OperationRule assertions added failing assertion 1`] = `
[
  {
    "change": {
      "added": {
        "method": "get",
        "pathPattern": "/api/users",
      },
      "changeType": "added",
      "location": {
        "conceptualLocation": {
          "method": "get",
          "path": "/api/users",
        },
        "conceptualPath": [
          "operations",
          "/api/users",
          "get",
        ],
        "jsonPath": "/paths/~1api~1users/get",
        "kind": "operation",
      },
    },
    "condition": undefined,
    "docsLink": undefined,
    "error": "operation does not have \`description\`",
    "exempted": false,
    "expected": undefined,
    "isMust": true,
    "isShould": false,
    "name": "operation description",
    "passed": false,
    "received": undefined,
    "severity": 2,
    "type": "added",
    "where": "GET /api/users",
  },
]
`;

exports[`OperationRule assertions added passing assertion 1`] = `
[
  {
    "change": {
      "added": {
        "description": "hello",
        "method": "post",
        "pathPattern": "/api/users",
      },
      "changeType": "added",
      "location": {
        "conceptualLocation": {
          "method": "post",
          "path": "/api/users",
        },
        "conceptualPath": [
          "operations",
          "/api/users",
          "post",
        ],
        "jsonPath": "/paths/~1api~1users/post",
        "kind": "operation",
      },
    },
    "condition": undefined,
    "docsLink": undefined,
    "error": undefined,
    "exempted": false,
    "expected": undefined,
    "isMust": true,
    "isShould": false,
    "name": "operation description",
    "passed": true,
    "received": undefined,
    "severity": 2,
    "type": "added",
    "where": "POST /api/users",
  },
]
`;

exports[`OperationRule assertions addedOrChanged failing assertion 1`] = `
[
  {
    "change": {
      "changeType": "changed",
      "changed": {
        "after": {
          "method": "post",
          "pathPattern": "/api/users",
          "summary": "hello",
        },
        "before": {
          "method": "post",
          "pathPattern": "/api/users",
        },
      },
      "location": {
        "conceptualLocation": {
          "method": "post",
          "path": "/api/users",
        },
        "conceptualPath": [
          "operations",
          "/api/users",
          "post",
        ],
        "jsonPath": "/paths/~1api~1users/post",
        "kind": "operation",
      },
    },
    "condition": undefined,
    "docsLink": undefined,
    "error": "operation does not have \`description\`",
    "exempted": false,
    "expected": undefined,
    "isMust": true,
    "isShould": false,
    "name": "operation description",
    "passed": false,
    "received": undefined,
    "severity": 2,
    "type": "changed",
    "where": "POST /api/users",
  },
  {
    "change": {
      "added": {
        "method": "get",
        "pathPattern": "/api/users",
      },
      "changeType": "added",
      "location": {
        "conceptualLocation": {
          "method": "get",
          "path": "/api/users",
        },
        "conceptualPath": [
          "operations",
          "/api/users",
          "get",
        ],
        "jsonPath": "/paths/~1api~1users/get",
        "kind": "operation",
      },
    },
    "condition": undefined,
    "docsLink": undefined,
    "error": "operation does not have \`description\`",
    "exempted": false,
    "expected": undefined,
    "isMust": true,
    "isShould": false,
    "name": "operation description",
    "passed": false,
    "received": undefined,
    "severity": 2,
    "type": "added",
    "where": "GET /api/users",
  },
]
`;

exports[`OperationRule assertions addedOrChanged passing assertion 1`] = `
[
  {
    "change": {
      "changeType": "changed",
      "changed": {
        "after": {
          "description": "hello",
          "method": "get",
          "pathPattern": "/api/users",
          "summary": "this is a summary",
        },
        "before": {
          "description": "hello",
          "method": "get",
          "pathPattern": "/api/users",
        },
      },
      "location": {
        "conceptualLocation": {
          "method": "get",
          "path": "/api/users",
        },
        "conceptualPath": [
          "operations",
          "/api/users",
          "get",
        ],
        "jsonPath": "/paths/~1api~1users/get",
        "kind": "operation",
      },
    },
    "condition": undefined,
    "docsLink": undefined,
    "error": undefined,
    "exempted": false,
    "expected": undefined,
    "isMust": true,
    "isShould": false,
    "name": "operation description",
    "passed": true,
    "received": undefined,
    "severity": 2,
    "type": "changed",
    "where": "GET /api/users",
  },
  {
    "change": {
      "added": {
        "description": "hello",
        "method": "post",
        "pathPattern": "/api/users",
      },
      "changeType": "added",
      "location": {
        "conceptualLocation": {
          "method": "post",
          "path": "/api/users",
        },
        "conceptualPath": [
          "operations",
          "/api/users",
          "post",
        ],
        "jsonPath": "/paths/~1api~1users/post",
        "kind": "operation",
      },
    },
    "condition": undefined,
    "docsLink": undefined,
    "error": undefined,
    "exempted": false,
    "expected": undefined,
    "isMust": true,
    "isShould": false,
    "name": "operation description",
    "passed": true,
    "received": undefined,
    "severity": 2,
    "type": "added",
    "where": "POST /api/users",
  },
]
`;

exports[`OperationRule assertions changed failing assertion 1`] = `
[
  {
    "change": {
      "changeType": "changed",
      "changed": {
        "after": {
          "method": "get",
          "operationId": "get-users-changed",
          "pathPattern": "/api/users",
        },
        "before": {
          "method": "get",
          "operationId": "get-users",
          "pathPattern": "/api/users",
        },
      },
      "location": {
        "conceptualLocation": {
          "method": "get",
          "path": "/api/users",
        },
        "conceptualPath": [
          "operations",
          "/api/users",
          "get",
        ],
        "jsonPath": "/paths/~1api~1users/get",
        "kind": "operation",
      },
    },
    "condition": undefined,
    "docsLink": undefined,
    "error": "cannot change operationId",
    "exempted": false,
    "expected": undefined,
    "isMust": true,
    "isShould": false,
    "name": "operation operationId",
    "passed": false,
    "received": undefined,
    "severity": 2,
    "type": "changed",
    "where": "GET /api/users",
  },
]
`;

exports[`OperationRule assertions changed passing assertion 1`] = `
[
  {
    "change": {
      "changeType": "changed",
      "changed": {
        "after": {
          "method": "get",
          "operationId": "get-users",
          "pathPattern": "/api/users",
        },
        "before": {
          "method": "get",
          "pathPattern": "/api/users",
        },
      },
      "location": {
        "conceptualLocation": {
          "method": "get",
          "path": "/api/users",
        },
        "conceptualPath": [
          "operations",
          "/api/users",
          "get",
        ],
        "jsonPath": "/paths/~1api~1users/get",
        "kind": "operation",
      },
    },
    "condition": undefined,
    "docsLink": undefined,
    "error": undefined,
    "exempted": false,
    "expected": undefined,
    "isMust": true,
    "isShould": false,
    "name": "operation operationId",
    "passed": true,
    "received": undefined,
    "severity": 2,
    "type": "changed",
    "where": "GET /api/users",
  },
]
`;

exports[`OperationRule assertions custom matchers hasCookieParameterMatching failing assertion 1`] = `
[
  {
    "change": {
      "location": {
        "conceptualLocation": {
          "method": "get",
          "path": "/api/users",
        },
        "conceptualPath": [
          "operations",
          "/api/users",
          "get",
        ],
        "jsonPath": "/paths/~1api~1users/get",
        "kind": "operation",
      },
      "value": {
        "method": "get",
        "pathPattern": "/api/users",
      },
    },
    "condition": undefined,
    "docsLink": undefined,
    "error": "Could not find a partial match in cookie parameters. Value to match: {"description":"Matcher.string"}",
    "exempted": false,
    "expected": undefined,
    "isMust": true,
    "isShould": false,
    "name": "parameter description",
    "passed": false,
    "received": undefined,
    "severity": 2,
    "type": "requirement",
    "where": "GET /api/users",
  },
]
`;

exports[`OperationRule assertions custom matchers hasCookieParameterMatching inverted assertion 1`] = `
[
  {
    "change": {
      "location": {
        "conceptualLocation": {
          "method": "get",
          "path": "/api/users",
        },
        "conceptualPath": [
          "operations",
          "/api/users",
          "get",
        ],
        "jsonPath": "/paths/~1api~1users/get",
        "kind": "operation",
      },
      "value": {
        "method": "get",
        "pathPattern": "/api/users",
      },
    },
    "condition": undefined,
    "docsLink": undefined,
    "error": undefined,
    "exempted": false,
    "expected": undefined,
    "isMust": true,
    "isShould": false,
    "name": "parameter description",
    "passed": true,
    "received": undefined,
    "severity": 2,
    "type": "requirement",
    "where": "GET /api/users",
  },
]
`;

exports[`OperationRule assertions custom matchers hasCookieParameterMatching passing assertion 1`] = `
[
  {
    "change": {
      "location": {
        "conceptualLocation": {
          "method": "get",
          "path": "/api/users",
        },
        "conceptualPath": [
          "operations",
          "/api/users",
          "get",
        ],
        "jsonPath": "/paths/~1api~1users/get",
        "kind": "operation",
      },
      "value": {
        "method": "get",
        "pathPattern": "/api/users",
      },
    },
    "condition": undefined,
    "docsLink": undefined,
    "error": undefined,
    "exempted": false,
    "expected": undefined,
    "isMust": true,
    "isShould": false,
    "name": "parameter description",
    "passed": true,
    "received": undefined,
    "severity": 2,
    "type": "requirement",
    "where": "GET /api/users",
  },
]
`;

exports[`OperationRule assertions custom matchers hasHeaderParameterMatching failing assertion 1`] = `
[
  {
    "change": {
      "location": {
        "conceptualLocation": {
          "method": "get",
          "path": "/api/users",
        },
        "conceptualPath": [
          "operations",
          "/api/users",
          "get",
        ],
        "jsonPath": "/paths/~1api~1users/get",
        "kind": "operation",
      },
      "value": {
        "method": "get",
        "pathPattern": "/api/users",
      },
    },
    "condition": undefined,
    "docsLink": undefined,
    "error": "Could not find a partial match in header parameters. Value to match: {"description":"Matcher.string"}",
    "exempted": false,
    "expected": undefined,
    "isMust": true,
    "isShould": false,
    "name": "parameter description",
    "passed": false,
    "received": undefined,
    "severity": 2,
    "type": "requirement",
    "where": "GET /api/users",
  },
]
`;

exports[`OperationRule assertions custom matchers hasHeaderParameterMatching inverted assertion 1`] = `
[
  {
    "change": {
      "location": {
        "conceptualLocation": {
          "method": "get",
          "path": "/api/users",
        },
        "conceptualPath": [
          "operations",
          "/api/users",
          "get",
        ],
        "jsonPath": "/paths/~1api~1users/get",
        "kind": "operation",
      },
      "value": {
        "method": "get",
        "pathPattern": "/api/users",
      },
    },
    "condition": undefined,
    "docsLink": undefined,
    "error": undefined,
    "exempted": false,
    "expected": undefined,
    "isMust": true,
    "isShould": false,
    "name": "parameter description",
    "passed": true,
    "received": undefined,
    "severity": 2,
    "type": "requirement",
    "where": "GET /api/users",
  },
]
`;

exports[`OperationRule assertions custom matchers hasHeaderParameterMatching passing assertion 1`] = `
[
  {
    "change": {
      "location": {
        "conceptualLocation": {
          "method": "get",
          "path": "/api/users",
        },
        "conceptualPath": [
          "operations",
          "/api/users",
          "get",
        ],
        "jsonPath": "/paths/~1api~1users/get",
        "kind": "operation",
      },
      "value": {
        "method": "get",
        "pathPattern": "/api/users",
      },
    },
    "condition": undefined,
    "docsLink": undefined,
    "error": undefined,
    "exempted": false,
    "expected": undefined,
    "isMust": true,
    "isShould": false,
    "name": "parameter description",
    "passed": true,
    "received": undefined,
    "severity": 2,
    "type": "requirement",
    "where": "GET /api/users",
  },
]
`;

exports[`OperationRule assertions custom matchers hasPathParameterMatching failing assertion 1`] = `
[
  {
    "change": {
      "location": {
        "conceptualLocation": {
          "method": "get",
          "path": "/api/users",
        },
        "conceptualPath": [
          "operations",
          "/api/users",
          "get",
        ],
        "jsonPath": "/paths/~1api~1users/get",
        "kind": "operation",
      },
      "value": {
        "method": "get",
        "pathPattern": "/api/users",
      },
    },
    "condition": undefined,
    "docsLink": undefined,
    "error": "Could not find a partial match in path parameters. Value to match: {"description":"Matcher.string"}",
    "exempted": false,
    "expected": undefined,
    "isMust": true,
    "isShould": false,
    "name": "parameter description",
    "passed": false,
    "received": undefined,
    "severity": 2,
    "type": "requirement",
    "where": "GET /api/users",
  },
]
`;

exports[`OperationRule assertions custom matchers hasPathParameterMatching inverted assertion 1`] = `
[
  {
    "change": {
      "location": {
        "conceptualLocation": {
          "method": "get",
          "path": "/api/users",
        },
        "conceptualPath": [
          "operations",
          "/api/users",
          "get",
        ],
        "jsonPath": "/paths/~1api~1users/get",
        "kind": "operation",
      },
      "value": {
        "method": "get",
        "pathPattern": "/api/users",
      },
    },
    "condition": undefined,
    "docsLink": undefined,
    "error": undefined,
    "exempted": false,
    "expected": undefined,
    "isMust": true,
    "isShould": false,
    "name": "parameter description",
    "passed": true,
    "received": undefined,
    "severity": 2,
    "type": "requirement",
    "where": "GET /api/users",
  },
]
`;

exports[`OperationRule assertions custom matchers hasPathParameterMatching passing assertion 1`] = `
[
  {
    "change": {
      "location": {
        "conceptualLocation": {
          "method": "get",
          "path": "/api/users",
        },
        "conceptualPath": [
          "operations",
          "/api/users",
          "get",
        ],
        "jsonPath": "/paths/~1api~1users/get",
        "kind": "operation",
      },
      "value": {
        "method": "get",
        "pathPattern": "/api/users",
      },
    },
    "condition": undefined,
    "docsLink": undefined,
    "error": undefined,
    "exempted": false,
    "expected": undefined,
    "isMust": true,
    "isShould": false,
    "name": "parameter description",
    "passed": true,
    "received": undefined,
    "severity": 2,
    "type": "requirement",
    "where": "GET /api/users",
  },
]
`;

exports[`OperationRule assertions custom matchers hasQueryParameterMatching failing assertion 1`] = `
[
  {
    "change": {
      "location": {
        "conceptualLocation": {
          "method": "get",
          "path": "/api/users",
        },
        "conceptualPath": [
          "operations",
          "/api/users",
          "get",
        ],
        "jsonPath": "/paths/~1api~1users/get",
        "kind": "operation",
      },
      "value": {
        "method": "get",
        "pathPattern": "/api/users",
      },
    },
    "condition": undefined,
    "docsLink": undefined,
    "error": "Could not find a partial match in query parameters",
    "exempted": false,
    "expected": undefined,
    "isMust": true,
    "isShould": false,
    "name": "parameter description",
    "passed": false,
    "received": undefined,
    "severity": 2,
    "type": "requirement",
    "where": "GET /api/users",
  },
]
`;

exports[`OperationRule assertions custom matchers hasQueryParameterMatching inverted assertion 1`] = `
[
  {
    "change": {
      "location": {
        "conceptualLocation": {
          "method": "get",
          "path": "/api/users",
        },
        "conceptualPath": [
          "operations",
          "/api/users",
          "get",
        ],
        "jsonPath": "/paths/~1api~1users/get",
        "kind": "operation",
      },
      "value": {
        "method": "get",
        "pathPattern": "/api/users",
      },
    },
    "condition": undefined,
    "docsLink": undefined,
    "error": undefined,
    "exempted": false,
    "expected": undefined,
    "isMust": true,
    "isShould": false,
    "name": "parameter description",
    "passed": true,
    "received": undefined,
    "severity": 2,
    "type": "requirement",
    "where": "GET /api/users",
  },
]
`;

exports[`OperationRule assertions custom matchers hasQueryParameterMatching passing assertion 1`] = `
[
  {
    "change": {
      "location": {
        "conceptualLocation": {
          "method": "get",
          "path": "/api/users",
        },
        "conceptualPath": [
          "operations",
          "/api/users",
          "get",
        ],
        "jsonPath": "/paths/~1api~1users/get",
        "kind": "operation",
      },
      "value": {
        "method": "get",
        "pathPattern": "/api/users",
      },
    },
    "condition": undefined,
    "docsLink": undefined,
    "error": undefined,
    "exempted": false,
    "expected": undefined,
    "isMust": true,
    "isShould": false,
    "name": "parameter description",
    "passed": true,
    "received": undefined,
    "severity": 2,
    "type": "requirement",
    "where": "GET /api/users",
  },
]
`;

exports[`OperationRule assertions custom matchers hasRequests failing assertion 1`] = `
[
  {
    "change": {
      "changeType": "changed",
      "changed": {
        "after": {
          "method": "get",
          "operationId": "get-users",
          "pathPattern": "/api/users",
        },
        "before": {
          "method": "get",
          "pathPattern": "/api/users",
        },
      },
      "location": {
        "conceptualLocation": {
          "method": "get",
          "path": "/api/users",
        },
        "conceptualPath": [
          "operations",
          "/api/users",
          "get",
        ],
        "jsonPath": "/paths/~1api~1users/get",
        "kind": "operation",
      },
    },
    "condition": undefined,
    "docsLink": undefined,
    "error": "Operation does not have request with content-type application/json",
    "exempted": false,
    "expected": undefined,
    "isMust": true,
    "isShould": false,
    "name": "operation description",
    "passed": false,
    "received": undefined,
    "severity": 2,
    "type": "changed",
    "where": "GET /api/users",
  },
]
`;

exports[`OperationRule assertions custom matchers hasRequests inverted assertion 1`] = `
[
  {
    "change": {
      "changeType": "changed",
      "changed": {
        "after": {
          "method": "get",
          "operationId": "get-users",
          "pathPattern": "/api/users",
        },
        "before": {
          "method": "get",
          "pathPattern": "/api/users",
        },
      },
      "location": {
        "conceptualLocation": {
          "method": "get",
          "path": "/api/users",
        },
        "conceptualPath": [
          "operations",
          "/api/users",
          "get",
        ],
        "jsonPath": "/paths/~1api~1users/get",
        "kind": "operation",
      },
    },
    "condition": undefined,
    "docsLink": undefined,
    "error": undefined,
    "exempted": false,
    "expected": undefined,
    "isMust": true,
    "isShould": false,
    "name": "operation description",
    "passed": true,
    "received": undefined,
    "severity": 2,
    "type": "changed",
    "where": "GET /api/users",
  },
]
`;

exports[`OperationRule assertions custom matchers hasRequests passing assertion 1`] = `
[
  {
    "change": {
      "changeType": "changed",
      "changed": {
        "after": {
          "method": "get",
          "operationId": "get-users",
          "pathPattern": "/api/users",
        },
        "before": {
          "method": "get",
          "pathPattern": "/api/users",
        },
      },
      "location": {
        "conceptualLocation": {
          "method": "get",
          "path": "/api/users",
        },
        "conceptualPath": [
          "operations",
          "/api/users",
          "get",
        ],
        "jsonPath": "/paths/~1api~1users/get",
        "kind": "operation",
      },
    },
    "condition": undefined,
    "docsLink": undefined,
    "error": undefined,
    "exempted": false,
    "expected": undefined,
    "isMust": true,
    "isShould": false,
    "name": "operation description",
    "passed": true,
    "received": undefined,
    "severity": 2,
    "type": "changed",
    "where": "GET /api/users",
  },
]
`;

exports[`OperationRule assertions custom matchers hasResponses failing assertion 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": "Operation does not have response with content-type application/json for status code 400 ",
    "exempted": false,
    "expected": undefined,
    "isMust": true,
    "isShould": false,
    "name": "operation description",
    "passed": false,
    "received": undefined,
    "severity": 2,
    "type": "removed",
    "where": "GET /api/users",
  },
]
`;

exports[`OperationRule assertions custom matchers hasResponses inverted assertion 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": undefined,
    "exempted": false,
    "expected": undefined,
    "isMust": true,
    "isShould": false,
    "name": "operation description",
    "passed": true,
    "received": undefined,
    "severity": 2,
    "type": "removed",
    "where": "GET /api/users",
  },
]
`;

exports[`OperationRule assertions custom matchers hasResponses passing assertion 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": undefined,
    "exempted": false,
    "expected": undefined,
    "isMust": true,
    "isShould": false,
    "name": "operation description",
    "passed": true,
    "received": undefined,
    "severity": 2,
    "type": "removed",
    "where": "GET /api/users",
  },
]
`;

exports[`OperationRule assertions custom matchers matches failing assertion 1`] = `
[
  {
    "change": {
      "added": {
        "method": "get",
        "pathPattern": "/api/users",
      },
      "changeType": "added",
      "location": {
        "conceptualLocation": {
          "method": "get",
          "path": "/api/users",
        },
        "conceptualPath": [
          "operations",
          "/api/users",
          "get",
        ],
        "jsonPath": "/paths/~1api~1users/get",
        "kind": "operation",
      },
    },
    "condition": undefined,
    "docsLink": undefined,
    "error": "Expected a partial match",
    "exempted": false,
    "expected": "{"description":"Matcher.string"}",
    "isMust": true,
    "isShould": false,
    "name": "operation description",
    "passed": false,
    "received": "{"responses":{}}",
    "severity": 2,
    "type": "added",
    "where": "GET /api/users",
  },
]
`;

exports[`OperationRule assertions custom matchers matches inverted assertion 1`] = `
[
  {
    "change": {
      "added": {
        "method": "get",
        "pathPattern": "/api/users",
      },
      "changeType": "added",
      "location": {
        "conceptualLocation": {
          "method": "get",
          "path": "/api/users",
        },
        "conceptualPath": [
          "operations",
          "/api/users",
          "get",
        ],
        "jsonPath": "/paths/~1api~1users/get",
        "kind": "operation",
      },
    },
    "condition": undefined,
    "docsLink": undefined,
    "error": undefined,
    "exempted": false,
    "expected": undefined,
    "isMust": true,
    "isShould": false,
    "name": "operation description",
    "passed": true,
    "received": undefined,
    "severity": 2,
    "type": "added",
    "where": "GET /api/users",
  },
]
`;

exports[`OperationRule assertions custom matchers matches passing assertion 1`] = `
[
  {
    "change": {
      "added": {
        "description": "hello",
        "method": "get",
        "pathPattern": "/api/users",
      },
      "changeType": "added",
      "location": {
        "conceptualLocation": {
          "method": "get",
          "path": "/api/users",
        },
        "conceptualPath": [
          "operations",
          "/api/users",
          "get",
        ],
        "jsonPath": "/paths/~1api~1users/get",
        "kind": "operation",
      },
    },
    "condition": undefined,
    "docsLink": undefined,
    "error": undefined,
    "exempted": false,
    "expected": undefined,
    "isMust": true,
    "isShould": false,
    "name": "operation description",
    "passed": true,
    "received": undefined,
    "severity": 2,
    "type": "added",
    "where": "GET /api/users",
  },
]
`;

exports[`OperationRule assertions custom matchers matches with custom message 1`] = `
[
  {
    "change": {
      "added": {
        "method": "get",
        "pathPattern": "/api/users",
      },
      "changeType": "added",
      "location": {
        "conceptualLocation": {
          "method": "get",
          "path": "/api/users",
        },
        "conceptualPath": [
          "operations",
          "/api/users",
          "get",
        ],
        "jsonPath": "/paths/~1api~1users/get",
        "kind": "operation",
      },
    },
    "condition": undefined,
    "docsLink": undefined,
    "error": "this is a custom message",
    "exempted": false,
    "expected": "{"description":"Matcher.string"}",
    "isMust": true,
    "isShould": false,
    "name": "operation description",
    "passed": false,
    "received": "{"responses":{}}",
    "severity": 2,
    "type": "added",
    "where": "GET /api/users",
  },
]
`;

exports[`OperationRule assertions custom matchers matchesOneOf failing assertion 1`] = `
[
  {
    "change": {
      "added": {
        "method": "get",
        "pathPattern": "/api/users",
      },
      "changeType": "added",
      "location": {
        "conceptualLocation": {
          "method": "get",
          "path": "/api/users",
        },
        "conceptualPath": [
          "operations",
          "/api/users",
          "get",
        ],
        "jsonPath": "/paths/~1api~1users/get",
        "kind": "operation",
      },
    },
    "condition": undefined,
    "docsLink": undefined,
    "error": "Expected at least one partial match",
    "exempted": false,
    "expected": "[{"description":"Matcher.string"},{"summary":"Matcher.string"}]",
    "isMust": true,
    "isShould": false,
    "name": "operation description",
    "passed": false,
    "received": "{"responses":{}}",
    "severity": 2,
    "type": "added",
    "where": "GET /api/users",
  },
]
`;

exports[`OperationRule assertions custom matchers matchesOneOf inverted assertion 1`] = `
[
  {
    "change": {
      "added": {
        "method": "get",
        "pathPattern": "/api/users",
      },
      "changeType": "added",
      "location": {
        "conceptualLocation": {
          "method": "get",
          "path": "/api/users",
        },
        "conceptualPath": [
          "operations",
          "/api/users",
          "get",
        ],
        "jsonPath": "/paths/~1api~1users/get",
        "kind": "operation",
      },
    },
    "condition": undefined,
    "docsLink": undefined,
    "error": undefined,
    "exempted": false,
    "expected": undefined,
    "isMust": true,
    "isShould": false,
    "name": "operation description",
    "passed": true,
    "received": undefined,
    "severity": 2,
    "type": "added",
    "where": "GET /api/users",
  },
]
`;

exports[`OperationRule assertions custom matchers matchesOneOf passing assertion 1`] = `
[
  {
    "change": {
      "added": {
        "description": "hello",
        "method": "get",
        "pathPattern": "/api/users",
      },
      "changeType": "added",
      "location": {
        "conceptualLocation": {
          "method": "get",
          "path": "/api/users",
        },
        "conceptualPath": [
          "operations",
          "/api/users",
          "get",
        ],
        "jsonPath": "/paths/~1api~1users/get",
        "kind": "operation",
      },
    },
    "condition": undefined,
    "docsLink": undefined,
    "error": undefined,
    "exempted": false,
    "expected": undefined,
    "isMust": true,
    "isShould": false,
    "name": "operation description",
    "passed": true,
    "received": undefined,
    "severity": 2,
    "type": "added",
    "where": "GET /api/users",
  },
]
`;

exports[`OperationRule assertions custom matchers not does not bleed into different assertions 1`] = `
[
  {
    "change": {
      "added": {
        "description": "hello",
        "method": "get",
        "pathPattern": "/api/users",
      },
      "changeType": "added",
      "location": {
        "conceptualLocation": {
          "method": "get",
          "path": "/api/users",
        },
        "conceptualPath": [
          "operations",
          "/api/users",
          "get",
        ],
        "jsonPath": "/paths/~1api~1users/get",
        "kind": "operation",
      },
    },
    "condition": undefined,
    "docsLink": undefined,
    "error": undefined,
    "exempted": false,
    "expected": undefined,
    "isMust": true,
    "isShould": false,
    "name": "operation description",
    "passed": true,
    "received": undefined,
    "severity": 2,
    "type": "added",
    "where": "GET /api/users",
  },
  {
    "change": {
      "added": {
        "description": "hello",
        "method": "get",
        "pathPattern": "/api/users",
      },
      "changeType": "added",
      "location": {
        "conceptualLocation": {
          "method": "get",
          "path": "/api/users",
        },
        "conceptualPath": [
          "operations",
          "/api/users",
          "get",
        ],
        "jsonPath": "/paths/~1api~1users/get",
        "kind": "operation",
      },
    },
    "condition": undefined,
    "docsLink": undefined,
    "error": undefined,
    "exempted": false,
    "expected": undefined,
    "isMust": true,
    "isShould": false,
    "name": "operation description",
    "passed": true,
    "received": undefined,
    "severity": 2,
    "type": "added",
    "where": "GET /api/users",
  },
]
`;

exports[`OperationRule assertions removed failing assertion 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",
    "exempted": false,
    "expected": undefined,
    "isMust": true,
    "isShould": false,
    "name": "operation removal",
    "passed": false,
    "received": undefined,
    "severity": 2,
    "type": "removed",
    "where": "GET /api/users",
  },
]
`;

exports[`OperationRule assertions removed passing assertion 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",
          "summary": "hello",
        },
      },
    },
    "condition": undefined,
    "docsLink": undefined,
    "error": undefined,
    "exempted": false,
    "expected": undefined,
    "isMust": true,
    "isShould": false,
    "name": "operation removal",
    "passed": true,
    "received": undefined,
    "severity": 2,
    "type": "removed",
    "where": "GET /api/users",
  },
]
`;

exports[`OperationRule assertions requirement failing assertion 1`] = `
[
  {
    "change": {
      "location": {
        "conceptualLocation": {
          "method": "get",
          "path": "/api/users",
        },
        "conceptualPath": [
          "operations",
          "/api/users",
          "get",
        ],
        "jsonPath": "/paths/~1api~1users/get",
        "kind": "operation",
      },
      "value": {
        "method": "get",
        "pathPattern": "/api/users",
      },
    },
    "condition": undefined,
    "docsLink": undefined,
    "error": "operation does not have \`description\`",
    "exempted": false,
    "expected": undefined,
    "isMust": true,
    "isShould": false,
    "name": "operation description",
    "passed": false,
    "received": undefined,
    "severity": 1,
    "type": "requirement",
    "where": "GET /api/users",
  },
]
`;

exports[`OperationRule assertions requirement passing assertion 1`] = `
[
  {
    "change": {
      "location": {
        "conceptualLocation": {
          "method": "get",
          "path": "/api/users",
        },
        "conceptualPath": [
          "operations",
          "/api/users",
          "get",
        ],
        "jsonPath": "/paths/~1api~1users/get",
        "kind": "operation",
      },
      "value": {
        "description": "hello",
        "method": "get",
        "pathPattern": "/api/users",
      },
    },
    "condition": undefined,
    "docsLink": undefined,
    "error": undefined,
    "exempted": false,
    "expected": undefined,
    "isMust": true,
    "isShould": false,
    "name": "operation description",
    "passed": true,
    "received": undefined,
    "severity": 1,
    "type": "requirement",
    "where": "GET /api/users",
  },
]
`;

exports[`OperationRule cookieParameter assertions added failing assertion 1`] = `
[
  {
    "change": {
      "added": {
        "in": "cookie",
        "name": "new-param",
      },
      "changeType": "added",
      "location": {
        "conceptualLocation": {
          "inRequest": {
            "cookie": "new-param",
          },
          "method": "get",
          "path": "/api/users",
        },
        "conceptualPath": [
          "operations",
          "/api/users",
          "get",
          "parameters",
          "cookie",
          "new-param",
        ],
        "jsonPath": "/paths/~1api~1users/get/parameters/0",
        "kind": "cookie-parameter",
      },
    },
    "condition": undefined,
    "docsLink": undefined,
    "error": "parameter does not have \`description\`",
    "exempted": false,
    "expected": undefined,
    "isMust": true,
    "isShould": false,
    "name": "parameter description",
    "passed": false,
    "received": undefined,
    "severity": 2,
    "type": "added",
    "where": "GET /api/users cookie parameter: new-param",
  },
]
`;

exports[`OperationRule cookieParameter assertions added passing assertion 1`] = `
[
  {
    "change": {
      "added": {
        "description": "hello",
        "in": "cookie",
        "name": "new-param",
      },
      "changeType": "added",
      "location": {
        "conceptualLocation": {
          "inRequest": {
            "cookie": "new-param",
          },
          "method": "get",
          "path": "/api/users",
        },
        "conceptualPath": [
          "operations",
          "/api/users",
          "get",
          "parameters",
          "cookie",
          "new-param",
        ],
        "jsonPath": "/paths/~1api~1users/get/parameters/0",
        "kind": "cookie-parameter",
      },
    },
    "condition": undefined,
    "docsLink": undefined,
    "error": undefined,
    "exempted": false,
    "expected": undefined,
    "isMust": true,
    "isShould": false,
    "name": "parameter description",
    "passed": true,
    "received": undefined,
    "severity": 2,
    "type": "added",
    "where": "GET /api/users cookie parameter: new-param",
  },
]
`;

exports[`OperationRule cookieParameter assertions changed failing assertion 1`] = `
[
  {
    "change": {
      "changeType": "changed",
      "changed": {
        "after": {
          "in": "cookie",
          "name": "new-param",
          "required": true,
        },
        "before": {
          "in": "cookie",
          "name": "new-param",
        },
      },
      "location": {
        "conceptualLocation": {
          "inRequest": {
            "cookie": "new-param",
          },
          "method": "get",
          "path": "/api/users",
        },
        "conceptualPath": [
          "operations",
          "/api/users",
          "get",
          "parameters",
          "cookie",
          "new-param",
        ],
        "jsonPath": "/paths/~1api~1users/get/parameters/0",
        "kind": "cookie-parameter",
      },
    },
    "condition": undefined,
    "docsLink": undefined,
    "error": "cannot make parameter required",
    "exempted": false,
    "expected": undefined,
    "isMust": true,
    "isShould": false,
    "name": "optional to required parameter",
    "passed": false,
    "received": undefined,
    "severity": 2,
    "type": "changed",
    "where": "GET /api/users cookie parameter: new-param",
  },
]
`;

exports[`OperationRule cookieParameter assertions changed passing assertion 1`] = `
[
  {
    "change": {
      "changeType": "changed",
      "changed": {
        "after": {
          "in": "cookie",
          "name": "new-param",
        },
        "before": {
          "in": "cookie",
          "name": "new-param",
          "required": true,
        },
      },
      "location": {
        "conceptualLocation": {
          "inRequest": {
            "cookie": "new-param",
          },
          "method": "get",
          "path": "/api/users",
        },
        "conceptualPath": [
          "operations",
          "/api/users",
          "get",
          "parameters",
          "cookie",
          "new-param",
        ],
        "jsonPath": "/paths/~1api~1users/get/parameters/0",
        "kind": "cookie-parameter",
      },
    },
    "condition": undefined,
    "docsLink": undefined,
    "error": undefined,
    "exempted": false,
    "expected": undefined,
    "isMust": true,
    "isShould": false,
    "name": "optional to required parameter",
    "passed": true,
    "received": undefined,
    "severity": 2,
    "type": "changed",
    "where": "GET /api/users cookie parameter: new-param",
  },
]
`;

exports[`OperationRule cookieParameter assertions removed failing assertion 1`] = `
[
  {
    "change": {
      "changeType": "removed",
      "location": {
        "conceptualLocation": {
          "inRequest": {
            "cookie": "new-param",
          },
          "method": "get",
          "path": "/api/users",
        },
        "conceptualPath": [
          "operations",
          "/api/users",
          "get",
          "parameters",
          "cookie",
          "new-param",
        ],
        "jsonPath": "/paths/~1api~1users/get/parameters/0",
        "kind": "cookie-parameter",
      },
      "removed": {
        "before": {
          "in": "cookie",
          "name": "new-param",
          "required": true,
        },
      },
    },
    "condition": undefined,
    "docsLink": undefined,
    "error": "required parameter cannot be removed",
    "exempted": false,
    "expected": undefined,
    "isMust": true,
    "isShould": false,
    "name": "removed parameters",
    "passed": false,
    "received": undefined,
    "severity": 2,
    "type": "removed",
    "where": "GET /api/users cookie parameter: new-param",
  },
]
`;

exports[`OperationRule cookieParameter assertions removed passing assertion 1`] = `
[
  {
    "change": {
      "changeType": "removed",
      "location": {
        "conceptualLocation": {
          "inRequest": {
            "cookie": "new-param",
          },
          "method": "get",
          "path": "/api/users",
        },
        "conceptualPath": [
          "operations",
          "/api/users",
          "get",
          "parameters",
          "cookie",
          "new-param",
        ],
        "jsonPath": "/paths/~1api~1users/get/parameters/0",
        "kind": "cookie-parameter",
      },
      "removed": {
        "before": {
          "in": "cookie",
          "name": "new-param",
        },
      },
    },
    "condition": undefined,
    "docsLink": undefined,
    "error": undefined,
    "exempted": false,
    "expected": undefined,
    "isMust": true,
    "isShould": false,
    "name": "removed parameters",
    "passed": true,
    "received": undefined,
    "severity": 2,
    "type": "removed",
    "where": "GET /api/users cookie parameter: new-param",
  },
]
`;

exports[`OperationRule cookieParameter assertions requirement failing assertion 1`] = `
[
  {
    "change": {
      "location": {
        "conceptualLocation": {
          "inRequest": {
            "cookie": "hello",
          },
          "method": "get",
          "path": "/api/users",
        },
        "conceptualPath": [
          "operations",
          "/api/users",
          "get",
          "parameters",
          "cookie",
          "hello",
        ],
        "jsonPath": "/paths/~1api~1users/get/parameters/0",
        "kind": "cookie-parameter",
      },
      "value": {
        "in": "cookie",
        "name": "hello",
      },
    },
    "condition": undefined,
    "docsLink": undefined,
    "error": "parameter does not have \`description\`",
    "exempted": false,
    "expected": undefined,
    "isMust": true,
    "isShould": false,
    "name": "parameter description",
    "passed": false,
    "received": undefined,
    "severity": 2,
    "type": "requirement",
    "where": "GET /api/users cookie parameter: hello",
  },
]
`;

exports[`OperationRule cookieParameter assertions requirement passing assertion 1`] = `
[
  {
    "change": {
      "location": {
        "conceptualLocation": {
          "inRequest": {
            "cookie": "hello",
          },
          "method": "get",
          "path": "/api/users",
        },
        "conceptualPath": [
          "operations",
          "/api/users",
          "get",
          "parameters",
          "cookie",
          "hello",
        ],
        "jsonPath": "/paths/~1api~1users/get/parameters/0",
        "kind": "cookie-parameter",
      },
      "value": {
        "description": "hello",
        "in": "cookie",
        "name": "hello",
      },
    },
    "condition": undefined,
    "docsLink": undefined,
    "error": undefined,
    "exempted": false,
    "expected": undefined,
    "isMust": true,
    "isShould": false,
    "name": "parameter description",
    "passed": true,
    "received": undefined,
    "severity": 2,
    "type": "requirement",
    "where": "GET /api/users cookie parameter: hello",
  },
]
`;

exports[`OperationRule headerParameter assertions added failing assertion 1`] = `
[
  {
    "change": {
      "added": {
        "in": "header",
        "name": "new-param",
      },
      "changeType": "added",
      "location": {
        "conceptualLocation": {
          "inRequest": {
            "header": "new-param",
          },
          "method": "get",
          "path": "/api/users",
        },
        "conceptualPath": [
          "operations",
          "/api/users",
          "get",
          "parameters",
          "header",
          "new-param",
        ],
        "jsonPath": "/paths/~1api~1users/get/parameters/0",
        "kind": "header-parameter",
      },
    },
    "condition": undefined,
    "docsLink": undefined,
    "error": "parameter does not have \`description\`",
    "exempted": false,
    "expected": undefined,
    "isMust": true,
    "isShould": false,
    "name": "parameter description",
    "passed": false,
    "received": undefined,
    "severity": 2,
    "type": "added",
    "where": "GET /api/users header parameter: new-param",
  },
]
`;

exports[`OperationRule headerParameter assertions added passing assertion 1`] = `
[
  {
    "change": {
      "added": {
        "description": "hello",
        "in": "header",
        "name": "new-param",
      },
      "changeType": "added",
      "location": {
        "conceptualLocation": {
          "inRequest": {
            "header": "new-param",
          },
          "method": "get",
          "path": "/api/users",
        },
        "conceptualPath": [
          "operations",
          "/api/users",
          "get",
          "parameters",
          "header",
          "new-param",
        ],
        "jsonPath": "/paths/~1api~1users/get/parameters/0",
        "kind": "header-parameter",
      },
    },
    "condition": undefined,
    "docsLink": undefined,
    "error": undefined,
    "exempted": false,
    "expected": undefined,
    "isMust": true,
    "isShould": false,
    "name": "parameter description",
    "passed": true,
    "received": undefined,
    "severity": 2,
    "type": "added",
    "where": "GET /api/users header parameter: new-param",
  },
]
`;

exports[`OperationRule headerParameter assertions changed failing assertion 1`] = `
[
  {
    "change": {
      "changeType": "changed",
      "changed": {
        "after": {
          "in": "header",
          "name": "new-param",
          "required": true,
        },
        "before": {
          "in": "header",
          "name": "new-param",
        },
      },
      "location": {
        "conceptualLocation": {
          "inRequest": {
            "header": "new-param",
          },
          "method": "get",
          "path": "/api/users",
        },
        "conceptualPath": [
          "operations",
          "/api/users",
          "get",
          "parameters",
          "header",
          "new-param",
        ],
        "jsonPath": "/paths/~1api~1users/get/parameters/0",
        "kind": "header-parameter",
      },
    },
    "condition": undefined,
    "docsLink": undefined,
    "error": "cannot make parameter required",
    "exempted": false,
    "expected": undefined,
    "isMust": true,
    "isShould": false,
    "name": "optional to required parameter",
    "passed": false,
    "received": undefined,
    "severity": 2,
    "type": "changed",
    "where": "GET /api/users header parameter: new-param",
  },
]
`;

exports[`OperationRule headerParameter assertions changed passing assertion 1`] = `
[
  {
    "change": {
      "changeType": "changed",
      "changed": {
        "after": {
          "in": "header",
          "name": "new-param",
        },
        "before": {
          "in": "header",
          "name": "new-param",
          "required": true,
        },
      },
      "location": {
        "conceptualLocation": {
          "inRequest": {
            "header": "new-param",
          },
          "method": "get",
          "path": "/api/users",
        },
        "conceptualPath": [
          "operations",
          "/api/users",
          "get",
          "parameters",
          "header",
          "new-param",
        ],
        "jsonPath": "/paths/~1api~1users/get/parameters/0",
        "kind": "header-parameter",
      },
    },
    "condition": undefined,
    "docsLink": undefined,
    "error": undefined,
    "exempted": false,
    "expected": undefined,
    "isMust": true,
    "isShould": false,
    "name": "optional to required parameter",
    "passed": true,
    "received": undefined,
    "severity": 2,
    "type": "changed",
    "where": "GET /api/users header parameter: new-param",
  },
]
`;

exports[`OperationRule headerParameter assertions removed failing assertion 1`] = `
[
  {
    "change": {
      "changeType": "removed",
      "location": {
        "conceptualLocation": {
          "inRequest": {
            "header": "new-param",
          },
          "method": "get",
          "path": "/api/users",
        },
        "conceptualPath": [
          "operations",
          "/api/users",
          "get",
          "parameters",
          "header",
          "new-param",
        ],
        "jsonPath": "/paths/~1api~1users/get/parameters/0",
        "kind": "header-parameter",
      },
      "removed": {
        "before": {
          "in": "header",
          "name": "new-param",
          "required": true,
        },
      },
    },
    "condition": undefined,
    "docsLink": undefined,
    "error": "required parameter cannot be removed",
    "exempted": false,
    "expected": undefined,
    "isMust": true,
    "isShould": false,
    "name": "removed parameters",
    "passed": false,
    "received": undefined,
    "severity": 2,
    "type": "removed",
    "where": "GET /api/users header parameter: new-param",
  },
]
`;

exports[`OperationRule headerParameter assertions removed passing assertion 1`] = `
[
  {
    "change": {
      "changeType": "removed",
      "location": {
        "conceptualLocation": {
          "inRequest": {
            "header": "new-param",
          },
          "method": "get",
          "path": "/api/users",
        },
        "conceptualPath": [
          "operations",
          "/api/users",
          "get",
          "parameters",
          "header",
          "new-param",
        ],
        "jsonPath": "/paths/~1api~1users/get/parameters/0",
        "kind": "header-parameter",
      },
      "removed": {
        "before": {
          "in": "header",
          "name": "new-param",
        },
      },
    },
    "condition": undefined,
    "docsLink": undefined,
    "error": undefined,
    "exempted": false,
    "expected": undefined,
    "isMust": true,
    "isShould": false,
    "name": "removed parameters",
    "passed": true,
    "received": undefined,
    "severity": 2,
    "type": "removed",
    "where": "GET /api/users header parameter: new-param",
  },
]
`;

exports[`OperationRule headerParameter assertions requirement failing assertion 1`] = `
[
  {
    "change": {
      "location": {
        "conceptualLocation": {
          "inRequest": {
            "header": "hello",
          },
          "method": "get",
          "path": "/api/users",
        },
        "conceptualPath": [
          "operations",
          "/api/users",
          "get",
          "parameters",
          "header",
          "hello",
        ],
        "jsonPath": "/paths/~1api~1users/get/parameters/0",
        "kind": "header-parameter",
      },
      "value": {
        "in": "header",
        "name": "hello",
      },
    },
    "condition": undefined,
    "docsLink": undefined,
    "error": "parameter does not have \`description\`",
    "exempted": false,
    "expected": undefined,
    "isMust": true,
    "isShould": false,
    "name": "parameter description",
    "passed": false,
    "received": undefined,
    "severity": 2,
    "type": "requirement",
    "where": "GET /api/users header parameter: hello",
  },
]
`;

exports[`OperationRule headerParameter assertions requirement passing assertion 1`] = `
[
  {
    "change": {
      "location": {
        "conceptualLocation": {
          "inRequest": {
            "header": "hello",
          },
          "method": "get",
          "path": "/api/users",
        },
        "conceptualPath": [
          "operations",
          "/api/users",
          "get",
          "parameters",
          "header",
          "hello",
        ],
        "jsonPath": "/paths/~1api~1users/get/parameters/0",
        "kind": "header-parameter",
      },
      "value": {
        "description": "hello",
        "in": "header",
        "name": "hello",
      },
    },
    "condition": undefined,
    "docsLink": undefined,
    "error": undefined,
    "exempted": false,
    "expected": undefined,
    "isMust": true,
    "isShould": false,
    "name": "parameter description",
    "passed": true,
    "received": undefined,
    "severity": 2,
    "type": "requirement",
    "where": "GET /api/users header parameter: hello",
  },
]
`;

exports[`OperationRule pathParameter assertions added failing assertion 1`] = `
[
  {
    "change": {
      "added": {
        "in": "path",
        "name": "new-param",
      },
      "changeType": "added",
      "location": {
        "conceptualLocation": {
          "inRequest": {
            "path": "new-param",
          },
          "method": "get",
          "path": "/api/users",
        },
        "conceptualPath": [
          "operations",
          "/api/users",
          "get",
          "parameters",
          "path",
          "new-param",
        ],
        "jsonPath": "/paths/~1api~1users/get/parameters/0",
        "kind": "path-parameter",
      },
    },
    "condition": undefined,
    "docsLink": undefined,
    "error": "parameter does not have \`description\`",
    "exempted": false,
    "expected": undefined,
    "isMust": true,
    "isShould": false,
    "name": "parameter description",
    "passed": false,
    "received": undefined,
    "severity": 2,
    "type": "added",
    "where": "GET /api/users path parameter: new-param",
  },
]
`;

exports[`OperationRule pathParameter assertions added passing assertion 1`] = `
[
  {
    "change": {
      "added": {
        "description": "hello",
        "in": "path",
        "name": "new-param",
      },
      "changeType": "added",
      "location": {
        "conceptualLocation": {
          "inRequest": {
            "path": "new-param",
          },
          "method": "get",
          "path": "/api/users",
        },
        "conceptualPath": [
          "operations",
          "/api/users",
          "get",
          "parameters",
          "path",
          "new-param",
        ],
        "jsonPath": "/paths/~1api~1users/get/parameters/0",
        "kind": "path-parameter",
      },
    },
    "condition": undefined,
    "docsLink": undefined,
    "error": undefined,
    "exempted": false,
    "expected": undefined,
    "isMust": true,
    "isShould": false,
    "name": "parameter description",
    "passed": true,
    "received": undefined,
    "severity": 2,
    "type": "added",
    "where": "GET /api/users path parameter: new-param",
  },
]
`;

exports[`OperationRule pathParameter assertions changed failing assertion 1`] = `
[
  {
    "change": {
      "changeType": "changed",
      "changed": {
        "after": {
          "in": "path",
          "name": "new-param",
          "required": true,
        },
        "before": {
          "in": "path",
          "name": "new-param",
        },
      },
      "location": {
        "conceptualLocation": {
          "inRequest": {
            "path": "new-param",
          },
          "method": "get",
          "path": "/api/users",
        },
        "conceptualPath": [
          "operations",
          "/api/users",
          "get",
          "parameters",
          "path",
          "new-param",
        ],
        "jsonPath": "/paths/~1api~1users/get/parameters/0",
        "kind": "path-parameter",
      },
    },
    "condition": undefined,
    "docsLink": undefined,
    "error": "cannot make parameter required",
    "exempted": false,
    "expected": undefined,
    "isMust": true,
    "isShould": false,
    "name": "optional to required parameter",
    "passed": false,
    "received": undefined,
    "severity": 2,
    "type": "changed",
    "where": "GET /api/users path parameter: new-param",
  },
]
`;

exports[`OperationRule pathParameter assertions changed passing assertion 1`] = `
[
  {
    "change": {
      "changeType": "changed",
      "changed": {
        "after": {
          "in": "path",
          "name": "new-param",
        },
        "before": {
          "in": "path",
          "name": "new-param",
          "required": true,
        },
      },
      "location": {
        "conceptualLocation": {
          "inRequest": {
            "path": "new-param",
          },
          "method": "get",
          "path": "/api/users",
        },
        "conceptualPath": [
          "operations",
          "/api/users",
          "get",
          "parameters",
          "path",
          "new-param",
        ],
        "jsonPath": "/paths/~1api~1users/get/parameters/0",
        "kind": "path-parameter",
      },
    },
    "condition": undefined,
    "docsLink": undefined,
    "error": undefined,
    "exempted": false,
    "expected": undefined,
    "isMust": true,
    "isShould": false,
    "name": "optional to required parameter",
    "passed": true,
    "received": undefined,
    "severity": 2,
    "type": "changed",
    "where": "GET /api/users path parameter: new-param",
  },
]
`;

exports[`OperationRule pathParameter assertions removed failing assertion 1`] = `
[
  {
    "change": {
      "changeType": "removed",
      "location": {
        "conceptualLocation": {
          "inRequest": {
            "path": "new-param",
          },
          "method": "get",
          "path": "/api/users",
        },
        "conceptualPath": [
          "operations",
          "/api/users",
          "get",
          "parameters",
          "path",
          "new-param",
        ],
        "jsonPath": "/paths/~1api~1users/get/parameters/0",
        "kind": "path-parameter",
      },
      "removed": {
        "before": {
          "in": "path",
          "name": "new-param",
          "required": true,
        },
      },
    },
    "condition": undefined,
    "docsLink": undefined,
    "error": "required parameter cannot be removed",
    "exempted": false,
    "expected": undefined,
    "isMust": true,
    "isShould": false,
    "name": "removed parameters",
    "passed": false,
    "received": undefined,
    "severity": 2,
    "type": "removed",
    "where": "GET /api/users path parameter: new-param",
  },
]
`;

exports[`OperationRule pathParameter assertions removed passing assertion 1`] = `
[
  {
    "change": {
      "changeType": "removed",
      "location": {
        "conceptualLocation": {
          "inRequest": {
            "path": "new-param",
          },
          "method": "get",
          "path": "/api/users",
        },
        "conceptualPath": [
          "operations",
          "/api/users",
          "get",
          "parameters",
          "path",
          "new-param",
        ],
        "jsonPath": "/paths/~1api~1users/get/parameters/0",
        "kind": "path-parameter",
      },
      "removed": {
        "before": {
          "in": "path",
          "name": "new-param",
        },
      },
    },
    "condition": undefined,
    "docsLink": undefined,
    "error": undefined,
    "exempted": false,
    "expected": undefined,
    "isMust": true,
    "isShould": false,
    "name": "removed parameters",
    "passed": true,
    "received": undefined,
    "severity": 2,
    "type": "removed",
    "where": "GET /api/users path parameter: new-param",
  },
]
`;

exports[`OperationRule pathParameter assertions requirement failing assertion 1`] = `
[
  {
    "change": {
      "location": {
        "conceptualLocation": {
          "inRequest": {
            "path": "hello",
          },
          "method": "get",
          "path": "/api/users",
        },
        "conceptualPath": [
          "operations",
          "/api/users",
          "get",
          "parameters",
          "path",
          "hello",
        ],
        "jsonPath": "/paths/~1api~1users/get/parameters/0",
        "kind": "path-parameter",
      },
      "value": {
        "in": "path",
        "name": "hello",
      },
    },
    "condition": undefined,
    "docsLink": undefined,
    "error": "parameter does not have \`description\`",
    "exempted": false,
    "expected": undefined,
    "isMust": true,
    "isShould": false,
    "name": "parameter description",
    "passed": false,
    "received": undefined,
    "severity": 2,
    "type": "requirement",
    "where": "GET /api/users path parameter: hello",
  },
]
`;

exports[`OperationRule pathParameter assertions requirement passing assertion 1`] = `
[
  {
    "change": {
      "location": {
        "conceptualLocation": {
          "inRequest": {
            "path": "hello",
          },
          "method": "get",
          "path": "/api/users",
        },
        "conceptualPath": [
          "operations",
          "/api/users",
          "get",
          "parameters",
          "path",
          "hello",
        ],
        "jsonPath": "/paths/~1api~1users/get/parameters/0",
        "kind": "path-parameter",
      },
      "value": {
        "description": "hello",
        "in": "path",
        "name": "hello",
      },
    },
    "condition": undefined,
    "docsLink": undefined,
    "error": undefined,
    "exempted": false,
    "expected": undefined,
    "isMust": true,
    "isShould": false,
    "name": "parameter description",
    "passed": true,
    "received": undefined,
    "severity": 2,
    "type": "requirement",
    "where": "GET /api/users path parameter: hello",
  },
]
`;

exports[`OperationRule queryParameter assertions added failing assertion 1`] = `
[
  {
    "change": {
      "added": {
        "in": "query",
        "name": "new-param",
      },
      "changeType": "added",
      "location": {
        "conceptualLocation": {
          "inRequest": {
            "query": "new-param",
          },
          "method": "get",
          "path": "/api/users",
        },
        "conceptualPath": [
          "operations",
          "/api/users",
          "get",
          "parameters",
          "query",
          "new-param",
        ],
        "jsonPath": "/paths/~1api~1users/get/parameters/0",
        "kind": "query-parameter",
      },
    },
    "condition": undefined,
    "docsLink": undefined,
    "error": "parameter does not have \`description\`",
    "exempted": false,
    "expected": undefined,
    "isMust": true,
    "isShould": false,
    "name": "parameter description",
    "passed": false,
    "received": undefined,
    "severity": 2,
    "type": "added",
    "where": "GET /api/users query parameter: new-param",
  },
]
`;

exports[`OperationRule queryParameter assertions added passing assertion 1`] = `
[
  {
    "change": {
      "added": {
        "description": "hello",
        "in": "query",
        "name": "new-param",
      },
      "changeType": "added",
      "location": {
        "conceptualLocation": {
          "inRequest": {
            "query": "new-param",
          },
          "method": "get",
          "path": "/api/users",
        },
        "conceptualPath": [
          "operations",
          "/api/users",
          "get",
          "parameters",
          "query",
          "new-param",
        ],
        "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": "parameter description",
    "passed": true,
    "received": undefined,
    "severity": 2,
    "type": "added",
    "where": "GET /api/users query parameter: new-param",
  },
]
`;

exports[`OperationRule queryParameter assertions changed failing assertion 1`] = `
[
  {
    "change": {
      "changeType": "changed",
      "changed": {
        "after": {
          "in": "query",
          "name": "new-param",
          "required": true,
        },
        "before": {
          "in": "query",
          "name": "new-param",
        },
      },
      "location": {
        "conceptualLocation": {
          "inRequest": {
            "query": "new-param",
          },
          "method": "get",
          "path": "/api/users",
        },
        "conceptualPath": [
          "operations",
          "/api/users",
          "get",
          "parameters",
          "query",
          "new-param",
        ],
        "jsonPath": "/paths/~1api~1users/get/parameters/0",
        "kind": "query-parameter",
      },
    },
    "condition": undefined,
    "docsLink": undefined,
    "error": "cannot make parameter required",
    "exempted": false,
    "expected": undefined,
    "isMust": true,
    "isShould": false,
    "name": "optional to required parameter",
    "passed": false,
    "received": undefined,
    "severity": 2,
    "type": "changed",
    "where": "GET /api/users query parameter: new-param",
  },
]
`;

exports[`OperationRule queryParameter assertions changed passing assertion 1`] = `
[
  {
    "change": {
      "changeType": "changed",
      "changed": {
        "after": {
          "in": "query",
          "name": "new-param",
        },
        "before": {
          "in": "query",
          "name": "new-param",
          "required": true,
        },
      },
      "location": {
        "conceptualLocation": {
          "inRequest": {
            "query": "new-param",
          },
          "method": "get",
          "path": "/api/users",
        },
        "conceptualPath": [
          "operations",
          "/api/users",
          "get",
          "parameters",
          "query",
          "new-param",
        ],
        "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": "optional to required parameter",
    "passed": true,
    "received": undefined,
    "severity": 2,
    "type": "changed",
    "where": "GET /api/users query parameter: new-param",
  },
]
`;

exports[`OperationRule queryParameter assertions removed failing assertion 1`] = `
[
  {
    "change": {
      "changeType": "removed",
      "location": {
        "conceptualLocation": {
          "inRequest": {
            "query": "new-param",
          },
          "method": "get",
          "path": "/api/users",
        },
        "conceptualPath": [
          "operations",
          "/api/users",
          "get",
          "parameters",
          "query",
          "new-param",
        ],
        "jsonPath": "/paths/~1api~1users/get/parameters/0",
        "kind": "query-parameter",
      },
      "removed": {
        "before": {
          "in": "query",
          "name": "new-param",
          "required": true,
        },
      },
    },
    "condition": undefined,
    "docsLink": undefined,
    "error": "required parameter cannot be removed",
    "exempted": false,
    "expected": undefined,
    "isMust": true,
    "isShould": false,
    "name": "removed parameters",
    "passed": false,
    "received": undefined,
    "severity": 2,
    "type": "removed",
    "where": "GET /api/users query parameter: new-param",
  },
]
`;

exports[`OperationRule queryParameter assertions removed passing assertion 1`] = `
[
  {
    "change": {
      "changeType": "removed",
      "location": {
        "conceptualLocation": {
          "inRequest": {
            "query": "new-param",
          },
          "method": "get",
          "path": "/api/users",
        },
        "conceptualPath": [
          "operations",
          "/api/users",
          "get",
          "parameters",
          "query",
          "new-param",
        ],
        "jsonPath": "/paths/~1api~1users/get/parameters/0",
        "kind": "query-parameter",
      },
      "removed": {
        "before": {
          "in": "query",
          "name": "new-param",
        },
      },
    },
    "condition": undefined,
    "docsLink": undefined,
    "error": undefined,
    "exempted": false,
    "expected": undefined,
    "isMust": true,
    "isShould": false,
    "name": "removed parameters",
    "passed": true,
    "received": undefined,
    "severity": 2,
    "type": "removed",
    "where": "GET /api/users query parameter: new-param",
  },
]
`;

exports[`OperationRule queryParameter assertions requirement failing assertion 1`] = `
[
  {
    "change": {
      "location": {
        "conceptualLocation": {
          "inRequest": {
            "query": "hello",
          },
          "method": "get",
          "path": "/api/users",
        },
        "conceptualPath": [
          "operations",
          "/api/users",
          "get",
          "parameters",
          "query",
          "hello",
        ],
        "jsonPath": "/paths/~1api~1users/get/parameters/0",
        "kind": "query-parameter",
      },
      "value": {
        "in": "query",
        "name": "hello",
      },
    },
    "condition": undefined,
    "docsLink": undefined,
    "error": "parameter does not have \`description\`",
    "exempted": false,
    "expected": undefined,
    "isMust": true,
    "isShould": false,
    "name": "parameter description",
    "passed": false,
    "received": undefined,
    "severity": 2,
    "type": "requirement",
    "where": "GET /api/users query parameter: hello",
  },
]
`;

exports[`OperationRule queryParameter assertions requirement passing assertion 1`] = `
[
  {
    "change": {
      "location": {
        "conceptualLocation": {
          "inRequest": {
            "query": "hello",
          },
          "method": "get",
          "path": "/api/users",
        },
        "conceptualPath": [
          "operations",
          "/api/users",
          "get",
          "parameters",
          "query",
          "hello",
        ],
        "jsonPath": "/paths/~1api~1users/get/parameters/0",
        "kind": "query-parameter",
      },
      "value": {
        "description": "hello",
        "in": "query",
        "name": "hello",
      },
    },
    "condition": undefined,
    "docsLink": undefined,
    "error": undefined,
    "exempted": false,
    "expected": undefined,
    "isMust": true,
    "isShould": false,
    "name": "parameter description",
    "passed": true,
    "received": undefined,
    "severity": 2,
    "type": "requirement",
    "where": "GET /api/users query parameter: hello",
  },
]
`;

exports[`OperationRule rulesContext after 1`] = `
{
  "custom": {},
  "operation": {
    "change": "added",
    "cookieParameters": Map {},
    "headerParameters": Map {},
    "location": {
      "conceptualLocation": {
        "method": "get",
        "path": "/api/users",
      },
      "conceptualPath": [
        "operations",
        "/api/users",
        "get",
      ],
      "jsonPath": "/paths/~1api~1users/get",
      "kind": "operation",
    },
    "method": "get",
    "path": "/api/users",
    "pathParameters": Map {},
    "polymorphicSchemas": {
      "after": Set {},
      "before": Set {},
    },
    "queryParameters": Map {},
    "raw": {
      "description": "hello",
      "responses": {},
    },
    "requests": [],
    "responses": Map {},
    "security": null,
    "value": {
      "description": "hello",
      "method": "get",
      "pathPattern": "/api/users",
    },
  },
  "specification": {
    "change": "changed",
    "location": {
      "conceptualLocation": {},
      "conceptualPath": [],
      "jsonPath": "",
      "kind": "specification",
    },
    "raw": {
      "info": {
        "title": "Empty",
        "version": "0.0.0",
      },
      "openapi": "3.1.0",
      "paths": {
        "/api/users": {
          "get": {
            "description": "hello",
            "responses": {},
          },
        },
      },
      "servers": [
        {
          "url": "http://optic.com",
        },
      ],
    },
    "value": {
      "info": {
        "title": "Empty",
        "version": "0.0.0",
      },
      "openapi": "3.1.0",
      "servers": [
        {
          "url": "http://optic.com",
        },
      ],
    },
    "versionChange": null,
  },
}
`;

exports[`OperationRule rulesContext before 1`] = `
{
  "custom": {},
  "operation": {
    "change": "removed",
    "cookieParameters": Map {},
    "headerParameters": Map {},
    "location": {
      "conceptualLocation": {
        "method": "get",
        "path": "/api/users",
      },
      "conceptualPath": [
        "operations",
        "/api/users",
        "get",
      ],
      "jsonPath": "/paths/~1api~1users/get",
      "kind": "operation",
    },
    "method": "get",
    "path": "/api/users",
    "pathParameters": Map {},
    "polymorphicSchemas": {
      "after": Set {},
      "before": Set {},
    },
    "queryParameters": Map {},
    "raw": {
      "description": "hello",
      "responses": {},
    },
    "requests": [],
    "responses": Map {},
    "security": null,
    "value": {
      "description": "hello",
      "method": "get",
      "pathPattern": "/api/users",
    },
  },
  "specification": {
    "change": "removed",
    "location": {
      "conceptualLocation": {},
      "conceptualPath": [],
      "jsonPath": "",
      "kind": "specification",
    },
    "raw": {
      "info": {
        "title": "Empty",
        "version": "0.0.0",
      },
      "openapi": "3.1.0",
      "paths": {
        "/api/users": {
          "get": {
            "description": "hello",
            "responses": {},
          },
        },
      },
      "servers": [
        {
          "url": "http://optic.com",
        },
      ],
    },
    "value": {
      "info": {
        "title": "Empty",
        "version": "0.0.0",
      },
      "openapi": "3.1.0",
      "servers": [
        {
          "url": "http://optic.com",
        },
      ],
    },
    "versionChange": null,
  },
}
`;
