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

API request usability and stability improvements #202

Merged
merged 3 commits into from
Jul 23, 2024

Conversation

mikenachbaur-okta
Copy link
Contributor

The APIClient system forms the foundation for most everything within the Client SDK, and as such the types and handling of data sent using these classes and protocols is of the utmost importance. To that end, this PR introduces several enhancements that will improve APIClient for future changes.

  • Ensure APIRequestBody parameters use the concrete APIRequestArgument instead of Any to improve how arguments are handled, tested, and validated.
  • Add APIRequestArgument conformances to several key types, including JWT, GrantType, and Token.Kind.
  • Improve default APIRequestArgument value conversion for types that already conform to RawRepresentable with a String value type.
  • Ensure SDKVersion.register is thread-safe, and begin initial adoption of the Sendable protocol.

This improves how APIRequest arguments are handled, and ensures type safety for the `bodyParameters` arguments. This improves the cleanliness of unit tests, ensures the types can be properly normalized when merging values from different software components, and pushes conversion of API request values down to the lowest level.
@mikenachbaur-okta mikenachbaur-okta merged commit c828fec into master Jul 23, 2024
8 checks passed
@mikenachbaur-okta mikenachbaur-okta deleted the OKTA-750342-FoundationImprovements branch July 23, 2024 19:12
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