Sync docs from master to gh-pages

This commit is contained in:
buildmaster
2018-12-18 13:31:57 +00:00
parent b51e9c2683
commit 2194b609d2
32 changed files with 170 additions and 198 deletions

View File

@@ -606,13 +606,4 @@ matching response definition was picked.</p><p>To turn off this feature just bum
`StubRunnerExtension`to dump all mappings per artifact id. Also the port at which the given stub server
was started will be attached.</p></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="_can_i_reference_text_from_file" href="#_can_i_reference_text_from_file"></a>3.8.3&nbsp;Can I reference text from file?</h3></div></div></div><p>Yes! With version 1.2.0 we&#8217;ve added such a possibility. It&#8217;s enough to call <code class="literal">file(&#8230;&#8203;)</code> method in the
DSL and provide a path relative to where the contract lays.
If you&#8217;re using YAML just use the <code class="literal">bodyFromFile</code> property.</p></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="_why_do_i_sometimes_get_socketexception" href="#_why_do_i_sometimes_get_socketexception"></a>3.8.4&nbsp;Why do I sometimes get <code class="literal">SocketException</code></h3></div></div></div><p>When using an HTTP client (e.g. <code class="literal">RestTemplate</code>) and running several tests that share a Spring context, you might sometimes get the following exception:</p><pre class="screen">java.net.SocketException: Unexpected end of file from server</pre><p>Tom Akehurst, the creator of WireMock did the following analysis of this issue.</p><div class="blockquote"><blockquote class="blockquote"><p>I looked at tcpdump while running the failing test. <code class="literal">HttpUrlConnection</code> is doing something weird - it&#8217;s creating a connection in a previous test case, which works fine, then the usual <code class="literal">fin</code> &#8594; <code class="literal">fin ack</code> etc. ending handshake happens. But it seems it isn&#8217;t discarded, but reused after that. Because the server thinks (rightly) that the connection is closed, it just sends a RST packet. Calling the <code class="literal">/__admin</code> endpoint just happened to remove the dead connection from the pool. This also fixes the problem (which using the Java HTTP client): System.setProperty("http.keepAlive", "false");</p></blockquote></div><p>There are the ways to solve this problem.</p><p>First, just use a different HTTP client for <code class="literal">RestTemplate</code>. Example for using Apache HTTP client:</p><p><b>pom.xml.&nbsp;</b>
</p><pre class="programlisting"><span xmlns:d="http://docbook.org/ns/docbook" class="hl-tag">&lt;dependency&gt;</span>
<span xmlns:d="http://docbook.org/ns/docbook" class="hl-tag">&lt;groupId&gt;</span>org.apache.httpcomponents<span xmlns:d="http://docbook.org/ns/docbook" class="hl-tag">&lt;/groupId&gt;</span>
<span xmlns:d="http://docbook.org/ns/docbook" class="hl-tag">&lt;artifactId&gt;</span>httpclient<span xmlns:d="http://docbook.org/ns/docbook" class="hl-tag">&lt;/artifactId&gt;</span>
<span xmlns:d="http://docbook.org/ns/docbook" class="hl-tag">&lt;scope&gt;</span>compile<span xmlns:d="http://docbook.org/ns/docbook" class="hl-tag">&lt;/scope&gt;</span>
<span xmlns:d="http://docbook.org/ns/docbook" class="hl-tag">&lt;/dependency&gt;</span></pre><p>
</p><pre class="programlisting"><span xmlns:d="http://docbook.org/ns/docbook" class="hl-keyword">this</span>.restTemplate
.setRequestFactory(<span xmlns:d="http://docbook.org/ns/docbook" class="hl-keyword">new</span> HttpComponentsClientHttpRequestFactory());</pre><p>Second option is to set the system property. You can set it either in code or pass it to your tests via a plugin.</p><pre class="programlisting"><span xmlns:d="http://docbook.org/ns/docbook" class="hl-keyword">static</span> {
System.setProperty(<span xmlns:d="http://docbook.org/ns/docbook" class="hl-string">"http.keepAlive"</span>, <span xmlns:d="http://docbook.org/ns/docbook" class="hl-string">"false"</span>);
}</pre></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="multi__spring_cloud_contract_verifier_introduction.html">Prev</a>&nbsp;</td><td width="20%" align="center">&nbsp;</td><td width="40%" align="right">&nbsp;<a accesskey="n" href="multi__spring_cloud_contract_verifier_setup.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">2.&nbsp;Spring Cloud Contract Verifier Introduction&nbsp;</td><td width="20%" align="center"><a accesskey="h" href="multi_spring-cloud-contract.html">Home</a></td><td width="40%" align="right" valign="top">&nbsp;4.&nbsp;Spring Cloud Contract Verifier Setup</td></tr></table></div></body></html>
If you&#8217;re using YAML just use the <code class="literal">bodyFromFile</code> property.</p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="multi__spring_cloud_contract_verifier_introduction.html">Prev</a>&nbsp;</td><td width="20%" align="center">&nbsp;</td><td width="40%" align="right">&nbsp;<a accesskey="n" href="multi__spring_cloud_contract_verifier_setup.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">2.&nbsp;Spring Cloud Contract Verifier Introduction&nbsp;</td><td width="20%" align="center"><a accesskey="h" href="multi_spring-cloud-contract.html">Home</a></td><td width="40%" align="right" valign="top">&nbsp;4.&nbsp;Spring Cloud Contract Verifier Setup</td></tr></table></div></body></html>

File diff suppressed because one or more lines are too long

View File

