3 Star 7 Fork 0

springrain / javadoc4openapi-maven-plugin

Create your Gitee Account
Explore and code with more than 5 million developers,Free private repositories !:)
Sign up
Clone or download
Cancel
Notice: Creating folder will generate an empty file .keep, because not support in Git
Loading...
README.md

介绍

javadoc4openapi 使用java注释代替swagger注解,生成openapi(swagger3)文档,代码零侵入.

javadoc4openapi-maven-plugin是其maven插件,项目编译时在resources下生成javadoc4openapi.yaml文档文件.

目前支持SpringMVC/SpringBoot

使用条件

依赖源码,项目在编译时需要打源码包,Maven配置如下

<!-- Source -->
<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-source-plugin</artifactId>
    <version>3.2.1</version>
    <executions>
        <execution>
            <phase>package</phase>
            <goals>
                <goal>jar-no-fork</goal>
            </goals>
        </execution>
    </executions>
</plugin>

如何使用

目前还没有上传到Maven仓库,需要手动在本地install一下再引用.

Maven插件配置如下


            <plugin>
                <groupId>org.springrain</groupId>
                <artifactId>javadoc4openapi-maven-plugin</artifactId>
                <version>0.0.1</version>
                <configuration>
                    <includes>
                        <!--需要加载分析的maven依赖源码包,本项目的groupId默认添加-->
                        <!--可以添加groupId或者groupId:artifactId-->
                        <!--
                        <include>org.springrain</include>
                        -->
                    </includes>
                </configuration>
                <executions>
                    <execution>
                        <!--如果不需要在执行编译时启动,则将phase注释掉-->
                        <phase>compile</phase>
                        <goals>
                            <goal>openapi</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

头条号

博客 https://www.jiagou.com
架构头条号

Comments ( 0 )

Sign in for post a comment

About

javadoc4openapi的maven插件,编译时自动生成openapi文档 spread retract
Cancel

Releases

No release

Contributors

All

Activities

load more
can not load any more
1
https://git.oschina.net/chunanyong/javadoc4openapi-maven-plugin.git
git@git.oschina.net:chunanyong/javadoc4openapi-maven-plugin.git
chunanyong
javadoc4openapi-maven-plugin
javadoc4openapi-maven-plugin
master

Search