Fixed broken docs

This commit is contained in:
Marcin Grzejszczak
2022-07-01 14:02:32 +02:00
parent 8a855d9bc3
commit 414cd9c545
10 changed files with 79 additions and 31 deletions

View File

@@ -27,12 +27,13 @@
:stubrunner_core_path: {core_path}/spring-cloud-contract-stub-runner
:standalone_samples_path: {samples_path}/standalone/dsl
:standalone_messaging_samples_path: {samples_path}/standalone/dsl
:standalone_pact_path: {samples_path}/standalone/dsl
:standalone_restdocs_path: {samples_path}/standalone/restdocs
:tests_path: {core_path}/tests
:samples_branch: 3.1.x
:samples_url: https://raw.githubusercontent.com/spring-cloud-samples/spring-cloud-contract-samples/{samples_branch}
:samples_code: https://github.com/spring-cloud-samples/spring-cloud-contract-samples/tree/{samples_branch}/
:samples_code: https://github.com/spring-cloud-samples/spring-cloud-contract-samples/tree/{samples_branch}
:doc_samples: {samples_code}/wiremock-jetty
:doc_samples_url: {samples_url}/wiremock-jetty
:wiremock_tests: {core_path}/spring-cloud-contract-wiremock
:introduction_url: {core_path}
:standalone_pact_path: {samples_url}/

View File

@@ -1874,7 +1874,7 @@ The XPath expression to select the email address is
WARNING: Beware, as the unqualified expressions (`/customer/email/text()` or `*/[local-name()='customer' and namespace-uri()='http://demo.com/customer']/email/text()`)
result in `""`. Even the child elements have to be referenced with the `local-name` syntax.
====== General Namespaced Node Expression Syntax
===== General Namespaced Node Expression Syntax
- Node using qualified namespace:
```
/<node-name>
@@ -2062,4 +2062,4 @@ name of `scenario1` and the three following steps:
. `logout`, marked as `Step2` (which closes the scenario).
You can find more details about WireMock scenarios at
https://wiremock.org/docs/stateful-behaviour/[https://wiremock.org/docs/stateful-behaviour/].
https://wiremock.org/docs/stateful-behaviour/[https://wiremock.org/docs/stateful-behaviour/].

View File

@@ -23,9 +23,9 @@ include::{standalone_samples_path}/http-server/pom.xml[tags=repos,indent=0]
----
[source,groovy,indent=0,subs="verbatim,attributes",role="secondary"]
.Gradle
.Gradle (`settings.xml`)
----
include::{standalone_samples_path}/http-server/build.gradle[tags=repos,indent=0]
include::{standalone_samples_path}/http-server/settings.gradle[tags=repos,indent=0]
----
====

View File

@@ -16,8 +16,8 @@ your test. The following code shows an example:
====
[source,java,indent=0]
----
include::{doc_samples}/src/test/java/com/example/WiremockForDocsTests.java[tags=wiremock_test1]
include::{doc_samples}/src/test/java/com/example/WiremockForDocsTests.java[tags=wiremock_test2]
include::{doc_samples_url}/src/test/java/com/example/WiremockForDocsTests.java[tags=wiremock_test1]
include::{doc_samples_url}/src/test/java/com/example/WiremockForDocsTests.java[tags=wiremock_test2]
----
====
@@ -111,8 +111,8 @@ instance, as the following example shows:
====
[source,java,indent=0]
----
include::{doc_samples}/src/test/java/com/example/WiremockForDocsClassRuleTests.java[tags=wiremock_test1]
include::{doc_samples}/src/test/java/com/example/WiremockForDocsClassRuleTests.java[tags=wiremock_test2]
include::{doc_samples_url}/src/test/java/com/example/WiremockForDocsClassRuleTests.java[tags=wiremock_test1]
include::{doc_samples_url}/src/test/java/com/example/WiremockForDocsClassRuleTests.java[tags=wiremock_test2]
----
====
@@ -182,7 +182,7 @@ a Spring `MockRestServiceServer`. The following code shows an example:
====
[source,java,indent=0]
----
include::{doc_samples}/src/test/java/com/example/WiremockForDocsMockServerApplicationTests.java[tags=wiremock_test]
include::{doc_samples_url}/src/test/java/com/example/WiremockForDocsMockServerApplicationTests.java[tags=wiremock_test]
----
====

View File

@@ -872,14 +872,7 @@ set a `metaData` entry in the Pact file with the `sentTo` key equal to the desti
=== Pact Contract
Spring Cloud Contract can read the Pact JSON definition. You can place the file in the
`src/test/resources/contracts` folder. Remember to put the `spring-cloud-contract-pact` dependency to your classpath. The following example shows such a Pact contract:
====
[source,javascript,indent=0]
----
include::{standalone_pact_path}/http-server/src/test/resources/contracts/pact/shouldMarkClientAsFraud.json[indent=0]
----
====
`src/test/resources/contracts` folder. Remember to put the `spring-cloud-contract-pact` dependency to your classpath.
[[how-to-use-pact-broker-pact-for-producers]]
=== Pact for Producers
@@ -893,13 +886,13 @@ Maven and Gradle:
[source,xml,indent=0,subs="verbatim,attributes",role="primary"]
.Maven
----
include::{standalone_pact_path}/http-server/pom.xml[tags=pact_dependency,indent=0]
include::{standalone_pact_path}/producer_pact/pom.xml[tags=pact_dependency,indent=0]
----
[source,groovy,indent=0,subs="verbatim,attributes",role="secondary"]
.Gradle
----
include::{standalone_pact_path}/http-server/build.gradle[tags=pact_dependency,indent=0]
include::{standalone_pact_path}/producer_pact/build.gradle[tags=pact_dependency,indent=0]
----
====
@@ -976,13 +969,13 @@ Maven and Gradle:
[source,xml,indent=0,subs="verbatim,attributes",role="primary"]
.Maven
----
include::{standalone_pact_path}/http-client/pom.xml[tags=pact_dependency,indent=0]
include::{standalone_pact_path}/consumer_pact_stubrunner/pom.xml[tags=pact_dependency,indent=0]
----
[source,groovy,indent=0,subs="verbatim,attributes",role="secondary"]
.Gradle
----
include::{standalone_pact_path}/http-client/build.gradle[tags=pact_dependency,indent=0]
include::{standalone_pact_path}/consumer_pact_stubrunner/build.gradle[tags=pact_dependency,indent=0]
----
====