BI-2047 - Pull Existing Observation Values For An Experiment Into Field-Book#443
Merged
BI-2047 - Pull Existing Observation Values For An Experiment Into Field-Book#443
Conversation
src/main/java/org/breedinginsight/brapi/v2/BrAPIObservationsController.java
Outdated
Show resolved
Hide resolved
src/main/java/org/breedinginsight/brapi/v2/dao/BrAPIObservationDAO.java
Outdated
Show resolved
Hide resolved
src/main/java/org/breedinginsight/brapi/v2/BrAPIObservationsController.java
Show resolved
Hide resolved
nickpalladino
requested changes
Feb 18, 2025
src/main/java/org/breedinginsight/brapi/v2/BrAPIObservationsController.java
Outdated
Show resolved
Hide resolved
nickpalladino
approved these changes
Feb 18, 2025
HMS17
approved these changes
Feb 18, 2025
Contributor
HMS17
left a comment
There was a problem hiding this comment.
API endpoint testing passes and fieldbook demo looked excellent!
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: BI-2047
Partially implemented the BrAPI /observations GET endpoint to support pulling existing observation values into Field Book. The endpoint only supports
studyDbIdand pagination (pageSize,page) query parameters. The use of other query parameters will result in a501 Not Implementedresponse. The use of invalid pagination query parameters will result in a400 Bad Requestresponse.Valid pagination query parameters must satisfy the following conditions.
Either both or neither of(BrAPI specifies default values).pageandpageSizemust be present, one is invalid without the other.pageSizemust be greater than zero. If omitted,pageSizedefaults to1000.pagemust be greater than or equal to zero and less than the total number of pages (pageis zero-indexed). If omitted,pagedefaults to 0.There is a story to add support for all query params, BI-2506.
Testing
Part 1: Field Book Integration
Part 2: 501 Not Implemented
studyDbIdshould result in a 501 status code.Part 3: Pagination
Test pagination, by providing both valid and invalid
pageSizeandpagequery parameters to the{{baseURL}}/v1/programs/{{programId}}/brapi/v2/observationsendpoint. Invalid pagination query parameters should result in a400 Bad Requestresponse. Valid pagination query parameters should result in data and metadata consistent with the BrAPI documentation on pagination. Note: the BrAPI Java Server is inconsistent with the docs, this is an open issue.Review the test cases in
BrAPIObservationsControllerIntegrationTest::testGetObsPaginationfor logical correctness.Checklist: