implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.1.0'
import io.swagger.v3.oas.annotations.OpenAPIDefinition;
import io.swagger.v3.oas.models.Components;
import io.swagger.v3.oas.models.OpenAPI;
import io.swagger.v3.oas.models.info.Info;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@Configuration
@OpenAPIDefinition
public class BoardController {
@Bean
public OpenAPI api() {
Info info = new Info().title("").version("v3").description("BAEKER-MSA : Member Server Endpoint");
return new OpenAPI().components(new Components()).info(info);
}
}
http://localhost:8080/swagger-ui/index.html
@Slf4j
@Hidden // 객체 단위로 끝점 숨기기
@RestController
@RequestMapping("/api")
@RequiredArgsConstructor
public class QuestionRestController {
@Tag // 그룹으로 묶기
@Slf4j
@RestController
@RequestMapping("/api")
@RequiredArgsConstructor
public class QuestionRestController {