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

Introduced prototype of equalToJson pattern with file source #2330

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ioanngolovko
Copy link

@ioanngolovko ioanngolovko commented Aug 28, 2023

Hello.

Sometimes people need to insert big json/xml data into equalToJson/equalToXml patterns. It's hard to do it and maintain in json files. I took the liberty of simplifying this process.

This PR introduces prototype of equalToJson pattern with file source.
It's open to discuss.

As we can see, source field has unpleasant side affects.
We can just check , that trimmed json ends with ".json" substring and then reprocess it.

One more notion - this will work for remote loading only.

I omitted the XML implementation until we decide on the architecture.

Submitter checklist

  • Recommended: Join WireMock Slack to get any help in #help-contributing or a project-specific channel like #wiremock-java
  • The PR request is well described and justified, including the body and the references
  • The PR title represents the desired changelog entry
  • The repository's code style is followed (see the contributing guide)
  • Test coverage that demonstrates that the change works as expected
  • For new features, there's necessary documentation in this pull request or in a subsequent PR to wiremock.org

@ioanngolovko ioanngolovko requested a review from a team as a code owner August 28, 2023 09:38
@ioanngolovko ioanngolovko marked this pull request as draft August 28, 2023 09:42
Copy link
Member

@oleg-nenashev oleg-nenashev left a comment

Choose a reason for hiding this comment

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

This PR is binary compatible, so no urgency to merge it into the 3.0.0 release, Will try to review ASAP

@oleg-nenashev
Copy link
Member

Sorry, I dropped the ball on it. Force push does not trigger an update in the PR.
We didn't unify file notations during WireMock 3 release, so I guess it is still actual and could be integrated as is once updated and once the merge conflict is resolved. Fine with you @tomakehurst

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.

None yet

2 participants