From 76edee5019838aca57268c8736850d65e807d5d6 Mon Sep 17 00:00:00 2001 From: Marcin Grzejszczak Date: Mon, 20 Jun 2016 13:45:52 +0200 Subject: [PATCH] Updated the docs --- docs/src/main/asciidoc/contract.adoc | 4 +++- .../verifier/builder/MockMvcMethodBodyBuilderSpec.groovy | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/src/main/asciidoc/contract.adoc b/docs/src/main/asciidoc/contract.adoc index a5c0545ca6..a7216e3bd0 100644 --- a/docs/src/main/asciidoc/contract.adoc +++ b/docs/src/main/asciidoc/contract.adoc @@ -5,7 +5,9 @@ == Contract DSL IMPORTANT: Remember that inside the contract file you have to provide the fully qualified name to -the `Contract` class and the `make` static import i.e. `org.springframework.cloud.contract.verifier.dsl.Contract.make { ... }` +the `Contract` class and the `make` static import i.e. `org.springframework.cloud.contract.verifier.dsl.Contract.make { ... }`. +You can also provide an import to the `Contract` class `import org.springframework.cloud.contract.verifier.dsl.Contract` and then call + `Contract.make { ... }` Contract DSL is written in Groovy, but don't be alarmed if you didn't use Groovy before. Knowledge of the language is not really needed as our DSL uses only a tiny subset of it (namely literals, method calls and closures). What's more the DSL is designed to be programmer-readable without any knowledge of the DSL itself - diff --git a/spring-cloud-contract-verifier/spring-cloud-contract-verifier-core/src/test/groovy/org/springframework/cloud/contract/verifier/builder/MockMvcMethodBodyBuilderSpec.groovy b/spring-cloud-contract-verifier/spring-cloud-contract-verifier-core/src/test/groovy/org/springframework/cloud/contract/verifier/builder/MockMvcMethodBodyBuilderSpec.groovy index 3b2e77c4b5..42a9c7db8c 100644 --- a/spring-cloud-contract-verifier/spring-cloud-contract-verifier-core/src/test/groovy/org/springframework/cloud/contract/verifier/builder/MockMvcMethodBodyBuilderSpec.groovy +++ b/spring-cloud-contract-verifier/spring-cloud-contract-verifier-core/src/test/groovy/org/springframework/cloud/contract/verifier/builder/MockMvcMethodBodyBuilderSpec.groovy @@ -1398,7 +1398,7 @@ World.'''""" Contract dslForDocs = // tag::dsl_example[] - Contract.make { + org.springframework.cloud.contract.verifier.dsl.Contract.make { request { method 'PUT' url '/api/12'