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

Allow {variable} vs ${variable} specifier in parameterized paths #1410

Closed
bawoodruff opened this issue Aug 1, 2021 · 2 comments
Closed

Allow {variable} vs ${variable} specifier in parameterized paths #1410

bawoodruff opened this issue Aug 1, 2021 · 2 comments

Comments

@bawoodruff
Copy link
Contributor

bawoodruff commented Aug 1, 2021

I'd like to be able to share URI specifications between Pact and RestTemplate -- but parameterized paths in Pact JVM are using ${variable} whereas Spring's RestTemplate use {variable} in the path specification.

I am currently performing a workaround as such:

 .pathFromProviderState(
    StoreManagement.UriComponents.GET_STORE_BY_RELATIVE_STORE_URL.replace("{", "${"),
    StoreManagement.UriComponents.GET_STORE_BY_RELATIVE_STORE_URL.replace("{relativeStoreUrl}", ValidStoreUrl))

Can we have an option to change the specifier in Pact JVM?

@uglyog
Copy link
Member

uglyog commented Aug 15, 2021

I've added two system properties to change the markers of the expressions:

  • pact.expressions.start
  • pact.expressions.end

@uglyog
Copy link
Member

uglyog commented Aug 22, 2021

4.1.25 released

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

No branches or pull requests

2 participants