Skip to content
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

MDCT-1993 api updates #4180

Merged
merged 6 commits into from
Oct 3, 2022
Merged

MDCT-1993 api updates #4180

merged 6 commits into from
Oct 3, 2022

Conversation

gmrabian
Copy link
Contributor

@gmrabian gmrabian commented Oct 3, 2022

Description

MDCT-1993 modify api to match standards

  1. Fetch to a specific item returns a 404 when the response is empty (instead of 200)
  2. Create calls return a 201 instead of 200
  3. Fetch’s with full primary keys will convert to a get from a query
  4. An update where the matching record does not exist returns a 404 (instead of a 500)

How to test

Try out the mcr postman collection from confluence! Check that:

  • Create now returns a 201 instead of 200
  • Update without existing item returns 404
  • Update without new data returns 400
  • Fetch where specific item doesn't exist returns 404 (does not apply to queries like "reportsByState")

ping me if you want help!

Changed Dependencies

none

Code author checklist

  • I have performed a self-review of my code
  • I have added thorough tests
  • I have added analytics, if necessary
  • I have updated the documentation, if necessary

Reviewer checklist (two different people)

  • I have done the deep review and verified the items in the above checklist are g2g
  • I have done the lgtm review

Comment on lines +11 to +18
get: jest
.fn()
.mockImplementationOnce(() => ({
Item: undefined,
}))
.mockImplementation(() => ({
Item: mockBannerResponse,
})),
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: I'm planning on opening a stacked branch to improve this

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stacked PR here: #4181

Copy link
Collaborator

@karla-vm karla-vm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice ✨ I was able to use the Postman Collection too!

@gmrabian gmrabian merged commit 3ecab67 into main Oct 3, 2022
@gmrabian gmrabian deleted the mdct-1993-api-mods branch October 3, 2022 19:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants