package de.avatic.taric.config;

import io.swagger.v3.oas.annotations.OpenAPIDefinition;
import io.swagger.v3.oas.annotations.enums.SecuritySchemeIn;
import io.swagger.v3.oas.annotations.enums.SecuritySchemeType;
import io.swagger.v3.oas.annotations.info.Contact;
import io.swagger.v3.oas.annotations.info.Info;
import io.swagger.v3.oas.annotations.security.SecurityScheme;
import io.swagger.v3.oas.annotations.servers.Server;
import io.swagger.v3.oas.models.Components;
import io.swagger.v3.oas.models.OpenAPI;
import io.swagger.v3.oas.models.security.SecurityRequirement;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;



@Configuration
@OpenAPIDefinition(
        info = @Info(
                title = "TARIC API",
                version = "1.0",
                description = "REST API for accessing TARIC (Integrated Tariff of the European Union) data. " +
                        "This API provides endpoints for retrieving tariff information, nomenclature, geographical data, " +
                        "certificates, conditions, and measures.",
                contact = @Contact(
                        name = "API Support",
                        email = "support@avatic.de"
                )
        ),
        servers = {
                @Server(
                        description = "Production Server",
                        url = "https://taric.avatic.de"
                )
        }
)
@SecurityScheme(
        name = "apiKey",
        type = SecuritySchemeType.APIKEY,
        in = SecuritySchemeIn.HEADER,
        paramName = "X-API-Key"
)
public class OpenApiConfig {
}