Spring REST Doc v1.1.0 发布,RESTful 服务文档管理
jopen 8年前
<p style="text-align: center;"><img alt="" src="https://simg.open-open.com/show/aa62afb56d42a6a12d777eabfc529192.png" /></p> <p>Spring REST Docs 帮助你管理 RESTful 服务文档,使用 Asciidoctor 来编写文档,使用 Spring MVC Test. 自动生成片段。</p> <h2>更新日志</h2> <h3>Highlights</h3> <p>REST Assured</p> <p>As an alternative to the lightweight server-less documentation generation offered by Spring Framework’s <code>MockMvc</code>, you can now use <a href="/misc/goto?guid=4958991038814238477">REST Assured</a> 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.</p> <p>The <a href="/misc/goto?guid=4958991038941398642">samples</a> now include <a href="/misc/goto?guid=4958991039051973881">an app</a> 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 <a href="/misc/goto?guid=4958991039178717035">available</a>. My thanks to <a href="/misc/goto?guid=4958991039297877569">Jenn Strater</a> who wrote both samples.</p> <h3>Markdown</h3> <p>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 <a href="/misc/goto?guid=4958986647293559255">Slate</a>.</p> <h3>TestNG</h3> <p>In addition to the existing support for using JUnit, you can now use Spring REST Docs with<a href="/misc/goto?guid=4958860118623297310">TestNG</a>.</p> <h3>Reusable snippets</h3> <p>Snippets can now be created once with some common configuration and then <a href="/misc/goto?guid=4958991039491615136">reused</a>. This reduces repetition when documenting common parts on an API, such as <code>self</code> links. My thanks to <a href="/misc/goto?guid=4958991039610883793">Marcel Overdijk</a> whose feedback and pull requests have significantly improved this new feature.</p> <h3>Relaxed snippets</h3> <p>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.</p> <h2>下载</h2> <ul> <li><a href="/misc/goto?guid=4958991039730235979" rel="nofollow"><strong>Source code</strong> (zip)</a></li> <li><a href="/misc/goto?guid=4958991039845812540" rel="nofollow"><strong>Source code</strong> (tar.gz)</a></li> </ul>