Getting Started
Install Prerequisites
Start your installations before the presentation begins so that the dependencies are able to download before we start the workshop.
Install docker :
Mac:
https://docs.docker.com/docker-for-mac/install/
Window:
https://docs.docker.com/docker-for-windows/install/
Linux:
https://docs.docker.com/install/linux/docker-ce/ubuntu/
Pull docker images:
Install Node: https://nodejs.org/en/
Clone Repos:
Client-Side Developers
From the root of contract-driven-development
run the following:
Server-Side Developers
From the root of contract-driven-development
run the following:
Currently the contract of addProduce.yml
is always sending the same response, ignoring the contents of the request the client is sending. Spring Cloud Contract can allow contracts to be more dynamic, for example allow fields within the response to pull from the request. Let's update addProduce.yml
to do this.
Update POST contract to respond with request body
Every service is going to be composed of many different contracts. Defining how an API should respond to a given request. It's important that we not only define what happens for successful responses, but unsuccessful ones as well. Currently we have a contract findProduceByName.yml
that defines what happens when a client successful searches for a subset of produce. Let's write a contract for when a client sends an invalid search request that has special characters in it.
Last updated