Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(docs): generate docs for configuration options automatically #116

Merged
merged 1 commit into from
Apr 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -19,30 +19,30 @@ public interface WireMockServerBuildTimeConfig {
boolean enabled();

/**
* Indicates whether WireMock server needs to be restarted after Quarkus live reload (see development mode for more
* information) or not.
* Restart WireMock Dev Service whenever Quarkus is reloaded. Otherwise, whenever files are changed in the
* {@code files-mapping} location you would need to restart the Dev Service (WireMock server) manually.
*/
@WithDefault("true")
boolean reload();

/**
* Optional fixed port the WireMock Dev Service will listen to.
* Optional fixed port the WireMock Dev Service will listen to. If not defined, the port will be chosen randomly.
* <p>
* If not defined, the port will be chosen randomly.
* <b>WARNING:</b> Only ports between 1025 and 65535 are permitted.
*/
OptionalInt port();

/**
* Path to the WireMock configuration files.
* If this starts with {@code classpath:} then files will be looked up on the classpath instead of the filesystem
* Path to the WireMock configuration files (root dir which contains the {@code mappings} and {@code __files} folders).
* If this starts with {@code classpath:} then files will be looked up on the classpath instead of the filesystem.
*/
@WithDefault("src/test/resources")
String filesMapping();

/**
* If global response templating should be enabled for WireMock
*
* @see <a href="https://wiremock.org/3.x/docs/response-templating/">https://wiremock.org/3.x/docs/response-templating/</a>
* Response templating is enabled by default in WireMock 3, with this setting response templating can be enabled globally.
* <p>
* Please refer to <a href="https://wiremock.org/3.x/docs/response-templating/">Response Templating</a> for more details.
*/
@WithDefault("false")
boolean globalResponseTemplating();
Expand All @@ -51,7 +51,7 @@ public interface WireMockServerBuildTimeConfig {
* Control whether WireMock Extension <a href=
* "https://wiremock.org/docs/extending-wiremock/#extension-registration-via-service-loading">service
* loading</a>,
* is enabled
* is enabled.
*/
@WithDefault("false")
boolean extensionScanningEnabled();
Expand Down
118 changes: 118 additions & 0 deletions docs/modules/ROOT/pages/includes/quarkus-wiremock-devservices.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@

:summaryTableId: quarkus-wiremock-devservices
[.configuration-legend]
icon:lock[title=Fixed at build time] Configuration property fixed at build time - All other configuration properties are overridable at runtime
[.configuration-reference.searchable, cols="80,.^10,.^10"]
|===

h|[[quarkus-wiremock-devservices_configuration]]link:#quarkus-wiremock-devservices_configuration[Configuration property]

h|Type
h|Default

a|icon:lock[title=Fixed at build time] [[quarkus-wiremock-devservices_quarkus-wiremock-devservices-enabled]]`link:#quarkus-wiremock-devservices_quarkus-wiremock-devservices-enabled[quarkus.wiremock.devservices.enabled]`


[.description]
--
If Dev Services for WireMock has been explicitly enabled or disabled.

ifdef::add-copy-button-to-env-var[]
Environment variable: env_var_with_copy_button:+++QUARKUS_WIREMOCK_DEVSERVICES_ENABLED+++[]
endif::add-copy-button-to-env-var[]
ifndef::add-copy-button-to-env-var[]
Environment variable: `+++QUARKUS_WIREMOCK_DEVSERVICES_ENABLED+++`
endif::add-copy-button-to-env-var[]
--|boolean
|`true`


a|icon:lock[title=Fixed at build time] [[quarkus-wiremock-devservices_quarkus-wiremock-devservices-reload]]`link:#quarkus-wiremock-devservices_quarkus-wiremock-devservices-reload[quarkus.wiremock.devservices.reload]`


[.description]
--
Restart WireMock Dev Service whenever Quarkus is reloaded. Otherwise, whenever files are changed in the `files-mapping` location you would need to restart the Dev Service (WireMock server) manually.

ifdef::add-copy-button-to-env-var[]
Environment variable: env_var_with_copy_button:+++QUARKUS_WIREMOCK_DEVSERVICES_RELOAD+++[]
endif::add-copy-button-to-env-var[]
ifndef::add-copy-button-to-env-var[]
Environment variable: `+++QUARKUS_WIREMOCK_DEVSERVICES_RELOAD+++`
endif::add-copy-button-to-env-var[]
--|boolean
|`true`


a|icon:lock[title=Fixed at build time] [[quarkus-wiremock-devservices_quarkus-wiremock-devservices-port]]`link:#quarkus-wiremock-devservices_quarkus-wiremock-devservices-port[quarkus.wiremock.devservices.port]`


[.description]
--
Optional fixed port the WireMock Dev Service will listen to. If not defined, the port will be chosen randomly.

*WARNING:* Only ports between 1025 and 65535 are permitted.

ifdef::add-copy-button-to-env-var[]
Environment variable: env_var_with_copy_button:+++QUARKUS_WIREMOCK_DEVSERVICES_PORT+++[]
endif::add-copy-button-to-env-var[]
ifndef::add-copy-button-to-env-var[]
Environment variable: `+++QUARKUS_WIREMOCK_DEVSERVICES_PORT+++`
endif::add-copy-button-to-env-var[]
--|int
|


a|icon:lock[title=Fixed at build time] [[quarkus-wiremock-devservices_quarkus-wiremock-devservices-files-mapping]]`link:#quarkus-wiremock-devservices_quarkus-wiremock-devservices-files-mapping[quarkus.wiremock.devservices.files-mapping]`


[.description]
--
Path to the WireMock configuration files (root dir which contains the `mappings` and `__files` folders). If this starts with `classpath:` then files will be looked up on the classpath instead of the filesystem.

ifdef::add-copy-button-to-env-var[]
Environment variable: env_var_with_copy_button:+++QUARKUS_WIREMOCK_DEVSERVICES_FILES_MAPPING+++[]
endif::add-copy-button-to-env-var[]
ifndef::add-copy-button-to-env-var[]
Environment variable: `+++QUARKUS_WIREMOCK_DEVSERVICES_FILES_MAPPING+++`
endif::add-copy-button-to-env-var[]
--|string
|`src/test/resources`


a|icon:lock[title=Fixed at build time] [[quarkus-wiremock-devservices_quarkus-wiremock-devservices-global-response-templating]]`link:#quarkus-wiremock-devservices_quarkus-wiremock-devservices-global-response-templating[quarkus.wiremock.devservices.global-response-templating]`


[.description]
--
Response templating is enabled by default in WireMock 3, with this setting response templating can be enabled globally.

Please refer to link:https://wiremock.org/3.x/docs/response-templating/[Response Templating] for more details.

ifdef::add-copy-button-to-env-var[]
Environment variable: env_var_with_copy_button:+++QUARKUS_WIREMOCK_DEVSERVICES_GLOBAL_RESPONSE_TEMPLATING+++[]
endif::add-copy-button-to-env-var[]
ifndef::add-copy-button-to-env-var[]
Environment variable: `+++QUARKUS_WIREMOCK_DEVSERVICES_GLOBAL_RESPONSE_TEMPLATING+++`
endif::add-copy-button-to-env-var[]
--|boolean
|`false`


a|icon:lock[title=Fixed at build time] [[quarkus-wiremock-devservices_quarkus-wiremock-devservices-extension-scanning-enabled]]`link:#quarkus-wiremock-devservices_quarkus-wiremock-devservices-extension-scanning-enabled[quarkus.wiremock.devservices.extension-scanning-enabled]`


[.description]
--
Control whether WireMock Extension link:https://wiremock.org/docs/extending-wiremock/#extension-registration-via-service-loading[service loading], is enabled.

ifdef::add-copy-button-to-env-var[]
Environment variable: env_var_with_copy_button:+++QUARKUS_WIREMOCK_DEVSERVICES_EXTENSION_SCANNING_ENABLED+++[]
endif::add-copy-button-to-env-var[]
ifndef::add-copy-button-to-env-var[]
Environment variable: `+++QUARKUS_WIREMOCK_DEVSERVICES_EXTENSION_SCANNING_ENABLED+++`
endif::add-copy-button-to-env-var[]
--|boolean
|`false`

|===
93 changes: 0 additions & 93 deletions docs/modules/ROOT/pages/includes/quarkus-wiremock.adoc

This file was deleted.

2 changes: 1 addition & 1 deletion docs/modules/ROOT/pages/index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -139,4 +139,4 @@ TIP: Please refer to https://quarkus.io/guides/config-reference#property-express
[[extension-configuration-reference]]
== Extension Configuration Reference

include::includes/quarkus-wiremock.adoc[leveloffset=+1, opts=optional]
include::includes/quarkus-wiremock-devservices.adoc[leveloffset=+1, opts=optional]
2 changes: 1 addition & 1 deletion docs/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
<resources>
<resource>
<directory>${project.basedir}/../target/asciidoc/generated/config/</directory>
<include>quarkus-my-ext.adoc</include>
<include>quarkus-wiremock-devservices.adoc</include>
<filtering>false</filtering>
</resource>
<resource>
Expand Down