Skip to content

Commit 11e8984

Browse files
committed
Docs: rename, search swagger 수정
1 parent ccdde1b commit 11e8984

File tree

3 files changed

+37
-2
lines changed

3 files changed

+37
-2
lines changed

src/main/java/io/ejangs/docsa/domain/commit/app/CommitContentAssembler.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public List<Map<String, Object>> assemble(String commitMongoId) {
3535

3636
return blockIds.stream()
3737
.map(id -> Optional.ofNullable(blockMap.get(id))
38-
.orElseThrow(() -> new CustomException(BlockErrorCode.BLOCK_NOT_FOUND)))
38+
.orElseThrow(() -> new CustomException(CommitErrorCode.COMMIT_NOT_FOUND)))
3939
.map(Block::getContent)
4040
.toList();
4141
}

src/main/java/io/ejangs/docsa/domain/doc/swagger/RenameDocDocs.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,6 @@
166166
}
167167
)
168168
)
169-
170169
}
171170
)
172171
public @interface RenameDocDocs {

src/main/java/io/ejangs/docsa/domain/doc/swagger/SearchDocDocs.java

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,42 @@
195195
"""
196196
)
197197
)
198+
),
199+
@ApiResponse(
200+
responseCode = "404",
201+
description = "문서 검색 실패 - 존재하지 않는 커밋",
202+
content = @Content(
203+
schema = @Schema(implementation = ErrorResponse.class),
204+
mediaType = MediaType.APPLICATION_JSON_VALUE,
205+
examples = @ExampleObject(
206+
value = """
207+
{
208+
"status": 404,
209+
"message": "해당 기록을 찾을 수 없습니다.",
210+
"error": "COMMIT_NOT_FOUND"
211+
}
212+
"""
213+
)
214+
)
215+
),
216+
@ApiResponse(
217+
responseCode = "500",
218+
description = "문서 검색 실패 - MySQL 또는 MongoDB 접근 실패",
219+
content = @Content(
220+
schema = @Schema(implementation = ErrorResponse.class),
221+
mediaType = MediaType.APPLICATION_JSON_VALUE,
222+
examples = {
223+
@ExampleObject(
224+
value = """
225+
{
226+
"status": 500,
227+
"message": "데이터 처리 중 오류가 발생했습니다. 잠시 후 다시 시도해주세요.",
228+
"error": "DATABASE_ERROR"
229+
}
230+
"""
231+
)
232+
}
233+
)
198234
)
199235
}
200236
)

0 commit comments

Comments
 (0)