From adcdf30be57931969bf00324aca8bd55ee723ba3 Mon Sep 17 00:00:00 2001 From: Marcin Grzejszczak Date: Mon, 2 Jul 2018 14:19:10 +0200 Subject: [PATCH] Updated the docs with proper links; fixes gh-672 --- README.adoc | 18 +++--------------- docs/src/main/asciidoc/links.adoc | 12 +----------- .../main/asciidoc/spring-cloud-wiremock.adoc | 3 +-- docs/src/main/asciidoc/verifier_faq.adoc | 2 +- .../main/asciidoc/verifier_introduction.adoc | 3 +-- docs/src/main/asciidoc/verifier_messaging.adoc | 4 +--- docs/src/main/asciidoc/verifier_setup.adoc | 4 ++-- .../src/main/asciidoc/verifier_stubrunner.adoc | 1 + 8 files changed, 11 insertions(+), 36 deletions(-) diff --git a/README.adoc b/README.adoc index 4bb695ffdc..f14bd5a373 100644 --- a/README.adoc +++ b/README.adoc @@ -1035,8 +1035,7 @@ of an identifier or a timestamp, you need not hardcode a value. You want to allo different ranges of values. To enable ranges of values, you can set regular expressions matching those values for the consumer side. You can provide the body by means of either a map notation or String with interpolations. -https://cloud.spring.io/spring-cloud-contract/single/spring-cloud-contract.html#_contract_dsl[Consult the docs -for more information.] We highly recommend using the map notation! +Consult the <> section for more information. We highly recommend using the map notation! TIP: You must understand the map notation in order to set up contracts. Please read the http://groovy-lang.org/json.html[Groovy docs regarding JSON]. @@ -1447,23 +1446,13 @@ https://github.com/spring-cloud-samples/spring-cloud-contract-samples[samples]. == Links -The following links may be helpful when working with Spring Cloud Contract Verifier: +The following links may be helpful when working with Spring Cloud Contract: * https://github.com/spring-cloud/spring-cloud-contract/[Spring Cloud Contract Github Repository] * https://github.com/spring-cloud-samples/spring-cloud-contract-samples/[Spring Cloud Contract Samples] -* https://cloud.spring.io/spring-cloud-contract/spring-cloud-contract.html[Spring Cloud -Contract Documentation] -* https://cloud.spring.io/spring-cloud-contract/spring-cloud-contract.html/deprecated[Accurest -Legacy Documentation] -* https://cloud.spring.io/spring-cloud-contract/spring-cloud-contract.html/#spring-cloud-contract-stub-runner[Spring -Cloud Contract Stub Runner Documentation] -* https://cloud.spring.io/spring-cloud-contract/spring-cloud-contract.html/#stub-runner-for-messaging[Spring -Cloud Contract Stub Runner Messaging Documentation] * https://gitter.im/spring-cloud/spring-cloud-contract[Spring Cloud Contract Gitter] -* https://cloud.spring.io/spring-cloud-contract/spring-cloud-contract-maven-plugin/[Spring -Cloud Contract Maven Plugin] * https://www.youtube.com/watch?v=sAAklvxmPmk[Spring Cloud Contract WJUG Presentation by Marcin Grzejszczak] @@ -1857,8 +1846,7 @@ methods to create request matchers, but you can't use both approaches. On the consumer side, you can make the `resource.json` generated earlier in this section available on the classpath (by -https://cloud.spring.io/spring-cloud-contract/spring-cloud-contract.html#_publishing_stubs_as_jars[publishing -stubs as JARs], for example). After that, you can create a stub using WireMock in a +<> section. Calling `value()` or `$()` tells Spring Cloud Contract that you will be passing a dynamic value. Inside the `consumer()` method you pass the value that should be used on the consumer side (in the generated stub). diff --git a/docs/src/main/asciidoc/verifier_introduction.adoc b/docs/src/main/asciidoc/verifier_introduction.adoc index ba81ef9acb..d5c36e7f29 100644 --- a/docs/src/main/asciidoc/verifier_introduction.adoc +++ b/docs/src/main/asciidoc/verifier_introduction.adoc @@ -698,8 +698,7 @@ of an identifier or a timestamp, you need not hardcode a value. You want to allo different ranges of values. To enable ranges of values, you can set regular expressions matching those values for the consumer side. You can provide the body by means of either a map notation or String with interpolations. -https://cloud.spring.io/spring-cloud-contract/single/spring-cloud-contract.html#_contract_dsl[Consult the docs -for more information.] We highly recommend using the map notation! +Consult the <> section for more information. We highly recommend using the map notation! TIP: You must understand the map notation in order to set up contracts. Please read the http://groovy-lang.org/json.html[Groovy docs regarding JSON]. diff --git a/docs/src/main/asciidoc/verifier_messaging.adoc b/docs/src/main/asciidoc/verifier_messaging.adoc index 37eb497f2a..9d4432f756 100644 --- a/docs/src/main/asciidoc/verifier_messaging.adoc +++ b/docs/src/main/asciidoc/verifier_messaging.adoc @@ -180,9 +180,7 @@ include::{verifier_core_path}/src/test/groovy/org/springframework/cloud/contract Unlike the HTTP part, in messaging, we need to publish the Groovy DSL inside the JAR with a stub. Then it is parsed on the consumer side and proper stubbed routes are created. -For more information, see -https://cloud.spring.io/spring-cloud-contract/spring-cloud-contract.html/#stub-runner-for-messaging[the -Stub Runner Messaging sections]. +For more information, see <> section. [source,xml,indent=0,subs="verbatim,attributes",role="primary"] .Maven diff --git a/docs/src/main/asciidoc/verifier_setup.adoc b/docs/src/main/asciidoc/verifier_setup.adoc index aca67ea259..a308860e3a 100644 --- a/docs/src/main/asciidoc/verifier_setup.adoc +++ b/docs/src/main/asciidoc/verifier_setup.adoc @@ -438,8 +438,8 @@ include::{standalone_samples_path}/http-server/pom.xml[tags=contract_maven_plugi ---- You can read more in the -https://cloud.spring.io/spring-cloud-contract/spring-cloud-contract-maven-plugin/[Spring -Cloud Contract Maven Plugin Documentation]. +https://cloud.spring.io/spring-cloud-static/spring-cloud-contract/2.0.0.RELEASE/spring-cloud-contract-maven-plugin/[Spring +Cloud Contract Maven Plugin Documentation (example for `2.0.0.RELEASE` version)]. [[maven-rest-assured]] ==== Maven and Rest Assured 2.0 diff --git a/docs/src/main/asciidoc/verifier_stubrunner.adoc b/docs/src/main/asciidoc/verifier_stubrunner.adoc index f0711d1bd4..a29dfc2b69 100644 --- a/docs/src/main/asciidoc/verifier_stubrunner.adoc +++ b/docs/src/main/asciidoc/verifier_stubrunner.adoc @@ -25,6 +25,7 @@ include::{standalone_samples_path}/http-server/pom.xml[tags=repos,indent=0] include::{standalone_samples_path}/http-server/build.gradle[tags=repos,indent=0] ---- +[[publishing-stubs-as-jars]] === Publishing Stubs as JARs The easiest approach would be to centralize the way stubs are kept. For example, you can