springfox.documentation.swagger.web.SwaggerResourcesProvider Java Examples

The following examples show how to use springfox.documentation.swagger.web.SwaggerResourcesProvider. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: SwaggerConfig.java    From sample-zuul-swagger2 with Apache License 2.0 5 votes vote down vote up
@Primary
@Bean
public SwaggerResourcesProvider swaggerResourcesProvider() {
	return () -> {
		List<SwaggerResource> resources = new ArrayList<>();
		properties.getRoutes().values().stream()
				.forEach(route ->
						resources
								.add(createResource(route.getServiceId(), route.getServiceId(), "2.0")));
		return resources;
	};
}
 
Example #2
Source File: SwaggerUIConfiguration.java    From microservice-patterns with Apache License 2.0 5 votes vote down vote up
@Primary
@Bean
@Lazy
public SwaggerResourcesProvider swaggerResourcesProvider(InMemorySwaggerResourcesProvider defaultResourcesProvider, RestTemplate temp) {
    return () -> {          
        List<SwaggerResource> resources = new ArrayList<>(defaultResourcesProvider.get());
        resources.clear();
        resources.addAll(definitionContext.getSwaggerDefinitions());
        return resources;
    };
}
 
Example #3
Source File: SwaggerUIConfig.java    From careconnect-reference-implementation with Apache License 2.0 5 votes vote down vote up
@Primary
@Bean
@Lazy
public SwaggerResourcesProvider swaggerResourcesProvider(ServiceDefinitionsContext definitionContext ) {

    return () -> {
        List<SwaggerResource> resources = new ArrayList<>();
        resources.clear();
        resources.addAll(definitionContext.getSwaggerDefinitions());
        return resources;
    };
}
 
Example #4
Source File: SwaggerHandler.java    From open-capacity-platform with Apache License 2.0 4 votes vote down vote up
@Autowired
public SwaggerHandler(SwaggerResourcesProvider swaggerResources) {
    this.swaggerResources = swaggerResources;
}
 
Example #5
Source File: SwaggerHandler.java    From microservices-platform with Apache License 2.0 4 votes vote down vote up
@Autowired
public SwaggerHandler(SwaggerResourcesProvider swaggerResources) {
    this.swaggerResources = swaggerResources;
}
 
Example #6
Source File: SwaggerController.java    From open-cloud with MIT License 4 votes vote down vote up
@Autowired
public SwaggerController(SwaggerResourcesProvider swaggerResources) {
    this.swaggerResources = swaggerResources;
}
 
Example #7
Source File: SwaggerHandler.java    From sophia_scaffolding with Apache License 2.0 4 votes vote down vote up
@Autowired
public SwaggerHandler(SwaggerResourcesProvider swaggerResources) {
    this.swaggerResources = swaggerResources;
}
 
Example #8
Source File: SwaggerHandler.java    From sophia_scaffolding with Apache License 2.0 4 votes vote down vote up
@Autowired
public SwaggerHandler(SwaggerResourcesProvider swaggerResources) {
    this.swaggerResources = swaggerResources;
}
 
Example #9
Source File: SwaggerHandler.java    From sophia_scaffolding with Apache License 2.0 4 votes vote down vote up
@Autowired
public SwaggerHandler(SwaggerResourcesProvider swaggerResources) {
    this.swaggerResources = swaggerResources;
}
 
Example #10
Source File: SwaggerHandler.java    From black-shop with Apache License 2.0 4 votes vote down vote up
@Autowired
public SwaggerHandler(SwaggerResourcesProvider swaggerResources) {
	this.swaggerResources = swaggerResources;
}