Apache Camel Rest DSL OpenAPI 生成器

问题描述 投票:0回答:1

根据示例,我在 Apache Camel Spring Boot 项目中创建了以下 REST 端点并发布了 OpenAPI 规范:

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="
       http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
       http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd">

    <camelContext xmlns="http://camel.apache.org/schema/spring">

        <restConfiguration component="servlet" apiContextPath="/api-docs">
        </restConfiguration>

        <rest path="/say">
            <get path="/hello">
                <to uri="direct:hello"/>
            </get>
            <get path="/bye" consumes="application/json">
                <to uri="direct:bye"/>
            </get>
            <post path="/bye">
                <to uri="mock:update"/>
            </post>
        </rest>
    </camelContext>

</beans>

目前,当我访问以下网址:

/api/api-docs
时,我收到以下响应:

"openapi" : "3.0.0"

从中可以清楚地看出 OpenAPI 规范正在版本

3.0

中生成

我正在使用

Apache Camel 4.9.0-SNAPSHOT

是否可以配置Camel生成

2.0
版本的OpenAPI规范?

apache-camel openapi openapi-generator camel-rest
1个回答
0
投票

不,它不像詹姆斯在上面的评论中所写的那样

© www.soinside.com 2019 - 2024. All rights reserved.