From 5ef72577b4d71832353f23aa2af1aef2552511f8 Mon Sep 17 00:00:00 2001 From: Marcin Grzejszczak Date: Fri, 6 Sep 2019 14:28:17 +0200 Subject: [PATCH] Added the missing configuration properties table --- docs/pom.xml | 15 +++++++ .../_additional-stubrunner-configprops.adoc | 18 ++++++++ docs/src/main/asciidoc/_configprops.adoc | 42 +++++++++++++++++++ docs/src/main/asciidoc/appendix.adoc | 20 +++++++++ docs/src/main/asciidoc/index.htmladoc | 1 + docs/src/main/asciidoc/index.htmlsingleadoc | 3 +- .../asciidoc/spring-cloud-contract.pdfadoc | 1 + 7 files changed, 99 insertions(+), 1 deletion(-) create mode 100644 docs/src/main/asciidoc/_additional-stubrunner-configprops.adoc create mode 100644 docs/src/main/asciidoc/_configprops.adoc create mode 100644 docs/src/main/asciidoc/appendix.adoc diff --git a/docs/pom.xml b/docs/pom.xml index 5eeb1fc5bb..91aa75acf6 100644 --- a/docs/pom.xml +++ b/docs/pom.xml @@ -18,6 +18,7 @@ ${basedir}/.. 3.4 1.0.x,1.1.x,2.0.x,2.1.x + stubrunner.*|wiremock.*| @@ -30,6 +31,16 @@ + + + ${project.groupId} + spring-cloud-starter-contract-stub-runner + + + ${project.groupId} + spring-cloud-starter-contract-verifier + + docs @@ -47,6 +58,10 @@ org.apache.maven.plugins maven-resources-plugin + + org.codehaus.mojo + exec-maven-plugin + org.asciidoctor asciidoctor-maven-plugin diff --git a/docs/src/main/asciidoc/_additional-stubrunner-configprops.adoc b/docs/src/main/asciidoc/_additional-stubrunner-configprops.adoc new file mode 100644 index 0000000000..f404e60464 --- /dev/null +++ b/docs/src/main/asciidoc/_additional-stubrunner-configprops.adoc @@ -0,0 +1,18 @@ +IMPORTANT: The following properties can be passed as a system property (e.g. `stubrunner.properties.git.branch`) or via an environment variable (e.g. `STUBRUNNER_PROPERTIES_GIT_BRANCH`) or as a property inside stub runner's annotation or a JUnit Rule / Extension. In the latter case you can pass `git.branch` property name instead of the `stubrunner.properties.git.branch` one. + +.Stubrunner Properties Options +|=== +|Name | Default | Description + +|stubrunner.properties.pactbroker.provider-name-with-group-id | false | When using the Pact Broker based approach, you can automatically group id to the provider name. + +|stubrunner.properties.git.branch | | When using the SCM based approach, you can customize the branch name to check out. +|stubrunner.properties.git.commit-message | Updating project [$project] with stubs | When using the SCM based approach, you can customize the commit message for created stubs. The `$project` text will be replaced with the project name. +|stubrunner.properties.git.no-of-attempts | 10 | When using the SCM based approach, you can customize number of retries to push the stubs to Git. +|stubrunner.properties.git.username | | When using the SCM based approach, you can pass the username to connect to the Git repository. +|stubrunner.properties.git.password | | When using the SCM based approach, you can pass the password to connect to the Git repository. +|stubrunner.properties.git.wait-between-attempts | 1000 | When using the SCM based approach, you can customize waiting time in ms between trying to push the stubs to Git. + +|stubrunner.properties.stubs.find-producer | false | When using the Stubs protocol, you can toggle this flag to search for contracts via the `group id / artifact id` instead of taking the stubs directly from the provided folder. + +|=== \ No newline at end of file diff --git a/docs/src/main/asciidoc/_configprops.adoc b/docs/src/main/asciidoc/_configprops.adoc new file mode 100644 index 0000000000..9c6e8e2063 --- /dev/null +++ b/docs/src/main/asciidoc/_configprops.adoc @@ -0,0 +1,42 @@ +|=== +|Name | Default | Description + +|stubrunner.amqp.enabled | false | Whether to enable support for Stub Runner and AMQP. +|stubrunner.amqp.mockCOnnection | true | Whether to enable support for Stub Runner and AMQP mocked connection factory. +|stubrunner.classifier | stubs | The classifier to use by default in ivy co-ordinates for a stub. +|stubrunner.cloud.consul.enabled | true | Whether to enable stubs registration in Consul. +|stubrunner.cloud.delegate.enabled | true | Whether to enable DiscoveryClient's Stub Runner implementation. +|stubrunner.cloud.enabled | true | Whether to enable Spring Cloud support for Stub Runner. +|stubrunner.cloud.eureka.enabled | true | Whether to enable stubs registration in Eureka. +|stubrunner.cloud.ribbon.enabled | true | Whether to enable Stub Runner's Ribbon integration. +|stubrunner.cloud.stubbed.discovery.enabled | true | Whether Service Discovery should be stubbed for Stub Runner. If set to false, stubs will get registered in real service discovery. +|stubrunner.cloud.zookeeper.enabled | true | Whether to enable stubs registration in Zookeeper. +|stubrunner.consumer-name | | You can override the default {@code spring.application.name} of this field by setting a value to this parameter. +|stubrunner.delete-stubs-after-test | true | If set to {@code false} will NOT delete stubs from a temporary folder after running tests. +|stubrunner.fail-on-no-stubs | true | When enabled, this flag will tell stub runner to throw an exception when no stubs / contracts were found. +|stubrunner.generate-stubs | false | When enabled, this flag will tell stub runner to not load the generated stubs, but convert the found contracts at runtime to a stub format and run those stubs. +|stubrunner.http-server-stub-configurer | | Configuration for an HTTP server stub. +|stubrunner.ids | [] | The ids of the stubs to run in "ivy" notation ([groupId]:artifactId:[version]:[classifier][:port]). {@code groupId}, {@code classifier}, {@code version} and {@code port} can be optional. +|stubrunner.ids-to-service-ids | | Mapping of Ivy notation based ids to serviceIds inside your application. Example "a:b" -> "myService" "artifactId" -> "myOtherService" +|stubrunner.integration.enabled | true | Whether to enable Stub Runner integration with Spring Integration. +|stubrunner.mappings-output-folder | | Dumps the mappings of each HTTP server to the selected folder. +|stubrunner.max-port | 15000 | Max value of a port for the automatically started WireMock server. +|stubrunner.min-port | 10000 | Min value of a port for the automatically started WireMock server. +|stubrunner.password | | Repository password. +|stubrunner.properties | | Map of properties that can be passed to custom {@link org.springframework.cloud.contract.stubrunner.StubDownloaderBuilder}. +|stubrunner.proxy-host | | Repository proxy host. +|stubrunner.proxy-port | | Repository proxy port. +|stubrunner.stream.enabled | true | Whether to enable Stub Runner integration with Spring Cloud Stream. +|stubrunner.stubs-mode | | Pick where the stubs should come from. +|stubrunner.stubs-per-consumer | false | Should only stubs for this particular consumer get registered in HTTP server stub. +|stubrunner.username | | Repository username. +|wiremock.placeholders.enabled | true | Flag to indicate that http URLs in generated wiremock stubs should be filtered to add or resolve a placeholder for a dynamic port. +|wiremock.rest-template-ssl-enabled | false | +|wiremock.server.files | [] | +|wiremock.server.https-port | -1 | +|wiremock.server.https-port-dynamic | false | +|wiremock.server.port | 8080 | +|wiremock.server.port-dynamic | false | +|wiremock.server.stubs | [] | + +|=== diff --git a/docs/src/main/asciidoc/appendix.adoc b/docs/src/main/asciidoc/appendix.adoc new file mode 100644 index 0000000000..dcc0e05a90 --- /dev/null +++ b/docs/src/main/asciidoc/appendix.adoc @@ -0,0 +1,20 @@ +:numbered!: +[appendix] +[[common-application-properties]] +== Common application properties + +include::_attributes.adoc[] + +Various properties can be specified inside your `application.properties` file, inside your `application.yml` file, or as command line switches. +This appendix provides a list of common {project-full-name} properties and references to the underlying classes that consume them. + +NOTE: Property contributions can come from additional jar files on your classpath, so you should not consider this an exhaustive list. +Also, you can define your own properties. + +=== Default application properties + +include::_configprops.adoc[] + +=== Additional application properties + +include::_additional-stubrunner-configprops.adoc[] \ No newline at end of file diff --git a/docs/src/main/asciidoc/index.htmladoc b/docs/src/main/asciidoc/index.htmladoc index 21d7b4ffb7..bd44d0c2a4 100644 --- a/docs/src/main/asciidoc/index.htmladoc +++ b/docs/src/main/asciidoc/index.htmladoc @@ -14,3 +14,4 @@ The reference documentation consists of the following sections: <> :: Contract DSL, Messaging, Spring Cloud Contract Stub Runner, and Spring Cloud Contract WireMock. <> :: Maven Plugin, Gradle Plugin, and Docker. <> :: Stubs versioning, Pact integration, Debugging, and more. +<> :: Properties, Metadata, Configuration, Dependencies, and more. \ No newline at end of file diff --git a/docs/src/main/asciidoc/index.htmlsingleadoc b/docs/src/main/asciidoc/index.htmlsingleadoc index 46603b6857..ad93154dc0 100644 --- a/docs/src/main/asciidoc/index.htmlsingleadoc +++ b/docs/src/main/asciidoc/index.htmlsingleadoc @@ -9,4 +9,5 @@ include::documentation-overview.adoc[leveloffset=+1] include::getting-started.adoc[leveloffset=+1] include::using.adoc[leveloffset=+1] include::project-features.adoc[leveloffset=+1] -include::howto.adoc[leveloffset=+1] \ No newline at end of file +include::howto.adoc[leveloffset=+1] +include::appendix.adoc[leveloffset=+1] \ No newline at end of file diff --git a/docs/src/main/asciidoc/spring-cloud-contract.pdfadoc b/docs/src/main/asciidoc/spring-cloud-contract.pdfadoc index 7beef6b1ef..26324f821c 100644 --- a/docs/src/main/asciidoc/spring-cloud-contract.pdfadoc +++ b/docs/src/main/asciidoc/spring-cloud-contract.pdfadoc @@ -9,3 +9,4 @@ include::getting-started.adoc[leveloffset=+1] include::using.adoc[leveloffset=+1] include::project-features.adoc[leveloffset=+1] include::howto.adoc[leveloffset=+1] +include::appendix.adoc[leveloffset=+1]