package com.kexue.skills.config;

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

@Configuration
@OpenAPIDefinition(
        info = @Info(
                title = "可学AI-skills平台API",
                version = "1.0.0",
                description = "API Documentation for Spring MVC Project"
        )
)
public class SwaggerConfig {

    @Bean
    public OpenAPI customOpenAPI() {
        return new OpenAPI()
                .info(new io.swagger.v3.oas.models.info.Info()
                        .title("可学AI-skills平台API")
                        .version("1.0.0")
                        .description("API Documentation for Spring MVC Project")
                        .license(new License().name("Apache 2.0").url("http://springdoc.org")));
    }

}