Sync docs from master to gh-pages
This commit is contained in:
@@ -339,6 +339,9 @@ the recommended way, as doing so makes the tests <span class="strong"><strong>ho
|
||||
headers:
|
||||
foo: bar
|
||||
fooReq: baz
|
||||
cookies:
|
||||
foo: bar
|
||||
fooReq: baz
|
||||
body:
|
||||
foo: bar
|
||||
matchers:
|
||||
@@ -374,7 +377,12 @@ response:
|
||||
- key: foo2
|
||||
regex: bar
|
||||
- key: foo3
|
||||
command: andMeToo($it)</pre><p>
|
||||
command: andMeToo($it)
|
||||
cookies:
|
||||
- key: foo2
|
||||
regex: bar
|
||||
- key: foo3
|
||||
predefined:</pre><p>
|
||||
</p><p><code class="literal">request</code> may contain additional <span class="strong"><strong>request headers</strong></span>, as shown in the following example:</p><p><b>Groovy DSL. </b>
|
||||
</p><pre class="programlisting">org.springframework.cloud.contract.spec.Contract.make {
|
||||
request {
|
||||
@@ -400,6 +408,31 @@ response:
|
||||
headers:
|
||||
foo: bar
|
||||
fooReq: baz</pre><p>
|
||||
</p><p><code class="literal">request</code> may contain additional <span class="strong"><strong>request cookies</strong></span>, as shown in the following example:</p><p><b>Groovy DSL. </b>
|
||||
</p><pre class="programlisting">org.springframework.cloud.contract.spec.Contract.make {
|
||||
request {
|
||||
<span xmlns:d="http://docbook.org/ns/docbook" class="hl-comment">//...</span>
|
||||
|
||||
<span xmlns:d="http://docbook.org/ns/docbook" class="hl-comment">// Each Cookies is added in form `'Cookie-Key' : 'Cookie-Value'`.</span>
|
||||
<span xmlns:d="http://docbook.org/ns/docbook" class="hl-comment">// there are also some helper methods</span>
|
||||
cookies {
|
||||
cookie <span xmlns:d="http://docbook.org/ns/docbook" class="hl-string">'key'</span>: <span xmlns:d="http://docbook.org/ns/docbook" class="hl-string">'value'</span>
|
||||
cookie(<span xmlns:d="http://docbook.org/ns/docbook" class="hl-string">'another_key'</span>, <span xmlns:d="http://docbook.org/ns/docbook" class="hl-string">'another_value'</span>)
|
||||
}
|
||||
|
||||
<span xmlns:d="http://docbook.org/ns/docbook" class="hl-comment">//...</span>
|
||||
}
|
||||
|
||||
response {
|
||||
<span xmlns:d="http://docbook.org/ns/docbook" class="hl-comment">//...</span>
|
||||
}
|
||||
}</pre><p>
|
||||
</p><p><b>YAML. </b>
|
||||
</p><pre class="programlisting">request:
|
||||
...
|
||||
cookies:
|
||||
foo: bar
|
||||
fooReq: baz</pre><p>
|
||||
</p><p><code class="literal">request</code> may contain a <span class="strong"><strong>request body</strong></span>:</p><p><b>Groovy DSL. </b>
|
||||
</p><pre class="programlisting">org.springframework.cloud.contract.spec.Contract.make {
|
||||
request {
|
||||
@@ -438,7 +471,9 @@ body:
|
||||
<span xmlns:d="http://docbook.org/ns/docbook" class="hl-comment">// name of the file</span>
|
||||
name: $(c(regex(nonEmpty())), p(<span xmlns:d="http://docbook.org/ns/docbook" class="hl-string">'filename.csv'</span>)),
|
||||
<span xmlns:d="http://docbook.org/ns/docbook" class="hl-comment">// content of the file</span>
|
||||
content: $(c(regex(nonEmpty())), p(<span xmlns:d="http://docbook.org/ns/docbook" class="hl-string">'file content'</span>)))
|
||||
content: $(c(regex(nonEmpty())), p(<span xmlns:d="http://docbook.org/ns/docbook" class="hl-string">'file content'</span>)),
|
||||
<span xmlns:d="http://docbook.org/ns/docbook" class="hl-comment">// content type for the part</span>
|
||||
contentType: $(c(regex(nonEmpty())), p(<span xmlns:d="http://docbook.org/ns/docbook" class="hl-string">'application/json'</span>)))
|
||||
)
|
||||
}
|
||||
response {
|
||||
@@ -555,7 +590,7 @@ following code shows an example:</p><p><b>Groovy DSL. </b>
|
||||
</p><pre class="programlisting">response:
|
||||
...
|
||||
status: 200</pre><p>
|
||||
</p><p>Besides status, the response may contain <span class="strong"><strong>headers</strong></span> and a <span class="strong"><strong>body</strong></span>, both of which are
|
||||
</p><p>Besides status, the response may contain <span class="strong"><strong>headers</strong></span>, <span class="strong"><strong>cookies</strong></span> and a <span class="strong"><strong>body</strong></span>, both of which are
|
||||
specified the same way as in the request (see the previous paragraph).</p><div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Tip"><tr><td rowspan="2" align="center" valign="top" width="25"><img alt="[Tip]" src="images/tip.png"></td><th align="left">Tip</th></tr><tr><td align="left" valign="top"><p>Via the Groovy DSL you can reference the <code class="literal">org.springframework.cloud.contract.spec.internal.HttpStatus</code>
|
||||
methods to provide a meaningful status instead of a digit. E.g. you can call
|
||||
<code class="literal">OK()</code> for a status <code class="literal">200</code> or <code class="literal">BAD_REQUEST()</code> for <code class="literal">400</code>.</p></td></tr></table></div></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="_dynamic_properties" href="#_dynamic_properties"></a>8.5 Dynamic properties</h2></div></div></div><p>The contract can contain some dynamic properties: timestamps, IDs, and so on. You do not
|
||||
|
||||
@@ -421,7 +421,7 @@ to clone the repository and use it as a source of contracts
|
||||
to generate tests or stubs.</p><p>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</p><div class="table"><a name="d0e7276" href="#d0e7276"></a><p class="title"><b>Table 10.1. SCM Stub Downloader properties</b></p><div class="table-contents"><table summary="SCM Stub Downloader properties" style="border-collapse: collapse;border-top: 0.5pt solid ; border-bottom: 0.5pt solid ; border-left: 0.5pt solid ; border-right: 0.5pt solid ; "><colgroup><col class="col_1"><col class="col_2"><col class="col_3"></colgroup><tbody><tr><td style="border-right: 0.5pt solid ; border-bottom: 0.5pt solid ; " align="left" valign="top"><p>Type of a property</p></td><td style="border-right: 0.5pt solid ; border-bottom: 0.5pt solid ; " align="left" valign="top"><p>Name of the property</p></td><td style="border-bottom: 0.5pt solid ; " align="left" valign="top"><p>Description</p></td></tr><tr><td style="border-right: 0.5pt solid ; border-bottom: 0.5pt solid ; " align="left" valign="top"><p>* <code class="literal">git.branch</code> (plugin prop)
|
||||
properties</p><div class="table"><a name="d0e7302" href="#d0e7302"></a><p class="title"><b>Table 10.1. SCM Stub Downloader properties</b></p><div class="table-contents"><table summary="SCM Stub Downloader properties" style="border-collapse: collapse;border-top: 0.5pt solid ; border-bottom: 0.5pt solid ; border-left: 0.5pt solid ; border-right: 0.5pt solid ; "><colgroup><col class="col_1"><col class="col_2"><col class="col_3"></colgroup><tbody><tr><td style="border-right: 0.5pt solid ; border-bottom: 0.5pt solid ; " align="left" valign="top"><p>Type of a property</p></td><td style="border-right: 0.5pt solid ; border-bottom: 0.5pt solid ; " align="left" valign="top"><p>Name of the property</p></td><td style="border-bottom: 0.5pt solid ; " align="left" valign="top"><p>Description</p></td></tr><tr><td style="border-right: 0.5pt solid ; border-bottom: 0.5pt solid ; " align="left" valign="top"><p>* <code class="literal">git.branch</code> (plugin prop)
|
||||
</p><p>* <code class="literal">stubrunner.properties.git.branch</code> (system prop)
|
||||
</p><p>* <code class="literal">STUBRUNNER_PROPERTIES_GIT_BRANCH</code> (env prop)</p></td><td style="border-right: 0.5pt solid ; border-bottom: 0.5pt solid ; " align="left" valign="top"><p>master</p></td><td style="border-bottom: 0.5pt solid ; " align="left" valign="top"><p>Which branch to checkout</p></td></tr><tr><td style="border-right: 0.5pt solid ; border-bottom: 0.5pt solid ; " align="left" valign="top"><p>* <code class="literal">git.username</code> (plugin prop)
|
||||
</p><p>* <code class="literal">stubrunner.properties.git.username</code> (system prop)
|
||||
@@ -437,7 +437,7 @@ to fetch the Pact contract definitions from the Pact Broker.
|
||||
Whatever is set after <code class="literal">pact://</code> will be parsed as the Pact Broker URL.</p><p>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</p><div class="table"><a name="d0e7425" href="#d0e7425"></a><p class="title"><b>Table 10.2. SCM Stub Downloader properties</b></p><div class="table-contents"><table summary="SCM Stub Downloader properties" style="border-collapse: collapse;border-top: 0.5pt solid ; border-bottom: 0.5pt solid ; border-left: 0.5pt solid ; border-right: 0.5pt solid ; "><colgroup><col class="col_1"><col class="col_2"><col class="col_3"></colgroup><tbody><tr><td style="border-right: 0.5pt solid ; border-bottom: 0.5pt solid ; " align="left" valign="top"><p>Type of a property</p></td><td style="border-right: 0.5pt solid ; border-bottom: 0.5pt solid ; " align="left" valign="top"><p>Name of the property</p></td><td style="border-bottom: 0.5pt solid ; " align="left" valign="top"><p>Description</p></td></tr><tr><td style="border-right: 0.5pt solid ; border-bottom: 0.5pt solid ; " align="left" valign="top"><p>* <code class="literal">pactbroker.host</code> (plugin prop)
|
||||
properties</p><div class="table"><a name="d0e7451" href="#d0e7451"></a><p class="title"><b>Table 10.2. SCM Stub Downloader properties</b></p><div class="table-contents"><table summary="SCM Stub Downloader properties" style="border-collapse: collapse;border-top: 0.5pt solid ; border-bottom: 0.5pt solid ; border-left: 0.5pt solid ; border-right: 0.5pt solid ; "><colgroup><col class="col_1"><col class="col_2"><col class="col_3"></colgroup><tbody><tr><td style="border-right: 0.5pt solid ; border-bottom: 0.5pt solid ; " align="left" valign="top"><p>Type of a property</p></td><td style="border-right: 0.5pt solid ; border-bottom: 0.5pt solid ; " align="left" valign="top"><p>Name of the property</p></td><td style="border-bottom: 0.5pt solid ; " align="left" valign="top"><p>Description</p></td></tr><tr><td style="border-right: 0.5pt solid ; border-bottom: 0.5pt solid ; " align="left" valign="top"><p>* <code class="literal">pactbroker.host</code> (plugin prop)
|
||||
</p><p>* <code class="literal">stubrunner.properties.pactbroker.host</code> (system prop)
|
||||
</p><p>* <code class="literal">STUBRUNNER_PROPERTIES_PACTBROKER_HOST</code> (env prop)</p></td><td style="border-right: 0.5pt solid ; border-bottom: 0.5pt solid ; " align="left" valign="top"><p>Host from URL passed to <code class="literal">repositoryRoot</code></p></td><td style="border-bottom: 0.5pt solid ; " align="left" valign="top"><p>What is the URL of Pact Broker</p></td></tr><tr><td style="border-right: 0.5pt solid ; border-bottom: 0.5pt solid ; " align="left" valign="top"><p>* <code class="literal">pactbroker.port</code> (plugin prop)
|
||||
</p><p>* <code class="literal">stubrunner.properties.pactbroker.port</code> (system prop)
|
||||
|
||||
@@ -3739,6 +3739,9 @@ the recommended way, as doing so makes the tests <span class="strong"><strong>ho
|
||||
headers:
|
||||
foo: bar
|
||||
fooReq: baz
|
||||
cookies:
|
||||
foo: bar
|
||||
fooReq: baz
|
||||
body:
|
||||
foo: bar
|
||||
matchers:
|
||||
@@ -3774,7 +3777,12 @@ response:
|
||||
- key: foo2
|
||||
regex: bar
|
||||
- key: foo3
|
||||
command: andMeToo($it)</pre><p>
|
||||
command: andMeToo($it)
|
||||
cookies:
|
||||
- key: foo2
|
||||
regex: bar
|
||||
- key: foo3
|
||||
predefined:</pre><p>
|
||||
</p><p><code class="literal">request</code> may contain additional <span class="strong"><strong>request headers</strong></span>, as shown in the following example:</p><p><b>Groovy DSL. </b>
|
||||
</p><pre class="programlisting">org.springframework.cloud.contract.spec.Contract.make {
|
||||
request {
|
||||
@@ -3800,6 +3808,31 @@ response:
|
||||
headers:
|
||||
foo: bar
|
||||
fooReq: baz</pre><p>
|
||||
</p><p><code class="literal">request</code> may contain additional <span class="strong"><strong>request cookies</strong></span>, as shown in the following example:</p><p><b>Groovy DSL. </b>
|
||||
</p><pre class="programlisting">org.springframework.cloud.contract.spec.Contract.make {
|
||||
request {
|
||||
<span xmlns:d="http://docbook.org/ns/docbook" class="hl-comment">//...</span>
|
||||
|
||||
<span xmlns:d="http://docbook.org/ns/docbook" class="hl-comment">// Each Cookies is added in form `'Cookie-Key' : 'Cookie-Value'`.</span>
|
||||
<span xmlns:d="http://docbook.org/ns/docbook" class="hl-comment">// there are also some helper methods</span>
|
||||
cookies {
|
||||
cookie <span xmlns:d="http://docbook.org/ns/docbook" class="hl-string">'key'</span>: <span xmlns:d="http://docbook.org/ns/docbook" class="hl-string">'value'</span>
|
||||
cookie(<span xmlns:d="http://docbook.org/ns/docbook" class="hl-string">'another_key'</span>, <span xmlns:d="http://docbook.org/ns/docbook" class="hl-string">'another_value'</span>)
|
||||
}
|
||||
|
||||
<span xmlns:d="http://docbook.org/ns/docbook" class="hl-comment">//...</span>
|
||||
}
|
||||
|
||||
response {
|
||||
<span xmlns:d="http://docbook.org/ns/docbook" class="hl-comment">//...</span>
|
||||
}
|
||||
}</pre><p>
|
||||
</p><p><b>YAML. </b>
|
||||
</p><pre class="programlisting">request:
|
||||
...
|
||||
cookies:
|
||||
foo: bar
|
||||
fooReq: baz</pre><p>
|
||||
</p><p><code class="literal">request</code> may contain a <span class="strong"><strong>request body</strong></span>:</p><p><b>Groovy DSL. </b>
|
||||
</p><pre class="programlisting">org.springframework.cloud.contract.spec.Contract.make {
|
||||
request {
|
||||
@@ -3838,7 +3871,9 @@ body:
|
||||
<span xmlns:d="http://docbook.org/ns/docbook" class="hl-comment">// name of the file</span>
|
||||
name: $(c(regex(nonEmpty())), p(<span xmlns:d="http://docbook.org/ns/docbook" class="hl-string">'filename.csv'</span>)),
|
||||
<span xmlns:d="http://docbook.org/ns/docbook" class="hl-comment">// content of the file</span>
|
||||
content: $(c(regex(nonEmpty())), p(<span xmlns:d="http://docbook.org/ns/docbook" class="hl-string">'file content'</span>)))
|
||||
content: $(c(regex(nonEmpty())), p(<span xmlns:d="http://docbook.org/ns/docbook" class="hl-string">'file content'</span>)),
|
||||
<span xmlns:d="http://docbook.org/ns/docbook" class="hl-comment">// content type for the part</span>
|
||||
contentType: $(c(regex(nonEmpty())), p(<span xmlns:d="http://docbook.org/ns/docbook" class="hl-string">'application/json'</span>)))
|
||||
)
|
||||
}
|
||||
response {
|
||||
@@ -3955,7 +3990,7 @@ following code shows an example:</p><p><b>Groovy DSL. </b>
|
||||
</p><pre class="programlisting">response:
|
||||
...
|
||||
status: 200</pre><p>
|
||||
</p><p>Besides status, the response may contain <span class="strong"><strong>headers</strong></span> and a <span class="strong"><strong>body</strong></span>, both of which are
|
||||
</p><p>Besides status, the response may contain <span class="strong"><strong>headers</strong></span>, <span class="strong"><strong>cookies</strong></span> and a <span class="strong"><strong>body</strong></span>, both of which are
|
||||
specified the same way as in the request (see the previous paragraph).</p><div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Tip"><tr><td rowspan="2" align="center" valign="top" width="25"><img alt="[Tip]" src="images/tip.png"></td><th align="left">Tip</th></tr><tr><td align="left" valign="top"><p>Via the Groovy DSL you can reference the <code class="literal">org.springframework.cloud.contract.spec.internal.HttpStatus</code>
|
||||
methods to provide a meaningful status instead of a digit. E.g. you can call
|
||||
<code class="literal">OK()</code> for a status <code class="literal">200</code> or <code class="literal">BAD_REQUEST()</code> for <code class="literal">400</code>.</p></td></tr></table></div></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="_dynamic_properties" href="#_dynamic_properties"></a>8.5 Dynamic properties</h2></div></div></div><p>The contract can contain some dynamic properties: timestamps, IDs, and so on. You do not
|
||||
@@ -5817,7 +5852,7 @@ to clone the repository and use it as a source of contracts
|
||||
to generate tests or stubs.</p><p>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</p><div class="table"><a name="d0e7276" href="#d0e7276"></a><p class="title"><b>Table 10.1. SCM Stub Downloader properties</b></p><div class="table-contents"><table summary="SCM Stub Downloader properties" style="border-collapse: collapse;border-top: 0.5pt solid ; border-bottom: 0.5pt solid ; border-left: 0.5pt solid ; border-right: 0.5pt solid ; "><colgroup><col class="col_1"><col class="col_2"><col class="col_3"></colgroup><tbody><tr><td style="border-right: 0.5pt solid ; border-bottom: 0.5pt solid ; " align="left" valign="top"><p>Type of a property</p></td><td style="border-right: 0.5pt solid ; border-bottom: 0.5pt solid ; " align="left" valign="top"><p>Name of the property</p></td><td style="border-bottom: 0.5pt solid ; " align="left" valign="top"><p>Description</p></td></tr><tr><td style="border-right: 0.5pt solid ; border-bottom: 0.5pt solid ; " align="left" valign="top"><p>* <code class="literal">git.branch</code> (plugin prop)
|
||||
properties</p><div class="table"><a name="d0e7302" href="#d0e7302"></a><p class="title"><b>Table 10.1. SCM Stub Downloader properties</b></p><div class="table-contents"><table summary="SCM Stub Downloader properties" style="border-collapse: collapse;border-top: 0.5pt solid ; border-bottom: 0.5pt solid ; border-left: 0.5pt solid ; border-right: 0.5pt solid ; "><colgroup><col class="col_1"><col class="col_2"><col class="col_3"></colgroup><tbody><tr><td style="border-right: 0.5pt solid ; border-bottom: 0.5pt solid ; " align="left" valign="top"><p>Type of a property</p></td><td style="border-right: 0.5pt solid ; border-bottom: 0.5pt solid ; " align="left" valign="top"><p>Name of the property</p></td><td style="border-bottom: 0.5pt solid ; " align="left" valign="top"><p>Description</p></td></tr><tr><td style="border-right: 0.5pt solid ; border-bottom: 0.5pt solid ; " align="left" valign="top"><p>* <code class="literal">git.branch</code> (plugin prop)
|
||||
</p><p>* <code class="literal">stubrunner.properties.git.branch</code> (system prop)
|
||||
</p><p>* <code class="literal">STUBRUNNER_PROPERTIES_GIT_BRANCH</code> (env prop)</p></td><td style="border-right: 0.5pt solid ; border-bottom: 0.5pt solid ; " align="left" valign="top"><p>master</p></td><td style="border-bottom: 0.5pt solid ; " align="left" valign="top"><p>Which branch to checkout</p></td></tr><tr><td style="border-right: 0.5pt solid ; border-bottom: 0.5pt solid ; " align="left" valign="top"><p>* <code class="literal">git.username</code> (plugin prop)
|
||||
</p><p>* <code class="literal">stubrunner.properties.git.username</code> (system prop)
|
||||
@@ -5833,7 +5868,7 @@ to fetch the Pact contract definitions from the Pact Broker.
|
||||
Whatever is set after <code class="literal">pact://</code> will be parsed as the Pact Broker URL.</p><p>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</p><div class="table"><a name="d0e7425" href="#d0e7425"></a><p class="title"><b>Table 10.2. SCM Stub Downloader properties</b></p><div class="table-contents"><table summary="SCM Stub Downloader properties" style="border-collapse: collapse;border-top: 0.5pt solid ; border-bottom: 0.5pt solid ; border-left: 0.5pt solid ; border-right: 0.5pt solid ; "><colgroup><col class="col_1"><col class="col_2"><col class="col_3"></colgroup><tbody><tr><td style="border-right: 0.5pt solid ; border-bottom: 0.5pt solid ; " align="left" valign="top"><p>Type of a property</p></td><td style="border-right: 0.5pt solid ; border-bottom: 0.5pt solid ; " align="left" valign="top"><p>Name of the property</p></td><td style="border-bottom: 0.5pt solid ; " align="left" valign="top"><p>Description</p></td></tr><tr><td style="border-right: 0.5pt solid ; border-bottom: 0.5pt solid ; " align="left" valign="top"><p>* <code class="literal">pactbroker.host</code> (plugin prop)
|
||||
properties</p><div class="table"><a name="d0e7451" href="#d0e7451"></a><p class="title"><b>Table 10.2. SCM Stub Downloader properties</b></p><div class="table-contents"><table summary="SCM Stub Downloader properties" style="border-collapse: collapse;border-top: 0.5pt solid ; border-bottom: 0.5pt solid ; border-left: 0.5pt solid ; border-right: 0.5pt solid ; "><colgroup><col class="col_1"><col class="col_2"><col class="col_3"></colgroup><tbody><tr><td style="border-right: 0.5pt solid ; border-bottom: 0.5pt solid ; " align="left" valign="top"><p>Type of a property</p></td><td style="border-right: 0.5pt solid ; border-bottom: 0.5pt solid ; " align="left" valign="top"><p>Name of the property</p></td><td style="border-bottom: 0.5pt solid ; " align="left" valign="top"><p>Description</p></td></tr><tr><td style="border-right: 0.5pt solid ; border-bottom: 0.5pt solid ; " align="left" valign="top"><p>* <code class="literal">pactbroker.host</code> (plugin prop)
|
||||
</p><p>* <code class="literal">stubrunner.properties.pactbroker.host</code> (system prop)
|
||||
</p><p>* <code class="literal">STUBRUNNER_PROPERTIES_PACTBROKER_HOST</code> (env prop)</p></td><td style="border-right: 0.5pt solid ; border-bottom: 0.5pt solid ; " align="left" valign="top"><p>Host from URL passed to <code class="literal">repositoryRoot</code></p></td><td style="border-bottom: 0.5pt solid ; " align="left" valign="top"><p>What is the URL of Pact Broker</p></td></tr><tr><td style="border-right: 0.5pt solid ; border-bottom: 0.5pt solid ; " align="left" valign="top"><p>* <code class="literal">pactbroker.port</code> (plugin prop)
|
||||
</p><p>* <code class="literal">stubrunner.properties.pactbroker.port</code> (system prop)
|
||||
|
||||
@@ -340,8 +340,389 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied.
|
||||
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.</p>
|
||||
<p>Can't read the url [https://www.apache.org/licenses/LICENSE-2.0] : Read timed out</p></div></div>
|
||||
limitations under the License.</p><a class="externalLink" href="https://www.apache.org/licenses/LICENSE-2.0">[Original text]</a>
|
||||
<p>Copy of the license follows:</p>
|
||||
<!-- Navigation -->
|
||||
<header>
|
||||
<nav class="navbar navbar-default navbar-fixed-top">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button class="navbar-toggle" type="button" data-toggle="collapse" data-target="#mainnav-collapse">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a href="https://www.apache.org/licenses/#" class="navbar-brand"><span class="glyphicon glyphicon-home"></span></a>
|
||||
</div>
|
||||
<div class="collapse navbar-collapse" id="mainnav-collapse">
|
||||
<div style="line-height:20px; padding-top:5px; float:left"><a href="https://www.apache.org/">Home</a> » <a href="https://www.apache.org/licenses/">Licenses</a></div>
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li class="dropdown">
|
||||
<a href="https://www.apache.org/licenses/#" class="dropdown-toggle" data-toggle="dropdown">About <span class="caret"></span></a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li><a href="https://www.apache.org/foundation">Overview</a></li>
|
||||
<li><a href="https://www.apache.org/foundation/members.html">Members</a></li>
|
||||
<li><a href="https://www.apache.org/foundation/how-it-works.html">Process</a></li>
|
||||
<li><a href="https://www.apache.org/foundation/sponsorship.html">Sponsorship</a></li>
|
||||
<li><a href="https://www.apache.org/foundation/glossary.html">Glossary</a></li>
|
||||
<li><a href="https://www.apache.org/foundation/preFAQ.html">FAQ</a></li>
|
||||
<li><a href="https://www.apache.org/foundation/policies/conduct.html">Code of Conduct</a></li>
|
||||
<li><a href="https://www.apache.org/foundation/contact.html ">Contact</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="https://www.apache.org/index.html#projects-list">Projects</a></li>
|
||||
<li class="dropdown">
|
||||
<a href="https://www.apache.org/licenses/#" class="dropdown-toggle" data-toggle="dropdown">People <span class="caret"></span></a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li><a href="http://people.apache.org/">Overview</a></li>
|
||||
<li><a href="http://people.apache.org/committer-index.html">Committers</a></li>
|
||||
<li><a href="https://www.apache.org/foundation/how-it-works.html#meritocracy">Meritocracy</a></li>
|
||||
<li><a href="https://www.apache.org/foundation/how-it-works.html#roles">Roles</a></li>
|
||||
<li><a href="https://www.apache.org/foundation/policies/conduct.html">Code of Conduct</a></li>
|
||||
<li><a href="http://planet.apache.org/">Planet Apache</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="dropdown">
|
||||
<a href="https://www.apache.org/licenses/#" class="dropdown-toggle" data-toggle="dropdown">Get Involved <span class="caret"></span></a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li><a href="https://www.apache.org/foundation/getinvolved.html">Overview</a></li>
|
||||
<li><a href="http://community.apache.org/">Community Development</a></li>
|
||||
<li><a href="https://www.apache.org/foundation/policies/conduct.html">Code of Conduct</a></li>
|
||||
<li><a href="http://helpwanted.apache.org/">Help Wanted</a></li>
|
||||
<li><a href="http://www.apachecon.com/">ApacheCon</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="https://www.apache.org/dyn/closer.cgi">Download</a></li>
|
||||
<li class="dropdown">
|
||||
<a href="https://www.apache.org/licenses/#" class="dropdown-toggle" data-toggle="dropdown">Support Apache <span class="caret"></span></a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li><a href="https://www.apache.org/foundation/sponsorship.html">Sponsorship</a></li>
|
||||
<li><a href="https://www.apache.org/foundation/contributing.html">Donations</a></li>
|
||||
<li><a href="https://www.apache.org/foundation/buy_stuff.html">Buy Stuff</a></li>
|
||||
<li><a href="https://www.apache.org/foundation/thanks.html">Thanks</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
</header>
|
||||
<!-- / Navigation -->
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-6 col-sm-5 col-xs-12">
|
||||
<img src="https://www.apache.org/img/asf_logo.png" alt="Apache Logo" style="max-width: 100%;">
|
||||
</div>
|
||||
<div class="col-md-3 col-sm-3 col-xs-6">
|
||||
<a href="http://apache.org/foundation/contributing.html" title="Support Apache">
|
||||
<img src="https://www.apache.org/images/SupportApache-small.png" style="height: 150px; width: 150px; margin-top: 5px; margin-bottom: 5px;">
|
||||
</a>
|
||||
</div>
|
||||
<div class="col-md-3 col-sm-4 col-xs-6">
|
||||
<div class="input-group" style="margin-bottom: 5px;">
|
||||
<script>
|
||||
(function() {
|
||||
var cx = '005703438322411770421:5mgshgrgx2u';
|
||||
var gcse = document.createElement('script');
|
||||
gcse.type = 'text/javascript';
|
||||
gcse.async = true;
|
||||
gcse.src = (document.location.protocol == 'https:' ? 'https:' : 'http:') +
|
||||
'//cse.google.com/cse.js?cx=' + cx;
|
||||
var s = document.getElementsByTagName('script')[0];
|
||||
s.parentNode.insertBefore(gcse, s);
|
||||
})();
|
||||
</script>
|
||||
<gcse:searchbox-only></gcse:searchbox-only>
|
||||
</div>
|
||||
<a role="button" class="btn btn-block btn-default btn-xs" href="https://www.apache.org/foundation/governance/">The Apache Way</a>
|
||||
<a role="button" class="btn btn-block btn-default btn-xs" href="https://community.apache.org/contributors/">Contribute</a>
|
||||
<a role="button" class="btn btn-block btn-default btn-xs" href="https://www.apache.org/foundation/thanks.html">ASF Sponsors</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container"><style type="text/css">
|
||||
/* The following code is added by mdx_elementid.py
|
||||
It was originally lifted from http://subversion.apache.org/style/site.css */
|
||||
/*
|
||||
* Hide class="elementid-permalink", except when an enclosing heading
|
||||
* has the :hover property.
|
||||
*/
|
||||
.headerlink, .elementid-permalink {
|
||||
visibility: hidden;
|
||||
}
|
||||
h2:hover > .headerlink, h3:hover > .headerlink, h1:hover > .headerlink, h6:hover > .headerlink, h4:hover > .headerlink, h5:hover > .headerlink, dt:hover > .elementid-permalink { visibility: visible }</style>
|
||||
<p>Apache License<br></br>Version 2.0, January 2004<br></br>
|
||||
<a href="http://www.apache.org/licenses/">http://www.apache.org/licenses/</a> </p>
|
||||
<p>TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION</p>
|
||||
<p><strong><a name="definitions">1. Definitions</a></strong>.</p>
|
||||
<p>"License" shall mean the terms and conditions for use, reproduction, and
|
||||
distribution as defined by Sections 1 through 9 of this document.</p>
|
||||
<p>"Licensor" shall mean the copyright owner or entity authorized by the
|
||||
copyright owner that is granting the License.</p>
|
||||
<p>"Legal Entity" shall mean the union of the acting entity and all other
|
||||
entities that control, are controlled by, or are under common control with
|
||||
that entity. For the purposes of this definition, "control" means (i) the
|
||||
power, direct or indirect, to cause the direction or management of such
|
||||
entity, whether by contract or otherwise, or (ii) ownership of fifty
|
||||
percent (50%) or more of the outstanding shares, or (iii) beneficial
|
||||
ownership of such entity.</p>
|
||||
<p>"You" (or "Your") shall mean an individual or Legal Entity exercising
|
||||
permissions granted by this License.</p>
|
||||
<p>"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation source,
|
||||
and configuration files.</p>
|
||||
<p>"Object" form shall mean any form resulting from mechanical transformation
|
||||
or translation of a Source form, including but not limited to compiled
|
||||
object code, generated documentation, and conversions to other media types.</p>
|
||||
<p>"Work" shall mean the work of authorship, whether in Source or Object form,
|
||||
made available under the License, as indicated by a copyright notice that
|
||||
is included in or attached to the work (an example is provided in the
|
||||
Appendix below).</p>
|
||||
<p>"Derivative Works" shall mean any work, whether in Source or Object form,
|
||||
that is based on (or derived from) the Work and for which the editorial
|
||||
revisions, annotations, elaborations, or other modifications represent, as
|
||||
a whole, an original work of authorship. For the purposes of this License,
|
||||
Derivative Works shall not include works that remain separable from, or
|
||||
merely link (or bind by name) to the interfaces of, the Work and Derivative
|
||||
Works thereof.</p>
|
||||
<p>"Contribution" shall mean any work of authorship, including the original
|
||||
version of the Work and any modifications or additions to that Work or
|
||||
Derivative Works thereof, that is intentionally submitted to Licensor for
|
||||
inclusion in the Work by the copyright owner or by an individual or Legal
|
||||
Entity authorized to submit on behalf of the copyright owner. For the
|
||||
purposes of this definition, "submitted" means any form of electronic,
|
||||
verbal, or written communication sent to the Licensor or its
|
||||
representatives, including but not limited to communication on electronic
|
||||
mailing lists, source code control systems, and issue tracking systems that
|
||||
are managed by, or on behalf of, the Licensor for the purpose of discussing
|
||||
and improving the Work, but excluding communication that is conspicuously
|
||||
marked or otherwise designated in writing by the copyright owner as "Not a
|
||||
Contribution."</p>
|
||||
<p>"Contributor" shall mean Licensor and any individual or Legal Entity on
|
||||
behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.</p>
|
||||
<p><strong><a name="copyright">2. Grant of Copyright License</a></strong>. Subject to the
|
||||
terms and conditions of this License, each Contributor hereby grants to You
|
||||
a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of, publicly
|
||||
display, publicly perform, sublicense, and distribute the Work and such
|
||||
Derivative Works in Source or Object form.</p>
|
||||
<p><strong><a name="patent">3. Grant of Patent License</a></strong>. Subject to the terms
|
||||
and conditions of this License, each Contributor hereby grants to You a
|
||||
perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made, use,
|
||||
offer to sell, sell, import, and otherwise transfer the Work, where such
|
||||
license applies only to those patent claims licensable by such Contributor
|
||||
that are necessarily infringed by their Contribution(s) alone or by
|
||||
combination of their Contribution(s) with the Work to which such
|
||||
Contribution(s) was submitted. If You institute patent litigation against
|
||||
any entity (including a cross-claim or counterclaim in a lawsuit) alleging
|
||||
that the Work or a Contribution incorporated within the Work constitutes
|
||||
direct or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate as of the
|
||||
date such litigation is filed.</p>
|
||||
<p><strong><a name="redistribution">4. Redistribution</a></strong>. You may reproduce and
|
||||
distribute copies of the Work or Derivative Works thereof in any medium,
|
||||
with or without modifications, and in Source or Object form, provided that
|
||||
You meet the following conditions:</p>
|
||||
<ol style="list-style: lower-latin;">
|
||||
<li>You must give any other recipients of the Work or Derivative Works a
|
||||
copy of this License; and</li>
|
||||
|
||||
<li>You must cause any modified files to carry prominent notices stating
|
||||
that You changed the files; and</li>
|
||||
|
||||
<li>You must retain, in the Source form of any Derivative Works that You
|
||||
distribute, all copyright, patent, trademark, and attribution notices from
|
||||
the Source form of the Work, excluding those notices that do not pertain to
|
||||
any part of the Derivative Works; and</li>
|
||||
|
||||
<li>If the Work includes a "NOTICE" text file as part of its distribution,
|
||||
then any Derivative Works that You distribute must include a readable copy
|
||||
of the attribution notices contained within such NOTICE file, excluding
|
||||
those notices that do not pertain to any part of the Derivative Works, in
|
||||
at least one of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or documentation,
|
||||
if provided along with the Derivative Works; or, within a display generated
|
||||
by the Derivative Works, if and wherever such third-party notices normally
|
||||
appear. The contents of the NOTICE file are for informational purposes only
|
||||
and do not modify the License. You may add Your own attribution notices
|
||||
within Derivative Works that You distribute, alongside or as an addendum to
|
||||
the NOTICE text from the Work, provided that such additional attribution
|
||||
notices cannot be construed as modifying the License.
|
||||
<br/>
|
||||
<br/>
|
||||
You may add Your own copyright statement to Your modifications and may
|
||||
provide additional or different license terms and conditions for use,
|
||||
reproduction, or distribution of Your modifications, or for any such
|
||||
Derivative Works as a whole, provided Your use, reproduction, and
|
||||
distribution of the Work otherwise complies with the conditions stated in
|
||||
this License.
|
||||
</li>
|
||||
|
||||
</ol>
|
||||
|
||||
<p><strong><a name="contributions">5. Submission of Contributions</a></strong>. Unless You
|
||||
explicitly state otherwise, any Contribution intentionally submitted for
|
||||
inclusion in the Work by You to the Licensor shall be under the terms and
|
||||
conditions of this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify the
|
||||
terms of any separate license agreement you may have executed with Licensor
|
||||
regarding such Contributions.</p>
|
||||
<p><strong><a name="trademarks">6. Trademarks</a></strong>. This License does not grant
|
||||
permission to use the trade names, trademarks, service marks, or product
|
||||
names of the Licensor, except as required for reasonable and customary use
|
||||
in describing the origin of the Work and reproducing the content of the
|
||||
NOTICE file.</p>
|
||||
<p><strong><a name="no-warranty">7. Disclaimer of Warranty</a></strong>. Unless required by
|
||||
applicable law or agreed to in writing, Licensor provides the Work (and
|
||||
each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT
|
||||
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including,
|
||||
without limitation, any warranties or conditions of TITLE,
|
||||
NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You
|
||||
are solely responsible for determining the appropriateness of using or
|
||||
redistributing the Work and assume any risks associated with Your exercise
|
||||
of permissions under this License.</p>
|
||||
<p><strong><a name="no-liability">8. Limitation of Liability</a></strong>. In no event and
|
||||
under no legal theory, whether in tort (including negligence), contract, or
|
||||
otherwise, unless required by applicable law (such as deliberate and
|
||||
grossly negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a result
|
||||
of this License or out of the use or inability to use the Work (including
|
||||
but not limited to damages for loss of goodwill, work stoppage, computer
|
||||
failure or malfunction, or any and all other commercial damages or losses),
|
||||
even if such Contributor has been advised of the possibility of such
|
||||
damages.</p>
|
||||
<p><strong><a name="additional">9. Accepting Warranty or Additional Liability</a></strong>.
|
||||
While redistributing the Work or Derivative Works thereof, You may choose
|
||||
to offer, and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this License.
|
||||
However, in accepting such obligations, You may act only on Your own behalf
|
||||
and on Your sole responsibility, not on behalf of any other Contributor,
|
||||
and only if You agree to indemnify, defend, and hold each Contributor
|
||||
harmless for any liability incurred by, or claims asserted against, such
|
||||
Contributor by reason of your accepting any such warranty or additional
|
||||
liability.</p>
|
||||
<p>END OF TERMS AND CONDITIONS</p>
|
||||
<h1 id="apply">APPENDIX: How to apply the Apache License to your work<a class="headerlink" href="https://www.apache.org/licenses/#apply" title="Permanent link">¶</a></h1>
|
||||
<p>To apply the Apache License to your work, attach the following boilerplate
|
||||
notice, with the fields enclosed by brackets "[]" replaced with your own
|
||||
identifying information. (Don't include the brackets!) The text should be
|
||||
enclosed in the appropriate comment syntax for the file format. We also
|
||||
recommend that a file or class name and description of purpose be included
|
||||
on the same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.</p>
|
||||
<div class="codehilite"><pre>Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
</pre></div></div>
|
||||
|
||||
<!-- Footer -->
|
||||
|
||||
<footer class="bg-primary">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<br />
|
||||
<div class="col-sm-1">
|
||||
|
||||
</div>
|
||||
<div class="col-sm-2">
|
||||
<h5 class="white">Community</h5>
|
||||
<ul class="list-unstyled white" role="menu">
|
||||
<li><a href="http://community.apache.org/">Overview</a></li>
|
||||
<li><a href="https://www.apache.org/foundation/conferences.html">Conferences</a></li>
|
||||
<li><a href="http://community.apache.org/gsoc.html">Summer of Code</a></li>
|
||||
<li><a href="http://community.apache.org/newcomers/">Getting Started</a></li>
|
||||
<li><a href="https://www.apache.org/foundation/how-it-works.html">The Apache Way</a></li>
|
||||
<li><a href="https://www.apache.org/travel/">Travel Assistance</a></li>
|
||||
<li><a href="https://www.apache.org/foundation/getinvolved.html">Get Involved</a></li>
|
||||
<li><a href="https://www.apache.org/foundation/policies/conduct.html">Code of Conduct</a></li>
|
||||
<li><a href="http://community.apache.org/newbiefaq.html">Community FAQ</a></li>
|
||||
<li><a href="https://www.apache.org/memorials/">Memorials</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-2">
|
||||
<h5 class="white">Innovation</h5>
|
||||
<ul class="list-unstyled white" role="menu">
|
||||
<li><a href="http://incubator.apache.org/">Incubator</a></li>
|
||||
<li><a href="http://labs.apache.org/">Labs</a></li>
|
||||
<li><a href="https://www.apache.org/licenses/">Licensing</a></li>
|
||||
<li><a href="https://www.apache.org/foundation/license-faq.html">Licensing FAQ</a></li>
|
||||
<li><a href="https://www.apache.org/foundation/marks/">Trademark Policy</a></li>
|
||||
<li><a href="https://www.apache.org/foundation/contact.html">Contacts</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-2">
|
||||
<h5 class="white">Tech Operations</h5>
|
||||
<ul class="list-unstyled white" role="menu">
|
||||
<li><a href="https://www.apache.org/dev/">Developer Information</a></li>
|
||||
<li><a href="https://www.apache.org/dev/infrastructure.html">Infrastructure</a></li>
|
||||
<li><a href="https://www.apache.org/security/">Security</a></li>
|
||||
<li><a href="http://status.apache.org">Status</a></li>
|
||||
<li><a href="https://www.apache.org/foundation/contact.html">Contacts</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-2">
|
||||
<h5 class="white">Press</h5>
|
||||
<ul class="list-unstyled white" role="menu">
|
||||
<li><a href="https://www.apache.org/press/">Overview</a></li>
|
||||
<li><a href="https://blogs.apache.org/">ASF News</a></li>
|
||||
<li><a href="https://blogs.apache.org/foundation/">Announcements</a></li>
|
||||
<li><a href="https://twitter.com/TheASF">Twitter Feed</a></li>
|
||||
<li><a href="https://www.apache.org/press/#contact">Contacts</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-2">
|
||||
<h5 class="white">Legal</h5>
|
||||
<ul class="list-unstyled white" role="menu">
|
||||
<li><a href="https://www.apache.org/legal/">Legal Affairs</a></li>
|
||||
<li><a href="https://www.apache.org/legal/dmca.html">DMCA</a></li>
|
||||
<li><a href="https://www.apache.org/licenses/">Licenses</a></li>
|
||||
<li><a href="https://www.apache.org/foundation/marks/">Trademark Policy</a></li>
|
||||
<li><a href="https://www.apache.org/foundation/records/">Public Records</a></li>
|
||||
<li><a href="https://www.apache.org/foundation/policies/privacy.html">Privacy Policy</a></li>
|
||||
<li><a href="https://www.apache.org/licenses/exports/">Export Information</a></li>
|
||||
<li><a href="https://www.apache.org/foundation/license-faq.html">License/Distribution FAQ</a></li>
|
||||
<li><a href="https://www.apache.org/foundation/contact.html">Contacts</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-1">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<hr class="col-lg-12 hr-white" />
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<p class="text-center">Copyright © 2017 The Apache Software Foundation, Licensed under the <a class="white" href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p>
|
||||
<p class="text-center">Apache and the Apache feather logo are trademarks of The Apache Software Foundation.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</footer>
|
||||
|
||||
<!-- / Footer -->
|
||||
|
||||
<script src="/js/jquery-2.1.1.min.js"></script>
|
||||
<script src="/js/bootstrap.js"></script>
|
||||
</div></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -6339,6 +6339,9 @@ the recommended way, as doing so makes the tests <emphasis role="strong">host-in
|
||||
headers:
|
||||
foo: bar
|
||||
fooReq: baz
|
||||
cookies:
|
||||
foo: bar
|
||||
fooReq: baz
|
||||
body:
|
||||
foo: bar
|
||||
matchers:
|
||||
@@ -6374,7 +6377,12 @@ response:
|
||||
- key: foo2
|
||||
regex: bar
|
||||
- key: foo3
|
||||
command: andMeToo($it)</programlisting>
|
||||
command: andMeToo($it)
|
||||
cookies:
|
||||
- key: foo2
|
||||
regex: bar
|
||||
- key: foo3
|
||||
predefined:</programlisting>
|
||||
</para>
|
||||
</formalpara>
|
||||
<simpara><literal>request</literal> may contain additional <emphasis role="strong">request headers</emphasis>, as shown in the following example:</simpara>
|
||||
@@ -6411,6 +6419,40 @@ headers:
|
||||
fooReq: baz</programlisting>
|
||||
</para>
|
||||
</formalpara>
|
||||
<simpara><literal>request</literal> may contain additional <emphasis role="strong">request cookies</emphasis>, as shown in the following example:</simpara>
|
||||
<formalpara>
|
||||
<title>Groovy DSL</title>
|
||||
<para>
|
||||
<programlisting language="groovy" linenumbering="unnumbered">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 {
|
||||
//...
|
||||
}
|
||||
}</programlisting>
|
||||
</para>
|
||||
</formalpara>
|
||||
<formalpara>
|
||||
<title>YAML</title>
|
||||
<para>
|
||||
<programlisting language="yml" linenumbering="unnumbered">request:
|
||||
...
|
||||
cookies:
|
||||
foo: bar
|
||||
fooReq: baz</programlisting>
|
||||
</para>
|
||||
</formalpara>
|
||||
<simpara><literal>request</literal> may contain a <emphasis role="strong">request body</emphasis>:</simpara>
|
||||
<formalpara>
|
||||
<title>Groovy DSL</title>
|
||||
@@ -6461,7 +6503,9 @@ body:
|
||||
// name of the file
|
||||
name: $(c(regex(nonEmpty())), p('filename.csv')),
|
||||
// content of the file
|
||||
content: $(c(regex(nonEmpty())), p('file content')))
|
||||
content: $(c(regex(nonEmpty())), p('file content')),
|
||||
// content type for the part
|
||||
contentType: $(c(regex(nonEmpty())), p('application/json')))
|
||||
)
|
||||
}
|
||||
response {
|
||||
@@ -6630,7 +6674,7 @@ following code shows an example:</simpara>
|
||||
status: 200</programlisting>
|
||||
</para>
|
||||
</formalpara>
|
||||
<simpara>Besides status, the response may contain <emphasis role="strong">headers</emphasis> and a <emphasis role="strong">body</emphasis>, both of which are
|
||||
<simpara>Besides status, the response may contain <emphasis role="strong">headers</emphasis>, <emphasis role="strong">cookies</emphasis> and a <emphasis role="strong">body</emphasis>, both of which are
|
||||
specified the same way as in the request (see the previous paragraph).</simpara>
|
||||
<tip>
|
||||
<simpara>Via the Groovy DSL you can reference the <literal>org.springframework.cloud.contract.spec.internal.HttpStatus</literal>
|
||||
|
||||
Reference in New Issue
Block a user