We use swagger ui
as the ui show.
<parent>
<groupId>com.baiwangmaoyi</groupId>
<artifactId>backend-parent</artifactId>
<version>1.16</version>
</parent>
<!--swagger-->
<dependency>
<groupId>io.swagger</groupId>
<artifactId>swagger-jersey2-jaxrs</artifactId>
<version>1.5.0</version>
<scope>compile</scope>
</dependency>
Reference: How to Use Plugin
Some configurations have been filled in common. So just configure some project-related.
Attention:remember to change version to away from covering others doc.
<plugin>
<groupId>com.github.kongchen</groupId>
<artifactId>swagger-maven-plugin</artifactId>
<configuration>
<apiSources>
<apiSource>
<locations>
com.baiwangmaoyi.ap.rest //your rest folder
</locations>
<info>
<title>test</title> // the doc name
<version>1.0.0</version> //the doc version
</info>
</apiSource>
</apiSources>
</configuration>
</plugin>
Reference: Swagger Annotations
@GET
@Produces(MediaType.APPLICATION_JSON)
@ApiOperation(value = "Find incoming invoice list", response = InvoiceInputDTO.class, responseContainer = "List")
@ApiResponses(@ApiResponse(code = 500, message = "internal error"))
run mvn clean compile -DskipTests
Download api.js
in the related
folder, and put it on your project root directory such as SC-Invoice-Input/
.
- temp version: run
node api.js
- stable version(we must on
master
branch): runnode api.js -stable
visit UI
- authentication setting
- material UI