[BI-1364] View a shared ontology that a program is subscribed to#179
Merged
[BI-1364] View a shared ontology that a program is subscribed to#179
Conversation
HMS17
approved these changes
Apr 15, 2022
src/main/java/org/breedinginsight/api/v1/controller/OntologyController.java
Outdated
Show resolved
Hide resolved
Contributor
|
PASSED - happy path (as described in BI-1364.) |
davedrp
reviewed
Apr 19, 2022
src/main/java/org/breedinginsight/api/v1/controller/TraitController.java
Outdated
Show resolved
Hide resolved
davedrp
approved these changes
Apr 19, 2022
24eb188 to
a083e88
Compare
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-1364 View a shared ontology that a program is subscribed to
A new exception class for returning 400 status was created.
OntologyService methods were created that wrap around existing TraitService and TraitUploadService methods which use the program ID for the case of a non-subscriber or sharing program and the sharing program's ID in the case of a subscribed program.
TraitController and TraitUpload controller were updated to return 400 status if a subscribed program requests to create or update traits of a shared ontology.
Dependencies
bi-web BI-1364 branch
Testing
See testing procedure for biweb BI-1364.
In addition, manually try to create and update traits for a subscribing program using POST/traits, PUT/traits, PUT/trait-upload, and POST/trait-upload/.
Verify that a 400 status was returned in all cases.
NOTE: In order to manually test POST/trait-upload/ you will first need to successfully import traits via PUT/trait-upload by making two changes in
TraitUploadController.java:ontologyService.updateTraitUpload(programId, file, actingUser);withtraitUploadService.updateTraitUpload(programId, file, actingUser);.Checklist: