[ https://issues.apache.org/jira/browse/CXF-9051?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Dmitry updated CXF-9051: ------------------------ Description: I'm upgrading spring boot in my project from 2.7 to 3.0.0 So changed cxf-rt-rs-service-description-swagger -> cxf-rt-rs-service-description-openapi-v3 After that I try just replace Swagger2Feature to OpenApiFuture and swagger-ui doesn't show my controllers and models anymore("No operations defined in spec"). Manual creating of cxf.endpoint.Server bean also didnt help me. What I do wrong? *Code of the problem:* +[https://github.com/romanov93/cxf-migtaion/tree/master+] Spring Boot 2.7.18 and Swagger2Feature: !image-2024-09-06-16-59-13-761.png! Spring Boot 3.0.0 and OpenApiFeature: !image-2024-09-06-17-01-05-729.png! Sorry for the stupid question, I don't know where else I can get help with that. Thank! ------------------------------------------------------------------------- @Configuration public class SwaggerConfiguration { @Bean public OpenApiFeature swaggerFeature() { OpenApiFeature swagger = new OpenApiFeature(); swagger.setVersion("1.0.0"); //swagger.setBasePath("/"); swagger.setPrettyPrint(true); //swagger.setSchemes(new String[]\\{"https", "http"} ); swagger.setContactEmail("exam...@mail.ru"); swagger.setDescription("Swagger cxf app"); swagger.setTitle("Title"); swagger.setSupportSwaggerUi(true); swagger.setSwaggerUiConfig(new SwaggerUiConfig().configUrl("/openapi.json")); //swagger.setHost("localhost:8080"); System.out.println("http://localhost:8080/api-docs?url=/openapi.json"); return swagger; } // @Bean // public Server jaxRsServer(Bus bus, UserController userController) { // final JAXRSServerFactoryBean factory = new JAXRSServerFactoryBean(); // // factory.setServiceBean(userController); // factory.setProvider(new JacksonJsonProvider()); // factory.setFeatures(Arrays.asList(swaggerFeature())); // factory.setBus(bus); // factory.setAddress("/"); // return factory.create(); // } } was: I'm upgrading spring boot in my project from 2.7 to 3.0.0 So changed cxf-rt-rs-service-description-swagger -> cxf-rt-rs-service-description-openapi-v3 After that I try just replace Swagger2Feature to OpenApiFuture and swagger-ui doesn't show my controllers and models anymore("No operations defined in spec"). Manual creating of cxf.endpoint.Server bean also didnt help me. What I do wrong? *Code of the problem:* +https://github.com/romanov93/cxf-migtaion/tree/master+ Spring Boot 2.7.18 and Swagger2Feature: !image-2024-09-06-16-59-13-761.png! Spring Boot 3.0.0 and OpenApiFeature: !image-2024-09-06-17-01-05-729.png! Sorry for the stupid question, I don't know where else I can get help with that. Thank! > SwaggerUI broken after migrate from description-swagger to > description-openapi-v3 > --------------------------------------------------------------------------------- > > Key: CXF-9051 > URL: https://issues.apache.org/jira/browse/CXF-9051 > Project: CXF > Issue Type: Bug > Components: JAX-RS > Affects Versions: 4.0.5 > Reporter: Dmitry > Priority: Major > Attachments: image-2024-09-06-16-59-13-761.png, > image-2024-09-06-17-01-05-729.png > > > I'm upgrading spring boot in my project from 2.7 to 3.0.0 > So changed > cxf-rt-rs-service-description-swagger -> > cxf-rt-rs-service-description-openapi-v3 > After that I try just replace Swagger2Feature to OpenApiFuture and swagger-ui > doesn't show my controllers and models anymore("No operations defined in > spec"). > Manual creating of cxf.endpoint.Server bean also didnt help me. > What I do wrong? > *Code of the problem:* > +[https://github.com/romanov93/cxf-migtaion/tree/master+] > Spring Boot 2.7.18 and Swagger2Feature: > !image-2024-09-06-16-59-13-761.png! > Spring Boot 3.0.0 and OpenApiFeature: > !image-2024-09-06-17-01-05-729.png! > Sorry for the stupid question, I don't know where else I can get help with > that. Thank! > ------------------------------------------------------------------------- > @Configuration > public class SwaggerConfiguration { > @Bean > public OpenApiFeature swaggerFeature() > { OpenApiFeature swagger = new OpenApiFeature(); swagger.setVersion("1.0.0"); > //swagger.setBasePath("/"); swagger.setPrettyPrint(true); > //swagger.setSchemes(new String[]\\{"https", "http"} > ); > swagger.setContactEmail("exam...@mail.ru"); > swagger.setDescription("Swagger cxf app"); > swagger.setTitle("Title"); > swagger.setSupportSwaggerUi(true); > swagger.setSwaggerUiConfig(new SwaggerUiConfig().configUrl("/openapi.json")); > //swagger.setHost("localhost:8080"); > System.out.println("http://localhost:8080/api-docs?url=/openapi.json"); > return swagger; > } > // @Bean > // public Server jaxRsServer(Bus bus, UserController userController) > { // final JAXRSServerFactoryBean factory = new JAXRSServerFactoryBean(); // > // factory.setServiceBean(userController); // factory.setProvider(new > JacksonJsonProvider()); // > factory.setFeatures(Arrays.asList(swaggerFeature())); // factory.setBus(bus); > // factory.setAddress("/"); // return factory.create(); // } > } -- This message was sent by Atlassian Jira (v8.20.10#820010)