//package io.gmss.fiscad.configuration;
//
//import org.springframework.context.annotation.Bean;
//import org.springframework.context.annotation.Configuration;
//import springfox.documentation.builders.ApiInfoBuilder;
//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.swagger.web.*;
//
//@Configuration
////@Import(SpringDataRestConfiguration.class)
//public class SwaggerConfig {
//    @Bean
//    public Docket api() {
//        return new Docket(DocumentationType.OAS_30)
//                .select()
//                .apis(RequestHandlerSelectors.basePackage("io.gmss.fiscad.controllers.od"))
//                .paths(PathSelectors.any()).build().apiInfo(this.getApiInfo());
////                .securitySchemes(this.securitySchemes())
////                .securityContexts(Arrays.asList(this.securityContext()));
//    }
//
//
//
////    public SecurityContext securityContext() {
////        AuthorizationScope[] scopes = { new AuthorizationScope("read", "for read operation"),
////                new AuthorizationScope("write", "for write operation") };
////        List<SecurityReference> securityReferences = Arrays.asList(new SecurityReference("basicAuth", scopes),
////                new SecurityReference("Key", scopes), new SecurityReference("Authorization", scopes));
////        return SecurityContext.builder().securityReferences(securityReferences)
////                .forPaths(PathSelectors.any())
////                .build();
////    }
//
////    public List<SecurityScheme> securitySchemes() {
////        // SecurityScheme basicAuth = new BasicAuth("basicAuth");
////        SecurityScheme userAuthToken = new ApiKey("Authorization", "Authorization", "header");
////        //  SecurityScheme keyAuth = new ApiKey("Key", "Key", "header");
////        return Arrays.asList(
////                // keyAuth,
////                userAuthToken
////                //, basicAuth
////        );
////    }
//
//    private ApiInfo getApiInfo() {
//    Contact contact = new Contact("INFOCAD", "https://gmss.com/", "contact@gmss.com");
//        return new ApiInfoBuilder()
//                .title("LIST OF API")
//                .description("This page show all ressources that you could handle to communicate with database via REST API.")
//                .version("1.0")
//                .license("INFOCAD v.1.0")
//                .licenseUrl("https://www.apache.org/licenses/LICENSE-3.0")
//                .contact(contact)
//                .build();
//    }
//}
