Building up example with Spring REST Docs 2.0.6
- Added javax.validator constraints to be pulled out
- Added subsection to pull out DnD character stats
Verify Restful Api and generate docs from Tests kotlin/griffio/kollchap/demo/DemoApplicationTests.kt
Spring Boot 3.1.1
Kotlin 1.8.21
Asciidoc template located in /src/docs/asciidoc/index.adoc
Use GitHub action to build asciidoc and publish html to GitHubPages
The published restdoc can be viewed here https://griffio.github.io/spring-restdocs-hateoas
The Dungeons Of Kollchap - from https://en.wikipedia.org/wiki/What_Is_Dungeons_%26_Dragons%3F
- javax.persistence -> jakarta.persistence
Tasks
Run tests and output completed docs in build/docs/asciidoc/index.html
./gradlew asciidoctor
Run tests only - does not generate index.html
./gradlew test
Run all tasks and create deployable jar
./gradlew bootJar
Execute jar with compatible Java 17
java -jar build/libs/kollchap-0.0.1-SNAPSHOT.jar
Restful Api index
http://localhost:8080/
Restdocs index
http://localhost:8080/docs/index.html
HAL explorer client
http://localhost:8080/webjars/hal-explorer/1.1.0/index.html#uri=/