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

Perform query param validation within BaseService #2676

Closed
paulmelnikow opened this issue Jan 7, 2019 · 1 comment
Closed

Perform query param validation within BaseService #2676

paulmelnikow opened this issue Jan 7, 2019 · 1 comment
Labels
core Server, BaseService, GitHub auth, Shared helpers

Comments

@paulmelnikow
Copy link
Member

paulmelnikow commented Jan 7, 2019

We've a few badges which validate query params by invoking _validateQueryParams on BaseService.

If we provided the route with a Joi schema instead of an array of names, we could validate these within BaseService instead – i.e. prior to invoking handle().

If #2675 hasn't been completed yet, we could use a placeholder Joi.object().required() for those services in the meantime.

@paulmelnikow paulmelnikow changed the title Build query param validation into BaseService Perform query param validation within BaseService Jan 7, 2019
@paulmelnikow paulmelnikow added the core Server, BaseService, GitHub auth, Shared helpers label Jan 7, 2019
@paulmelnikow
Copy link
Member Author

This could also validate that query parameters are in snake_case.

paulmelnikow added a commit that referenced this issue Feb 19, 2019
… matrix gitlab f-droid endpoint dynamic bitbucket appveyor]

Fix #2676
paulmelnikow added a commit that referenced this issue Feb 21, 2019
This is a mid-sized PR that adds query param validation to BaseService and updates most of the services which use query param validation to use it. There are a couple minor tweaks I made along the way.

Fix #2676
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Server, BaseService, GitHub auth, Shared helpers
Projects
None yet
Development

No branches or pull requests

1 participant