Merged
Conversation
timparsons
requested changes
Jan 11, 2023
Member
timparsons
left a comment
There was a problem hiding this comment.
Left some comments about how to handle the listType query param
| List<BrAPIListSummary> brapiLists; | ||
|
|
||
| if (queryParams.getListType() == null) { | ||
| // TODO: in future return all list types but for now just return germplasm |
Member
There was a problem hiding this comment.
Why not just have this method return a 400 if the listType isn't specified?
Member
Author
There was a problem hiding this comment.
I didn't think the listType parameter was required but I can change it if it should be.
Member
There was a problem hiding this comment.
Ah...good point. Looked back at the spec, and you're spot on. I'll approve this!
| switch(queryParams.getListType()) { | ||
| case "germplasm": | ||
| default: | ||
| brapiLists = germplasmService.getGermplasmListsByProgramId(programId, request); |
Member
There was a problem hiding this comment.
Similar to above, maybe a 400 should be returned here.
Member
Author
There was a problem hiding this comment.
I could see the case for a 400 here if there is a listType specified but it's not one of the available ones.
timparsons
approved these changes
Jan 11, 2023
dmeidlin
approved these changes
Jan 12, 2023
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.
Description
Story: https://breedinginsight.atlassian.net/browse/BI-1616?atlOrigin=eyJpIjoiMDY3MzAwZjNlNTM4NDQ4MzkwMmJhZDUzN2UxYjdmZWMiLCJwIjoiaiJ9
Dependencies
Testing
Checklist: