Description
REST Docs 2.0 requires Spring Framework 5 but Grails 3 uses Spring Framework 4.3. This was missed as part of the work on 2.0 and we've got away with it until now, but a recent addition of a call to org.springframework.util.Assert.state(boolean, Supplier<String>)
has made the problem apparent.
We do not want to give the false impression that using REST Docs 2.0 with Framework 4.3 is supported. I tried to update the sample to use Grails 4 but it wasn't straightforward. At the time of writing, the top 10 most popular content as shown by GitHub's traffic insight is the following:
- https://github.com/spring-projects/spring-restdocs
- https://github.com/spring-projects/spring-restdocs/tree/master/samples/rest-notes-spring-data-rest
- https://github.com/spring-projects/spring-restdocs/tree/master/samples/rest-notes-spring-data-rest/src
- https://github.com/spring-projects/spring-restdocs/tree/master/samples/rest-notes-spring-data-rest/src/main
- https://github.com/spring-projects/spring-restdocs/tree/v2.0.3.RELEASE/samples/rest-notes-spring-data-rest
- https://github.com/spring-projects/spring-restdocs/tree/master/samples/rest-notes-spring-hateoas
- https://github.com/spring-projects/spring-restdocs/tree/master/samples/rest-notes-spring-data-rest/src/main/java/com/example/notes
- https://github.com/spring-projects/spring-restdocs/tree/master/samples/web-test-client
- https://github.com/spring-projects/spring-restdocs/tree/master/samples
- https://github.com/spring-projects/spring-restdocs/tree/master/samples/junit5
Given the relative lack of interest in the sample and its relatively high maintenance cost (#357, #445, #540), I think the best course of action is to remove it. A Grails 4 sample could be added in the future if there's sufficient interest. In the meantime, the Grails sample will continue to be available in the 1.2.x branch.