Hi there,

I was trying to use the most up-to-date version of the following Maven
plugin to generate the REST routes and DTOs for a given openApi 3.1.0 spec:
<groupId>org.apache.camel</groupId>
<artifactId>camel-restdsl-openapi-plugin</artifactId>
<version>4.4.0</version>

with default settings in the <build> section and using the option:
"camel-restdsl-openapi:generate".

Unfortunately it gave me this error:
[ERROR] Failed to execute goal
org.apache.camel:camel-restdsl-openapi-plugin:4.4.0:generate-with-dto
(generate-sources) on project openapi-test: Execution generate-sources of
goal org.apache.camel:camel-restdsl-openapi-plugin:4.4.0:generate-with-dto
failed: Unsupported document type:
io.apicurio.datamodels.models.openapi.v31.OpenApi31DocumentImpl

(The Maven plugin camel-restdsl-openapi-plugin uses apicurio version 2.0.3
(see:
https://github.com/apache/camel/blob/main/tooling/openapi-rest-dsl-generator/pom.xml
=>
https://github.com/apache/camel/blob/e248d5cd78912c0b12f41565b44193f6d2db0008/parent/pom.xml
)
but this apicurio version already contains/supports an openApi 3.1
datamodel. It's just that this plugin seems not to be able to handle this
data model)

So isn't the plugin compatible with openApi Spec 3.1.0? I can't see that
restriction from the plugin documentation here:
https://github.com/apache/camel/blob/main/tooling/maven/camel-restdsl-openapi-plugin/src/main/docs/camel-restdsl-openapi-plugin.adoc


Thanks and kind regards

Jacob

Reply via email to