-
Notifications
You must be signed in to change notification settings - Fork 3
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
Adding /cans/ endpoints and service layer refactor #2831
Open
rajohnson90
wants to merge
16
commits into
main
Choose a base branch
from
OPS-2781/adding-remaining-cans-endpoints
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
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
…ng service layer for controller to call. Updating test to include more of /cans/ POST endpoint. Added two new auth client config fixtures.
…it tests. Functionality not complete because we are now using a service layer to isolate business logic. updated openapi doc to match new endpoint.
…d handle both situations. Using partial flag for deserialization in patch. removing unnecessary fields in patch-related tests.
…d test_service_patch_can to not rely on hard-coded id for table item.
…maining-cans-endpoints
…e'. Clean up patch/put unit tests so API tests are only testing API.
…it tests to test out the service and api layers separately.
rajohnson90
requested review from
johndeange,
fpigeonjr,
maiyerlee and
Santi-3rd
September 20, 2024 17:10
fpigeonjr
approved these changes
Sep 20, 2024
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.
🟢 tests pass
@@ -14,6 +26,7 @@ class BasicCANSchema(Schema): | |||
description = fields.String(allow_none=True) | |||
id = fields.Integer(required=True) | |||
portfolio_id = fields.Integer(required=True) | |||
obligate_by = fields.Integer(allow_none=True) |
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.
⭐
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.
What changed
I added POST, PUT, PATCH, and DELETE /cans/ as well as refactoring the api endpoints to go through a service layer and isolate business logic. All unit tests were updated to support this. The obligate_by property was also added to the CAN schema at Frank's request to support the consumption of the GET /cans/ endpoint in our related FE work. Finally openapi doc will be updated monday morning to include the new endpoints.
Issue
OPS-2781
How to test
Definition of Done Checklist