Skip to content
This repository was archived by the owner on Jan 31, 2024. It is now read-only.

Commit 195d8f0

Browse files
committed
add restdocs description in README.md
1 parent b8099e5 commit 195d8f0

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,24 @@ You can use one of the following approaches to run this project.
115115

116116
If you want to explore the REST API docs online, there is a *Swagger UI* configured for visualizing the REST APIs, just go to [http://localhost:9000/swagger-ui.html](http://localhost:9000/swagger-ui.html).
117117

118+
### Generate static REST API docs
119+
120+
I move the rest docs generation to a standalone profile.
121+
122+
Execute the following command line to generate HTML and PDF format for your REST APIs, which combined the Swagger description file and Spring test code snippets(as code samples).
123+
124+
```
125+
mvn clean package -Drestdocs
126+
```
127+
128+
The details are explained in [API documention](https://hantsy.gitbooks.io/build-a-restful-app-with-spring-mvc-and-angularjs/content/swagger.html) section.
129+
130+
When it is done, check the generated static docs in *target/asciidoc* folder, including a HTML 5 file, and PDF format file.
131+
132+
The pdf document looks like.
133+
134+
![pdf](https://github.com/hantsy/angularjs-springmvc-sample-boot/blob/master/restdocs.png)
135+
118136
### Docker
119137

120138
You can run the project in multistage Docker building development environment, check [Multistage Builds](https://github.com/hantsy/devops-sandbox/blob/master/multistage.md).

restdocs.png

124 KB
Loading

0 commit comments

Comments
 (0)