https://github.com/griffio/spring-restdocs-hateoas
spring-restdocs spring-data-hateoas kotlin
https://github.com/griffio/spring-restdocs-hateoas
kotlin restdocs spring-boot
Last synced: 4 months ago
JSON representation
spring-restdocs spring-data-hateoas kotlin
- Host: GitHub
- URL: https://github.com/griffio/spring-restdocs-hateoas
- Owner: griffio
- Created: 2022-07-16T17:39:59.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2024-12-07T16:26:32.000Z (over 1 year ago)
- Last Synced: 2024-12-28T09:39:38.622Z (about 1 year ago)
- Topics: kotlin, restdocs, spring-boot
- Language: Kotlin
- Homepage: https://griffio.github.io/spring-restdocs-hateoas/
- Size: 477 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Kollchap Restful Dungeon spring hateoas rest-docs
Building up example with [Spring REST Docs 3.0.3](https://github.com/spring-projects/spring-restdocs)
* 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](https://github.com/griffio/spring-restdocs-hateoas/blob/master/src/test/kotlin/griffio/kollchap/demo/DemoApplicationTests.kt)
Spring Boot 3.4.0
Kotlin 2.0.10 https://detekt.dev/docs/introduction/compatibility/#tool-versions
Asciidoc template located in [/src/docs/asciidoc/index.adoc](https://github.com/griffio/spring-restdocs-hateoas/blob/master/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](https://griffio.github.io/spring-restdocs-hateoas/)

The Dungeons Of Kollchap - from https://en.wikipedia.org/wiki/What_Is_Dungeons_%26_Dragons%3F
### Changes
* javax.persistence -> jakarta.persistence
* Kotlin aligned with https://detekt.dev/docs/introduction/compatibility/#tool-versions
---
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 with restdocs copied to static docs
~~~
./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=/
~~~