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

Type Locking Service responses as "raw" #2068

Merged
merged 2 commits into from
Nov 4, 2024
Merged

Type Locking Service responses as "raw" #2068

merged 2 commits into from
Nov 4, 2024

Conversation

iamacook
Copy link
Member

This is a sample implementation for #1731.

Summary

We validate API responses on the domain layer, but directly assign the type in the datasources. This means that the response types are not necessarily correct.

Using the Locking Service as an example, this type all responses as "raw". These responses can therefore not be used directly unless they are validated.

By returning the API response directly in the CommunityRepository, you can see a type error that demonstrates this:

image

Changes

  • Add new Raw utility type
  • Apply utility type to responses of Locking Service

@iamacook iamacook self-assigned this Oct 28, 2024
@iamacook iamacook requested a review from a team as a code owner October 28, 2024 14:41
@iamacook iamacook force-pushed the raw-locking branch 2 times, most recently from 6af402c to 0d27aeb Compare October 29, 2024 15:43
@hectorgomezv hectorgomezv self-requested a review November 4, 2024 11:49
@iamacook iamacook merged commit 9dbaf53 into main Nov 4, 2024
20 checks passed
@iamacook iamacook deleted the raw-locking branch November 4, 2024 11:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants