-
Notifications
You must be signed in to change notification settings - Fork 2
[#60] ✨ 스웨거 업데이트에 따른 타입 추가 #140
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
Merged
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
4052de5
[#60] ✨ update apiSchema alongto backend update
KingNono1030 bb2adad
[#60] 🚚 move my page related types from auth to profile
KingNono1030 4e00eeb
[#60] 🚚 rename profile types to myPage types
KingNono1030 00c9e12
[#60] ✨ add check nickname interface in mypage types
KingNono1030 3402b32
[#60] ✨ add multipart formdata generic type
KingNono1030 e822289
[#60] ✨ apply multipart formdata interface on file upload requiring t…
KingNono1030 8a92077
[#60] 🚚 move svg types
KingNono1030 eb66e0c
[#60] 🚚 turn type files to uppercase
KingNono1030 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
File renamed without changes.
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
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
File renamed without changes.
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -96,8 +96,8 @@ export interface LanguageAwardRequest extends AwardRequestBase, LanguageAward { | |
| // 포트폴리오 리스트 조회 | ||
| export type PortfolioListItem = PortfolioBase & PostBaseBody | ||
|
|
||
| // 포트폴리오 생성 요청 타입 | ||
| export interface PortfolioCreateRequest extends PortfolioBase { | ||
| // 포트폴리오 리스트 조회 | ||
| export interface PortfolioDetail extends PortfolioBase { | ||
| portContent: string // 상세 내용 | ||
| techStacks: TechStack[] // 사용 기술 스택 | ||
| links?: PortfolioLink[] // 외부 링크 | ||
|
Comment on lines
+99
to
103
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 전부터 느꼈지만, 여러 번 재사용되는 타입을 기본 base 타입을 지정해두고, extends 하니 여러번 정의해줘야하는 번거로움을 피할 수 있어서 정말 좋네요
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 네 맞아요 ! |
||
|
|
@@ -111,5 +111,8 @@ export interface PortfolioCreateRequest extends PortfolioBase { | |
| careers?: PortfolioCareer[] // 경력 리스트 | ||
| } | ||
|
|
||
| // 포트폴리오 생성 요청 타입 | ||
| export type PortfolioCreateRequest = MultipartFormData<PortfolioDetail> | ||
|
|
||
| // 포트폴리오 생성 응답 타입 | ||
| export type PortfolioCreateResponse = PortfolioCreateRequest & PostBaseBody | ||
File renamed without changes.
File renamed without changes.
File renamed without changes.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'never' 타입을 적용하는 건 처음 보네요! 찾아보니
의 용도로 사용한다고 하는군요.. 덕분에 never 타입에 대해 알아갑니다!
그러면 타입 스크립트에서 타입 지정이 필요없을 때 ? 사용하는 것 같은데,
정확히 어떤 목적으로 사용되는 건지 알려주실 수 있나요 ??
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ApiSchema.types.d.ts 파일 같은 경우 제가 openapi-typescript 라는 도구를 사용하여 민지님이 작업해주신 스펙에 있는 타입을 그대로 타입스크립트 파일로 생성한 결과물입니다 !
my-page-check-nickname 엔드포인트에서는 post 메서드만 있고 나머지의 경우는 없고, 다른 요구하는 쿼리 등이 없어서 never 로 타입이 변환된 듯 하네요.
http://43.202.50.174:8080/v3/api-docs 실제 스펙에서는 never 로 지정되어 있지 않지만, 특정 엔드포인트에서 존재하지 않는 요청에 대해서 타입스크립트로 변환할 때 never 타입으로 자동 생성된 듯 합니다 !
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
아 ㅎㅎ 민지님께서 작업해주신 것을 바탕으로 타입을 생성해주셔서 그런 거군요! 감사합니다 ~