To generate http apis of gRPC service.
com.yinxiang.utils.api.doc.RestApiGenerator
.<plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>exec-maven-plugin</artifactId> <version>3.0.0</version> <executions> <execution> <phase>test</phase> <goals> <goal>java</goal> </goals> <configuration> <includePluginDependencies>true</includePluginDependencies> <mainClass>com.yinxiang.utils.api.doc.RestApiGenerator</mainClass> <arguments> <argument>${basedir}/../test-stubs/target/generated-sources/protobuf/</argument> <argument>${basedir}/../test-stubs/target/classes</argument> <argument>${basedir}/</argument> <argument></argument> </arguments> </configuration> </execution> </executions> </plugin>
com.yinxiang.utils.api.doc.RestApiHtmlGenerator
.<plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>exec-maven-plugin</artifactId> <version>3.0.0</version> <executions> <execution> <phase>test</phase> <goals> <goal>java</goal> </goals> <configuration> <includePluginDependencies>true</includePluginDependencies> <mainClass>com.yinxiang.utils.api.doc.RestApiHtmlGenerator</mainClass> <arguments> <argument>${basedir}/../test-stubs/target/generated-sources/protobuf/</argument> <argument>${basedir}/../test-stubs/target/classes</argument> <argument>${basedir}/</argument> <argument></argument> </arguments> </configuration> </execution> </executions> </plugin>
com.yinxiang.utils.api.doc.RestApiJsonGenerator
.<plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>exec-maven-plugin</artifactId> <version>3.0.0</version> <executions> <execution> <phase>test</phase> <goals> <goal>java</goal> </goals> <configuration> <includePluginDependencies>true</includePluginDependencies> <mainClass>com.yinxiang.utils.api.doc.RestApiJsonGenerator</mainClass> <arguments> <argument>${basedir}/../test-stubs/target/generated-sources/protobuf/</argument> <argument>${basedir}/../test-stubs/target/classes</argument> <argument>${basedir}/</argument> <argument></argument> </arguments> </configuration> </execution> </executions> </plugin>
com.yinxiang.utils.api.doc.ServiceReactApiGenerator
, need use: https://github.com/yinxiang-team/service-api-react. Clone it and create a new react project with copy all code and push to a git repository.<plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>exec-maven-plugin</artifactId> <version>3.0.0</version> <executions> <execution> <phase>test</phase> <goals> <goal>java</goal> </goals> <configuration> <includePluginDependencies>true</includePluginDependencies> <mainClass>com.yinxiang.utils.api.doc.ServiceReactApiGenerator</mainClass> <arguments> <argument>${basedir}/../test-stubs/target/generated-sources/protobuf/</argument> <argument>${basedir}/../test-stubs/target/classes</argument> <argument>${basedir}/_service-api</argument> <argument></argument><!-- this arg is the new react repository. --> </arguments> </configuration> </execution> </executions> <dependencies> <dependency> <groupId>com.sun</groupId> <artifactId>tools</artifactId> <version>1.8</version> <scope>system</scope> <systemPath>${java.home}/../lib/tools.jar</systemPath> </dependency> </dependencies> </plugin>