From 8f56bbe23134ecaa628f87546d8c9e4260466686 Mon Sep 17 00:00:00 2001 From: Filip Hanik Date: Thu, 19 Dec 2024 09:55:24 -0800 Subject: [PATCH] Add documentation on how to generate documentation on the local machine --- README.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/README.md b/README.md index 96c151c4981..4ac9a9047ee 100644 --- a/README.md +++ b/README.md @@ -292,6 +292,27 @@ In CloudFoundry terms * `app` is a webapp that needs single sign on and access to the `api` service on behalf of users. +## Generating API Documentation + +API documentation is generated using the [`spring-restdocs`](https://github.com/spring-projects/spring-restdocs) framework. +The tests that run this are located in [`uaa/tests`](file:./uaa/src/test/java) folder and are very similar to MockMvc tests. + +The formatting of the output documentation is done by using Ruby and [Slate](https://github.com/slatedocs/slate). + +To be able to run the command `./gradlew generateDocs` having Ruby 3.3.5 and bundler installed is key. + +### Installing Ruby using brew and rbenv + +```shell +brew install rbenv +rbenv install 3.3.5 +rbenv global 3.3.5 # or use rbenv local 3.3.5 +gem install bundler +./gradlew generateDocs +``` + +The produced documentation can be accessed via [index.html](file:./uaa/build/docs/version/0.0.0/index.html) + # Running the UAA on Kubernetes __Prerequisites__