-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Runtime] Integrate the new URI and String coders (#45)
[Runtime] Integrate the new URI and String coders ### Motivation See details in the generator PR on motivation (apple/swift-openapi-generator#226). ### Modifications - Deprecated `_AutoLosslessStringConvertible` and `_StringConvertible` 🎉 - Deprecated all `*Text` helper functions on `Converter`, it was a convoluted mix of `URI` and `String`, so they all need to go away. - Added `*URI` and `*String` helper functions for the appropriate parameters/bodies. Those use the new URI/String coders under the hood. - Note: we now manipulate the `Request.query` property more directly, instead of going through `URLQueryItem`. ### Result Now we fully rely on `Codable` and a combination of system and custom encoder/decoders, which allows us to much more easily support Foundation types (such as Date), generated types (such as string enums), and primitive types - all the same way. While this might not be fully evident in this PR, this refactoring actually makes it possible for us to support much more of the OpenAPI specification. ### Test Plan Deprecated tests of the `*Text` helpers, introduced new tests for the new helpers. Reviewed by: glbrntt Builds: ✔︎ pull request validation (5.8) - Build finished. ✔︎ pull request validation (5.9) - Build finished. ✔︎ pull request validation (api breakage) - Build finished. ✔︎ pull request validation (docc test) - Build finished. ✔︎ pull request validation (integration test) - Build finished. ✔︎ pull request validation (nightly) - Build finished. ✔︎ pull request validation (soundness) - Build finished. #45
- Loading branch information
Showing
16 changed files
with
2,128 additions
and
949 deletions.
There are no files selected for viewing
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
Oops, something went wrong.