{
  "consumer": {
    "name": "vapor-chamber"
  },
  "provider": {
    "name": "vapor-chamber-backend"
  },
  "interactions": [
    {
      "type": "Synchronous/HTTP",
      "description": "gen-0",
      "request": {
        "method": "POST",
        "path": "/api/vc",
        "headers": {
          "Content-Type": [
            "application/json"
          ],
          "Accept": [
            "application/json, application/problem+json"
          ]
        },
        "body": {
          "content": {
            "command": "vcContractGen",
            "target": {
              "id": 1
            },
            "payload": {
              "name": "a",
              "qty": 5
            }
          },
          "contentType": "application/json",
          "encoded": false
        }
      },
      "response": {
        "status": 200
      }
    },
    {
      "type": "Synchronous/HTTP",
      "description": "gen-1",
      "request": {
        "method": "POST",
        "path": "/api/vc",
        "headers": {
          "Content-Type": [
            "application/json"
          ],
          "Accept": [
            "application/json, application/problem+json"
          ]
        },
        "body": {
          "content": {
            "command": "vcContractGen",
            "target": {
              "id": 1
            },
            "payload": {
              "qty": 5
            }
          },
          "contentType": "application/json",
          "encoded": false
        }
      },
      "response": {
        "status": 422,
        "body": {
          "content": {
            "status": 422,
            "code": "validation_failed",
            "detail": "Any text.",
            "errors": [
              {
                "pointer": "/payload/name",
                "detail": "Any text."
              }
            ]
          },
          "contentType": "application/json",
          "encoded": false
        },
        "matchingRules": {
          "body": {
            "$.detail": {
              "combine": "AND",
              "matchers": [
                {
                  "match": "type"
                }
              ]
            },
            "$.errors[*].detail": {
              "combine": "AND",
              "matchers": [
                {
                  "match": "type"
                }
              ]
            }
          }
        }
      }
    },
    {
      "type": "Synchronous/HTTP",
      "description": "gen-2",
      "request": {
        "method": "POST",
        "path": "/api/vc",
        "headers": {
          "Content-Type": [
            "application/json"
          ],
          "Accept": [
            "application/json, application/problem+json"
          ]
        },
        "body": {
          "content": {
            "command": "vcContractGen",
            "target": {
              "id": "x"
            },
            "payload": {
              "name": "a",
              "qty": 5
            }
          },
          "contentType": "application/json",
          "encoded": false
        }
      },
      "response": {
        "status": 422,
        "body": {
          "content": {
            "status": 422,
            "code": "validation_failed",
            "detail": "Any text.",
            "errors": [
              {
                "pointer": "/target/id",
                "detail": "Any text."
              }
            ]
          },
          "contentType": "application/json",
          "encoded": false
        },
        "matchingRules": {
          "body": {
            "$.detail": {
              "combine": "AND",
              "matchers": [
                {
                  "match": "type"
                }
              ]
            },
            "$.errors[*].detail": {
              "combine": "AND",
              "matchers": [
                {
                  "match": "type"
                }
              ]
            }
          }
        }
      }
    },
    {
      "type": "Synchronous/HTTP",
      "description": "gen-3",
      "request": {
        "method": "POST",
        "path": "/api/vc",
        "headers": {
          "Content-Type": [
            "application/json"
          ],
          "Accept": [
            "application/json, application/problem+json"
          ]
        },
        "body": {
          "content": {
            "command": "vcContractGen",
            "target": {
              "id": 1
            },
            "payload": {
              "name": "a",
              "qty": "5"
            }
          },
          "contentType": "application/json",
          "encoded": false
        }
      },
      "response": {
        "status": 422,
        "body": {
          "content": {
            "status": 422,
            "code": "validation_failed",
            "detail": "Any text.",
            "errors": [
              {
                "pointer": "/payload/qty",
                "detail": "Any text."
              }
            ]
          },
          "contentType": "application/json",
          "encoded": false
        },
        "matchingRules": {
          "body": {
            "$.detail": {
              "combine": "AND",
              "matchers": [
                {
                  "match": "type"
                }
              ]
            },
            "$.errors[*].detail": {
              "combine": "AND",
              "matchers": [
                {
                  "match": "type"
                }
              ]
            }
          }
        }
      }
    },
    {
      "type": "Synchronous/HTTP",
      "description": "gen-4",
      "request": {
        "method": "POST",
        "path": "/api/vc",
        "headers": {
          "Content-Type": [
            "application/json"
          ],
          "Accept": [
            "application/json, application/problem+json"
          ]
        },
        "body": {
          "content": {
            "command": "vcContractGen",
            "target": {
              "id": 1
            },
            "payload": {
              "name": "",
              "qty": 5
            }
          },
          "contentType": "application/json",
          "encoded": false
        }
      },
      "response": {
        "status": 200
      }
    }
  ],
  "metadata": {
    "pactSpecification": {
      "version": "4.0"
    }
  }
}
