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

strictQuery가 여러 casing의 query를 하나의 값으로 인식하면 어떨까요? #1897

Open
giwan-dev opened this issue Feb 7, 2022 · 2 comments
Labels
discussion In need of more discussion

Comments

@giwan-dev
Copy link
Contributor

문제

query string의 key 값은 camelCase, snake_case, PascalCase, BIG_SNAKE_CASE, kebab-case 모두 가능합니다. 같은 이름을 다르게 표현하는 쿼리를 하나로 표준화하는 작업이 매번 필요합니다.

해결책

casing만 다른 쿼리 key값을 하나의 값으로 인식하면 어떨까요? 예를 들어 resourceId, resource_id, RESOURCE_ID, ResourceId, resource-id 모두 같은 key 값으로 보고 이들 값 중 하나만 사용하는 것이죠.
매번 어떤 케이싱의 쿼리가 들어오는지 확인하고 변환할 필요가 없어서 편리할 것입니다.

@giwan-dev giwan-dev added the discussion In need of more discussion label Feb 7, 2022
@inbeom
Copy link
Contributor

inbeom commented Feb 7, 2022

예전에 썼던 humps.camelizeKeys의 방식이 되는 거겠네요 ㅎ 경험으로 돌이켜보면 처리 방식을 통일하더라도 원문을 참조하게 될 일들이 생겼던 것 같아요. 그래서 떼어냈던..

@giwan-dev
Copy link
Contributor Author

strictQuery는 원본을 훼손하지 않기 때문에 원문을 참조할 순 있겠네요.
casing이 다른 쿼리를 다르게 사용하고 있는 케이스가 있는지가 포인트가 될 거 같아요.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion In need of more discussion
Projects
None yet
Development

No branches or pull requests

2 participants