Skip to main content

Interface: WireMockExtension

Defined in: src/extensions.ts:23

Base interface all WireMock extensions must implement: what WireMock loads for it. Implement at least one optional member.

Example​

const shortJournal: WireMockExtension = {
getName: () => "short-journal",
getOptions: () => ["--max-request-journal=2"],
};

See​

TypeScript extensions

Methods​

getClassNames()?​

getClassNames?(): readonly string[];

Defined in: src/extensions.ts:27

Fully qualified Java class names, passed to --extensions.

Returns​

readonly string[]


getJars()?​

getJars?(): readonly WiremockStaticFile[];

Defined in: src/extensions.ts:29

JARs – or directories of them – for WireMock's class path.

Returns​

readonly WiremockStaticFile[]


getName()​

getName(): string;

Defined in: src/extensions.ts:25

Its name, e.g. WireMock's "uppercase". Re-registering a name: no-op if configured alike, else an error.

Returns​

string


getOptions()?​

getOptions?(): readonly string[];

Defined in: src/extensions.ts:31

WireMock CLI options, one per entry: "--flag" or "--option=value".

Returns​

readonly string[]