All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.bidib.wizard.server.config.SwaggerConfig Maven / Gradle / Ivy

There is a newer version: 2.0.29
Show newest version
package org.bidib.wizard.server.config;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springdoc.core.GroupedOpenApi;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import io.swagger.v3.oas.models.OpenAPI;
import io.swagger.v3.oas.models.info.Info;
import io.swagger.v3.oas.models.info.License;

@Configuration(proxyBeanMethods = false)
public class SwaggerConfig {

    private static final Logger LOGGER = LoggerFactory.getLogger(SwaggerConfig.class);

    @Bean
    GroupedOpenApi api() {

        LOGGER.info("Create the swagger2 api bean.");

        // @formatter:off
        return GroupedOpenApi.builder()
            .group("bidib-wizard-api")
            .pathsToMatch("/api/**")
            .build();
        
        // @formatter:on
    }

    @Bean
    OpenAPI bidibWizardAPI() {
        // @formatter:off
        return new OpenAPI()
                .info(new Info().title("BiDiB-Wizard API")
                .description("BiDiB-Wizard sample application")
                .version("v0.1")
                .license(new License().name("GNU GPLv3")));
        // @formatter:on
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy