package io.gmss.fiscad.configuration;

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

@OpenAPIDefinition(
        info = @Info(
                contact = @Contact(
                        name = "Novatic",
                        email = "contact@novatic.org",
                        url = "https://novatic.org"
                ),
                description = "Cette page présente toutes les ressources API pour la gestion des données socio-foncières et fiscales",
                title = "FISCAD",
                version = "1.0",
                license = @License(
                        name = "Licence name",
                        url = "https://novatic.org"
                ),
                termsOfService = "Terms of service"
        ),
        servers = {
                @Server(
                        description = "Local ENV",
                        url = "http://localhost:8282"
                ),
                @Server(
                        description = "TEST ENV (http)",
                        url = "http://novatic.vps.webdock.cloud:8282"
                ),
                @Server(
                        description = "PROD ENV (https)",
                        url = "https://backend.fiscad.org"
                )
        },
        security = {
                @SecurityRequirement(
                        name = "bearer"
                )
        }
)
@SecurityScheme(
        name = "bearer",
        description = "Authentification Json Web Token",
        scheme = "Bearer",
        type = SecuritySchemeType.HTTP,
        bearerFormat = "JWT",
        in = SecuritySchemeIn.HEADER
)
public class OpenApiConfig {
}
