diff --git a/2.0.x/multi/multi__customization.html b/2.0.x/multi/multi__customization.html index 3522c8d4ec..5b5a284ccd 100644 --- a/2.0.x/multi/multi__customization.html +++ b/2.0.x/multi/multi__customization.html @@ -173,45 +173,4 @@ following example:

Maven.  </plugin>

Gradle. 

classpath "com.example:beer-common:0.0.1-SNAPSHOT"

-

9.1.5 Referencing classes in DSLs

You can now reference your classes in your DSL, as shown in the following example:

package contracts.beer.rest
-
-import com.example.ConsumerUtils
-import com.example.ProducerUtils
-import org.springframework.cloud.contract.spec.Contract
-
-Contract.make {
-	description("""
-Represents a successful scenario of getting a beer
-
-```
-given:
-	client is old enough
-when:
-	he applies for a beer
-then:
-	we'll grant him the beer
-```
-
-""")
-	request {
-		method 'POST'
-		url '/check'
-		body(
-				age: $(ConsumerUtils.oldEnough())
-		)
-		headers {
-			contentType(applicationJson())
-		}
-	}
-	response {
-		status 200
-		body("""
-			{
-				"status": "${value(ProducerUtils.ok())}"
-			}
-			""")
-		headers {
-			contentType(applicationJson())
-		}
-	}
-}
\ No newline at end of file +

9.1.5 Referencing classes in DSLs

You can now reference your classes in your DSL, as shown in the following example:

Unresolved directive in verifier_contract.adoc - include::https://raw.githubusercontent.com/spring-cloud-samples/spring-cloud-contract-samples/master/producer/src/test/resources/contracts/beer/rest/shouldGrantABeerIfOldEnough.groovy[indent=0]
\ No newline at end of file diff --git a/2.0.x/multi/multi__spring_cloud_contract_stub_runner.html b/2.0.x/multi/multi__spring_cloud_contract_stub_runner.html index c8f3a9b83e..01b281f817 100644 --- a/2.0.x/multi/multi__spring_cloud_contract_stub_runner.html +++ b/2.0.x/multi/multi__spring_cloud_contract_stub_runner.html @@ -71,31 +71,10 @@ versions, which are automatically uploaded after every successful build:

[Tip]Tip

For both Maven and Gradle, the setup comes ready to work. However, you can customize it if you want to.

Maven. 

<!-- First disable the default jar setup in the properties section -->
-<!-- we don't want the verifier to do a jar for us -->
-<spring.cloud.contract.verifier.skip>true</spring.cloud.contract.verifier.skip>
+Unresolved directive in verifier_stubrunner.adoc - include::https://raw.githubusercontent.com/spring-cloud-samples/spring-cloud-contract-samples/master/producer_with_restdocs/pom.xml[tags=skip_jar,indent=0]
 
 <!-- Next add the assembly plugin to your build -->
-<!-- we want the assembly plugin to generate the JAR -->
-<plugin>
-	<groupId>org.apache.maven.plugins</groupId>
-	<artifactId>maven-assembly-plugin</artifactId>
-	<executions>
-		<execution>
-			<id>stub</id>
-			<phase>prepare-package</phase>
-			<goals>
-				<goal>single</goal>
-			</goals>
-			<inherited>false</inherited>
-			<configuration>
-				<attach>true</attach>
-				<descriptors>
-					${basedir}/src/assembly/stub.xml
-				</descriptors>
-			</configuration>
-		</execution>
-	</executions>
-</plugin>
+Unresolved directive in verifier_stubrunner.adoc - include::https://raw.githubusercontent.com/spring-cloud-samples/spring-cloud-contract-samples/master/producer_with_restdocs/pom.xml[tags=assembly,indent=0]
 
 <!-- Finally setup your assembly. Below you can find the contents of src/main/assembly/stub.xml -->
 <assembly
diff --git a/2.0.x/single/spring-cloud-contract.html b/2.0.x/single/spring-cloud-contract.html
index 0d8c692517..f0f65f229a 100644
--- a/2.0.x/single/spring-cloud-contract.html
+++ b/2.0.x/single/spring-cloud-contract.html
@@ -2439,31 +2439,10 @@ versions, which are automatically uploaded after every successful build:

[Tip]Tip

For both Maven and Gradle, the setup comes ready to work. However, you can customize it if you want to.

Maven. 

<!-- First disable the default jar setup in the properties section -->
-<!-- we don't want the verifier to do a jar for us -->
-<spring.cloud.contract.verifier.skip>true</spring.cloud.contract.verifier.skip>
+Unresolved directive in verifier_stubrunner.adoc - include::https://raw.githubusercontent.com/spring-cloud-samples/spring-cloud-contract-samples/master/producer_with_restdocs/pom.xml[tags=skip_jar,indent=0]
 
 <!-- Next add the assembly plugin to your build -->
