Skip to content

Commit d8f1588

Browse files
authored
Merge pull request #155 from yongho9064/chore/swagger
chore[swagger]: 사소한 위치 변경 및 summary 번호
2 parents 37eb5e0 + 5d6876f commit d8f1588

File tree

2 files changed

+18
-18
lines changed

2 files changed

+18
-18
lines changed

backend/src/main/java/com/ai/lawyer/domain/chatbot/controller/ChatBotController.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,15 @@ public class ChatBotController {
2525

2626
private final ChatBotService chatBotService;
2727

28-
@Operation(summary = "새로운 채팅", description = "첫 메시지 전송으로 새로운 채팅방을 생성하고 챗봇과 대화를 시작")
28+
@Operation(summary = "01. 새로운 채팅", description = "첫 메시지 전송으로 새로운 채팅방을 생성하고 챗봇과 대화를 시작")
2929
@PostMapping("/message")
3030
public ResponseEntity<Flux<ChatResponse>> postNewMessage(
3131
@AuthenticationPrincipal Long memberId,
3232
@RequestBody ChatRequest chatRequest) {
3333
return ResponseEntity.ok(chatBotService.sendMessage(memberId, chatRequest, null));
3434
}
3535

36-
@Operation(summary = "기존 채팅", description = "기존 채팅방에 메시지를 보내고 챗봇과 대화를 이어감")
36+
@Operation(summary = "02. 기존 채팅", description = "기존 채팅방에 메시지를 보내고 챗봇과 대화를 이어감")
3737
@PostMapping("{roomId}/message")
3838
public ResponseEntity<Flux<ChatResponse>> postMessage(@AuthenticationPrincipal Long memberId, @RequestBody ChatRequest chatRequest, @PathVariable(value = "roomId", required = false) Long roomId) {
3939
return ResponseEntity.ok(chatBotService.sendMessage(memberId, chatRequest, roomId));

backend/src/main/java/com/ai/lawyer/global/springDoc/SpringDocConfig.java

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,22 @@ public GroupedOpenApi allApi() {
6767
.build();
6868
}
6969

70+
@Bean GroupedOpenApi chatApi() {
71+
return GroupedOpenApi.builder()
72+
.group("챗봇과 관련된 API")
73+
.pathsToMatch("/api/chat/**")
74+
.packagesToScan("com.ai.lawyer.domain.chatbot.controller")
75+
.build();
76+
}
77+
78+
@Bean
79+
public OpenAPI customOpenAPI() {
80+
return new OpenAPI()
81+
.servers(List.of(
82+
new Server().url("/").description("Relative (proxy-friendly)")
83+
));
84+
}
85+
7086
private OpenApiCustomizer orderBySummaryNumber() {
7187
return openApi -> {
7288
if (openApi.getPaths() == null) return;
@@ -95,20 +111,4 @@ private OpenApiCustomizer orderBySummaryNumber() {
95111
sortedPaths.forEach(openApi.getPaths()::addPathItem);
96112
};
97113
}
98-
99-
@Bean GroupedOpenApi chatApi() {
100-
return GroupedOpenApi.builder()
101-
.group("챗봇과 관련된 API")
102-
.pathsToMatch("/api/chat/**")
103-
.packagesToScan("com.ai.lawyer.domain.chatbot.controller")
104-
.build();
105-
}
106-
107-
@Bean
108-
public OpenAPI customOpenAPI() {
109-
return new OpenAPI()
110-
.servers(List.of(
111-
new Server().url("/").description("Relative (proxy-friendly)")
112-
));
113-
}
114114
}

0 commit comments

Comments
 (0)