cancel
Showing results for 
Search instead for 
Did you mean: 

Join different types of endpoints using springboot and Elide.

Highlighted
Occasional Visitor

Join different types of endpoints using springboot and Elide.

I have a spring-boot project with two kind of endpoints, I have a swagger configuration for each kind, working in isolation but I want to see all endpoints at http://localhost:8080/swagger-ui.html.

1. Typical controllers, using @RequestMapping and mappings (@GetMapping, @PostMapping and @DeleteMapping). With this configuration I use springfox (typical Docket object):

new Docket(DocumentationType.SWAGGER_2)
.select()
.apis(RequestHandlerSelectors
.basePackage("com.billib.business.coreengine"))
.paths(PathSelectors.any())
.build();

2. Elide endpoints, a framework with its own swagger system. I publish a @GetMapping(value = "/v2/api-docs") which returns an object of type io.swagger.models.Swagger (as a json) to create the response each time I open http://localhost:8080/swagger-ui.html. This endpoints can't be seen using springfox and Docket object until what I know.

@GetMapping(value = "/v2/api-docs", produces = MediaType.APPLICATION_JSON_UTF8_VALUE )
public String apiDocs() {
	EntityDictionary dictionary = elide.getElideSettings().getDictionary();

	Info info = new Info().title("Business REST API").version("1.0");
	SwaggerBuilder builder = new SwaggerBuilder(dictionary, info);
	Swagger document = builder.build();
		
	return SwaggerBuilder.getDocument(document);
}

 

I want to join all responses into one to see all together at http://localhost:8080/swagger-ui.html, but I can't, I can only separately.

Any idea to accomplish it?

New Here?
Join us and watch the welcome video:
Watch the new Interview
Top Kudoed Authors