All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.mosip.pmp.partner.SwaggerConfig Maven / Gradle / Ivy

package io.mosip.pmp.partner;

import java.util.Collections;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import springfox.documentation.builders.PathSelectors;
import springfox.documentation.builders.RequestHandlerSelectors;
import springfox.documentation.service.ApiInfo;
import springfox.documentation.service.Contact;
import springfox.documentation.spi.DocumentationType;
import springfox.documentation.spring.web.plugins.Docket;
import springfox.documentation.swagger2.annotations.EnableSwagger2;

@Configuration
@EnableSwagger2
public class SwaggerConfig {
	@Bean
	public Docket productApi() {
		return new Docket(DocumentationType.SWAGGER_2).select()
				.apis(RequestHandlerSelectors.basePackage("io.mosip.pmp")).paths(PathSelectors.regex("(?!/(error).*).*")).build()
				.apiInfo(metaData());
	}

	private ApiInfo metaData() {
		return new ApiInfo("Partner Services", "Partner Regitration ", "1.0", "Terms of service",
				new Contact("MOSIP Partner", "https://mosip.io", "[email protected]"), "Apache License Version 2.0",
				"https://www.apache.org/licenses/LICENSE-2.0", Collections.emptyList());
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy