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

Adding build function for all kind of UrlPattern in RequestPatternBuilder #2536

Merged
merged 5 commits into from
Jan 10, 2024

Conversation

AlEmerich
Copy link
Contributor

@AlEmerich AlEmerich commented Dec 15, 2023

In order to be able to customize url with every kind of UrlPattern from a RequestPattern using the like function, it would be useful if RequestPatternBuilder allows to do so.

I added test only for urlPath because I did not judge that it was necessary for other (since it wil be exactly the same and lead to a lot of duplicated code, but feel free to tell me otherwise.

References

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

@AlEmerich AlEmerich requested a review from a team as a code owner December 15, 2023 13:38
@tomakehurst
Copy link
Member

I think it might be more consistent to add a single withUrl overload that that takes a UrlPattern parameter, since this is how the main DSL works.

@AlEmerich
Copy link
Contributor Author

AlEmerich commented Jan 9, 2024

@tomakehurst Agree, you're right, should we still keep the withUrl(String) overload to ensure backward compatibility ?

EDIT: Nevermind, I misread, I thought you said keeping a single withUrl

@tomakehurst tomakehurst merged commit 190c42e into wiremock:master Jan 10, 2024
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