Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: apple/swift-openapi-runtime
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 0.3.4
Choose a base ref
...
head repository: apple/swift-openapi-runtime
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 0.3.5
Choose a head ref
  • 3 commits
  • 13 files changed
  • 1 contributor

Commits on Oct 25, 2023

  1. Add a soundness --fix flag (#62)

    Add a soundness --fix flag
    
    ### Motivation
    
    When running `./scripts/soundness.sh` produces swift-format warnings, we ask adopters to manually copy/paste a call to swift format to fix the warnings up. This is tedious and unnecessary.
    
    ### Modifications
    
    Add a `--fix` option on the `soundness.sh` script to actually apply the fixes as well, avoiding the need to copy/paste long commands.
    
    ### Result
    
    Easier fixing up of formatting warnings.
    
    ### Test Plan
    
    Manually tested the workflow locally.
    
    
    Reviewed by: glbrntt
    
    Builds:
         ✔︎ pull request validation (5.10) - Build finished. 
         ✔︎ 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. 
    
    #62
    czechboy0 authored Oct 25, 2023
    Configuration menu
    Copy the full SHA
    82edf0e View commit details
    Browse the repository at this point in the history

Commits on Oct 26, 2023

  1. [Runtime] Generate server variables (#64)

    [Runtime] Generate server variables
    
    ### Motivation
    
    The runtime side of apple/swift-openapi-generator#24.
    
    ### Modifications
    
    Added an SPI `ServerVariable` type and a variant of the `URL.init(validatingOpenAPIServerURL:variables:)` method, which takes the template and variables and returns a fully formed concrete URL.
    
    ### Result
    
    Unblocked the generator half of supporting server variables.
    
    ### Test Plan
    
    Added unit tests.
    
    
    Reviewed by: glbrntt
    
    Builds:
         ✔︎ pull request validation (5.10) - Build finished. 
         ✔︎ 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. 
    
    #64
    czechboy0 authored Oct 26, 2023
    Configuration menu
    Copy the full SHA
    51bdb07 View commit details
    Browse the repository at this point in the history
  2. Improved enriched error propagation from the transport and middlewares (

    #63)
    
    Improved enriched error propagation from the transport and middlewares
    
    ### Motivation
    
    Fixes apple/swift-openapi-generator#302 and apple/swift-openapi-generator#17.
    
    The issue was that we hid away errors thrown in transports and middlewares, and the adopter would get `ClientError` where the `underlyingError` wasn't the error thrown by the underlying transport/middleware, but instead a private wrapper of ours.
    
    ### Modifications
    
    Make sure `{Client,Server}Error.underlyingError` contains the error thrown from the underlying transport/middleware when that was the cause of the error, otherwise keep `RuntimeError` there as was the behavior until now.
    
    Also added a `causeDescription` property on both public error types to allow communicating the context for the underlying error.
    
    Also made sure middleware errors are now wrapped in Client/ServerError, they weren't before so didn't contain the context necessary to debug issues well.
    
    ### Result
    
    Adopters can now extract the errors thrown e.g. by URLSession from our public error types using the `underlyingError` property and understand the context of where it was thrown by checking the user-facing `causeDescription`.
    
    Also, adopters now get enriched errors thrown from middlewares.
    
    ### Test Plan
    
    Wrote unit tests for both UniversalClient and UniversalServer, inevitably found some minor bugs there as well, fixed them all, plus the unit tests now verify the behavior new in this PR.
    
    
    Reviewed by: glbrntt
    
    Builds:
         ✔︎ pull request validation (5.10) - Build finished. 
         ✔︎ pull request validation (5.8) - Build finished. 
         ✔︎ pull request validation (5.9) - 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. 
         ✖︎ pull request validation (api breakage) - Build finished. 
    
    #63
    czechboy0 authored Oct 26, 2023
    Configuration menu
    Copy the full SHA
    ad8bf04 View commit details
    Browse the repository at this point in the history
Loading