package com.moka.gdtauto.config;

import io.swagger.v3.oas.models.OpenAPI;
import io.swagger.v3.oas.models.info.Contact;
import io.swagger.v3.oas.models.info.Info;
import io.swagger.v3.oas.models.info.License;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * Knife4j API文档配置
 * 访问地址：http://localhost:8080/doc.html
 * 
 * @author moka
 * @since 2026-02-04
 */
@Configuration
public class Knife4jConfig {

    @Bean
    public OpenAPI customOpenAPI() {
        return new OpenAPI()
                .info(new Info()
                        .title("腾讯广告投放平台自动化API")
                        .description("基于腾讯广告Marketing API的自动化投放管理系统")
                        .version("1.0.0")
                        .contact(new Contact()
                                .name("Moka Team")
                                .email("dev@moka.com"))
                        .license(new License()
                                .name("Apache 2.0")
                                .url("https://www.apache.org/licenses/LICENSE-2.0.html")));
    }
}
