【问题标题】:openapi-generator-maven-plugin code gen from http来自 http 的 openapi-generator-maven-plugin 代码生成
【发布时间】:2022-03-21 22:45:21
【问题描述】:

我们可以在 openapi-generator-maven-plugin 中传递输入的 yml 规范 HTTP URL 吗?

我想让输入规范和生成的代码保持同步。

【问题讨论】:

    标签: swagger swagger-codegen swagger-codegen-maven-plugin openapi-generator-maven-plugin


    【解决方案1】:

    是的,使用 openapi-generator-maven-plugin 只需将包含协议的 URL 提供为 inputSpec:

    <plugin>
        <groupId>org.openapitools</groupId>
        <artifactId>openapi-generator-maven-plugin</artifactId>
        <version>5.4.0</version>
        <executions>
            <execution>
                ...
                <configuration>
                    <inputSpec>https://petstore3.swagger.io/api/v3/openapi.yaml</inputSpec>
                    ...
                </configuration>
            </execution>
        </executions>
    </plugin>
    

    可能需要更新插件版本。

    【讨论】:

      猜你喜欢
      • 2022-07-23
      • 2021-08-08
      • 2020-10-26
      • 2022-07-15
      • 2021-11-09
      • 2022-09-30
      • 2022-07-15
      • 2023-03-04
      • 2020-05-06
      相关资源
      最近更新 更多