Sync docs from master to gh-pages
This commit is contained in:
@@ -4569,6 +4569,65 @@ the <code>Contract</code> class (<code>import org.springframework.cloud.spec.Con
|
||||
Just like the with the Java DSL you can put your contracts in any directory of your choice.
|
||||
The Maven and Gradle plugins will look at the <code>src/test/resources/contracts</code> directory by default.</p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>You need to explicitly pass the the <code>spring-cloud-contract-spec-kotlin</code> dependency to your project plugin setup.</p>
|
||||
</div>
|
||||
<div class="exampleblock">
|
||||
<div class="content">
|
||||
<div class="listingblock primary">
|
||||
<div class="title">Maven</div>
|
||||
<div class="content">
|
||||
<pre class="highlightjs highlight"><code class="language-xml hljs" data-lang="xml"><plugin>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-contract-maven-plugin</artifactId>
|
||||
<version>${spring-cloud-contract.version}</version>
|
||||
<extensions>true</extensions>
|
||||
<configuration>
|
||||
<!-- some config -->
|
||||
</configuration>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-contract-spec-kotlin</artifactId>
|
||||
<version>${spring-cloud-contract.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</plugin>
|
||||
|
||||
<dependencies>
|
||||
<!-- Remember to add this for the DSL support in the IDE and on the consumer side -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-contract-spec-kotlin</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies></code></pre>
|
||||
</div>
|
||||
</div>
|
||||
<div class="listingblock secondary">
|
||||
<div class="title">Gradle</div>
|
||||
<div class="content">
|
||||
<pre class="highlightjs highlight"><code class="language-groovy hljs" data-lang="groovy">buildscript {
|
||||
repositories {
|
||||
// ...
|
||||
}
|
||||
dependencies {
|
||||
classpath "org.springframework.cloud:spring-cloud-contract-gradle-plugin:${scContractVersion}"
|
||||
// remember to add this:
|
||||
classpath "org.springframework.cloud:spring-cloud-contract-spec-kotlin:${scContractVersion}"
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
// ...
|
||||
|
||||
// Remember to add this for the DSL support in the IDE and on the consumer side
|
||||
testImplementation "org.springframework.cloud:spring-cloud-contract-spec-kotlin"
|
||||
}</code></pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="admonitionblock important">
|
||||
<table>
|
||||
<tr>
|
||||
@@ -15479,7 +15538,7 @@ set a <code>metaData</code> entry in the Pact file with the <code>sentTo</code>
|
||||
<h4 id="how-to-use-pact-broker-pact-contract"><a class="anchor" href="#how-to-use-pact-broker-pact-contract"></a><a class="link" href="#how-to-use-pact-broker-pact-contract">5.7.3. Pact Contract</a></h4>
|
||||
<div class="paragraph">
|
||||
<p>Spring Cloud Contract can read the Pact JSON definition. You can place the file in the
|
||||
<code>src/test/resources/contracts</code> folder. The following example shows such a Pact contract:</p>
|
||||
<code>src/test/resources/contracts</code> folder. Remember to put the <code>spring-cloud-contract-pact</code> dependency to your classpath. The following example shows such a Pact contract:</p>
|
||||
</div>
|
||||
<div class="exampleblock">
|
||||
<div class="content">
|
||||
|
||||
Reference in New Issue
Block a user