在Open API Generator Maven插件中使用GIT存储库中的文件而不是<InputSpec>

时间:2019-09-23 11:12:48

标签: openapi openapi-generator

我正在使用“ openapi-generator-maven-plugin” 4.1.1版生成Model类 我目前正在使用'inputSpec'标签从Java项目的resources文件夹访问POM中的.yaml文件。

        <plugins>
            <plugin>
                <groupId>org.openapitools</groupId>
                <artifactId>openapi-generator-maven-plugin</artifactId>
                <version>4.1.1</version>
                <executions>
                    <execution>
                        <id>generate-sources-client</id>
                        <phase>generate-sources</phase>
                        <goals>
                            <goal>generate</goal>
                        </goals>
                        <configuration>
                            <inputSpec>${project.basedir}/src/main/resources/test.yaml</inputSpec>
                            <generatorName>java</generatorName>
                            <generateApiDocumentation>false</generateApiDocumentation>
                            <generateApis>true</generateApis>
                            <generateModels>true</generateModels>
                            <generateSupportingFiles>true</generateSupportingFiles>
                            <library>resttemplate</library>
                            <configOptions>
                                <java8>true</java8>
                                <dateLibrary>java8</dateLibrary>
                            </configOptions>
                            <library>resttemplate</library>
                            <output>${project.basedir}</output>
                            <apiPackage>com.test.api</apiPackage>
                            <modelPackage>com.test.model</modelPackage>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

我有一个场景,其中我需要从远程git存储库访问文件。有什么方法可以执行此操作吗? 不是很肯定and标签,它们是否与此相关?

0 个答案:

没有答案