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

[Suggestion] Use same type for files #1071

Open
2 tasks
babycroc opened this issue Sep 15, 2024 · 0 comments
Open
2 tasks

[Suggestion] Use same type for files #1071

babycroc opened this issue Sep 15, 2024 · 0 comments
Labels
back-end enhancement New feature or request good first issue Good for newcomers

Comments

@babycroc
Copy link
Contributor

제안 내용 *

파일에 대한 정보를 반환하는 API들이 여럿 존재하는데, 반환값이 통일되어 있지 않아 혹시 통일해주실 수 있나 여쭤보고 싶습니다

PUT이나 POST API들의 경우 fileId라는 field를 공통적으로 사용하고 있어 다음과 같은 형태로 통일되면 어떨까 제안해봅니다

{
  fileId: z.string().max(255),
  name: z.string().max(255),
  url: z.string().max(255),
}

참고 용도로 2024.09.15 17:45 기준, dev에 있는 다양한 종류의 file 관련 response들을 모아보았습니다

z.object({
  fileId: z.string().max(255),
  name: z.string().max(255),
  url: z.string().max(255),
}),
  • apiAct002evidenceFiles
z.object({
  uploadUrl: z.string(),
  fileId: z.string().max(128),
  name: zFileName,
}),
  • apiFil001urls
z.object({
  id: z.string().max(256),
  url: z.string(),
  name: zFileName,
}),
  • apiFil003files
  • apiReg011, apiReg015, apiReg022activityPlanFile, clubRuleFile, externalInstructionFile
z.object({
  id: z.coerce.string().max(255),
  link: z.coerce.string(),
  name: z.coerce.string().max(255),
}),
  • apiFnd002

스크린샷

관련 Task *

  • Task1
  • Task2
@babycroc babycroc added enhancement New feature or request good first issue Good for newcomers back-end labels Sep 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
back-end enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant