You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To provide more flexibility around how WireMock is configured at startup.
Refactor the hierarchy under Options, creating a composite class with hierarchical delegation and a set of new bindings for properties files, environment variables and system properties.
This should support construction of cases like this:
Where the CLI options will take the highest precedence and the programmatically constructed config the lowest.
It should also be possible to provide a default configuration via a template method in WireMockServerRunner so that different (or end-user custom) builds of WireMock can provide different defaults.
Implementation
Ideally we would create an abstract base class for all of the config binding impls, which would define all of the keys in a similar manner as CommandLineOptions currently does, but sufficiently abstractly that it could be used for env vars, CLI, system props etc.
The main challenge here might be figuring out way to describe, parse and validate these in a way that's not specific to CLI, although it might be possible to wrap the current joptsimple based solution.
References
No response
The text was updated successfully, but these errors were encountered:
Proposal
Overview
To provide more flexibility around how WireMock is configured at startup.
Refactor the hierarchy under
Options
, creating a composite class with hierarchical delegation and a set of new bindings for properties files, environment variables and system properties.This should support construction of cases like this:
Where the CLI options will take the highest precedence and the programmatically constructed config the lowest.
It should also be possible to provide a default configuration via a template method in
WireMockServerRunner
so that different (or end-user custom) builds of WireMock can provide different defaults.Implementation
Ideally we would create an abstract base class for all of the config binding impls, which would define all of the keys in a similar manner as
CommandLineOptions
currently does, but sufficiently abstractly that it could be used for env vars, CLI, system props etc.The main challenge here might be figuring out way to describe, parse and validate these in a way that's not specific to CLI, although it might be possible to wrap the current joptsimple based solution.
References
No response
The text was updated successfully, but these errors were encountered: