Sync docs from master to gh-pages

This commit is contained in:
buildmaster
2018-10-26 20:04:05 +00:00
parent d1a0cf52ba
commit 072790e9cd
3 changed files with 91 additions and 4 deletions

View File

@@ -4,7 +4,7 @@
<book xmlns="http://docbook.org/ns/docbook" xmlns:xl="http://www.w3.org/1999/xlink" version="5.0" xml:lang="en">
<info>
<title>Spring Cloud Contract</title>
<date>2018-10-17</date>
<date>2018-10-15</date>
</info>
<preface>
<title></title>
@@ -6133,6 +6133,8 @@ relative to the folder in which the contract lays.</simpara>
// (this can be a valid request or invalid depending
// on type of contract being specified).
request {
method GET()
url "/foo"
//...
}
@@ -6141,6 +6143,7 @@ relative to the folder in which the contract lays.</simpara>
// with following response after receiving request
// specified in "request" part above).
response {
status 200
//...
}
@@ -6185,6 +6188,7 @@ same information is mandatory in request definition of the Contract.</simpara>
response {
//...
status 200
}
}</programlisting>
</para>
@@ -6211,6 +6215,7 @@ the recommended way, as doing so makes the tests <emphasis role="strong">host-in
response {
//...
status 200
}
}</programlisting>
</para>
@@ -6230,6 +6235,7 @@ the recommended way, as doing so makes the tests <emphasis role="strong">host-in
<programlisting language="groovy" linenumbering="unnumbered">org.springframework.cloud.contract.spec.Contract.make {
request {
//...
method GET()
urlPath('/users') {
@@ -6266,6 +6272,7 @@ the recommended way, as doing so makes the tests <emphasis role="strong">host-in
response {
//...
status 200
}
}</programlisting>
</para>
@@ -6334,6 +6341,8 @@ response:
<programlisting language="groovy" linenumbering="unnumbered">org.springframework.cloud.contract.spec.Contract.make {
request {
//...
method GET()
url "/foo"
// Each header is added in form `'Header-Name' : 'Header-Value'`.
// there are also some helper methods
@@ -6347,6 +6356,7 @@ response:
response {
//...
status 200
}
}</programlisting>
</para>
@@ -6368,6 +6378,8 @@ headers:
<programlisting language="groovy" linenumbering="unnumbered">org.springframework.cloud.contract.spec.Contract.make {
request {
//...
method GET()
url "/foo"
// Each Cookies is added in form `'Cookie-Key' : 'Cookie-Value'`.
// there are also some helper methods
@@ -6381,6 +6393,7 @@ headers:
response {
//...
status 200
}
}</programlisting>
</para>
@@ -6402,6 +6415,8 @@ cookies:
<programlisting language="groovy" linenumbering="unnumbered">org.springframework.cloud.contract.spec.Contract.make {
request {
//...
method GET()
url "/foo"
// Currently only JSON format of request body is supported.
// Format will be determined from a header or body's content.
@@ -6410,6 +6425,7 @@ cookies:
response {
//...
status 200
}
}</programlisting>
</para>
@@ -6556,6 +6572,8 @@ following code shows an example:</simpara>
<programlisting language="groovy" linenumbering="unnumbered">org.springframework.cloud.contract.spec.Contract.make {
request {
//...
method GET()
url "/foo"
}
response {
// Status code sent by the server
@@ -7513,6 +7531,7 @@ email, url, uuid, iso_date, iso_date_time, iso_time, iso_8601_with_offset, non_e
Content-Type: application/json
cookies:
foo: 2
bar: 3
queryParameters:
limit: 10
offset: 20
@@ -7540,7 +7559,7 @@ email, url, uuid, iso_date, iso_date_time, iso_time, iso_8601_with_offset, non_e
regex: /get/[0-9]
# predefined:
# execute a method
# command:
#command: 'equals($it)'
queryParameters:
- key: limit
type: equal_to
@@ -7565,6 +7584,8 @@ email, url, uuid, iso_date, iso_date_time, iso_time, iso_8601_with_offset, non_e
cookies:
- key: foo
regex: '[0-9]'
- key: bar
command: 'equals($it)'
headers:
- key: Content-Type
regex: "application/json.*"
@@ -7597,6 +7618,9 @@ email, url, uuid, iso_date, iso_date_time, iso_time, iso_8601_with_offset, non_e
type: by_null
response:
status: 200
cookies:
foo: 1
bar: 2
body:
duck: 123
alpha: "abc"
@@ -7628,6 +7652,11 @@ response:
headers:
- key: Content-Type
regex: "application/json.*"
cookies:
- key: foo
regex: '[0-9]'
- key: bar
command: 'equals($it)'
body:
- path: $.duck
type: by_regex