apache / camel-quarkus

Apache Camel Quarkus
https://camel.apache.org
Apache License 2.0
257 stars 192 forks source link

Remove Swagger ModelResolverSubstitutions #6593

Open jamesnetherton opened 1 month ago

jamesnetherton commented 1 month ago

Bug description

Quarkus has upgraded Jackson to 2.18.0 & Swagger Core is using some deprecated APIs which got removed.

Caused by: com.oracle.graal.pointsto.constraints.UnsupportedFeatureException: Discovered unresolved method during parsing: com.fasterxml.jackson.databind.BeanDescription.findJsonValueMethod(). This error is reported at image build time because class io.swagger.v3.core.jackson.ModelResolver is registered for linking at image build time by command line and command line.
Error encountered while parsing io.swagger.v3.core.jackson.ModelResolver.findJsonValueType(ModelResolver.java:1065)
Parsing context:
   at io.swagger.v3.core.jackson.ModelResolver.resolve(ModelResolver.java:410)
   at io.swagger.v3.core.converter.ModelConverterContextImpl.resolve(ModelConverterContextImpl.java:97)
   at io.swagger.v3.core.converter.ModelConverters.readAll(ModelConverters.java:137)
   at io.swagger.v3.core.converter.ModelConverters.readAll(ModelConverters.java:128)
   at org.apache.camel.openapi.RestModelConverters.readClassOpenApi3(RestModelConverters.java:84)
   at org.apache.camel.openapi.RestModelConverters.readClass(RestModelConverters.java:73)
   at org.apache.camel.openapi.RestOpenApiReader.appendModels(RestOpenApiReader.java:1028)
   at org.apache.camel.openapi.RestOpenApiReader.parse(RestOpenApiReader.java:324)
   at org.apache.camel.openapi.RestOpenApiReader.read(RestOpenApiReader.java:209)
   at org.apache.camel.openapi.RestOpenApiSupport.renderResourceListing(RestOpenApiSupport.java:315)
   at org.apache.camel.openapi.RestOpenApiProcessor.doInit(RestOpenApiProcessor.java:75)
   at org.apache.camel.support.service.BaseService.init(BaseService.java:85)
   at org.apache.camel.support.service.BaseService.start(BaseService.java:115)
   at org.apache.camel.support.ScheduledPollConsumer.beforePoll(ScheduledPollConsumer.java:736)
   at root method.(Unknown Source)
jamesnetherton commented 1 month ago

Some more detail in https://github.com/swagger-api/swagger-core/issues/4755.

jamesnetherton commented 1 month ago

Fixed in #6648.

jamesnetherton commented 1 month ago

Reopening since we should remove the workaround when we get an upgraded swagger-core.