Based on the examples, I created the following REST endpoints in the Apache Camel Spring Boot project and published the OpenAPI specification:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns=";
xmlns:xsi=";
xsi:schemaLocation="
.xsd
.xsd">
<camelContext xmlns=";>
<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>
Currently, when I access the following URL: /api/api-docs
, I receive the following response:
"openapi" : "3.0.0"
From which it is clear that the OpenAPI specification is being generated in version 3.0
I am using Apache Camel 4.9.0-SNAPSHOT
.
Is it possible to configure Camel to generate an OpenAPI specification in version 2.0
?
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1742401298a4436964.html
评论列表(0条)