i am setting up a new project. Using ```"org.sprin...
# wiremock-java
y
i am setting up a new project. Using
Copy code
"org.springframework.cloud:spring-cloud-starter-contract-stub-runner"
But I am getting the following error and not sure why. Any help ?
Copy code
Request was not matched
                                               =======================

-----------------------------------------------------------------------------------------------------------------------
| Closest stub                                             | Request                                                  |
-----------------------------------------------------------------------------------------------------------------------
                                                           |
GET                                                        | GET
/ldap_directory_items/v2/group_members?key=key&name=APP-O  | /ldap_directory_items/v2/group_members?key=key&name=APP-O
AUTH2-ABCD&size=100000                                     | AUTH2-ABCD&size=100000
                                                           |
                                                           |
-----------------------------------------------------------------------------------------------------------------------
t
Hi @Yash Agarwal what type of URL match does that stub have? Might be that you’re attempting to match a URL with a query string using a path only matcher.
y
urlEqualTo. I tried Path and Regex. None are working.
Copy code
-----------------------------------------------------------------------------------------------------------------------
| Closest stub                                             | Request                                                  |
-----------------------------------------------------------------------------------------------------------------------
                                                           |
GET                                                        | GET
[path] /ldap_directory_items/v2/group_members              | /ldap_directory_items/v2/group_members?key=key&name=APP-O
                                                           | AUTH2-ABCD&size=100000
                                                           |
Query: key = key                                           | key: key
Query: name = APP-OAUTH2-ABCD                              | name: APP-OAUTH2-ABCD
Query: size = 100000                                       | size: 100000
                                                           |
                                                           |
-----------------------------------------------------------------------------------------------------------------------
Copy code
-----------------------------------------------------------------------------------------------------------------------
| Closest stub                                             | Request                                                  |
-----------------------------------------------------------------------------------------------------------------------
                                                           |
GET                                                        | GET
[regex] /ldap_directory_items/v2/group_members.*           | /ldap_directory_items/v2/group_members?key=key&name=APP-O
                                                           | AUTH2-ABCD&size=100000
                                                           |
                                                           |
-----------------------------------------------------------------------------------------------------------------------
t
Are you using the latest version of WireMock i.e. 2.35.0?
y
yes.
t
In that case can you share the full stub definition JSON and the request you’re making?