feat: 공개 Case·Reference 응답에 문서 요약을 싣는다
문서가 스스로 밝히는 한 줄 요약(`document.summary`)을 공개 응답이 내보내지 않았다. 화면은 제목 바로 아래에 그것을 그려야 하는데 자리가 없어 유형별 요약을 대신 썼고, 그러면 머리말이 바로 아래의 "문제"나 "이 기준을 쓰는 이유"와 같은 글을 두 번 말한다. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XEHXspz4rv5pB5wiiSsVDu
This commit is contained in:
co-authored by
Claude Opus 5
parent
a5f93b9b75
commit
c6d9d2d675
+2
@@ -37,6 +37,7 @@ public final class DocumentResponseMapper {
|
|||||||
PublishedDocumentView doc = view.document();
|
PublishedDocumentView doc = view.document();
|
||||||
CaseDetailResponseCase body = new CaseDetailResponseCase();
|
CaseDetailResponseCase body = new CaseDetailResponseCase();
|
||||||
body.setTitle(doc.title());
|
body.setTitle(doc.title());
|
||||||
|
body.setSummary(doc.summary());
|
||||||
body.setProblemSummary(doc.primarySummary());
|
body.setProblemSummary(doc.primarySummary());
|
||||||
body.setConclusionSummary(doc.secondarySummary());
|
body.setConclusionSummary(doc.secondarySummary());
|
||||||
body.setEnvironmentSummary(doc.environmentSummary());
|
body.setEnvironmentSummary(doc.environmentSummary());
|
||||||
@@ -72,6 +73,7 @@ public final class DocumentResponseMapper {
|
|||||||
PublishedDocumentView doc = view.document();
|
PublishedDocumentView doc = view.document();
|
||||||
ReferenceDetailResponseReference body = new ReferenceDetailResponseReference();
|
ReferenceDetailResponseReference body = new ReferenceDetailResponseReference();
|
||||||
body.setTitle(doc.title());
|
body.setTitle(doc.title());
|
||||||
|
body.setSummary(doc.summary());
|
||||||
body.setScopeSummary(doc.primarySummary());
|
body.setScopeSummary(doc.primarySummary());
|
||||||
body.setAppliesTo(doc.appliesTo());
|
body.setAppliesTo(doc.appliesTo());
|
||||||
body.setExcludedScope(doc.excludedScope());
|
body.setExcludedScope(doc.excludedScope());
|
||||||
|
|||||||
+2
@@ -97,6 +97,7 @@ public class JdbcPublicDocumentQueryAdapter implements PublicDocumentQueryPort {
|
|||||||
// 컬럼(`public_resource_projection.last_verified_at`)은 `upsertProjection` 이
|
// 컬럼(`public_resource_projection.last_verified_at`)은 `upsertProjection` 이
|
||||||
// 채우지 않아 언제나 null 이었다.
|
// 채우지 않아 언제나 null 이었다.
|
||||||
+ " p.navigation_path, p.published_at, p.updated_at, d.last_verified_at,"
|
+ " p.navigation_path, p.published_at, p.updated_at, d.last_verified_at,"
|
||||||
|
+ " d.summary,"
|
||||||
+ " r.rules, r.examples,"
|
+ " r.rules, r.examples,"
|
||||||
+ " t.name AS topic_name, t.slug AS topic_slug,"
|
+ " t.name AS topic_name, t.slug AS topic_slug,"
|
||||||
+ " pr.name AS project_name, pr.slug AS project_slug,"
|
+ " pr.name AS project_name, pr.slug AS project_slug,"
|
||||||
@@ -127,6 +128,7 @@ public class JdbcPublicDocumentQueryAdapter implements PublicDocumentQueryPort {
|
|||||||
type,
|
type,
|
||||||
rs.getString("navigation_path"),
|
rs.getString("navigation_path"),
|
||||||
rs.getString("title"),
|
rs.getString("title"),
|
||||||
|
rs.getString("summary"),
|
||||||
// Case 는 문제/결론, Reference 는 범위/적용이 각각 앞뒤 요약 자리에 온다.
|
// Case 는 문제/결론, Reference 는 범위/적용이 각각 앞뒤 요약 자리에 온다.
|
||||||
isCase ? rs.getString("problem_summary") : rs.getString("scope_summary"),
|
isCase ? rs.getString("problem_summary") : rs.getString("scope_summary"),
|
||||||
isCase ? rs.getString("conclusion_summary") : null,
|
isCase ? rs.getString("conclusion_summary") : null,
|
||||||
|
|||||||
+4
@@ -9,12 +9,16 @@ import java.util.List;
|
|||||||
* <p>계약의 {@code CaseDetailResponse.case} 와 {@code ReferenceDetailResponse.reference} 는 담는 필드가
|
* <p>계약의 {@code CaseDetailResponse.case} 와 {@code ReferenceDetailResponse.reference} 는 담는 필드가
|
||||||
* 다르지만(문제/결론 vs 범위/적용), 원천이 같은 {@code document} + 유형별 detail 이라 하나의 레코드로 읽고 웹 계층에서 유형별 모양으로 나눈다.
|
* 다르지만(문제/결론 vs 범위/적용), 원천이 같은 {@code document} + 유형별 detail 이라 하나의 레코드로 읽고 웹 계층에서 유형별 모양으로 나눈다.
|
||||||
*
|
*
|
||||||
|
* @param summary 문서가 스스로 밝히는 한 줄 요약. 제목 바로 아래에 온다 — 유형별 요약({@code primarySummary}: Case 는 문제,
|
||||||
|
* Reference 는 범위)과 다르다. 이 자리가 없던 동안 화면은 유형별 요약을 대신 썼고, 그러면 머리말이 바로 아래의 "문제" 나 "이 기준을 쓰는 이유" 와
|
||||||
|
* 같은 글을 두 번 말했다.
|
||||||
* @param content Markdown 원문이다. studio 의 렌더 블록이 아니다 — 공개 계약은 {@code contentFormat} 과 함께 원문을 준다.
|
* @param content Markdown 원문이다. studio 의 렌더 블록이 아니다 — 공개 계약은 {@code contentFormat} 과 함께 원문을 준다.
|
||||||
*/
|
*/
|
||||||
public record PublishedDocumentView(
|
public record PublishedDocumentView(
|
||||||
String type,
|
String type,
|
||||||
String canonicalPath,
|
String canonicalPath,
|
||||||
String title,
|
String title,
|
||||||
|
String summary,
|
||||||
String primarySummary,
|
String primarySummary,
|
||||||
String secondarySummary,
|
String secondarySummary,
|
||||||
List<String> environmentSummary,
|
List<String> environmentSummary,
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# source: tech-log-design-package contracts/openapi/studio-v1.yaml @ ff0c12a (master)
|
# source: tech-log-design-package contracts/openapi/studio-v1.yaml @ 0ffbc28 (master)
|
||||||
18dd46898be64b07f7e826409d19347512613ee2e22420028a4a0644f50f37dd studio-v1.yaml
|
18dd46898be64b07f7e826409d19347512613ee2e22420028a4a0644f50f37dd studio-v1.yaml
|
||||||
# source: tech-log-design-package contracts/openapi/public-v1.yaml @ ff0c12a (master)
|
# source: tech-log-design-package contracts/openapi/public-v1.yaml @ 0ffbc28 (master)
|
||||||
34efa8d2fdba959373081e5b2aace252be86bef243a80c238d8c4af50fa8eb0a public-v1.yaml
|
79949b286e2b4d28333d3376945960a319d247b675b23a73f50b75ce10994c5e public-v1.yaml
|
||||||
# source: tech-log-design-package contracts/openapi/studio-management-v1.yaml @ ff0c12a (master)
|
# source: tech-log-design-package contracts/openapi/studio-management-v1.yaml @ 0ffbc28 (master)
|
||||||
72650735061fde627f5037571eb986cb758f44a546f065c88408399f8eec4a55 studio-management-v1.yaml
|
72650735061fde627f5037571eb986cb758f44a546f065c88408399f8eec4a55 studio-management-v1.yaml
|
||||||
|
|||||||
@@ -1239,6 +1239,12 @@ components:
|
|||||||
properties:
|
properties:
|
||||||
title:
|
title:
|
||||||
type: string
|
type: string
|
||||||
|
# 문서가 스스로 밝히는 한 줄 요약이다. 제목 바로 아래에 온다.
|
||||||
|
#
|
||||||
|
# 이 자리가 없어서 화면은 problemSummary / scopeSummary 를 대신 썼고, 그러면 머리말이
|
||||||
|
# 바로 아래의 "문제" 나 "이 기준을 쓰는 이유" 와 같은 글을 두 번 말한다.
|
||||||
|
summary:
|
||||||
|
type: string
|
||||||
problemSummary:
|
problemSummary:
|
||||||
type: string
|
type: string
|
||||||
conclusionSummary:
|
conclusionSummary:
|
||||||
@@ -1325,6 +1331,12 @@ components:
|
|||||||
properties:
|
properties:
|
||||||
title:
|
title:
|
||||||
type: string
|
type: string
|
||||||
|
# 문서가 스스로 밝히는 한 줄 요약이다. 제목 바로 아래에 온다.
|
||||||
|
#
|
||||||
|
# 이 자리가 없어서 화면은 problemSummary / scopeSummary 를 대신 썼고, 그러면 머리말이
|
||||||
|
# 바로 아래의 "문제" 나 "이 기준을 쓰는 이유" 와 같은 글을 두 번 말한다.
|
||||||
|
summary:
|
||||||
|
type: string
|
||||||
scopeSummary:
|
scopeSummary:
|
||||||
type: string
|
type: string
|
||||||
appliesTo:
|
appliesTo:
|
||||||
|
|||||||
Reference in New Issue
Block a user