PageSourceSearch

https://docs-pactflow-preview.netlify.app/assets/js/ff012db9.b8fdd6b9.js

js docs-pactflow-preview.netlify.app collected 2026-10-03 10:40:51 UTC 24,383 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkpartners=self.webpackChunkpartners||[]).push([[12107],{15680:(e,t,a)=>{a.d(t,{xA:()=>s,yg:()=>g});var n=a(96540);function i(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function r(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function o(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?r(Object(a),!0).forEach((function(t){i(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):r(Object(a)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}function l(e,t){if(null==e)return{};var a,n,i=function(e,t){if(null==e)return{};var a,n,i={},r=Object.keys(e);for(n=0;n<r.length;n++)a=r[n],t.indexOf(a)>=0||(i[a]=e[a]);return i}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(n=0;n<r.length;n++)a=r[n],t.indexOf(a)>=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(i[a]=e[a])}return i}var p=n.createContext({}),c=function(e){var t=n.useContext(p),a=t;return e&&(a="function"==typeof e?e(t):o(o({},t),e)),a},s=function(e){var t=c(e.components);return n.createElement(p.Provider,{value:t},e.children)},u="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},h=n.forwardRef((function(e,t){var a=e.components,i=e.mdxType,r=e.originalType,p=e.parentName,s=l(e,["components","mdxType","originalType","parentName"]),u=c(a),h=i,g=u["".concat(p,".").concat(h)]||u[h]||d[h]||r;return a?n.createElement(g,o(o({ref:t},s),{},{components:a})):n.createElement(g,o({ref:t},s))}));function g(e,t){var a=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var r=a.length,o=new Array(r);o[0]=h;var l={};for(var p in t)hasOwnProperty.call(t,p)&&(l[p]=t[p]);l.originalType=e,l[u]="string"==typeof e?e:i,o[1]=l;for(var c=2;c<r;c++)o[c]=a[c];return n.createElement.apply(null,o)}return n.createElement.apply(null,a)}h.displayName="MDXCreateElement"},45470:(e,t,a)=>{a.r(t),a.d(t,{assets:()=>p,contentTitle:()=>o,default:()=>d,frontMatter:()=>r,metadata:()=>l,toc:()=>c});var n=a(58168),i=(a(96540),a(15680));const r={title:"Publishing Contracts",sidebar_label:"Publishing Contracts"},o=void 0,l={unversionedId:"docs/bi-directional-contract-testing/publishing",id:"docs/bi-directional-contract-testing/publishing",title:"Publishing Contracts",description:"Publishing the Consumer Contract to PactFlow",source:"@site/docs/docs/bi-directional-contract-testing/publishing.md",sourceDirName:"docs/bi-directional-contract-testing",slug:"/docs/bi-directional-contract-testing/publishing",permalink:"/docs/bi-directional-contract-testing/publishing",draft:!1,editUrl:"https://github.com/pactflow/docs.pactflow.io/edit/master/website/docs/docs/bi-directional-contract-testing/publishing.md",tags:[],version:"current",lastUpdatedBy:"Matt Fellows",lastUpdatedAt:1740540534,formattedLastUpdatedAt:"Feb 26, 2025",frontMatter:{title:"Publishing Contracts",sidebar_label:"Publishing Contracts"},sidebar:"docs",previous:{title:"Provider",permalink:"/docs/bi-directional-contract-testing/provider"},next:{title:"Compatibility Checks",permalink:"/docs/bi-directional-contract-testing/compatibility-checks"}},p={},c=[{value:"Publishing the Consumer Contract to PactFlow",id:"publishing-the-consumer-contract-to-pactflow",level:2},{value:"Publishing the Provider Contract + Results to PactFlow",id:"publishing-the-provider-contract--results-to-pactflow",level:2},{value:"Installation",id:"installation",level:3},{value:"Docker",id:"docker",level:4},{value:"Pact Standalone CLI",id:"pact-standalone-cli",level:4},{value:"windows (bash shell)",id:"windows-bash-shell",level:5},{value:"MacOS",id:"macos",level:5},{value:"Linux",id:"linux",level:5},{value:"Pact Broker Client (Ruby)",id:"pact-broker-client-ruby",level:4},{value:"GitHub Actions",id:"github-actions",level:4},{value:"Publishing",id:"publishing",level:3},{value:"Usage",id:"usage",level:4},{value:"Docker",id:"docker-1",level:4},{value:"Pact Standalone CLI",id:"pact-standalone-cli-1",level:4},{value:"Pact Broker Client (Ruby)",id:"pact-broker-client-ruby-1",level:4},{value:"GitHub Actions",id:"github-actions-1",level:4},{value:"Request Details",id:"request-details",level:4}],s={toc:c},u="wrapper";
1function d(e){let{components:t,...a}=e;return(0,i.yg)(u,(0,n.A)({},s,a,{components:t,mdxType:"MDXLayout"}),(0,i.yg)("h2",{id:"publishing-the-consumer-contract-to-pactflow"},"Publishing the Consumer Contract to PactFlow"),(0,i.yg)("p",null,"Publishing a consumer contract is the same as publishing a regular Pact. For details on publishing pact files to PactFlow, refer to ",(0,i.yg)("a",{parentName:"p",href:"https://docs.pact.io/getting_started/sharing_pacts"},"Sharing Pacts with the Pact Broker"),"."),(0,i.yg)("h2",{id:"publishing-the-provider-contract--results-to-pactflow"},"Publishing the Provider Contract + Results to PactFlow"),(0,i.yg)("p",null,"There are several ways PactFlow can be used to publish contracts."),(0,i.yg)("p",null,"The links in the list will take you to the respective documentation in each repo."),(0,i.yg)("p",null,"Otherwise see the ",(0,i.yg)("a",{parentName:"p",href:"#installation"},"Installation")," section and ",(0,i.yg)("a",{parentName:"p",href:"#usage"},"Usage")," instructions on this page."),(0,i.yg)("ol",null,(0,i.yg)("li",{parentName:"ol"},(0,i.yg)("a",{parentName:"li",href:"https://hub.docker.com/r/pactfoundation/pact-cli"},"Docker")),(0,i.yg)("li",{parentName:"ol"},(0,i.yg)("a",{parentName:"li",href:"https://github.com/pact-foundation/pact-ruby-standalone/releases"},"Pact Standalone CLI")),(0,i.yg)("li",{parentName:"ol"},(0,i.yg)("a",{parentName:"li",href:"https://github.com/pact-foundation/pact_broker-client#provider-contracts"},"Pact Broker Client (Ruby)")),(0,i.yg)("li",{parentName:"ol"},(0,i.yg)("a",{parentName:"li",href:"https://github.com/pactflow/actions/tree/main/publish-provider-contract"},"Github Actions"))),(0,i.yg)("h3",{id:"installation"},"Installation"),(0,i.yg)("h4",{id:"docker"},"Docker"),(0,i.yg)("ul",null,(0,i.yg)("li",{parentName:"ul"},"The Pact Broker CLI is packaged with the other Ruby command line tools in the ",(0,i.yg)("a",{parentName:"li",href:"https://hub.docker.com/r/pactfoundation/pact-cli"},"pactfoundation/pact-cli")," Docker image.")),(0,i.yg)("pre",null,(0,i.yg)("code",{parentName:"pre",className:"language-sh"},"docker pull pactfoundation/pact-cli\n")),(0,i.yg)("h4",{id:"pact-standalone-cli"},"Pact Standalone CLI"),(0,i.yg)("ul",null,(0,i.yg)("li",{parentName:"ul"},"Download the latest ",(0,i.yg)("a",{parentName:"li",href:"https://github.com/pact-foundation/pact-ruby-standalone/releases"},"pact-ruby-standalone")," package.",(0,i.yg)("ul",{parentName:"li"},(0,i.yg)("li",{parentName:"ul"},"Available from version ",(0,i.yg)("inlineCode",{parentName:"li"},"v1.89.00")," and upwards"))),(0,i.yg)("li",{parentName:"ul"},"Installation instructions are provided in the above link, for ",(0,i.yg)("inlineCode",{parentName:"li"},"windows")," / ",(0,i.yg)("inlineCode",{parentName:"li"},"macos")," / ",(0,i.yg)("inlineCode",{parentName:"li"},"linux")),(0,i.yg)("li",{parentName:"ul"},"You do not need Ruby to run the CLI, as the Ruby runtime is packaged with the executable using Travelling Ruby.")),(0,i.yg)("h5",{id:"windows-bash-shell"},"windows (bash shell)"),(0,i.yg)("pre",null,(0,i.yg)("code",{parentName:"pre",className:"language-sh"}," curl -LO https://github.com/pact-foundation/pact-ruby-standalone/releases/download/v1.89.00/pact-1.89.00-win32.zip && \\\n                unzip pact-1.89.00-win32.zip && \\\n                ./pact/bin/pactflow.bat help\n")),(0,i.yg)("h5",{id:"macos"},"MacOS"),(0,i.yg)("pre",null,(0,i.yg)("code",{parentName:"pre",className:"language-sh"},"curl -LO https://github.com/pact-foundation/pact-ruby-standalone/releases/download/v1.89.00/pact-1.89.00-osx.tar.gz && \\\n                tar xzf pact-1.89.00-osx.tar.gz && \\\n                ./pact/bin/pactflow help\n")),(0,i.yg)("h5",{id:"linux"},"Linux"),(0,i.yg)("pre",null,(0,i.yg)("code",{parentName:"pre",className:"language-sh"},"curl -LO https://github.com/pact-foundation/pact-ruby-standalone/releases/download/v1.89.00/pact-1.89.00-linux-x86_64.tar.gz && \\\n                tar xzf pact-1.89.00-linux-x86_64.tar.gz && \\\n                ./pact/bin/pactflow help\n")),(0,i.yg)("h4",{id:"pact-broker-client-ruby"},"Pact Broker Client (Ruby)"),(0,i.yg)("ul",null,(0,i.yg)("li",{parentName:"ul"},"Either",(0,i.yg)("ul",{parentName:"li"},(0,i.yg)("li",{parentName:"ul"},"Add ",(0,i.yg)("inlineCode",{parentName:"li"},"gem 'pact_broker-client'")," to your Gemfile and run ",(0,i.yg)("inlineCode",{parentName:"li"},"bundle install")),(0,i.yg)("li",{parentName:"ul"},"Install the gem directly by running",(0,i.yg)("pre",{parentName:"li"},(0,i.yg)("code",{parentName:"pre",className:"language-sh"},"  gem install pact_broker-client\n")))))),(0,i.yg)("h4",{id:"github-actions"},"GitHub Actions"),(0,i.yg)("p",null,"Copy and paste the following snippet into your .yml file."),(0,i.yg)("pre",null,(0,i.yg)("code",{parentName:"pre",className:"language-sh"},"- name: publish-provider-contract action\n  uses: pactflow/actions/[email protected]\n")),(0,i.yg)("h3",{id:"publishing"},"Publishing"),(0,i.yg)("h4",{id:"usage"},"Usage"),(0,i.yg)("pre",null,(0,i.yg)("code",{parentName:"pre",className:"language-sh"},"Usage:\n  pactflow publish-provider-contract CONTRACT_FILE ... --provider=PROVIDER -a,\n    --provider-app-version=PROVIDER_APP_VERSION -b, --broker-base-url=B
1ROKER_BASE_URL\n\nOptions:\n      --provider=PROVIDER\n              # The provider name\n  -a, --provider-app-version=PROVIDER_APP_VERSION\n              # The provider application version\n  -h, [--branch=BRANCH]\n              # Repository branch of the provider version\n  -t, [--tag=TAG]\n              # Tag name for provider version. Can be specified multiple\n                times.\n      [--specification=SPECIFICATION]\n              # The contract specification\n              # Default: oas\n      [--content-type=CONTENT_TYPE]\n              # The content type. eg. application/yml\n      [--verification-success], [--no-verification-success]\n              # Whether or not the self verification passed successfully.\n      [--verification-exit-code=N]\n              # The exit code of the verification process. Can be used instead\n                of --verification-success|--no-verification-success for a\n                simpler build script.\n      [--verification-results=VERIFICATION_RESULTS]\n              # The path to the file containing the output from the\n                verification process\n      [--verification-results-content-type=VERIFICATION_RESULTS_CONTENT_TYPE]\n              # The content type of the verification output eg. text/plain,\n                application/yaml\n      [--verification-results-format=VERIFICATION_RESULTS_FORMAT]\n              # The format of the verification output eg. junit, text\n      [--verifier=VERIFIER]\n              # The tool used to verify the provider contract\n      [--verifier-version=VERIFIER_VERSION]\n              # The version of the tool used to verify the provider contract\n      [--build-url=BUILD_URL]\n              # The build URL that created the provider contract\n  -o, [--output=OUTPUT]\n              # json or text\n              # Default: text\n  -b, --broker-base-url=BROKER_BASE_URL\n              # The base URL of the Pact Broker\n  -u, [--broker-username=BROKER_USERNAME]\n              # Pact Broker basic auth username\n  -p, [--broker-password=BROKER_PASSWORD]\n              # Pact Broker basic auth password\n  -k, [--broker-token=BROKER_TOKEN]\n              # Pact Broker bearer token\n  -v, [--verbose], [--no-verbose]\n              # Verbose output. Default: false\n")),(0,i.yg)("h4",{id:"docker-1"},"Docker"),(0,i.yg)("ul",null,(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("a",{parentName:"li",href:"https://hub.docker.com/r/pactfoundation/pact-cli"},"Docs")),(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("a",{parentName:"li",href:"https://github.com/pactflow/example-bi-directional-provider-postman/runs/6819148533?check_suite_focus=true"},"See the example in GitHub Actions"))),(0,i.yg)("pre",null,(0,i.yg)("code",{parentName:"pre",className:"language-sh"},'docker run --rm -v /${PWD}:/${PWD} -w ${PWD} \\\n      -e PACT_BROKER_BASE_URL \\\n      -e PACT_BROKER_TOKEN \\\n      pactfoundation/pact-cli:0.50.0.28 \\\n      pactflow publish-provider-contract \\\n      oas/swagger.yml \\\n      --provider "pactflow-example-bi-directional-provider-postman" \\\n      --provider-app-version 3a0994c \\\n      --branch test-pactflow-command \\\n      --content-type application/yaml \\\n      --verification-exit-code=0 \\\n      --verification-results newman/newman-run-report-2022-06-09-14-18-33-406-0.json \\\n      --verification-results-content-type text/plain \\\n      --verifier postman\n')),(0,i.yg)("h4",{id:"pact-standalone-cli-1"},"Pact Standalone CLI"),(0,i.yg)("ul",null,(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("a",{parentName:"li",href:"https://github.com/pact-foundation/pact-ruby-standalone/releases"},"Docs")),(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("a",{parentName:"li",href:"https://github.com/pactflow/example-bi-directional-provider-postman/runs/6819148761?check_suite_focus=true"},"See the example in GitHub Actions"))),(0,i.yg)("pre",null,(0,i.yg)("code",{parentName:"pre",className:"language-sh"},'./pact/bin/pactflow publish-provider-contract \\\n      oas/swagger.yml \\\n      --provider "pactflow-example-bi-directional-provider-postman" \\\n      --provider-app-version 3a0994c \\\n      --branch test-pactflow-command \\\n      --content-type application/yaml \\\n      --verification-exit-code=0 \\\n      --verification-results newman/newman-run-report-2022-06-09-14-03-30-715-0.json \\\n      --verification-results-content-type text/plain \\\n      --verifier postman\n')),(0,i.yg)("h4",{id:"pact-broker-client-ruby-1"},"Pact Broker Client (Ruby)"),(0,i.yg)("ul",null,(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("a",{parentName:"li",href:"https://github.com/pact-foundation/pact_broker-client#provider-contracts"},"Docs")),(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("a",{parentName:"li",href:"https://github.com/pactflow/example-bi-directional-prov
1ider-postman/runs/6819148631?check_suite_focus=true"},"See the example in GitHub Actions"))),(0,i.yg)("pre",null,(0,i.yg)("code",{parentName:"pre",className:"language-sh"},'pactflow publish-provider-contract \\\n      oas/swagger.yml \\\n      --provider "pactflow-example-bi-directional-provider-postman" \\\n      --provider-app-version 3a0994c \\\n      --branch test-pactflow-command \\\n      --content-type application/yaml \\\n      --verification-exit-code=0 \\\n      --verification-results newman/newman-run-report-2022-06-09-14-03-30-715-0.json \\\n      --verification-results-content-type text/plain \\\n      --verifier postman\n')),(0,i.yg)("h4",{id:"github-actions-1"},"GitHub Actions"),(0,i.yg)("ul",null,(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("a",{parentName:"li",href:"https://github.com/pactflow/actions/tree/main/publish-provider-contract#example"},"Docs"))),(0,i.yg)("pre",null,(0,i.yg)("code",{parentName:"pre",className:"language-sh"},'# (This just saves defining these multiple times for different pact jobs)\nenv:\n  version: "1.2.3"\n  application_name: "my-api-provider"\n  pact_broker: ${{ secrets.PACT_BROKER_BASE_URL }}\n  pact_broker_token: ${{ secrets.PACT_BROKER_TOKEN }}\n\njobs:\n  pact-publish-oas-action:\n    runs-on: ubuntu-latest\n    steps:\n      # MANDATORY: Must use \'checkout\' first\n      - uses: actions/checkout@v4\n      - name: Publish provider contract on passing test run\n        if: success()\n        uses: pactflow/actions/publish-provider-contract@v2\n        with:\n          version: "1.2.3"\n          application_name: "my-api-provider"\n          broker_url: ${{ secrets.PACT_BROKER_BASE_URL }}\n            token: ${{ secrets.PACT_BROKER_TOKEN }}\n          contract: src/oas/user.yml\n          contract_content_type: application/yaml # optional, defaults to application/yml\n          verification_results: src/results/report.md\n      - name: Publish provider contract on failing test run\n        # ensure we publish results even if the tests fail\n        if: failure()\n        uses: pactflow/actions/publish-provider-contract@v2\n        with:\n          version: "1.2.3"\n          application_name: "my-api-provider"\n          broker_url: ${{ secrets.PACT_BROKER_BASE_URL }}\n          token: ${{ secrets.PACT_BROKER_TOKEN }}\n          contract: src/oas/user.yml\n          verification_results: src/results/report.md\n          # ensure we set the verification_exit_code to ensure we upload a failing self-verification result\n          verification_exit_code: 1 # defaults to 0 (success)\n\n\x3c!-- ### Directly via API\n\n1. `publish_contracts` ([API Reference](https://github.com/pact-foundation/pact_broker/blob/master/lib/pact_broker/doc/views/index/publish-contracts.markdown)) / [Example via Makefile](https://github.com/pactflow/example-bi-directional-provider-restassured/blob/d562158cd0920eb57e5ba7007e65db4a9f08cbe9/Makefile#L32) / [Example Script](https://github.com/pactflow/example-bi-directional-provider-restassured/blob/master/scripts/publish.sh)\n 2. This will associate the `version` with a `provider contract`\n\n#### Example\n\nWe will take you through an example below.\n\n> The standard authorization environment variables are used here.\n\nHere is an example bash script that uses `cURL` to create the branch version for the specified application to PactFlow.\n\n1. `create_branch_version.sh` ([API Reference](https://github.com/pact-foundation/pact_broker/blob/master/lib/pact_broker/doc/views/index/pacticipant-branch-version.markdown)) / [Example via Makefile](https://github.com/pactflow/example-bi-directional-provider-restassured/blob/d562158cd0920eb57e5ba7007e65db4a9f08cbe9/Makefile#L26) / [Example Script](https://github.com/pactflow/example-bi-directional-provider-restassured/blob/master/scripts/create_branch_version.sh)\n\n```sh\n#!/bin/bash\n\necho "==> Creating version branch for ${PACTICIPANT}"\ncurl \\\n-X PUT \\\n-H "Authorization: Bearer ${PACT_BROKER_TOKEN}" \\\n-H "Content-Type: application/json" \\\n"${PACT_BROKER_BASE_URL}/pacticipants/${PACTICIPANT}/branches/${GIT_BRANCH}/versions/${COMMIT}" \\\n-d \'{}\n}\'\n')),(0,i.yg)("p",null,"Here is an example bash script that uses ",(0,i.yg)("inlineCode",{parentName:"p"},"cURL")," to upload the the OAS and test results to PactFlow."),(0,i.yg)("ol",{start:2},(0,i.yg)("li",{parentName:"ol"},(0,i.yg)("inlineCode",{parentName:"li"},"publish.sh")," (",(0,i.yg)("a",{parentName:"li",href:"https://github.com/pact-foundation/pact_broker/blob/master/lib/pact_broker/doc/views/index/publish-contracts.markdown"},"API Reference"),") / ",(0,i.yg)("a",{parentName:"li",href:"https://github.com/pactflow/example-bi-directional-prov
1ider-restassured/blob/d562158cd0920eb57e5ba7007e65db4a9f08cbe9/Makefile#L32"},"Example via Makefile")," / ",(0,i.yg)("a",{parentName:"li",href:"https://github.com/pactflow/example-bi-directional-provider-restassured/blob/master/scripts/publish.sh"},"Example Script"))),(0,i.yg)("pre",null,(0,i.yg)("code",{parentName:"pre",className:"language-sh"},'#!/bin/bash\n\nSUCCESS=true\nif [ "${1}" != "true" ]; then\n  SUCCESS=false\nfi\nOAS=$(cat oas/swagger.yml | base64) # Pass the "-w 0" flag if on linux\nREPORT=$(cat /path/to/report.file | base64)\n\necho "==> Uploading OAS to PactFlow"\ncurl \\\n  -X PUT \\\n  -H "Authorization: Bearer ${PACT_BROKER_TOKEN}" \\\n  -H "Content-Type: application/json" \\\n  "${PACT_BROKER_BASE_URL}/contracts/provider/${PACTICIPANT}/version/${COMMIT}" \\\n  -d \'{\n   "content": "\'$OAS\'",\n   "contractType": "oas",\n   "contentType": "application/yaml",\n   "verificationResults": {\n     "success": \'$SUCCESS\',\n     "content": "\'$REPORT\'",\n     "contentType": "text/plain",\n     "verifier": "verifier"\n   }\n }\'\n')),(0,i.yg)("p",null,"Usage: ",(0,i.yg)("inlineCode",{parentName:"p"},"./publish.sh true|false")),(0,i.yg)("h4",{id:"request-details"},"Request Details"),(0,i.yg)("p",null,(0,i.yg)("inlineCode",{parentName:"p"},"publish_contracts")," (",(0,i.yg)("a",{parentName:"p",href:"https://github.com/pact-foundation/pact_broker/blob/master/lib/pact_broker/doc/views/index/publish-contracts.markdown"},"API Reference"),") / ",(0,i.yg)("a",{parentName:"p",href:"https://github.com/pactflow/example-bi-directional-provider-restassured/blob/d562158cd0920eb57e5ba7007e65db4a9f08cbe9/Makefile#L32"},"Example via Makefile")," / ",(0,i.yg)("a",{parentName:"p",href:"https://github.com/pactflow/example-bi-directional-provider-restassured/blob/master/scripts/publish.sh"},"Example Script")),(0,i.yg)("p",null,(0,i.yg)("strong",{parentName:"p"},"Path")),(0,i.yg)("p",null,"The request should be a ",(0,i.yg)("inlineCode",{parentName:"p"},"PUT")," to the following path:"),(0,i.yg)("pre",null,(0,i.yg)("code",{parentName:"pre"},"{baseUrl}/contracts/provider/{application}/version/{version}\n")),(0,i.yg)("ul",null,(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("p",{parentName:"li"},(0,i.yg)("inlineCode",{parentName:"p"},"baseURL")),(0,i.yg)("p",{parentName:"li"},"The base URL of your PactFlow account e.g. ",(0,i.yg)("a",{parentName:"p",href:"https://myaccount.pactflow.io"},"https://myaccount.pactflow.io"))),(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("p",{parentName:"li"},(0,i.yg)("inlineCode",{parentName:"p"},"application")),(0,i.yg)("p",{parentName:"li"},"The name of the provider API application")),(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("p",{parentName:"li"},(0,i.yg)("inlineCode",{parentName:"p"},"version")),(0,i.yg)("p",{parentName:"li"},"The version of the provider API application"))),(0,i.yg)("p",null,(0,i.yg)("strong",{parentName:"p"},"Body")),(0,i.yg)("p",null,"The following describes the body that should be sent in the API"),(0,i.yg)("ul",null,(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("p",{parentName:"li"},(0,i.yg)("inlineCode",{parentName:"p"},"content")),(0,i.yg)("p",{parentName:"li"},"The base64 encoded contents of the OAS (see ",(0,i.yg)("a",{parentName:"p",href:"#base64-encoding"},"base64 encoding")," below)")),(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("p",{parentName:"li"},(0,i.yg)("inlineCode",{parentName:"p"},"contractType")),(0,i.yg)("p",{parentName:"li"},"Must be ",(0,i.yg)("inlineCode",{parentName:"p"},"oas"))),(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("p",{parentName:"li"},(0,i.yg)("inlineCode",{parentName:"p"},"content_type")),(0,i.yg)("p",{parentName:"li"},"Must be ",(0,i.yg)("inlineCode",{parentName:"p"},"application/yaml"))),(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("p",{parentName:"li"},(0,i.yg)("inlineCode",{parentName:"p"},"verificationResults")),(0,i.yg)("p",{parentName:"li"}
1,"This object contains the information about the test results")),(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("p",{parentName:"li"},(0,i.yg)("inlineCode",{parentName:"p"},"verificationResults.success")),(0,i.yg)("p",{parentName:"li"},"A boolean value indicating if the tests passed or failed (one of ",(0,i.yg)("inlineCode",{parentName:"p"},"true")," or ",(0,i.yg)("inlineCode",{parentName:"p"},"false"),")")),(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("p",{parentName:"li"},(0,i.yg)("inlineCode",{parentName:"p"},"verificationResults.content")),(0,i.yg)("p",{parentName:"li"},"The base64 encoded test results, which may be any output of your choosing (see ",(0,i.yg)("a",{parentName:"p",href:"#base64-encoding"},"base64 encoding")," below).")),(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("p",{parentName:"li"},(0,i.yg)("inlineCode",{parentName:"p"},"verificationResults.contentType")),(0,i.yg)("p",{parentName:"li"},"The content type of the results. Must be a valid mime type")),(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("p",{parentName:"li"},(0,i.yg)("inlineCode",{parentName:"p"},"verificationResults.verifier")),(0,i.yg)("p",{parentName:"li"},"The name of the tool used to perform the verification"),(0,i.yg)("p",{parentName:"li"},"--\x3e"))))}d.isMDXComponent=!0}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.