package com.demo1.config.swagger;

import org.springdoc.core.GroupedOpenApi;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class SwaggerConfig {

    private static final String BASE_PACKAGE = "com.demo1";

    @Bean
    public GroupedOpenApi boardApi(){
        final String url = "boards";
        return GroupedOpenApi.builder()
                .group(url)
                .pathsToMatch("/api/"+url+"/**")
                .packagesToScan(BASE_PACKAGE+".board")
                .build();
    }

}
