Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

템플릿 공개 여부에 따른 Swagger 파일 수정 #748

Merged
merged 11 commits into from
Oct 11, 2024

Conversation

kyum-q
Copy link
Contributor

@kyum-q kyum-q commented Oct 7, 2024

⚡️ 관련 이슈

#739

📍주요 변경 사항

템플릿 공개 여부 설정 추가로 Swagger 파일 수정

  • 템플릿 생성 시, isPublic 필드 추가 -> visibility 로 변경
  • 템플릿 조회 시, 멤버 정보에 따라 템플릿 반환 값 다름을 문서에 표시

🎸기타

기존 template 생성자 그대로 둠

현재 템플릿 공개 여부인 visibility 필드 추가됨에 따라 생성자 변경 생김
하지만 테스트 코드에서 template 생성자를 너무 많이 사용하고 있어서 기존에 있는 생성자를 부생성자로 그대로 두고 그 경우에는 visibility 을 PUBLIC로 하도록 설정해두었다.

    public Template(Member member, String title, String description, Category category) {
        this(member, title, description, category, Visibility.PUBLIC);
    }

    public Template(Member member, String title, String description, Category category, Visibility visibility) {
        this.member = member;
        this.title = title;
        this.description = description;
        this.category = category;
        this.visibility = visibility;
    }

이 부분에 대해서 삭제해야 할지 그대로 나둬도 될지 여러분은 어떻게 생각하나요?

마이그레션에 visibility default 처리

마이그레이션 보면 visibility 설정 시 default 값도 설정했는데 혹시 맘에 안 들면 말해주세요 ~
위에 말했듯이 기존 template 생성자 그대로 두고 기본 값을 PUBLIC로 설정해놨으니 DB단에도 default 설정도 한겁니다

@kyum-q kyum-q added documentation 문서 작업 BE 백엔드 labels Oct 7, 2024
@kyum-q kyum-q added this to the 6차 스프린트 🦴 milestone Oct 7, 2024
@kyum-q kyum-q self-assigned this Oct 7, 2024
Copy link
Contributor

@zangsu zangsu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

켬미 집에서도 쉬지 않고 작업하시네요~~~~ 고생하셨어요!!
너무 고맙지만, 몸도 챙기면서 작업 하셔야 합니다~~!!

몇가지 제안사항, 의견들 코멘트로 달아 두었어요.

+) 왜 문서화에서 자동으로 공백이 있는 줄이 생기는 걸까요???
뭐가 문제인건지...

HoeSeong123
HoeSeong123 previously approved these changes Oct 8, 2024
Copy link
Contributor

@HoeSeong123 HoeSeong123 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

꼼꼼함은 켬미를 따라올 사람이 없네요 정말!!!!
아픈건 괜찮나요? 너무 고생하셨습니다👍

jminkkk
jminkkk previously approved these changes Oct 8, 2024
Copy link
Contributor

@jminkkk jminkkk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

굿입니다 켬미 체공

@@ -0,0 +1 @@
ALTER TABLE template ADD COLUMN is_public BOOLEAN NOT NULL DEFAULT TRUE;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

따봉

Copy link
Contributor

@zeus6768 zeus6768 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

빠른 작업 멋져요 켬미 👍

의견 하나 남겼으니 확인 부탁해요~!

Copy link
Contributor

@jminkkk jminkkk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

켬미 이 PR 변경사항에 잡히지 않았던 부분을 #761 보면서 확인해서 추가로 코멘트 남겨요!
SpringDocTemplateController.java에 단건 조회 부분에서 다른 회원의 비공개 글을 조회하면 403이 터져야 할 것 같아요.

이 부분도 문서화 추가 부탁드립니다!

@kyum-q kyum-q dismissed stale reviews from jminkkk and HoeSeong123 via f83bcd3 October 9, 2024 15:02
@kyum-q
Copy link
Contributor Author

kyum-q commented Oct 9, 2024

제우스 의견에 따라 isPublic을 visibility로 변경하였습니다.

Visibility는 enum 클래스로 public과 private가 있습니다
그래서 변경 사항이 많습니다 ~ 다시 한 번 확인 부탁드려요 ~

HoeSeong123
HoeSeong123 previously approved these changes Oct 10, 2024
Copy link
Contributor

@HoeSeong123 HoeSeong123 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

변경사항 확인했습니다👍

@@ -0,0 +1,8 @@
package codezap.template.domain;

public enum Visibility {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

zangsu
zangsu previously approved these changes Oct 10, 2024
Copy link
Contributor

@zangsu zangsu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

켬 고~ 켬미 고생했어요~~

zeus6768
zeus6768 previously approved these changes Oct 10, 2024
Copy link
Contributor

@zeus6768 zeus6768 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

jminkkk
jminkkk previously approved these changes Oct 11, 2024
@kyum-q kyum-q dismissed stale reviews from jminkkk, zeus6768, zangsu, and HoeSeong123 via 954d41e October 11, 2024 01:11
Copy link
Contributor

@Hain-tain Hain-tain left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

켬미 짱❤️❤️❤️

@zeus6768 zeus6768 merged commit dd9b670 into dev/be Oct 11, 2024
6 checks passed
@zeus6768 zeus6768 deleted the docs/739-private-swagger branch October 11, 2024 01:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BE 백엔드 documentation 문서 작업
Projects
Status: Weekend Done
Development

Successfully merging this pull request may close these issues.

6 participants