BDMS 55: contact coverage & other updates#89
Merged
Conversation
- implement Validate schema for create and update schemas - use "| None" instead of Optional for style consistency
404 error handling is now done by simple_get_by_id
Codecov Report❌ Patch coverage is
|
jirhiker
approved these changes
Aug 20, 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:
/contactroute should be fully covered with GET, GET by ID, PATCH, POST, and DELETE endpointsHow
Implementation summary - the following was changed / added / removed:
contactschemas, includingThingContactAssociationcreate, update, and response schemascontactendpoints and functions for authentication, permissions, and paper trailsamp. This can be changed if it should be general.scope="module"fixtures so overrides in one script doesn't effect overrides in another.searchandassettests to use fixtures since they were previously impacted bycontacttests that didn't use fixtures (and it now does)urltoAssetschema to correspond with the database and incoming data.Notes
Any special considerations, workarounds, or follow-up work to note?
passive_deletes=Trueto cascade the deletion ofemail,phone,address, andThingContactAssociationso that if a contact is deleted its child items will also be deleted. If this was not implemented thecontact_idwould be set to NULL in the tables, violating the not-null constraint.PydanticStyleExceptionso that all raised exceptions follow the Pydantic stylecontact_idto associate the items with another contact