This documentation will allow you to go through Spring Cloud Contract Workshops by completing a series of tasks that will teach you the basic and more advanced concept behind Consumer Driven Contracts and Spring Cloud Contract as such.

Setup

The repository mostly consists of pairs of producer and consumer applications that show different use cases of Spring Cloud Contract. The initial state of the repository is such that all the examples are working and the tests are passing. In order for you to prepare the repository so it has only the basic pieces of code set up execute this Gradle command

$ git clone https://github.com/spring-cloud-samples/spring-cloud-contract-samples
$ cd spring-cloud-contract-samples
$ ./gradlew prepareForWorkshops

This command will remove most of the code / contracts / project setup so that you can start with the workshops.

Tip
Whenever your lost - don’t worry. It’s enough to check what’s there in the master branch where all of the examples are ready and working.
Important
You’ll also need to have Maven installed. Check out the website on how to download and install Maven

Generating the documentation

To generate the whole documentation it’s enough to call the Gradle task:

$ git clone https://github.com/spring-cloud-samples/spring-cloud-contract-samples
$ cd spring-cloud-contract-samples
$ ./gradlew generateDocumentation

Resources

Adib Saikali’s introduction to Consumer Driven Contracts

   

   

Introduction to Spring Cloud Contract

Tasks