Chore(client): Swagger 인증 적용에 따른 openapi-typescript 타입 생성 스크립트 수정#260
Open
jogpfls wants to merge 2 commits into
Open
Chore(client): Swagger 인증 적용에 따른 openapi-typescript 타입 생성 스크립트 수정#260jogpfls wants to merge 2 commits into
jogpfls wants to merge 2 commits into
Conversation
jogpfls
requested review from
jm8468,
jyeon03 and
twossu
and removed request for
a team
July 5, 2026 13:52
🎨 Storybook 배포 완료PR 작성자: @jogpfls |
jm8468
reviewed
Jul 7, 2026
jm8468
left a comment
Collaborator
There was a problem hiding this comment.
굿굿입니다 저도 스크립트 파일을 잘 작성하고 이해하고 싶어요
혹시 팁 같은게 있을까용??
| : "${VITE_API_BASE_URL:?VITE_API_BASE_URL이 .env에 필요합니다}" | ||
|
|
||
| DOCS_URL="${VITE_API_BASE_URL%/}/v3/api-docs" | ||
| OUTPUT="src/shared/apis/schema.d.ts" |
Collaborator
There was a problem hiding this comment.
이 스크립트를 실행하면 schema.d.ts 파일이 위의 경로에 설치되는데,
develop 브랜치에서는 schema.d.ts의 경로가 apps/client/src/shared/types/schema.d.ts에 있어요.
기존 apis/types에서는 모두 apps/client/src/shared/types/schema.d.ts 이 경로를 참조하고 있어서
import 경로를 다시 수정해주면 좋아보이네요 :D
jm8468
requested changes
Jul 7, 2026
jm8468
reviewed
Jul 12, 2026
jm8468
left a comment
Collaborator
There was a problem hiding this comment.
Changes requested -> Comment 로 변경함니다... 🙏
jm8468
approved these changes
Jul 12, 2026
jm8468
left a comment
Collaborator
There was a problem hiding this comment.
변경이 안되네요 ㅎㅎ
천천히 반영하고 머지해주세용
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.
📌 Summary
Swagger 인증 적용에 따른 openapi-typescript 타입 생성 스크립트 수정
📚 Tasks
.env.example에 Swagger 자격증명 키 추가🔍 Describe
배경
데모데이 직전에 백엔드 측에서 Swagger에 Basic Auth 인증을 적용했던거 기억나시나요,,?
openapi-typescript는 Swagger의
/v3/api-docs스펙을 그대로 가져와 타입을 생성하는 구조인데 Swagger 접근이 인증으로 막히면서 기존generate:types스크립트도 401로 실패하게 되길래 이에 맞춰 스크립트를 업데이트했어용접근 방식
openapi-typescript CLI는 원격 URL에 대한 인증 옵션을 지원하지 않아요 (v6의
--auth플래그가 v7에서 제거됨).공식 권장 방향에 따라 인증된 curl로 스펙을 임시 파일에 내려받은 뒤 파일 경로를 넘기는 2단계 방식으로 변경했습니다.
사용 방법
.env에SWAGGER_USERNAME,SWAGGER_PASSWORD를 추가한 뒤 기존과 동일하게pnpm generate:types를 실행하면 됩니다. env 값은 노션에 업데이트 해놨어요 !👀 To Reviewer
📸 Screenshot