Test-driven documentation with Spring REST Docs
summary
Introduces Spring REST Docs as a test-driven pipeline that hooks into integration tests (MockMvc or REST Assured), produces reusable snippets, and injects them into prose written with Asciidoctor or Markdown. Tests generate curl and HTTPie examples, response/request field tables, headers and hypermedia links; tests fail if documented fields don’t match actual requests or responses, and relaxed snippets allow partial examples. Build plugins (Maven/Gradle) produce HTML/PDF and can bundle docs into the service jar for serving.
AI-written summary · about
chapters (6)
- 0:00Start
- 19:53HTTP request
- 20:11Path parameters
- 21:08Response fields Pothi Type Description
- 21:35Asciidoctor
- 23:33Other snippets
related talks
57mDocumenting RESTful APIs with Spring REST Docs
01h 23mDocumenting RESTful APIs
50mSpring REST Docs: Documentation From Tests, Not the Other Way Around
41mIntroducing Spring Auto REST Docs
46mJUnit, RESTDocs, Asciidoctor and Maven to document your APIs
51mDocumenting RESTful APIs with Spring REST Docs and RAML
38mDocs as Tests: A Strategy for Resilient Docs
29mNo-Frills REST API Testing with REST-Assured
