Skip to content

Recorder serve event transformer#3403

Merged
tomakehurst merged 10 commits into
masterfrom
recorder-serve-event-transformer
Apr 29, 2026
Merged

Recorder serve event transformer#3403
tomakehurst merged 10 commits into
masterfrom
recorder-serve-event-transformer

Conversation

@tomakehurst

Copy link
Copy Markdown
Member

Supports transformation of serve events before they are processed by the recorder, providing another way to customise recorded output.

Intended for situations like where the the request and response body are in a format like protobuf and must be converted to JSON for use within WireMock.

@tomakehurst tomakehurst requested a review from a team as a code owner April 29, 2026 08:38
Comment on lines +402 to +418
this.id = original.id;
this.scheme = original.scheme;
this.host = original.host;
this.port = original.port;
this.pathAndQuery = original.pathAndQuery;
this.absoluteUrl = original.absoluteUrl;
this.method = original.method;
this.clientIp = original.clientIp;
this.headers = original.headers;
this.pathParams = original.pathParams;
this.cookies = original.cookies;
this.isBrowserProxyRequest = original.isBrowserProxyRequest;
this.loggedDate = original.loggedDate;
this.body = original.body;
this.multiparts = original.multiparts;
this.protocol = original.protocol;
this.formParameters = original.formParameters;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we need to copy any elements of collections into new ones here. see StubMapping.Builder or RequestPattern.Builder for examples.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we're also missing a bunch of methods on the builder for mutating these fields

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there's still a bunch of collections we're not copying (e.g. headers)

@tomakehurst tomakehurst merged commit 99e2837 into master Apr 29, 2026
5 checks passed
@tomakehurst tomakehurst deleted the recorder-serve-event-transformer branch April 29, 2026 14:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants