-
Notifications
You must be signed in to change notification settings - Fork 737
Spring REST Docs 3.0 Release Notes
Support for documenting form parameters has been added. Please refer to the reference documentation for further details. This new support partially replaces the support for documenting request parameters which mixed query and form parameters together.
Support for documenting query parameters has been added. Please refer to the reference documentation for further details. This new support partially replaces the support for documenting request parameters which mixed query and form parameters together.
Support for documenting request and response cookies has been added. Please refer to the reference documentation for further details.
The language is now specified automatically in request and response body snippets.
It is determined using the Content-Type
of the request or response.
For example,
a response whose Content-Type
is application/json
will have the language of its body snippet set to json
.
Support for documenting request parameters has been removed. Request parameters are a server-side construct of the Servlet API that mix form and query parameters together. To provide accurate, client-focussed documentation, form and query parameters should be documented separately.
As a result of this change, when using Spring Framework’s MockMvc
, you may have to update how your tests send parameters to your API.
Instead of using param
to populate the server-side map of request parameters, queryParam
(for query parameters) or application/x-www-form-urlencoded
body content (for form parameters) should be used instead.
Support for pre-processing a request to modify its parameters has been removed. Where possible, the request should be made with the required parameters from the outset, either in its query string or in its form URL encoding body. Where this is not possible, its form URL encoded body can be modified prior to it being documented to change the parameters that it contains.
Spring REST Docs' REST Assured integration now requires REST Assured 5.2 and now resides in the org.springframework.restdocs.restassured
package.