From f9e9bd035017238a8dae520da0186ff5829a6dd1 Mon Sep 17 00:00:00 2001 From: buildmaster Date: Wed, 11 Apr 2018 14:22:56 +0000 Subject: [PATCH] Sync docs from 1.2.x to gh-pages --- 1.2.x/multi/multi__contract_dsl.html | 37 ++++++++++++++- 1.2.x/single/spring-cloud-contract.html | 37 ++++++++++++++- .../checkstyle.html | 6 +-- .../complex.html | 6 +-- .../configs.html | 6 +-- .../convert-mojo.html | 6 +-- .../generateStubs-mojo.html | 6 +-- .../generateTests-mojo.html | 6 +-- .../help-mojo.html | 6 +-- .../index.html | 6 +-- .../integration.html | 6 +-- .../issue-tracking.html | 6 +-- .../junit.html | 6 +-- .../license.html | 6 +-- .../plugin-info.html | 6 +-- .../plugin-management.html | 6 +-- .../plugins.html | 6 +-- .../project-info.html | 6 +-- .../project-reports.html | 6 +-- .../project-summary.html | 6 +-- .../run-mojo.html | 6 +-- .../sitemap.html | 6 +-- .../source-repository.html | 6 +-- .../spock.html | 6 +-- .../team-list.html | 6 +-- .../usage.html | 6 +-- 1.2.x/spring-cloud-contract.xml | 46 ++++++++++++++++++- 27 files changed, 186 insertions(+), 78 deletions(-) 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 @@