Skip to content

Spring Cloud Contract 2.0 Migration Guide

Marcin Grzejszczak edited this page Apr 2, 2018 · 5 revisions

Spring Cloud Contract 2.0 Migration Guide

IMPORTANT: This migration guide is a work in progress

Migrations

StubMode introduction

Related to https://github.com/spring-cloud/spring-cloud-contract/issues/287.

Stub Runner

Change workOffline in @AutoConfigureStubRunner to stubsMode = StubRunnerProperties.StubsMode.LOCAL.

Maven Plugin

Change contractsWorkOffline to <contractsMode>LOCAL</contractsMode>

Gradle Plugin

Change contractsWorkOffline = true to contractsMode = "LOCAL"

StubsDownloaderBuilder modification

Related to https://github.com/spring-cloud/spring-cloud-contract/pull/596

  • StubDownloaderBuilder extends ProtocolResovler. By default the ProtocolResolver methods return null.
  • stubRunnerOptions.stubRepositoryRoot is a Resource not a String
  • generateWireMockClientStubs Gradle task got removed
  • if folder with contracts has a subfolder called contracts, we will pick contracts from the subfolder

Pact upgrade to 3.5.13

Related to https://github.com/spring-cloud/spring-cloud-contract/pull/569