Hi All, I have created a springboot microservice application which needs to dispaly other two microservices api's in swagger and added springfox-swagger2.2.4.0,springfox-swagger-ui.2.4.0 jars in pom.xml.
Below are the microservices swagger urls http://localhost:8081/swagger-ui.html http://localhost:8082/swagger-ui.html Created below controller. @Controller @ApiIgnore public class ApiResourceController { @Autowired(required = false) private SecurityConfiguration securityConfiguration; @Autowired(required = false) private UiConfiguration uiConfiguration; @RequestMapping(value = "/configuration/security") @ResponseBody public ResponseEntity<SecurityConfiguration> securityConfiguration() { return new ResponseEntity<SecurityConfiguration>( Optional.fromNullable(securityConfiguration).or(SecurityConfiguration.DEFAULT), HttpStatus.OK); } @RequestMapping(value = "/configuration/ui") @ResponseBody public ResponseEntity<UiConfiguration> uiConfiguration() { return new ResponseEntity<UiConfiguration>( Optional.fromNullable(uiConfiguration).or(UiConfiguration.DEFAULT), HttpStatus.OK); } @RequestMapping(value = "/swagger-resources") @ResponseBody ResponseEntity<List<SwaggerResource>> swaggerResources() { List<SwaggerResource> resources = new ArrayList<SwaggerResource>(); resources.add(swaggerResource("test1", "http://localhost:8081/", "1.0")); resources.add(swaggerResource("test2", "http://localhost:8082/", "1.0")); return new ResponseEntity<List<SwaggerResource>>(resources, HttpStatus.OK); } private SwaggerResource swaggerResource(String name, String location, String version) { SwaggerResource swaggerResource = new SwaggerResource(); swaggerResource.setLocation(location); swaggerResource.setName(name); swaggerResource.setSwaggerVersion(version); return swaggerResource; } } Please help me how can i display two microservices api's in single swagger page. What urls' i need to pass to swaggerResource class. -- You received this message because you are subscribed to the Google Groups "Swagger" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
