-
Notifications
You must be signed in to change notification settings - Fork 733
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
Consider request parameters when determining a GET request's query string #26
Comments
The relationship between request parameters and a URI's query string is a little bit tricky and, at the moment, Spring REST Docs only looks at the query string ( In the meantime, updating your test to look like the following should produce the desired snippet:
|
I tried that first, with no luck, hence why I assumed I needed separate calls to Digging a little more into the code, I see
in the |
That looks like you're missing the changes made in 6bdd60c. Perhaps you need to give Maven or Gradle a nudge to get it to refresh snapshot dependencies? |
Aha, thanks!
|
Took a look at Artifactory on repo.spring.io -- looks like that commit isn't in the most recent snapshot. Still, glad to know it'll be in the next update. |
The changes should be in the latest snapshots as they're automatically published by the CI server. The artifact's coordinates changed from |
I have a problem whean I want to pass to my controller method a DTO object as query parameter. |
@KamilJedrzejuk That sounds like a problem with how you're making the request which is out of REST Docs' control. Perhaps you could ask a question on Stack Overflow that includes an example of how you're making the request and the controller that is receiving it. |
I have a documentation test like the following:
When I run this as part of my Maven build, a request-response.asciidoc is produced, but the sample curl request omits the query parameters.
Putting a breakpoint in the
RoutesController
shows me that the parameters are indeed received by the controller, so I believe I'm sending them correctly with MockMvc.Any reason I would get a curl snippet like:
[source,bash]
----
$ curl http://localhost:8080/routes -i
----
for this request?
The text was updated successfully, but these errors were encountered: