This repository has been archived by the owner on Dec 22, 2022. It is now read-only.
generated from NASA-PDS/template-repo-java
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Pds api 110: unify the behavior of response building (#80)
* fix all the shortcuts to accept application/pds4+json * changes to support swagger.yaml changes * middle of refactor * back to ResponseEntity<Object> * rework how responses are built Basically scrapped what was there and reqbuilt it all using a visitor pattern that will hopefully consolidate changes that fix all endpoints instead of so much cut-n-past. There is still a lot of boilerplate thata may be able to be worked out with more effort. * most errors are cleaned up Had to add "accept: application/json to the verify scripts. This moved them formward but have some odd results like the query language changed without updating the test. Other items are still failing and will need to track them down one by one but the problems are no longer in the verify scripts. Added some missed functinality in the product handler. Cleaned up some logic in the RequestAndResponseContext that does the bulk of the work for mixing and matching the various application type requests. Added a new error to account for when valid information was given (lidvid) but nothing was found despite that. * last adjustments The looking up a lidvid from lid required a touch more fine tuning to verify that it found the whole lidvid matches the given to accound for partial lidvids that are more than a lid but less than a full lidvid. Had to also clean up a List<String>.toArray() that was causing a segfault. Turning a list to [] syntax is not so easy to understand. * set these to something workable to everyone but me * add cvs, cvs+text,kvp+json The work of making the product and adding them all to the endpoints. THe work of adding a serializer is a touch more complicated. * fixed up the query The blank query had to use the preset which got lost. Also put the conversion of the names back in place. * fix what is returned when fields is blanks Accidentally made it so only the minimal set was returned if fields are left blank. Added a min/max list of fields where min must be a subset of max and empty is a full set without having to define all that may be in elastic search. This min/max approach fixes the blank fields and adds constraints so that pds+ formats will only every reeturn the allowable keys and nothing else. These are simple to change in the future as well by modifying just the min/max arrays. Co-authored-by: Al Niessner <Al.Niessner@xxx.xxx>
- Loading branch information
1 parent
42fc71d
commit 7a9456a
Showing
28 changed files
with
1,035 additions
and
698 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.