Spring REST Docs 1.1.0.RELEASE

Releases | Andy Wilkinson | May 31, 2016 | ...

It's my pleasure to announce the release of Spring REST Docs 1.1.0.RELEASE which is now available for Maven Central, JCenter and our release repository.

Highlights

REST Assured

As an alternative to the lightweight server-less documentation generation offered by Spring Framework's MockMvc, you can now use REST Assured to test and document your RESTful services. This opens up Spring REST Docs to all four corners of the JVM and beyond, allowing you to document anything that you can access via HTTP.

The samples now include an app that is documented using REST Docs, built using Grails, and tested using Spock. A third-party sample that uses REST Docs to document an API implemented using Ratpack is also available. My thanks to Jenn Strater who wrote both samples.

Markdown

Support has been added for generating Markdown snippets. On its own, Markdown isn't as capable as Asciidoctor, but can work very well when combined with existing documentation toolchains such as Slate.

TestNG

In addition to the existing support for using JUnit, you can now use Spring REST Docs with TestNG.

Reusable snippets

Snippets can now be created once with some common configuration and then reused. This reduces repetition when documenting common parts on an API, such as self links. My thanks to Marcel Overdijk whose feedback and pull requests have significantly improved this new feature.

Relaxed snippets

By default, Spring REST Docs will cause your tests to fail if you've neglected to document something or if you've attempted to document something that doesn't exist. This is great for detailed API documentation, but can be restrictive when documenting a scenario where you want to focus on a specific part of a request or response. Rather than having to explicitly ignore everything that you don't want to document, you can now use relaxed snippets for documenting links, request and response fields, and request and path parameters.

Using Spring REST Docs 1.1 with Spring Boot 1.3

By default, Spring Boot 1.3 uses Spring REST Docs 1.0. To use 1.1, you should override the version configured in Boot's dependency management in your pom.xml or build.gradle:

pom.xml:

<properties>
    <spring-restdocs.version>1.1.0.RELEASE</spring-restdocs.version>
</properties>

build.gradle:

ext['spring-restdocs.version']=1.1.0.RELEASE

Thank you

Thank you to everyone who has contributed to Spring REST Docs and helped to shape the 1.1 release. I'm looking forward to your feedback here, on GitHub, Stack Overflow, and Twitter.

Project Page | GitHub | Issues | Documentation

Get the Spring newsletter

Thank you for your interest. Someone will get back to you shortly.

Get ahead

VMware offers training and certification to turbo-charge your progress.

Learn more

Get support

Tanzu Spring Runtime offers support and binaries for OpenJDK™, Spring, and Apache Tomcat® in one simple subscription.

Learn more

Upcoming events

Check out all the upcoming events in the Spring community.

View all