
com.github.ydoc.config.SwaggerResourcesConfig Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ydoc-spring-boot-starter Show documentation
Show all versions of ydoc-spring-boot-starter Show documentation
YDoc一款低侵入性、简洁并同时支持SwaggerUi和YApi的文档生成器
The newest version!
package com.github.ydoc.config;
import springfox.documentation.spi.DocumentationType;
import springfox.documentation.swagger.web.SwaggerResource;
import springfox.documentation.swagger.web.SwaggerResourcesProvider;
import java.util.Collections;
import java.util.List;
/**
* @author nobugboy
**/
public class SwaggerResourcesConfig implements SwaggerResourcesProvider {
@Override
public List get() {
SwaggerResource swaggerResource = swaggerResource("/swagger-json");
return Collections.singletonList(swaggerResource);
}
private SwaggerResource swaggerResource(String location) {
SwaggerResource swaggerResource = new SwaggerResource();
swaggerResource.setLocation(location);
swaggerResource.setName("default");
swaggerResource.setSwaggerVersion(DocumentationType.SWAGGER_2.getVersion());
return swaggerResource;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy