'OpenAPI Swagger Documentation for Springboot application

We are trying to generate swagger documentation for our project. It's springboot project but it has JAX-RS annotations like @Path, @Get, @Post etc.

We have added modified SpringBootApplication.java file to include swagger configurations like -

@EnableAutoConfiguration
@ComponentScan
@ImportResource({"/spring/context.xml"})
@OpenAPIDefinition(info = @Info(title = "MFSWalletServ API's", version = "1.0", 
    description = "API Information"),
    servers = { @Server(description = "local", url = "http://localhost:8080"),
    @Server(description = "Stage", url = "https://msmaster.qa.paypal.com:12326")})

public class SpringBootApplication extends SpringBootServletInitializer {

    public static void main(String[] args) throws IOException {
          SpringApplication.run(RaptorApplication.class);
    }

}

Swagger page is showing up but no API's are coming up.

Current Swagger page

We might have to add some property or something to tell swagger where(package) to look for API's - but i am not sure where to add them. How can i add swagger documentation for our API's ?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source