BDMS 55: thing coverage & other updates#108
Merged
Merged
Conversation
for the API it should always used the request for data transfers it can be set by a string
Codecov Report❌ Patch coverage is
|
jirhiker
approved these changes
Aug 28, 2025
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.
Why
This PR addresses the following problem / context:
thingrouter should be fully covered with GET, GET by ID, POST, PATCH, and DELETE endpointsLocation'snameneeds to be editable in a PATCH requestHow
Implementation summary - the following was changed / added / removed:
/thing/water-well,/thing/water-well/{thing_id},/thing/spring/{spring_id}/thing/water-well/{thing_id}/well-screen/thing/id-link/{link_id}thing_typequery parameter from GET/thingas that is now handled as a path parameter/thing/wellto POST/thing/water-wellto correspond with the current thing type/thingso that things of a particularthing_typecan be created. This restricts the values that can be populated and ensures there is no spillover into a field for a wrongthing_type/thing/water-well/{thing_id}and PATCH/thing/spring/{thing_id}/thingso that fields can only be edited that correspond with the correctthing_type/thing/{thing}(since the type doesn't matter for deletion),/thing/well-screen/{well_screen_id},/thing/id-link/{link_id}Notes
Any special considerations, workarounds, or follow-up work to note?
thing_typeis deduced by the request/path parameterthing_typeis still a viable argument foradd_thingsince that is used in the data transfer. That argument is not, however, to be used in the API and endpoints.thing_typeis vital information for getting, posting, and patching aThingthing_helper.pywas updated to have custom getting, posting, and patching functions