@@ -167,7 +167,7 @@ Contract.make {
status OK()
body(file(<span xmlns:d="http://docbook.org/ns/docbook" class="hl-string">"response.json"</span>))
headers {
contentType(textPlain())
contentType(applicationJson())
}
}
}</pre><p>
@@ -179,7 +179,11 @@ Contract.make {
response:
status: 200
bodyFromFile: response.json</pre><p>
</p><p>Further assume that the JSON files is as follows:</p><p><span class="strong"><strong>request.json</strong></span></p><pre class="programlisting"><span xmlns:d="http://docbook.org/ns/docbook" class="hl-keyword">{</span> <span xmlns:d="http://docbook.org/ns/docbook" class="hl-string">"status"</span> : <span xmlns:d="http://docbook.org/ns/docbook" class="hl-string">"REQUEST"</span> <span xmlns:d="http://docbook.org/ns/docbook" class="hl-keyword">}</span></pre><p><span class="strong"><strong>response.json</strong></span></p><pre class="programlisting"><span xmlns:d="http://docbook.org/ns/docbook" class="hl-keyword">{</span> <span xmlns:d="http://docbook.org/ns/docbook" class="hl-string">"status"</span> : <span xmlns:d="http://docbook.org/ns/docbook" class="hl-string">"RESPONSE"</span> <span xmlns:d="http://docbook.org/ns/docbook" class="hl-keyword">}</span></pre><p>When test or stub generation takes place, the contents of the file is passed to the body
</p><p>Further assume that the JSON files is as follows:</p><p><span class="strong"><strong>request.json</strong></span></p><pre class="programlisting"><span xmlns:d="http://docbook.org/ns/docbook" class="hl-keyword">{</span>
<span xmlns:d="http://docbook.org/ns/docbook" class="hl-string">"status"</span>: <span xmlns:d="http://docbook.org/ns/docbook" class="hl-string">"REQUEST"</span>
<span xmlns:d="http://docbook.org/ns/docbook" class="hl-keyword">}</span></pre><p><span class="strong"><strong>response.json</strong></span></p><pre class="programlisting"><span xmlns:d="http://docbook.org/ns/docbook" class="hl-keyword">{</span>
<span xmlns:d="http://docbook.org/ns/docbook" class="hl-string">"status"</span>: <span xmlns:d="http://docbook.org/ns/docbook" class="hl-string">"RESPONSE"</span>
<span xmlns:d="http://docbook.org/ns/docbook" class="hl-keyword">}</span></pre><p>When test or stub generation takes place, the contents of the file is passed to the body
of a request or a response. The name of the file needs to be a file with location
relative to the folder in which the contract lays.</p><p>If you need to pass the contents of a file in a binary form
it&#8217;s enough for you to use the <code class="literal">fileAsBytes</code> method in Groovy DSL or <code class="literal">bodyFromFileAsBytes</code> field in YAML.</p><p><b>Groovy DSL.&nbsp;</b>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -1,13 +1,13 @@
<!DOCTYPE html>
<!--
| Generated by Apache Maven Doxia Site Renderer 1.8.1 at 2018-12-16
| Generated by Apache Maven Doxia Site Renderer 1.8.1 at 2018-12-18
| Rendered using Apache Maven Fluido Skin 1.5
-->
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="Date-Revision-yyyymmdd" content="20181216" />
<meta name="Date-Revision-yyyymmdd" content="20181218" />
<meta http-equiv="Content-Language" content="en" />
<title>Spring Cloud Contract Maven Plugin &#x2013; Checkstyle Results</title>
<link rel="stylesheet" href="./css/apache-maven-fluido-1.5.min.css" />
@@ -146,7 +146,7 @@
<div id="breadcrumbs">
<ul class="breadcrumb">
<li id="publishDate">Last Published: 2018-12-16
<li id="publishDate">Last Published: 2018-12-18
<span class="divider">|</span>
</li>
<li id="projectVersion">Version: 2.1.0.BUILD-SNAPSHOT
@@ -348,12 +348,12 @@
<td><a href="#org.springframework.cloud.contract.maven.verifier.stubrunner.LocalStubRunner.java">org/springframework/cloud/contract/maven/verifier/stubrunner/LocalStubRunner.java</a></td>
<td>0</td>
<td>0</td>
<td>10</td></tr>
<td>9</td></tr>
<tr class="a">
<td><a href="#org.springframework.cloud.contract.maven.verifier.stubrunner.RemoteStubRunner.java">org/springframework/cloud/contract/maven/verifier/stubrunner/RemoteStubRunner.java</a></td>
<td>0</td>
<td>0</td>
<td>19</td></tr></table></div>
<td>20</td></tr></table></div>
<div class="section">
<h2><a name="Rules"></a>Rules</h2>
<table border="0" class="table table-striped">
@@ -3724,58 +3724,52 @@
<tr class="b">
<td><img src="images/icon_error_sml.gif" alt="" />&#160;Error</td>
<td>javadoc</td>
<td>JavadocPackage</td>
<td>Missing package-info.java file.</td>
<td></td></tr>
<tr class="a">
<td><img src="images/icon_error_sml.gif" alt="" />&#160;Error</td>
<td>javadoc</td>
<td>JavadocType</td>
<td>Missing a Javadoc comment.</td>
<td>26</td></tr>
<tr class="b">
<tr class="a">
<td><img src="images/icon_error_sml.gif" alt="" />&#160;Error</td>
<td>whitespace</td>
<td>FileTabCharacter</td>
<td>File contains tab characters (this is the first instance).</td>
<td>29</td></tr>
<tr class="a">
<tr class="b">
<td><img src="images/icon_error_sml.gif" alt="" />&#160;Error</td>
<td>javadoc</td>
<td>JavadocVariable</td>
<td>Missing a Javadoc comment.</td>
<td>29</td></tr>
<tr class="b">
<tr class="a">
<td><img src="images/icon_error_sml.gif" alt="" />&#160;Error</td>
<td>naming</td>
<td>ConstantName</td>
<td>Name 'log' must match pattern '^[A-Z][A-Z0-9]*(_[A-Z0-9]+)*$'.</td>
<td>29</td></tr>
<tr class="a">
<tr class="b">
<td><img src="images/icon_error_sml.gif" alt="" />&#160;Error</td>
<td>sizes</td>
<td>LineLength</td>
<td>Line is longer than 80 characters (found 85).</td>
<td>31</td></tr>
<tr class="b">
<tr class="a">
<td><img src="images/icon_error_sml.gif" alt="" />&#160;Error</td>
<td>design</td>
<td>DesignForExtension</td>
<td>Class 'LocalStubRunner' looks like designed for extension (can be subclassed), but the method 'run' does not have javadoc that explains how to do that safely. If class is not designed for extension consider making the class 'LocalStubRunner' final or making the method 'run' static/final/abstract/empty, or adding allowed annotation for the method.</td>
<td>31</td></tr>
<tr class="a">
<tr class="b">
<td><img src="images/icon_error_sml.gif" alt="" />&#160;Error</td>
<td>javadoc</td>
<td>JavadocMethod</td>
<td>Missing a Javadoc comment.</td>
<td>31</td></tr>
<tr class="b">
<tr class="a">
<td><img src="images/icon_error_sml.gif" alt="" />&#160;Error</td>
<td>misc</td>
<td>FinalParameters</td>
<td>Parameter options should be final.</td>
<td>31</td></tr>
<tr class="a">
<tr class="b">
<td><img src="images/icon_error_sml.gif" alt="" />&#160;Error</td>
<td>sizes</td>
<td>LineLength</td>
@@ -3784,12 +3778,18 @@
<div class="section">
<h3 id="org.springframework.cloud.contract.maven.verifier.stubrunner.RemoteStubRunner.java">org/springframework/cloud/contract/maven/verifier/stubrunner/RemoteStubRunner.java</h3>
<table border="0" class="table table-striped">
<tr class="b">
<tr class="a">
<th>Severity</th>
<th>Category</th>
<th>Rule</th>
<th>Message</th>
<th>Line</th></tr>
<tr class="b">
<td><img src="images/icon_error_sml.gif" alt="" />&#160;Error</td>
<td>javadoc</td>
<td>JavadocPackage</td>
<td>Missing package-info.java file.</td>
<td></td></tr>
<tr class="a">
<td><img src="images/icon_error_sml.gif" alt="" />&#160;Error</td>
<td>javadoc</td>

View File

@@ -130,7 +130,7 @@ under the License.
</tr>
<tr>
<td>
<a href="https://github.com/spring-cloud/spring-cloud-contract/checkstyle.html#org.springframework.cloud.contract.maven.verifier.RunMojo.java">org/springframework/cloud/contract/maven/verifier/RunMojo.java</a>
<a href="https://github.com/spring-cloud/spring-cloud-contract/checkstyle.html#org.springframework.cloud.contract.maven.verifier.stubrunner.RemoteStubRunner.java">org/springframework/cloud/contract/maven/verifier/stubrunner/RemoteStubRunner.java</a>
</td>
<td>
0
@@ -139,7 +139,7 @@ under the License.
0
</td>
<td>
46
20
</td>
</tr>
<tr>
@@ -158,7 +158,7 @@ under the License.
</tr>
<tr>
<td>
<a href="https://github.com/spring-cloud/spring-cloud-contract/checkstyle.html#org.springframework.cloud.contract.maven.verifier.stubrunner.RemoteStubRunner.java">org/springframework/cloud/contract/maven/verifier/stubrunner/RemoteStubRunner.java</a>
<a href="https://github.com/spring-cloud/spring-cloud-contract/checkstyle.html#org.springframework.cloud.contract.maven.verifier.RunMojo.java">org/springframework/cloud/contract/maven/verifier/RunMojo.java</a>
</td>
<td>
0
@@ -167,7 +167,7 @@ under the License.
0
</td>
<td>
19
46
</td>
</tr>
<tr>
@@ -181,7 +181,7 @@ under the License.
0
</td>
<td>
10
9
</td>
</tr>
<tr>

View File

@@ -1,13 +1,13 @@
<!DOCTYPE html>
<!--
| Generated by Apache Maven Doxia Site Renderer 1.8.1 at 2018-12-16
| Generated by Apache Maven Doxia Site Renderer 1.8.1 at 2018-12-18
| Rendered using Apache Maven Fluido Skin 1.5
-->
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="Date-Revision-yyyymmdd" content="20181216" />
<meta name="Date-Revision-yyyymmdd" content="20181218" />
<meta http-equiv="Content-Language" content="en" />
<title>Spring Cloud Contract Maven Plugin &#x2013; CI Management</title>
<link rel="stylesheet" href="./css/apache-maven-fluido-1.5.min.css" />
@@ -146,7 +146,7 @@
<div id="breadcrumbs">
<ul class="breadcrumb">
<li id="publishDate">Last Published: 2018-12-16
<li id="publishDate">Last Published: 2018-12-18
<span class="divider">|</span>
</li>
<li id="projectVersion">Version: 2.1.0.BUILD-SNAPSHOT

View File

@@ -1,13 +1,13 @@
<!DOCTYPE html>
<!--
| Generated by Apache Maven Doxia Site Renderer 1.8.1 at 2018-12-16
| Generated by Apache Maven Doxia Site Renderer 1.8.1 at 2018-12-18
| Rendered using Apache Maven Fluido Skin 1.5
-->
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="Date-Revision-yyyymmdd" content="20181216" />
<meta name="Date-Revision-yyyymmdd" content="20181218" />
<meta http-equiv="Content-Language" content="en" />
<title>Spring Cloud Contract Maven Plugin &#x2013; </title>
<link rel="stylesheet" href="./css/apache-maven-fluido-1.5.min.css" />
@@ -146,7 +146,7 @@
<div id="breadcrumbs">
<ul class="breadcrumb">
<li id="publishDate">Last Published: 2018-12-16
<li id="publishDate">Last Published: 2018-12-18
<span class="divider">|</span>
</li>
<li id="projectVersion">Version: 2.1.0.BUILD-SNAPSHOT

View File

@@ -1,13 +1,13 @@
<!DOCTYPE html>
<!--
| Generated by Apache Maven Doxia Site Renderer 1.8.1 at 2018-12-16
| Generated by Apache Maven Doxia Site Renderer 1.8.1 at 2018-12-18
| Rendered using Apache Maven Fluido Skin 1.5
-->
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="Date-Revision-yyyymmdd" content="20181216" />
<meta name="Date-Revision-yyyymmdd" content="20181218" />
<meta http-equiv="Content-Language" content="en" />
<title>Spring Cloud Contract Maven Plugin &#x2013; </title>
<link rel="stylesheet" href="./css/apache-maven-fluido-1.5.min.css" />
@@ -146,7 +146,7 @@
<div id="breadcrumbs">
<ul class="breadcrumb">
<li id="publishDate">Last Published: 2018-12-16
<li id="publishDate">Last Published: 2018-12-18
<span class="divider">|</span>
</li>
<li id="projectVersion">Version: 2.1.0.BUILD-SNAPSHOT

View File

@@ -1,13 +1,13 @@
<!DOCTYPE html>
<!--
| Generated by Apache Maven Doxia Site Renderer 1.8.1 at 2018-12-16
| Generated by Apache Maven Doxia Site Renderer 1.8.1 at 2018-12-18
| Rendered using Apache Maven Fluido Skin 1.5
-->
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="Date-Revision-yyyymmdd" content="20181216" />
<meta name="Date-Revision-yyyymmdd" content="20181218" />
<meta http-equiv="Content-Language" content="en" />
<title>Spring Cloud Contract Maven Plugin &#x2013; spring-cloud-contract:convert</title>
<link rel="stylesheet" href="./css/apache-maven-fluido-1.5.min.css" />
@@ -146,7 +146,7 @@
<div id="breadcrumbs">
<ul class="breadcrumb">
<li id="publishDate">Last Published: 2018-12-16
<li id="publishDate">Last Published: 2018-12-18
<span class="divider">|</span>
</li>
<li id="projectVersion">Version: 2.1.0.BUILD-SNAPSHOT

View File

@@ -1,13 +1,13 @@
<!DOCTYPE html>
<!--
| Generated by Apache Maven Doxia Site Renderer 1.8.1 at 2018-12-16
| Generated by Apache Maven Doxia Site Renderer 1.8.1 at 2018-12-18
| Rendered using Apache Maven Fluido Skin 1.5
-->
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="Date-Revision-yyyymmdd" content="20181216" />
<meta name="Date-Revision-yyyymmdd" content="20181218" />
<meta http-equiv="Content-Language" content="en" />
<title>Spring Cloud Contract Maven Plugin &#x2013; spring-cloud-contract:generateStubs</title>
<link rel="stylesheet" href="./css/apache-maven-fluido-1.5.min.css" />
@@ -146,7 +146,7 @@
<div id="breadcrumbs">
<ul class="breadcrumb">
<li id="publishDate">Last Published: 2018-12-16
<li id="publishDate">Last Published: 2018-12-18
<span class="divider">|</span>
</li>
<li id="projectVersion">Version: 2.1.0.BUILD-SNAPSHOT

View File

@@ -1,13 +1,13 @@
<!DOCTYPE html>
<!--
| Generated by Apache Maven Doxia Site Renderer 1.8.1 at 2018-12-16
| Generated by Apache Maven Doxia Site Renderer 1.8.1 at 2018-12-18
| Rendered using Apache Maven Fluido Skin 1.5
-->
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="Date-Revision-yyyymmdd" content="20181216" />
<meta name="Date-Revision-yyyymmdd" content="20181218" />
<meta http-equiv="Content-Language" content="en" />
<title>Spring Cloud Contract Maven Plugin &#x2013; spring-cloud-contract:generateTests</title>
<link rel="stylesheet" href="./css/apache-maven-fluido-1.5.min.css" />
@@ -146,7 +146,7 @@
<div id="breadcrumbs">
<ul class="breadcrumb">
<li id="publishDate">Last Published: 2018-12-16
<li id="publishDate">Last Published: 2018-12-18
<span class="divider">|</span>
</li>
<li id="projectVersion">Version: 2.1.0.BUILD-SNAPSHOT

View File

@@ -1,13 +1,13 @@
<!DOCTYPE html>
<!--
| Generated by Apache Maven Doxia Site Renderer 1.8.1 at 2018-12-16
| Generated by Apache Maven Doxia Site Renderer 1.8.1 at 2018-12-18
| Rendered using Apache Maven Fluido Skin 1.5
-->
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="Date-Revision-yyyymmdd" content="20181216" />
<meta name="Date-Revision-yyyymmdd" content="20181218" />
<meta http-equiv="Content-Language" content="en" />
<title>Spring Cloud Contract Maven Plugin &#x2013; spring-cloud-contract:help</title>
<link rel="stylesheet" href="./css/apache-maven-fluido-1.5.min.css" />
@@ -146,7 +146,7 @@
<div id="breadcrumbs">
<ul class="breadcrumb">
<li id="publishDate">Last Published: 2018-12-16
<li id="publishDate">Last Published: 2018-12-18
<span class="divider">|</span>
</li>
<li id="projectVersion">Version: 2.1.0.BUILD-SNAPSHOT

View File

@@ -1,13 +1,13 @@
<!DOCTYPE html>
<!--
| Generated by Apache Maven Doxia Site Renderer 1.8.1 at 2018-12-16
| Generated by Apache Maven Doxia Site Renderer 1.8.1 at 2018-12-18
| Rendered using Apache Maven Fluido Skin 1.5
-->
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="Date-Revision-yyyymmdd" content="20181216" />
<meta name="Date-Revision-yyyymmdd" content="20181218" />
<meta http-equiv="Content-Language" content="en" />
<title>Spring Cloud Contract Maven Plugin &#x2013; </title>
<link rel="stylesheet" href="./css/apache-maven-fluido-1.5.min.css" />
@@ -146,7 +146,7 @@
<div id="breadcrumbs">
<ul class="breadcrumb">
<li id="publishDate">Last Published: 2018-12-16
<li id="publishDate">Last Published: 2018-12-18
<span class="divider">|</span>
</li>
<li id="projectVersion">Version: 2.1.0.BUILD-SNAPSHOT

View File

@@ -1,13 +1,13 @@
<!DOCTYPE html>
<!--
| Generated by Apache Maven Doxia Site Renderer 1.8.1 at 2018-12-16
| Generated by Apache Maven Doxia Site Renderer 1.8.1 at 2018-12-18
| Rendered using Apache Maven Fluido Skin 1.5
-->
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="Date-Revision-yyyymmdd" content="20181216" />
<meta name="Date-Revision-yyyymmdd" content="20181218" />
<meta http-equiv="Content-Language" content="en" />
<title>Spring Cloud Contract Maven Plugin &#x2013; Issue Management</title>
<link rel="stylesheet" href="./css/apache-maven-fluido-1.5.min.css" />
@@ -146,7 +146,7 @@
<div id="breadcrumbs">
<ul class="breadcrumb">
<li id="publishDate">Last Published: 2018-12-16
<li id="publishDate">Last Published: 2018-12-18
<span class="divider">|</span>
</li>
<li id="projectVersion">Version: 2.1.0.BUILD-SNAPSHOT

View File

@@ -1,13 +1,13 @@
<!DOCTYPE html>
<!--
| Generated by Apache Maven Doxia Site Renderer 1.8.1 at 2018-12-16
| Generated by Apache Maven Doxia Site Renderer 1.8.1 at 2018-12-18
| Rendered using Apache Maven Fluido Skin 1.5
-->
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="Date-Revision-yyyymmdd" content="20181216" />
<meta name="Date-Revision-yyyymmdd" content="20181218" />
<meta http-equiv="Content-Language" content="en" />
<title>Spring Cloud Contract Maven Plugin &#x2013; </title>
<link rel="stylesheet" href="./css/apache-maven-fluido-1.5.min.css" />
@@ -146,7 +146,7 @@
<div id="breadcrumbs">
<ul class="breadcrumb">
<li id="publishDate">Last Published: 2018-12-16
<li id="publishDate">Last Published: 2018-12-18
<span class="divider">|</span>
</li>
<li id="projectVersion">Version: 2.1.0.BUILD-SNAPSHOT

View File

@@ -1,13 +1,13 @@
<!DOCTYPE html>
<!--
| Generated by Apache Maven Doxia Site Renderer 1.8.1 at 2018-12-16
| Generated by Apache Maven Doxia Site Renderer 1.8.1 at 2018-12-18
| Rendered using Apache Maven Fluido Skin 1.5
-->
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="Date-Revision-yyyymmdd" content="20181216" />
<meta name="Date-Revision-yyyymmdd" content="20181218" />
<meta http-equiv="Content-Language" content="en" />
<title>Spring Cloud Contract Maven Plugin &#x2013; Project Licenses</title>
<link rel="stylesheet" href="./css/apache-maven-fluido-1.5.min.css" />
@@ -146,7 +146,7 @@
<div id="breadcrumbs">
<ul class="breadcrumb">
<li id="publishDate">Last Published: 2018-12-16
<li id="publishDate">Last Published: 2018-12-18
<span class="divider">|</span>
</li>
<li id="projectVersion">Version: 2.1.0.BUILD-SNAPSHOT

View File

@@ -1,13 +1,13 @@
<!DOCTYPE html>
<!--
| Generated by Apache Maven Doxia Site Renderer 1.8.1 at 2018-12-16
| Generated by Apache Maven Doxia Site Renderer 1.8.1 at 2018-12-18
| Rendered using Apache Maven Fluido Skin 1.5
-->
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="Date-Revision-yyyymmdd" content="20181216" />
<meta name="Date-Revision-yyyymmdd" content="20181218" />
<meta http-equiv="Content-Language" content="en" />
<title>Spring Cloud Contract Maven Plugin &#x2013; Plugin Documentation</title>
<link rel="stylesheet" href="./css/apache-maven-fluido-1.5.min.css" />
@@ -146,7 +146,7 @@
<div id="breadcrumbs">
<ul class="breadcrumb">
<li id="publishDate">Last Published: 2018-12-16
<li id="publishDate">Last Published: 2018-12-18
<span class="divider">|</span>
</li>
<li id="projectVersion">Version: 2.1.0.BUILD-SNAPSHOT

View File

@@ -1,13 +1,13 @@
<!DOCTYPE html>
<!--
| Generated by Apache Maven Doxia Site Renderer 1.8.1 at 2018-12-16
| Generated by Apache Maven Doxia Site Renderer 1.8.1 at 2018-12-18
| Rendered using Apache Maven Fluido Skin 1.5
-->
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="Date-Revision-yyyymmdd" content="20181216" />
<meta name="Date-Revision-yyyymmdd" content="20181218" />
<meta http-equiv="Content-Language" content="en" />
<title>Spring Cloud Contract Maven Plugin &#x2013; Project Plugin Management</title>
<link rel="stylesheet" href="./css/apache-maven-fluido-1.5.min.css" />
@@ -146,7 +146,7 @@
<div id="breadcrumbs">
<ul class="breadcrumb">
<li id="publishDate">Last Published: 2018-12-16
<li id="publishDate">Last Published: 2018-12-18
<span class="divider">|</span>
</li>
<li id="projectVersion">Version: 2.1.0.BUILD-SNAPSHOT

View File

@@ -1,13 +1,13 @@
<!DOCTYPE html>
<!--
| Generated by Apache Maven Doxia Site Renderer 1.8.1 at 2018-12-16
| Generated by Apache Maven Doxia Site Renderer 1.8.1 at 2018-12-18
| Rendered using Apache Maven Fluido Skin 1.5
-->
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="Date-Revision-yyyymmdd" content="20181216" />
<meta name="Date-Revision-yyyymmdd" content="20181218" />
<meta http-equiv="Content-Language" content="en" />
<title>Spring Cloud Contract Maven Plugin &#x2013; Project Plugins</title>
<link rel="stylesheet" href="./css/apache-maven-fluido-1.5.min.css" />
@@ -146,7 +146,7 @@
<div id="breadcrumbs">
<ul class="breadcrumb">
<li id="publishDate">Last Published: 2018-12-16
<li id="publishDate">Last Published: 2018-12-18
<span class="divider">|</span>
</li>
<li id="projectVersion">Version: 2.1.0.BUILD-SNAPSHOT

View File

@@ -1,13 +1,13 @@
<!DOCTYPE html>
<!--
| Generated by Apache Maven Doxia Site Renderer 1.8.1 at 2018-12-16
| Generated by Apache Maven Doxia Site Renderer 1.8.1 at 2018-12-18
| Rendered using Apache Maven Fluido Skin 1.5
-->
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="Date-Revision-yyyymmdd" content="20181216" />
<meta name="Date-Revision-yyyymmdd" content="20181218" />
<meta http-equiv="Content-Language" content="en" />
<title>Spring Cloud Contract Maven Plugin &#x2013; Project Information</title>
<link rel="stylesheet" href="./css/apache-maven-fluido-1.5.min.css" />
@@ -146,7 +146,7 @@
<div id="breadcrumbs">
<ul class="breadcrumb">
<li id="publishDate">Last Published: 2018-12-16
<li id="publishDate">Last Published: 2018-12-18
<span class="divider">|</span>
</li>
<li id="projectVersion">Version: 2.1.0.BUILD-SNAPSHOT

View File

@@ -1,13 +1,13 @@
<!DOCTYPE html>
<!--
| Generated by Apache Maven Doxia Site Renderer 1.8.1 at 2018-12-16
| Generated by Apache Maven Doxia Site Renderer 1.8.1 at 2018-12-18
| Rendered using Apache Maven Fluido Skin 1.5
-->
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="Date-Revision-yyyymmdd" content="20181216" />
<meta name="Date-Revision-yyyymmdd" content="20181218" />
<meta http-equiv="Content-Language" content="en" />
<title>Spring Cloud Contract Maven Plugin &#x2013; Generated Reports</title>
<link rel="stylesheet" href="./css/apache-maven-fluido-1.5.min.css" />
@@ -146,7 +146,7 @@
<div id="breadcrumbs">
<ul class="breadcrumb">
<li id="publishDate">Last Published: 2018-12-16
<li id="publishDate">Last Published: 2018-12-18
<span class="divider">|</span>
</li>
<li id="projectVersion">Version: 2.1.0.BUILD-SNAPSHOT

View File

@@ -1,13 +1,13 @@
<!DOCTYPE html>
<!--
| Generated by Apache Maven Doxia Site Renderer 1.8.1 at 2018-12-16
| Generated by Apache Maven Doxia Site Renderer 1.8.1 at 2018-12-18
| Rendered using Apache Maven Fluido Skin 1.5
-->
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="Date-Revision-yyyymmdd" content="20181216" />
<meta name="Date-Revision-yyyymmdd" content="20181218" />
<meta http-equiv="Content-Language" content="en" />
<title>Spring Cloud Contract Maven Plugin &#x2013; spring-cloud-contract:pushStubsToScm</title>
<link rel="stylesheet" href="./css/apache-maven-fluido-1.5.min.css" />
@@ -146,7 +146,7 @@
<div id="breadcrumbs">
<ul class="breadcrumb">
<li id="publishDate">Last Published: 2018-12-16
<li id="publishDate">Last Published: 2018-12-18
<span class="divider">|</span>
</li>
<li id="projectVersion">Version: 2.1.0.BUILD-SNAPSHOT

View File

@@ -1,13 +1,13 @@
<!DOCTYPE html>
<!--
| Generated by Apache Maven Doxia Site Renderer 1.8.1 at 2018-12-16
| Generated by Apache Maven Doxia Site Renderer 1.8.1 at 2018-12-18
| Rendered using Apache Maven Fluido Skin 1.5
-->
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="Date-Revision-yyyymmdd" content="20181216" />
<meta name="Date-Revision-yyyymmdd" content="20181218" />
<meta http-equiv="Content-Language" content="en" />
<title>Spring Cloud Contract Maven Plugin &#x2013; spring-cloud-contract:run</title>
<link rel="stylesheet" href="./css/apache-maven-fluido-1.5.min.css" />
@@ -146,7 +146,7 @@
<div id="breadcrumbs">
<ul class="breadcrumb">
<li id="publishDate">Last Published: 2018-12-16
<li id="publishDate">Last Published: 2018-12-18
<span class="divider">|</span>
</li>
<li id="projectVersion">Version: 2.1.0.BUILD-SNAPSHOT

View File

@@ -1,13 +1,13 @@
<!DOCTYPE html>
<!--
| Generated by Apache Maven Doxia Site Renderer 1.8.1 at 2018-12-16
| Generated by Apache Maven Doxia Site Renderer 1.8.1 at 2018-12-18
| Rendered using Apache Maven Fluido Skin 1.5
-->
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="Date-Revision-yyyymmdd" content="20181216" />
<meta name="Date-Revision-yyyymmdd" content="20181218" />
<meta http-equiv="Content-Language" content="en" />
<title>Spring Cloud Contract Maven Plugin &#x2013; Source Code Management</title>
<link rel="stylesheet" href="./css/apache-maven-fluido-1.5.min.css" />
@@ -146,7 +146,7 @@
<div id="breadcrumbs">
<ul class="breadcrumb">
<li id="publishDate">Last Published: 2018-12-16
<li id="publishDate">Last Published: 2018-12-18
<span class="divider">|</span>
</li>
<li id="projectVersion">Version: 2.1.0.BUILD-SNAPSHOT

View File

@@ -1,13 +1,13 @@
<!DOCTYPE html>
<!--
| Generated by Apache Maven Doxia Site Renderer 1.8.1 at 2018-12-16
| Generated by Apache Maven Doxia Site Renderer 1.8.1 at 2018-12-18
| Rendered using Apache Maven Fluido Skin 1.5
-->
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="Date-Revision-yyyymmdd" content="20181216" />
<meta name="Date-Revision-yyyymmdd" content="20181218" />
<meta http-equiv="Content-Language" content="en" />
<title>Spring Cloud Contract Maven Plugin &#x2013; Sitemap</title>
<link rel="stylesheet" href="./css/apache-maven-fluido-1.5.min.css" />
@@ -146,7 +146,7 @@
<div id="breadcrumbs">
<ul class="breadcrumb">
<li id="publishDate">Last Published: 2018-12-16
<li id="publishDate">Last Published: 2018-12-18
<span class="divider">|</span>
</li>
<li id="projectVersion">Version: 2.1.0.BUILD-SNAPSHOT

View File

@@ -1,13 +1,13 @@
<!DOCTYPE html>
<!--
| Generated by Apache Maven Doxia Site Renderer 1.8.1 at 2018-12-16
| Generated by Apache Maven Doxia Site Renderer 1.8.1 at 2018-12-18
| Rendered using Apache Maven Fluido Skin 1.5
-->
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="Date-Revision-yyyymmdd" content="20181216" />
<meta name="Date-Revision-yyyymmdd" content="20181218" />
<meta http-equiv="Content-Language" content="en" />
<title>Spring Cloud Contract Maven Plugin &#x2013; </title>
<link rel="stylesheet" href="./css/apache-maven-fluido-1.5.min.css" />
@@ -146,7 +146,7 @@
<div id="breadcrumbs">
<ul class="breadcrumb">
<li id="publishDate">Last Published: 2018-12-16
<li id="publishDate">Last Published: 2018-12-18
<span class="divider">|</span>
</li>
<li id="projectVersion">Version: 2.1.0.BUILD-SNAPSHOT

View File

@@ -1,13 +1,13 @@
<!DOCTYPE html>
<!--
| Generated by Apache Maven Doxia Site Renderer 1.8.1 at 2018-12-16
| Generated by Apache Maven Doxia Site Renderer 1.8.1 at 2018-12-18
| Rendered using Apache Maven Fluido Skin 1.5
-->
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="Date-Revision-yyyymmdd" content="20181216" />
<meta name="Date-Revision-yyyymmdd" content="20181218" />
<meta http-equiv="Content-Language" content="en" />
<title>Spring Cloud Contract Maven Plugin &#x2013; Project Summary</title>
<link rel="stylesheet" href="./css/apache-maven-fluido-1.5.min.css" />
@@ -146,7 +146,7 @@
<div id="breadcrumbs">
<ul class="breadcrumb">
<li id="publishDate">Last Published: 2018-12-16
<li id="publishDate">Last Published: 2018-12-18
<span class="divider">|</span>
</li>
<li id="projectVersion">Version: 2.1.0.BUILD-SNAPSHOT

View File

@@ -1,13 +1,13 @@
<!DOCTYPE html>
<!--
| Generated by Apache Maven Doxia Site Renderer 1.8.1 at 2018-12-16
| Generated by Apache Maven Doxia Site Renderer 1.8.1 at 2018-12-18
| Rendered using Apache Maven Fluido Skin 1.5
-->
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="Date-Revision-yyyymmdd" content="20181216" />
<meta name="Date-Revision-yyyymmdd" content="20181218" />
<meta http-equiv="Content-Language" content="en" />
<title>Spring Cloud Contract Maven Plugin &#x2013; Project Team</title>
<link rel="stylesheet" href="./css/apache-maven-fluido-1.5.min.css" />
@@ -146,7 +146,7 @@
<div id="breadcrumbs">
<ul class="breadcrumb">
<li id="publishDate">Last Published: 2018-12-16
<li id="publishDate">Last Published: 2018-12-18
<span class="divider">|</span>
</li>
<li id="projectVersion">Version: 2.1.0.BUILD-SNAPSHOT
@@ -346,7 +346,12 @@
<td><img src="https://www.gravatar.com/avatar/035ae18f5f948ab3c8a5cbf40bbea383?d=mm&amp;s=60" alt="" /></td>
<td><a name="dsyer"></a>dsyer</td>
<td>David Syer</td>
<td><a href="dsyer@pivotal.io">dsyer@pivotal.io</a></td></tr></table></div>
<td><a href="dsyer@pivotal.io">dsyer@pivotal.io</a></td></tr>
<tr class="a">
<td><img src="https://www.gravatar.com/avatar/3fe0243d6874044618145c0339617da4?d=mm&amp;s=60" alt="" /></td>
<td><a name="OlgaMaciaszek"></a>OlgaMaciaszek</td>
<td>Olga Maciaszek-Sharma</td>
<td><a href="omaciaszeksharma@pivotal.io">omaciaszeksharma@pivotal.io</a></td></tr></table></div>
<div class="section">
<h3><a name="Contributors"></a>Contributors</h3><a name="Contributors"></a>
<p>There are no contributors listed for this project. Please check back again later.</p></div></div>

View File

@@ -1,13 +1,13 @@
<!DOCTYPE html>
<!--
| Generated by Apache Maven Doxia Site Renderer 1.8.1 at 2018-12-16
| Generated by Apache Maven Doxia Site Renderer 1.8.1 at 2018-12-18
| Rendered using Apache Maven Fluido Skin 1.5
-->
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="Date-Revision-yyyymmdd" content="20181216" />
<meta name="Date-Revision-yyyymmdd" content="20181218" />
<meta http-equiv="Content-Language" content="en" />
<title>Spring Cloud Contract Maven Plugin &#x2013; </title>
<link rel="stylesheet" href="./css/apache-maven-fluido-1.5.min.css" />
@@ -146,7 +146,7 @@
<div id="breadcrumbs">
<ul class="breadcrumb">
<li id="publishDate">Last Published: 2018-12-16
<li id="publishDate">Last Published: 2018-12-18
<span class="divider">|</span>
</li>
<li id="projectVersion">Version: 2.1.0.BUILD-SNAPSHOT

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-12-16</date>
<date>2018-12-12</date>
</info>
<preface>
<title></title>
@@ -2324,33 +2324,6 @@ was started will be attached.</simpara>
DSL and provide a path relative to where the contract lays.
If you&#8217;re using YAML just use the <literal>bodyFromFile</literal> property.</simpara>
</section>
<section xml:id="_why_do_i_sometimes_get_socketexception">
<title>Why do I sometimes get <literal>SocketException</literal></title>
<simpara>When using an HTTP client (e.g. <literal>RestTemplate</literal>) and running several tests that share a Spring context, you might sometimes get the following exception:</simpara>
<screen>java.net.SocketException: Unexpected end of file from server</screen>
<simpara>Tom Akehurst, the creator of WireMock did the following analysis of this issue.</simpara>
<blockquote>
<simpara>I looked at tcpdump while running the failing test. <literal>HttpUrlConnection</literal> is doing something weird - it&#8217;s creating a connection in a previous test case, which works fine, then the usual <literal>fin</literal> &#8594; <literal>fin ack</literal> etc. ending handshake happens. But it seems it isn&#8217;t discarded, but reused after that. Because the server thinks (rightly) that the connection is closed, it just sends a RST packet. Calling the <literal>/__admin</literal> endpoint just happened to remove the dead connection from the pool. This also fixes the problem (which using the Java HTTP client): System.setProperty("http.keepAlive", "false");</simpara>
</blockquote>
<simpara>There are the ways to solve this problem.</simpara>
<simpara>First, just use a different HTTP client for <literal>RestTemplate</literal>. Example for using Apache HTTP client:</simpara>
<formalpara>
<title>pom.xml</title>
<para>
<programlisting language="xml" linenumbering="unnumbered">&lt;dependency&gt;
&lt;groupId&gt;org.apache.httpcomponents&lt;/groupId&gt;
&lt;artifactId&gt;httpclient&lt;/artifactId&gt;
&lt;scope&gt;compile&lt;/scope&gt;
&lt;/dependency&gt;</programlisting>
</para>
</formalpara>
<programlisting language="java" linenumbering="unnumbered">this.restTemplate
.setRequestFactory(new HttpComponentsClientHttpRequestFactory());</programlisting>
<simpara>Second option is to set the system property. You can set it either in code or pass it to your tests via a plugin.</simpara>
<programlisting language="java" linenumbering="unnumbered">static {
System.setProperty("http.keepAlive", "false");
}</programlisting>
</section>
</section>
</chapter>
<chapter xml:id="_spring_cloud_contract_verifier_setup">
@@ -6244,7 +6217,7 @@ Contract.make {
status OK()
body(file("response.json"))
headers {
contentType(textPlain())
contentType(applicationJson())
}
}
}</programlisting>
@@ -6264,9 +6237,13 @@ response:
</formalpara>
<simpara>Further assume that the JSON files is as follows:</simpara>
<simpara><emphasis role="strong">request.json</emphasis></simpara>
<programlisting language="json" linenumbering="unnumbered">{ "status" : "REQUEST" }</programlisting>
<programlisting language="json" linenumbering="unnumbered">{
"status": "REQUEST"
}</programlisting>
<simpara><emphasis role="strong">response.json</emphasis></simpara>
<programlisting language="json" linenumbering="unnumbered">{ "status" : "RESPONSE" }</programlisting>
<programlisting language="json" linenumbering="unnumbered">{
"status": "RESPONSE"
}</programlisting>
<simpara>When test or stub generation takes place, the contents of the file is passed to the body
of a request or a response. The name of the file needs to be a file with location
relative to the folder in which the contract lays.</simpara>
@@ -9385,8 +9362,8 @@ following code listing shows the <literal>SingleTestGenerator</literal> interfac
* @deprecated use {@link SingleTestGenerator#buildClass(ContractVerifierConfigProperties, Collection, String, GeneratedClassData)}
*/
@Deprecated
String buildClass(ContractVerifierConfigProperties properties,
Collection&lt;ContractMetadata&gt; listOfFiles, String className, String classPackage, String includedDirectoryRelativePath);
abstract String buildClass(ContractVerifierConfigProperties properties,
Collection&lt;ContractMetadata&gt; listOfFiles, String className, String classPackage, String includedDirectoryRelativePath)
/**
* Creates contents of a single test class in which all test scenarios from
@@ -9398,9 +9375,9 @@ following code listing shows the <literal>SingleTestGenerator</literal> interfac
* @param includedDirectoryRelativePath - relative path to the included directory
* @return contents of a single test class
*/
default String buildClass(ContractVerifierConfigProperties properties,
String buildClass(ContractVerifierConfigProperties properties,
Collection&lt;ContractMetadata&gt; listOfFiles, String includedDirectoryRelativePath, GeneratedClassData generatedClassData) {
return buildClass(properties, listOfFiles, generatedClassData.className, generatedClassData.classPackage, includedDirectoryRelativePath);
return buildClass(properties, listOfFiles, generatedClassData.className, generatedClassData.classPackage, includedDirectoryRelativePath)
}
/**
@@ -9408,18 +9385,18 @@ following code listing shows the <literal>SingleTestGenerator</literal> interfac
*
* @param properties - properties passed to the plugin
*/
String fileExtension(ContractVerifierConfigProperties properties);
abstract String fileExtension(ContractVerifierConfigProperties properties)
class GeneratedClassData {
public final String className;
public final String classPackage;
public final java.nio.file.Path testClassPath;
static class GeneratedClassData {
public final String className
public final String classPackage
public final java.nio.file.Path testClassPath
public GeneratedClassData(String className, String classPackage,
GeneratedClassData(String className, String classPackage,
java.nio.file.Path testClassPath) {
this.className = className;
this.classPackage = classPackage;
this.testClassPath = testClassPath;
this.className = className
this.classPackage = classPackage
this.testClassPath = testClassPath
}
}
}</programlisting>