package com.ctsb.my_product_management_svc.config;

import io.swagger.v3.oas.annotations.OpenAPIDefinition;
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.info.License;
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
import io.swagger.v3.oas.annotations.security.SecurityScheme;

@OpenAPIDefinition(
        info = @Info(
                contact = @Contact(
                        name = "Thaswin Muralikaran",
                        email = "thaswin@cybersolution.com.my",
                        url = "https://cybersolution.com.my/"
                ),
                description = "OpenApi documentation for Product Management System",
                title = "OpenApi specification - Product Management Service",
                version = "1.0",
                license = @License(
                        name = "Cybersolution Technologies Sdn Bhd",
                        url = "https://cybersolution.com.my/"
                ),
                termsOfService = "Terms of service"
        ),
        security = {
                @SecurityRequirement(
                        name = "bearerAuth"
                )
        }
)
@SecurityScheme(
        name = "bearerAuth",
        description = "Input JWT token for authentication",
        type = SecuritySchemeType.HTTP,
        scheme = "bearer",
        bearerFormat = "JWT"
)
public class OpenApiConfig {
}
