-
Notifications
You must be signed in to change notification settings - Fork 0
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
Utils - Initial functionality & documentation added #1
Conversation
Utils package used to separate anything that MAY become a library later on if required.
Refactored some code & paths
Added ID to update request for robustness
Cleared the database before each test to make them non-deterministic
- Changed the response type of getObservations to XML for consistency - Updated the unit test for getObservations to handle the wrapper response type (for XML lists)
…ponse type (for XML lists)
…e to revert so they're all "observation" if required) Removed some duplicate code Updated error out method to handle a specialised type made sure that adding both SimpleObservations and DerivedObservations are tested.
-Added a unit test for updating (which also uses the above)
- added a few more tests
minor corrections error responses now return text/plain
- Added a getCollections method - unit tests for paging and collections
- Added a getCollections method - unit tests for paging and collections
Common method added for pagination requests Fixed unit test parsing the text/plain response from getCollectionIds
…ams where they were not required)
Github's CI build phase currently fails due to org.opencadc:CAOM:2.5.0-SNAPSHOT not being found in the outside world.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the design of the REST interface end-points is not really what I think of as "standard" - it differs in a couple of ways
- the "verb" is appearing in the URI - this is not necessary - so for instance
DELETE [/observations/delete/{observationId}]
can just beDELETE [/observations/{observationId}]
- the create and update operations are mapped to the opposite HTTP verbs than is usual - i.e. the normal thing is create => POST and update => PUT
I think that https://stackoverflow.blog/2020/03/02/best-practices-for-rest-api-design/#h2-2eb87cd076da0 goes over this in a bit more detail
It would be good to just tweak the endpoints to follow that pattern
- DELETE has verb in API removed. - unit tests & details updated to reflect this
@pahjbo amendments made as requested including the minor changes to the details.md |
I have removed all of the verbs from endpoint URIs - I am not sure that the collections and derivedObservation endpoints are really correct, but will merge for now |
Services added and descriptions added to detail.md
Unit tests added
OpenAPI headers added to allow swagger UI to display helpful information
detail.md has details of each specific endpoint