mirror of
https://gitee.com/bookshelfplus/bookshelfplus
synced 2025-09-14 20:41:38 +08:00
添加Swagger2生成Api文档测试类,以及adoc转html
This commit is contained in:
@@ -28,7 +28,7 @@
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<version>4.11</version>
|
||||
<version>4.13</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
@@ -116,12 +116,12 @@
|
||||
<dependency>
|
||||
<groupId>io.springfox</groupId>
|
||||
<artifactId>springfox-swagger2</artifactId>
|
||||
<version>2.6.1</version>
|
||||
<version>2.9.2</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.springfox</groupId>
|
||||
<artifactId>springfox-swagger-ui</artifactId>
|
||||
<version>2.6.1</version>
|
||||
<version>2.9.2</version>
|
||||
</dependency>
|
||||
<!--前面引入过这个包-->
|
||||
<!--<dependency>-->
|
||||
@@ -133,6 +133,21 @@
|
||||
<artifactId>spring-boot-starter-test</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<!-- Swagger 生成离线静态API文档
|
||||
refer: https://blog.csdn.net/aiguoguo000/article/details/105681606
|
||||
-->
|
||||
<dependency>
|
||||
<groupId>io.github.swagger2markup</groupId>
|
||||
<artifactId>swagger2markup</artifactId>
|
||||
<version>1.3.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.asciidoctor</groupId>
|
||||
<artifactId>asciidoctorj-pdf</artifactId>
|
||||
<version>1.5.0-alpha.10.1</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
@@ -218,6 +233,44 @@
|
||||
</configurationFile>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
<!-- Swagger 生成离线静态API文档
|
||||
refer: https://blog.csdn.net/aiguoguo000/article/details/105681606
|
||||
-->
|
||||
<plugin>
|
||||
<groupId>io.github.swagger2markup</groupId>
|
||||
<artifactId>swagger2markup-maven-plugin</artifactId>
|
||||
<version>1.3.1</version>
|
||||
<configuration>
|
||||
<swaggerInput>http://localhost:8080/v2/api-docs</swaggerInput>
|
||||
<outputDir>src/docs/asciidoc/generated</outputDir>
|
||||
<config>
|
||||
<swagger2markup.markupLanguage>ASCIIDOC</swagger2markup.markupLanguage>
|
||||
</config>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.asciidoctor</groupId>
|
||||
<artifactId>asciidoctor-maven-plugin</artifactId>
|
||||
<version>1.5.6</version>
|
||||
<configuration>
|
||||
<!--asciidoc文件目录-->
|
||||
<sourceDirectory>docs/asciidoc/generated</sourceDirectory>
|
||||
<!---生成html的路径-->
|
||||
<outputDirectory>docs/asciidoc/html</outputDirectory>
|
||||
<backend>html</backend>
|
||||
<sourceHighlighter>coderay</sourceHighlighter>
|
||||
<attributes>
|
||||
<!--导航栏在左-->
|
||||
<toc>left</toc>
|
||||
<!--显示层级数-->
|
||||
<!--<toclevels>3</toclevels>-->
|
||||
<!--自动打数字序号-->
|
||||
<sectnums>true</sectnums>
|
||||
</attributes>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
</plugins>
|
||||
</pluginManagement>
|
||||
<plugins>
|
||||
|
Reference in New Issue
Block a user