This documentation takes you through the Spring Cloud Contract Workshops by asking you to complete a series of tasks that teach you both basic and more advanced concepts behind Consumer Driven Contracts in general and Spring Cloud Contract in particular.

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 that it has only the basic pieces of code ready for use, run the following Gradle command:

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

The preceding commands removes most of the code, contracts, and project setup details, so that you can start the workshops.

Tip
Whenever your lost, do not worry. At any time, you can check what the contents in the master branch where all of the examples are ready and working.
Important
You must have Maven installed. Check out the website on how to download and install Maven.

Generating the documentation

To generate the documentation, call the Gradle task, as shown below:

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

Resources

The following resources may help you learn about Spring Cloud Contracts:

Adib Saikali’s Introduction to Consumer Driven Contracts

   

   

Introduction to Spring Cloud Contract

Tasks