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

830 : Add limit and metadata version params in v2 settings get end-point #838

Merged
merged 12 commits into from
Jun 8, 2021

Conversation

rehammuzzamil
Copy link
Contributor

Resolves #830

Map<String, TreeNode<String, Location>> treeNodeHashMap = null;

if (StringUtils.isBlank(team) && StringUtils.isBlank(providerId) && StringUtils.isBlank(locationId)
&& StringUtils.isBlank(teamId) && StringUtils.isBlank(team) && StringUtils.isBlank(serverVersion)) {
&& StringUtils.isBlank(teamId) && StringUtils.isBlank(team) && StringUtils.isBlank(serverVersion)
&& StringUtils.isBlank(metadataVersion)) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wont this break the current functionality StringUtils.isBlank(metadataVersion)?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This check is to ensure that all parameters can not be null. Hence, added meta version field here as well. @bennsimon
Please let me know if there is anything incorrect.
settingsv2get

Copy link
Member

@bennsimon bennsimon Jun 7, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a new parameter so for the devs that were supplying the other params only it should work. i.e metadataVersion should be optional to not break the implementation for others.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, metadata_version and limit request params are not required fields. This check is to ensure that all request parameters can not be null, we need to supply at least a single request param from the given list. Thus added the check.
Should I remove validation from here? @bennsimon

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

leave it

bennsimon
bennsimon previously approved these changes Jun 8, 2021
@rehammuzzamil rehammuzzamil merged commit f36a158 into master Jun 8, 2021
@rehammuzzamil rehammuzzamil deleted the 830-add-limit-and-metadata-version branch June 8, 2021 07:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add limit and metadata_version parameters to the settings v2 endpoint
2 participants