Previously, OperationRequestFactory would add a Host header if one did not already exist in the request’s headers, however it did not include the port. This meant that when the request was being made to a non-standard port (a port other than 80 for an HTTP request and 443 for an HTTPS request) the Host header was incorrect. This commit updates OperationRequestFactory to check the URI for a port and, if it has one, include it in the Host header. UriModifyingOperationPreprocessor has also been updated to correctly include the port in the Host header. Closes gh-269
Spring REST Docs 
Overview
The primary goal of this project is to make it easy to document RESTful services by combining content that's been hand-written using Asciidoctor with auto-generated examples produced with the Spring MVC Test framework. The result is intended to be an easy-to-read user guide, akin to GitHub's API documentation for example, rather than the fully automated, dense API documentation produced by tools like Swagger.
For a broader introduction see the Documenting RESTful APIs presentation. Both the slides and a video recording are available.
Learning more
To learn more about Spring REST Docs, please consult the reference documentation.
Building from source
You will need Java 7 or later to build Spring REST Docs. It is built using Gradle:
./gradlew build
Contributing
Contributors to this project agree to uphold its code of conduct.
There are several that you can contribute to Spring REST Docs:
- Open a pull request. Please see the contributor guidelines for details.
- Ask and answer questions on Stack Overflow using the
spring-restdocstag. - Chat with fellow users on Gitter.
Third-party extensions
| Name | Description |
|---|---|
| restdocs-wiremock | Auto-generate WireMock stubs as part of documenting your RESTful API |
Licence
Spring REST Docs is open source software released under the Apache 2.0 license.