-<!-- we want the assembly plugin to generate the JAR -->
-<plugin>
-	<groupId>org.apache.maven.plugins</groupId>
-	<artifactId>maven-assembly-plugin</artifactId>
-	<executions>
-		<execution>
-			<id>stub</id>
-			<phase>prepare-package</phase>
-			<goals>
-				<goal>single</goal>
-			</goals>
-			<inherited>false</inherited>
-			<configuration>
-				<attach>true</attach>
-				<descriptors>
-					${basedir}/src/assembly/stub.xml
-				</descriptors>
-			</configuration>
-		</execution>
-	</executions>
-</plugin>
+Unresolved directive in verifier_stubrunner.adoc - include::https://raw.githubusercontent.com/spring-cloud-samples/spring-cloud-contract-samples/master/producer_with_restdocs/pom.xml[tags=assembly,indent=0]
 
 <!-- Finally setup your assembly. Below you can find the contents of src/main/assembly/stub.xml -->
 <assembly
@@ -5509,48 +5488,7 @@ following example:

Maven.  </plugin>

Gradle. 

classpath "com.example:beer-common:0.0.1-SNAPSHOT"

-

9.1.5 Referencing classes in DSLs

You can now reference your classes in your DSL, as shown in the following example:

package contracts.beer.rest
-
-import com.example.ConsumerUtils
-import com.example.ProducerUtils
-import org.springframework.cloud.contract.spec.Contract
-
-Contract.make {
-	description("""
-Represents a successful scenario of getting a beer
-
-```
-given:
-	client is old enough
-when:
-	he applies for a beer
-then:
-	we'll grant him the beer
-```
-
-""")
-	request {
-		method 'POST'
-		url '/check'
-		body(
-				age: $(ConsumerUtils.oldEnough())
-		)
-		headers {
-			contentType(applicationJson())
-		}
-	}
-	response {
-		status 200
-		body("""
-			{
-				"status": "${value(ProducerUtils.ok())}"
-			}
-			""")
-		headers {
-			contentType(applicationJson())
-		}
-	}
-}

10. Using the Pluggable Architecture

You may encounter cases where you have your contracts have been defined in other formats, +

9.1.5 Referencing classes in DSLs

You can now reference your classes in your DSL, as shown in the following example:

Unresolved directive in verifier_contract.adoc - include::https://raw.githubusercontent.com/spring-cloud-samples/spring-cloud-contract-samples/master/producer/src/test/resources/contracts/beer/rest/shouldGrantABeerIfOldEnough.groovy[indent=0]

10. Using the Pluggable Architecture

You may encounter cases where you have your contracts have been defined in other formats, such as YAML, RAML or PACT. In those cases, you still want to benefit from the automatic generation of tests and stubs. You can add your own implementation for generating both tests and stubs. Also, you can customize the way tests are generated (for example, you diff --git a/2.0.x/spring-cloud-contract.xml b/2.0.x/spring-cloud-contract.xml index 9bcae11cf4..00926a928c 100644 --- a/2.0.x/spring-cloud-contract.xml +++ b/2.0.x/spring-cloud-contract.xml @@ -4,7 +4,7 @@ Spring Cloud Contract -2018-08-11 +2018-08-12 @@ -4162,31 +4162,10 @@ it if you want to. Maven <!-- First disable the default jar setup in the properties section --> -<!-- we don't want the verifier to do a jar for us --> -<spring.cloud.contract.verifier.skip>true</spring.cloud.contract.verifier.skip> +Unresolved directive in verifier_stubrunner.adoc - include::https://raw.githubusercontent.com/spring-cloud-samples/spring-cloud-contract-samples/master/producer_with_restdocs/pom.xml[tags=skip_jar,indent=0] <!-- Next add the assembly plugin to your build --> -<!-- we want the assembly plugin to generate the JAR --> -<plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-assembly-plugin</artifactId> - <executions> - <execution> - <id>stub</id> - <phase>prepare-package</phase> - <goals> - <goal>single</goal> - </goals> - <inherited>false</inherited> - <configuration> - <attach>true</attach> - <descriptors> - ${basedir}/src/assembly/stub.xml - </descriptors> - </configuration> - </execution> - </executions> -</plugin> +Unresolved directive in verifier_stubrunner.adoc - include::https://raw.githubusercontent.com/spring-cloud-samples/spring-cloud-contract-samples/master/producer_with_restdocs/pom.xml[tags=assembly,indent=0] <!-- Finally setup your assembly. Below you can find the contents of src/main/assembly/stub.xml --> <assembly @@ -8800,48 +8779,7 @@ following example:

Referencing classes in DSLs You can now reference your classes in your DSL, as shown in the following example: -package contracts.beer.rest - -import com.example.ConsumerUtils -import com.example.ProducerUtils -import org.springframework.cloud.contract.spec.Contract - -Contract.make { - description(""" -Represents a successful scenario of getting a beer - -``` -given: - client is old enough -when: - he applies for a beer -then: - we'll grant him the beer -``` - -""") - request { - method 'POST' - url '/check' - body( - age: $(ConsumerUtils.oldEnough()) - ) - headers { - contentType(applicationJson()) - } - } - response { - status 200 - body(""" - { - "status": "${value(ProducerUtils.ok())}" - } - """) - headers { - contentType(applicationJson()) - } - } -} +Unresolved directive in verifier_contract.adoc - include::https://raw.githubusercontent.com/spring-cloud-samples/spring-cloud-contract-samples/master/producer/src/test/resources/contracts/beer/rest/shouldGrantABeerIfOldEnough.groovy[indent=0]