Open shubifeng opened 6 years ago
swagger-spring-boot-starter 使用 1.7的版本 swagger2markup 使用2.8的版本 无法通过maven插件生成ASCIIdoc
<dependency> <groupId>com.spring4all</groupId> <artifactId>swagger-spring-boot-starter</artifactId> </dependency> <dependency> <groupId>io.github.swagger2markup</groupId> <artifactId>swagger2markup</artifactId> </dependency> <!--<dependency>--> <!--<groupId>io.springfox</groupId>--> <!--<artifactId>springfox-swagger-ui</artifactId>--> <!--<version>${swagger.version}</version>--> <!--</dependency>--> <!--<dependency>--> <!--<groupId>io.springfox</groupId>--> <!--<artifactId>springfox-swagger2</artifactId>--> <!--<version>${swagger.version}</version>--> <!--</dependency>--> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-test</artifactId> </dependency> <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-openfeign</artifactId> </dependency> </dependencies> <build> <plugins> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> <!-- <version>${spring-boot-maven-plugin.version}</version> --> <configuration> <executable>true</executable> </configuration> <executions> <execution> <goals> <goal>repackage</goal> </goals> </execution> </executions> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>${maven-compiler-plugin.version}</version> <configuration> <source>${java.version}</source> <target>${java.version}</target> </configuration> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin</artifactId> <version>${maven-jar-plugin.version}</version> <configuration> <excludes> <exclude>**/application.yml/**</exclude> <exclude>**/application.yml.example/**</exclude> </excludes> </configuration> </plugin> <!--https://gitee.com/didispace/spring-boot-starter-swagger详细参考--> <plugin> <groupId>io.github.swagger2markup</groupId> <artifactId>swagger2markup-maven-plugin</artifactId> <version>${swagger2markup.version}</version> <configuration> <swaggerInput>http://localhost:9062/v2/api-docs</swaggerInput> <outputFile>${project.basedir}/src/main/resources/static/generated/all</outputFile> <config> <swagger2markup.pathsGroupedBy>TAGS</swagger2markup.pathsGroupedBy> <swagger2markup.generatedExamplesEnabled>TRUE</swagger2markup.generatedExamplesEnabled> <swagger2markup.outputLanguage>ZH</swagger2markup.outputLanguage> <swagger2markup.markupLanguage>ASCIIDOC</swagger2markup.markupLanguage> <!-- <swagger2markup.markupLanguage>MARKDOWN</swagger2markup.markupLanguage> --> </config> </configuration> <!--<executions>--> <!--<execution>--> <!--<phase>test</phase>--> <!--<goals>--> <!--<goal>convertSwagger2markup</goal>--> <!--</goals>--> <!--</execution>--> <!--</executions>--> </plugin> <plugin> <groupId>org.asciidoctor</groupId> <artifactId>asciidoctor-maven-plugin</artifactId> <version>1.5.6</version> <!-- Configure generic document generation settings --> <configuration> <sourceDirectory>${project.basedir}/src/main/resources/static/generated</sourceDirectory> <outputDirectory>${project.basedir}/src/main/resources/static/docs</outputDirectory> <sourceDocumentName>all.adoc</sourceDocumentName> <backend>html</backend> <sourceHighlighter>coderay</sourceHighlighter> <attributes> <doctype>book</doctype> <toc>left</toc> <toclevels>3</toclevels> <numbered></numbered> <hardbreaks></hardbreaks> <sectlinks></sectlinks> <sectanchors></sectanchors> </attributes> </configuration> </plugin> </plugins> </build> </project>
swagger-spring-boot-starter 使用 1.7的版本 swagger2markup 使用2.8的版本 无法通过maven插件生成ASCIIdoc