feat(ai): 마케팅 블로그 초안 수정 API (PUT /ai/marketing/contents/{id})#49
Merged
Conversation
생성된 블로그 초안을 사장이 손봐 저장할 수 있도록 수정 엔드포인트 추가. - output(draft: 제목·단락·FAQ·해시태그)만 갱신, 입력 메타(키워드/상황/메모/사진)·생성시각·토큰은 불변 - user_id 격리(소유 아니면 404), 소프트삭제 콘텐츠 수정 불가(404) - 빈/공백 해시태그 정리, Bean Validation(@Valid) 입력 검증 - MarketingServiceTest 4종 + RestDocs 문서화 + OpenAPI 스펙 재생성 Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
요약
생성된 AI 블로그 초안을 사장이 손봐 저장할 수 있도록 초안 수정 엔드포인트 추가.
PUT /ai/marketing/contents/{id}— output(draft: 제목·단락·FAQ·해시태그)만 갱신, 입력 메타(키워드/상황/메모/사진)·생성시각·토큰은 불변user_id격리(소유 아니면 404), 소프트삭제 콘텐츠 수정 불가(404)MarketingContentUpdateRequest/BlogSectionInput/BlogFaqInput(@Valid 검증),MarketingService.updateContent+getContent/updateContent공용toDetail()추출ai_marketing_content.output_json이미var)리뷰 반영
sections에@NotNull추가 — 누락 시@Size(min=1)이 발동하지 않아 빈 초안이 저장되던 갭 차단(+ 400 검증 테스트)updateContent에서save()반환 엔티티로toDetail(merge 시맨틱 안전)검증
./gradlew build test통과 — ktlint + detekt + 전체 테스트 + JaCoCo 80% 게이트MarketingContentUpdateRequestrequired: sections·title)🤖 Generated with Claude Code