diff --git a/1.2.x/multi/multi__contract_dsl.html b/1.2.x/multi/multi__contract_dsl.html index c4cb740350..9df5d7c573 100644 --- a/1.2.x/multi/multi__contract_dsl.html +++ b/1.2.x/multi/multi__contract_dsl.html @@ -331,6 +331,9 @@ the recommended way, as doing so makes the tests ho headers: foo: bar fooReq: baz + cookies: + foo: bar + fooReq: baz body: foo: bar matchers: @@ -362,7 +365,12 @@ response: - key: foo2 regex: bar - key: foo3 - command: andMeToo($it)

+ command: andMeToo($it) + cookies: + - key: foo2 + regex: bar + - key: foo3 + predefined:

request may contain additional request headers, as shown in the following example:

Groovy DSL. 

org.springframework.cloud.contract.spec.Contract.make {
 	request {
@@ -388,6 +396,31 @@ response:
 headers:
   foo: bar
   fooReq: baz

+

request may contain additional request cookies, as shown in the following example:

Groovy DSL.  +

org.springframework.cloud.contract.spec.Contract.make {
+	request {
+		//...
+
+		// Each Cookies is added in form `'Cookie-Key' : 'Cookie-Value'`.
+		// there are also some helper methods
+		cookies {
+			cookie 'key': 'value'
+			cookie('another_key', 'another_value')
+		}
+
+		//...
+	}
+
+	response {
+		//...
+	}
+}

+

YAML.  +

request:
+...
+cookies:
+  foo: bar
+  fooReq: baz

request may contain a request body:

Groovy DSL. 

org.springframework.cloud.contract.spec.Contract.make {
 	request {
@@ -525,7 +558,7 @@ following code shows an example:

Groovy DSL. 

response:
 ...
 status: 200

-

Besides status, the response may contain headers and a body, both of which are +

Besides status, the response may contain headers, cookies and a body, both of which are specified the same way as in the request (see the previous paragraph).

8.5 Dynamic properties

The contract can contain some dynamic properties: timestamps, IDs, and so on. You do not want to force the consumers to stub their clocks to always return the same value of time so that it gets matched by the stub.

For Groovy DSL you can provide the dynamic parts in your contracts diff --git a/1.2.x/single/spring-cloud-contract.html b/1.2.x/single/spring-cloud-contract.html index 181e0c717c..5f479bf38d 100644 --- a/1.2.x/single/spring-cloud-contract.html +++ b/1.2.x/single/spring-cloud-contract.html @@ -3118,6 +3118,9 @@ the recommended way, as doing so makes the tests ho headers: foo: bar fooReq: baz + cookies: + foo: bar + fooReq: baz body: foo: bar matchers: @@ -3149,7 +3152,12 @@ response: - key: foo2 regex: bar - key: foo3 - command: andMeToo($it)

+ command: andMeToo($it) + cookies: + - key: foo2 + regex: bar + - key: foo3 + predefined:

request may contain additional request headers, as shown in the following example:

Groovy DSL. 

org.springframework.cloud.contract.spec.Contract.make {
 	request {
@@ -3175,6 +3183,31 @@ response:
 headers:
   foo: bar
   fooReq: baz

+

request may contain additional request cookies, as shown in the following example:

Groovy DSL.  +

org.springframework.cloud.contract.spec.Contract.make {
+	request {
+		//...
+
+		// Each Cookies is added in form `'Cookie-Key' : 'Cookie-Value'`.
+		// there are also some helper methods
+		cookies {
+			cookie 'key': 'value'
+			cookie('another_key', 'another_value')
+		}
+
+		//...
+	}
+
+	response {
+		//...
+	}
+}

+

YAML.  +

request:
+...
+cookies:
+  foo: bar
+  fooReq: baz

request may contain a request body:

Groovy DSL. 

org.springframework.cloud.contract.spec.Contract.make {
 	request {
@@ -3312,7 +3345,7 @@ following code shows an example:

Groovy DSL. 

response:
 ...
 status: 200

-

Besides status, the response may contain headers and a body, both of which are +

Besides status, the response may contain headers, cookies and a body, both of which are specified the same way as in the request (see the previous paragraph).

8.5 Dynamic properties

The contract can contain some dynamic properties: timestamps, IDs, and so on. You do not want to force the consumers to stub their clocks to always return the same value of time so that it gets matched by the stub.

For Groovy DSL you can provide the dynamic parts in your contracts diff --git a/1.2.x/spring-cloud-contract-maven-plugin/checkstyle.html b/1.2.x/spring-cloud-contract-maven-plugin/checkstyle.html index c8bf2746f0..5ef9ea32fe 100644 --- a/1.2.x/spring-cloud-contract-maven-plugin/checkstyle.html +++ b/1.2.x/spring-cloud-contract-maven-plugin/checkstyle.html @@ -1,13 +1,13 @@ - + Spring Cloud Contract Maven Plugin – Checkstyle Results @@ -146,7 +146,7 @@