Sha256: eec634aedd4983cad8c28a47f08e8e42f5106aca5558e388290d6788385beacc

Contents?: true

Size: 1.13 KB

Versions: 71

Compression:

Stored size: 1.13 KB

Contents

# Publish a pact

Allowed methods: PUT

A pact is published to the broker using a combination of the provider name, the consumer name, and the consumer application version. The consumer application version will be used to determine which revision of the pact is the "latest" to return to the provider for verification, and will allow you to determine which versions of the consumer and provider are compatible with each other.

The pact generated by your passing consumer tests should be published to the broker during each CI build. Tools exist for this exist in most languages that have an implementation of pact.

Example:

    PUT http://broker/provider/Bar/consumer/Foo/version/1.2.104

    {
      "consumer": {
        "name": "Bar"
      },
      "provider": {
        "name": "Foo"
      },
      "interactions": [
        {
          "description" : "a request for something",
          "provider_state": "something exists",
          "request": {
            "method": "get",
            "path" : "/something"
          },
          "response": {
            "status": 200,
            "body" : "something"
          }
        }
      ]
    }

Version data entries

71 entries across 71 versions & 1 rubygems

Version Path
pact_broker-2.30.0 lib/pact_broker/doc/views/index/publish-pact.markdown
pact_broker-2.29.0 lib/pact_broker/doc/views/index/publish-pact.markdown
pact_broker-2.27.6 lib/pact_broker/doc/views/index/publish-pact.markdown
pact_broker-2.27.5 lib/pact_broker/doc/views/index/publish-pact.markdown
pact_broker-2.27.4 lib/pact_broker/doc/views/index/publish-pact.markdown
pact_broker-2.27.3 lib/pact_broker/doc/views/index/publish-pact.markdown
pact_broker-2.27.2 lib/pact_broker/doc/views/index/publish-pact.markdown
pact_broker-2.27.0 lib/pact_broker/doc/views/index/publish-pact.markdown
pact_broker-2.26.1 lib/pact_broker/doc/views/index/publish-pact.markdown
pact_broker-2.26.0 lib/pact_broker/doc/views/index/publish-pact.markdown
pact_broker-2.25.0 lib/pact_broker/doc/views/index/publish-pact.markdown
pact_broker-2.24.0 lib/pact_broker/doc/views/index/publish-pact.markdown
pact_broker-2.23.4 lib/pact_broker/doc/views/publish-pact.markdown
pact_broker-2.23.3 lib/pact_broker/doc/views/publish-pact.markdown
pact_broker-2.23.2 lib/pact_broker/doc/views/publish-pact.markdown
pact_broker-2.23.1 lib/pact_broker/doc/views/publish-pact.markdown
pact_broker-2.23.0 lib/pact_broker/doc/views/publish-pact.markdown
pact_broker-2.22.0 lib/pact_broker/doc/views/publish-pact.markdown
pact_broker-2.21.0 lib/pact_broker/doc/views/publish-pact.markdown
pact_broker-2.20.0 lib/pact_broker/doc/views/publish-pact.markdown