From 14ef80851e5cb3eee6ca548665a38de14424d633 Mon Sep 17 00:00:00 2001
From: buildmaster
The repository would have to the following setu └── beer-api-consumer └── rest ├── shouldGrantABeerIfOldEnough.json - └── shouldRejectABeerIfTooYoung.json
Under META-INF folder:
groupId (e.g. com.example)artifactId (e.g. beer-api-producer-git)0.0.1-SNAPSHOT)finally, there are two folders:
contracts - the good practice is to store the contracts required by each
+ └── shouldRejectABeerIfTooYoung.jsonUnder META-INF folder:
groupId (e.g. com.example)artifactId (e.g. beer-api-producer-git)next, the version of the application (e.g. 0.0.1-SNAPSHOT). Starting from Spring Cloud Contract version 2.1.0, you can specify the versions as follows (assuming that your versions follow the semantic versioning)
+ or latest - to find the latest version of your stubs (assuming that the snapshots are always the latest artifact for a given revision number). That means:
1.0.0.RELEASE, 2.0.0.BUILD-SNAPSHOT and 2.0.0.RELEASE we will assume that the latest is 2.0.0.BUILD-SNAPSHOT1.0.0.RELEASE and 2.0.0.RELEASE we will assume that the latest is 2.0.0.RELEASElatest or + we will pick that folderrelease - to find the latest release version of your stubs. That means:
1.0.0.RELEASE, 2.0.0.BUILD-SNAPSHOT and 2.0.0.RELEASE we will assume that the latest is 2.0.0.RELEASErelease we will pick that folderfinally, there are two folders:
contracts - the good practice is to store the contracts required by each
consumer in the folder with the consumer name (e.g. beer-api-consumer). That way you
can use the stubs-per-consumer feature. Further directory structure is arbitrary.mappings - in this folder the Maven / Gradle Spring Cloud Contract plugins will push
the stub server mappings. On the consumer side, Stub Runner will scan this folder
diff --git a/multi/multi__using_the_pluggable_architecture.html b/multi/multi__using_the_pluggable_architecture.html
index 7e0365021b..1f3b477dd6 100644
--- a/multi/multi__using_the_pluggable_architecture.html
+++ b/multi/multi__using_the_pluggable_architecture.html
@@ -440,10 +440,10 @@ to clone the repository and use it as a source of contracts
to generate tests or stubs.Either via environment variables, system properties, properties set inside the plugin or contracts repository configuration you can tweak the downloader’s behaviour. Below you can find the list of -properties
Table 10.1. SCM Stub Downloader properties
Type of a property | Name of the property | Description |
* * * | master | Which branch to checkout |
* * * | Git clone username | |
* * * | Git clone password | |
* * * | 10 | Number of attempts to push the commits to |
* * * | 1000 | Number of millis to wait between attempts to push the commits to |
Whenever the repositoryRoot starts with a Pact protocol
+properties
Table 10.1. SCM Stub Downloader properties
Type of a property | Name of the property | Description |
* * * | master | Which branch to checkout |
* * * | Git clone username | |
* * * | Git clone password | |
* * * | 10 | Number of attempts to push the commits to |
* * * | 1000 | Number of millis to wait between attempts to push the commits to |
Whenever the repositoryRoot starts with a Pact protocol
(starts with pact://), the stub downloader will try
to fetch the Pact contract definitions from the Pact Broker.
Whatever is set after pact:// will be parsed as the Pact Broker URL.
Either via environment variables, system properties, properties set inside the plugin or contracts repository configuration you can tweak the downloader’s behaviour. Below you can find the list of -properties
Table 10.2. SCM Stub Downloader properties
Name of a property | Default | Description |
* * * | Host from URL passed to | What is the URL of Pact Broker |
* * * | Port from URL passed to | What is the port of Pact Broker |
* * * | Protocol from URL passed to | What is the protocol of Pact Broker |
* * * | Version of the stub, or | What tags should be used to fetch the stub |
* * * |
| What kind of authentication should be used to connect to the Pact Broker |
* * * | The username passed to | Username used to connect to the Pact Broker |
* * * | The password passed to | Password used to connect to the Pact Broker |
* * * | false | When |