package com.unicorn.hgzero.stt.config;

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

import java.util.List;

/**
 * Swagger/OpenAPI 설정
 * STT 서비스 API 문서화 설정
 */
@Configuration
public class SwaggerConfig {
    
    @Bean
    public OpenAPI openAPI() {
        return new OpenAPI()
                .info(new Info()
                        .title("STT Service API")
                        .description("Speech-to-Text 서비스 API 문서")
                        .version("v1.0.0")
                        .contact(new Contact()
                                .name("STT Service Team")
                                .email("stt-service@unicorn.com"))
                        .license(new License()
                                .name("Apache 2.0")
                                .url("http://www.apache.org/licenses/LICENSE-2.0.html")))
                .servers(List.of(
                        new Server().url("http://localhost:8083").description("로컬 개발 서버"),
                        new Server().url("https://dev-api.unicorn.com").description("개발 서버"),
                        new Server().url("https://api.unicorn.com").description("운영 서버")
                ));
    }
}