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: 1.8.3
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: 1.9.0
Choose a head ref
  • 4 commits
  • 13 files changed
  • 5 contributors

Commits on Sep 26, 2025

  1. Fix formatting in swift-format 6.2 (#159)

    ### Motivation
    
    Formatter got upgraded upstream, so we need to update formatting in our
    project.
    
    ### Modifications
    
    Regenerated using swift-format from Swift 6.2 and made a few manual
    fixes.
    
    ### Result
    
    Soundness format is clean again.
    
    ### Test Plan
    
    Ran locally.
    czechboy0 authored Sep 26, 2025
    Configuration menu
    Copy the full SHA
    05d0d32 View commit details
    Browse the repository at this point in the history
  2. Enable Swift 6.2 jobs in CI (#158)

    Motivation:
    
    Swift 6.2 has been released, we should add it to our CI coverage.
    
    Modifications:
    
    Add additional Swift 6.2 jobs where appropriate in main.yml,
    pull_request.yml
    
    Result:
    
    Improved test coverage.
    
    Co-authored-by: Honza Dvorsky <[email protected]>
    rnro and czechboy0 authored Sep 26, 2025
    Configuration menu
    Copy the full SHA
    16e7f0d View commit details
    Browse the repository at this point in the history

Commits on Oct 18, 2025

  1. Configuration menu
    Copy the full SHA
    f04cc99 View commit details
    Browse the repository at this point in the history

Commits on Nov 4, 2025

  1. Convert DecodingErrors thrown from request handling code to HTTP 400 … (

    #161)
    
    ### Motivation
    
    The library does not gracefully handle when clients send requests with
    malformed request bodies, parameters, etc. If a client sends a request
    that for example is missing a required field or has a field that cannot
    be converted to the correct type, the server should respond with a `400`
    indicating to the client that **they** have done something wrong.
    Instead, the library throws a `DecodingError` which propagates all the
    way up resulting in a `500` response which incorrectly tells the client
    that something went wrong on the server.
    
    ### Modifications
    
    * Added a layer of handling to each call that is made to decode request
    objects which wraps `DecodingErrors` into `RuntimeErrors`.
    * Make `ServerError` conform to `HTTPResponseConvertible`
    * Modify `ErrorHandlingMiddleware` to first check if the underlying
    error conforms to `HTTPResponseConvertible` and if not use the values
    from `ServerError`. This allows the `HTTPResponseConvertible` values set
    in a `RuntimeError` to be honoured after the `RuntimeError` is
    transformed into a `ServerError`.
    
    ### Result
    
    Since `RuntimeError` conforms to `HTTPResponseConvertible` these errors
    will get converted to `400` responses by the `ErrorHandlingMiddleware`.
    This isn't a perfect solution because consumers of the library have to
    opt-in to the `ErrorHandlingMiddleware` to avoid returning `500`.
    
    ### Test Plan
    
    * Added unit tests for each modification.
    * Verified in my own service that with this change malformed requests
    get converted into `400` responses.
    
    ---------
    
    Co-authored-by: colin-dignazio <[email protected]>
    Co-authored-by: Honza Dvorsky <[email protected]>
    3 people authored Nov 4, 2025
    Configuration menu
    Copy the full SHA
    7cdf333 View commit details
    Browse the repository at this point in the history
Loading