-
Notifications
You must be signed in to change notification settings - Fork 34
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
BIT-100: Adds the known device API call #18
Conversation
No New Or Fixed Issues Found |
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.
Nice!
BitwardenShared/Core/Auth/Services/API/Device/DeviceAPIService.swift
Outdated
Show resolved
Hide resolved
Co-authored-by: Matt Czech <[email protected]>
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.
Great work!
🤔 A small question about the Fixtures: Could we have like "generic" fixtures when using a unique value, as Bool
in this case. So instead of having KnownDeviceFalse.json
and KnownDeviceTrue.json
, we could have False.json
and True.json
so they can be reused avoiding potentially having multiple files with the same content for trivial data. Furthermore, is there an advantage on having files created for these trivial data for fixtures? We could directly create it without the files.
Additionally, if all/most of the fixtures files are going to be JSON, could we have a func loadFromJsonBundle(resource: String) -> APITestData
to avoid hardcoding the json extension on each call?
What do you think?
I'm on board with having generic fixtures for data like this! That makes a lot of sense. But (as I address below), I think I'll remove these files in favor of creating the fixtures in code instead.
My intention was to follow the same convention that will be used for all other fixtures that we will be using for unit testing our API calls. That way all the fixtures that are available in
Love this, I'll add a method for doing this. |
🎟️ Tracking
BIT-100
🚧 Type of change
📔 Objective
This PR adds the Known Device API call and related models.
The API call isn't hooked up to anything yet, since there isn't any UI for the login flow yet, but once the UI is added we'll be able to use this API call.
📋 Code changes
/devices/knowndevice
API call, including request and response definitions./devices/knowndevice
⏰ Reminders before review
🦮 Reviewer guidelines
:+1:
) or similar for great changes:memo:
) or ℹ️ (:information_source:
) for notes or general info:question:
) for questions:thinking:
) or 💭 (:thought_balloon:
) for more open inquiry that's not quite a confirmed issue and could potentially benefit from discussion:art:
) for suggestions / improvements:x:
) or:warning:
) for more significant problems or concerns needing attention:seedling:
) or ♻️ (:recycle:
) for future improvements or indications of technical debt:pick:
) for minor or nitpick changes