swagger-core icon indicating copy to clipboard operation
swagger-core copied to clipboard

Support jakarta.xml.bind-api for spring boot 3 apps

Open FoKas90 opened this issue 2 years ago • 2 comments

I've recently upgraded my spring boot project to version 3.1.1, therefore it doesn't have any javax.* dependencies. Also my project has dependency from swagger libs 2.2.20 in order to generate openrpc specs. I use ModelConverters in order to obtain ResolvedSchema. When ModelConverters.readAllAsResolvedSchema() is called my app fails with error ClassNotFoundException: javax.xml.bind.annotation.XmlElement because SwaggerAnnotationIntrospector depends on javax.xml.bind.annotation.XmlElement which doesn't exists in classpath.

I suggest provide support of jakarta.xml.bind-api so that swagger libs can be used within spring boot 3 apps

FoKas90 avatar Feb 01 '24 10:02 FoKas90

Jakarta namespace is supported by dedicated artifacts, please see wiki

ghost avatar Feb 07 '24 13:02 ghost

@ivasilachi thanks for response and pointer, closing ticket

frantuma avatar Feb 07 '24 13:02 frantuma