Skip to content

Commit 4aa4a2f

Browse files
authored
Update README_swagger.md
1 parent b12053f commit 4aa4a2f

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

README_swagger.md

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
The swagger.json file has been generated by the com.sebastian-daschner:jaxrs-analyzer-maven-plugin:jar:0.15 Maven plugin.
44

55
The following plugin must be added into the pom.xml of javaee7-angular project in order to re-generate the swagger.json document if you update the JAX-RS annotations of the RESTFul application.
6-
6+
```
77
<plugin>
88
<groupId>com.sebastian-daschner</groupId>
99
<artifactId>jaxrs-analyzer-maven-plugin</artifactId>
@@ -21,13 +21,14 @@ The following plugin must be added into the pom.xml of javaee7-angular project i
2121
</execution>
2222
</executions>
2323
</plugin>
24-
24+
```
2525

2626
And copy the new file in the directory
27+
```
2728
cp ../javaee7-angular/target/jaxrs-analyzer/swagger.json .
28-
29+
```
2930
Then, you should add the following statements into the swagger.json file
30-
31+
```
3132
...
3233
"info": {
3334
"description": "This is a sample of a simple RESTFul JavaEE server.",
@@ -44,8 +45,9 @@ Then, you should add the following statements into the swagger.json file
4445
},
4546
"host": "localhost:8080",
4647
...
47-
48+
```
4849
# Generate the static documentation (HTML)
50+
```
4951
sudo npm install -g yamljs
5052
sudo npm install -g bootprint bootprint-openapi
5153
sudo npm install -g html-inline
@@ -54,12 +56,13 @@ mkdir -p target
5456
yaml2json --pretty api/swagger/swagger.yaml > target/swagger.json
5557
bootprint openapi target/swagger.json target/docs
5658
html-inline target/docs/index.html > target/docs/one_page_index.html
57-
59+
```
5860
# Generate the static documentation (PDF)
5961
TODO see https://www.npmjs.com/package/swagger-spec-to-pdf
62+
```
6063
/usr/lib/node_modules/swagger-spec-to-pdf/bin/swagger2pdf -s target/swagger.json -t target/docs/swagger.pdf
6164
swagger2pdf
62-
65+
```
6366
# Alternative : Generate the static documentation from (ADOC, HTML, PDF)
6467
TODO
6568
https://github.com/Swagger2Markup/spring-swagger2markup-demo.git

0 commit comments

Comments
 (0)