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.5.0
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.6.0
Choose a head ref
  • 10 commits
  • 37 files changed
  • 5 contributors

Commits on Sep 7, 2024

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

Commits on Oct 2, 2024

  1. ci: Migrate to GitHub Actions and reusable workflows, part one (#116)

    ### Motivation
    
    Following on from the migration in Swift OpenAPI Generator, we need to
    migrate this repo to GitHub Actions based CI and the reusable workflows
    that are currently in the NIO repo.
    
    ### Modifications
    
    In order to bootstrap the migration, we need to merge the workflows in,
    otherwise we won't get any PR feedback on them while we get them ready.
    As a practical matter, they are all passing locally (verified) by `act`
    but it would be nice to stage these in so we can keep a green CI while
    we migrate and decommission the old CI.
    
    So this disables the soundness checks for now, so we can then use a
    follow up PR to do the cut over with testing in the PR.
    
    ### Result
    
    Old CI still working, new CI should start running in some capacity.
    simonjbeaumont authored Oct 2, 2024
    Configuration menu
    Copy the full SHA
    e1f390a View commit details
    Browse the repository at this point in the history
  2. ci: Migrate to GitHub Actions and reusable workflows, part two (#117)

    ### Motivation
    
    Following #116 we can now cut over to the soundness checks from the
    GithHub Actions CI and short-circuit the old CI checks.
    
    ### Modifications
    
    - Remove most scripts used by old CI
    - Short-circuit API checking script
    - Short-circuit the docker CI
    - Enable soundness tests in GitHub Actions workflow
    - Ignore docker/* for license check
    - Remove DocC plugin from package manifest
    - Update CONTRIBUTING.md with instructions for local run
    
    ### Result
    
    GitHub Actions CI is the one that we care about. We can then update the
    branch rules, disable the old webhook, and, finally, remove the
    vestigial stuff.
    simonjbeaumont authored Oct 2, 2024
    Configuration menu
    Copy the full SHA
    f795237 View commit details
    Browse the repository at this point in the history
  3. ci: Migrate to GitHub Actions and reusable workflows, part three (fin…

    …al) (#118)
    
    ### Motivation
    
    Following on from #116 and #117, we have now disabled the webhook that
    was driving the old CI and updated the branch protection rules to
    require the new GitHub Actions based CI checks.
    
    We can now delete the final shims that were keeping the old CI green,
    since it is no longer running and complete the migration.
    
    ### Modifications
    
    - Delete all Docker bits and scripts used by old CI.
    
    ### Result
    
    Migration complete.
    
    ### Test Plan
    
    We should be seeing _only_ GitHub Actions checks on this PR and they
    should all be passing (apart from the ones that are explicitly
    disabled).
    simonjbeaumont authored Oct 2, 2024
    Configuration menu
    Copy the full SHA
    654e2bb View commit details
    Browse the repository at this point in the history
  4. benchmarks: Add subdirectory Benchmarks/ package (#119)

    ### Motivation
    
    We'd like to be able to benchmark various parts of the runtime library
    to make targeted and measurable performance improvements.
    
    ### Modifications
    
    - Add a subdirectory directory package with the package-benchmark
    plugin.
    - Add a benchmark for `ISO8601DateTranscoder.encode(_:)`.
    - Add temporary benchmarks of Foundation ISO8601 date encoding APIs to
    guide improvements to `ISO8601DateTranscoder`.
    
    ### Result
    
    - Can now run benchmarks using `swift package --package-path Benchmarks/
    benchmark`.
    
    ### Test Plan
    
    There is no CI for this currently. That can follow, but we wanted the
    package plugin to unblock incoming updates to the date transcoder.
    simonjbeaumont authored Oct 2, 2024
    Configuration menu
    Copy the full SHA
    82b474f View commit details
    Browse the repository at this point in the history

Commits on Oct 3, 2024

  1. Support nested arrays of primitive values inside of objects (#120)

    ### Motivation
    
    It's a useful pattern to define a single JSON schema for all your (e.g.
    query) parameters, and handle them as a single object in your code.
    
    In OpenAPI, that'd be expressed like this, for example:
    
    ```yaml
    # parameter
    name: myParams
    in: query
    explode: true
    style: form
    schema:
      $ref: '#/components/schemas/QueryObject'
    
    # schema
    QueryObject:
      type: object
      properties:
        myString:
          type: string
        myList:
          type: array
          items:
          	type: string
    ```
    
    Until now, the `myList` property would not be allowed, and would fail to
    serialize and parse, as arrays within objects were not allowed for
    `form` style parameters (used by query items, by default).
    
    ### Modifications
    
    This PR extends the support of the `form` style to handle single nesting
    in the top level objects. It does _not_ add support for arbitrarily deep
    nesting.
    
    As part of this work, we also now allow the `deepObject` style to do the
    same - use arrays nested in an object.
    
    ### Result
    
    The useful pattern of having an array within a "params" object works
    correctly now.
    
    ### Test Plan
    
    Added unit tests for all 4 components: encoder, decoder, serializer, and
    parser.
    czechboy0 authored Oct 3, 2024
    Configuration menu
    Copy the full SHA
    da2e5b8 View commit details
    Browse the repository at this point in the history
  2. EventStreams: Customisable Terminating Byte Sequence (#115)

    ### Motivation
    
    As discussed in
    apple/swift-openapi-generator#622, some APIs,
    e.g., ChatGPT or Claude, may return a non-JSON byte sequence to
    terminate a stream of events.
    If not handled with a workaround (see below)such non-JSON terminating
    byte sequences cause a decoding error.
    
    ### Modifications
    
    This PR adds the ability to customise the terminating byte sequence by
    providing a closure to `asDecodedServerSentEvents()` as well as
    `asDecodedServerSentEventsWithJSONData()` that can match incoming data
    for the terminating byte sequence before it is decoded into JSON, for
    instance.
    
    ### Result
    
    Instead of having to decode and re-encode incoming events to filter out
    the terminating byte sequence - as seen in
    apple/swift-openapi-generator#622 (comment)
    - terminating byte sequences can now be cleanly caught by either
    providing a closure or providing the terminating byte sequence directly
    when calling `asDecodedServerSentEvents()` and
    `asDecodedServerSentEventsWithJSONData()`.
    
    ### Test Plan
    
    This PR includes unit tests that test the new function parameters as
    part of the existing tests for `asDecodedServerSentEvents()` as well as
    `asDecodedServerSentEventsWithJSONData()`.
    
    ---------
    
    Co-authored-by: Honza Dvorsky <[email protected]>
    paulhdk and czechboy0 authored Oct 3, 2024
    Configuration menu
    Copy the full SHA
    d604dd0 View commit details
    Browse the repository at this point in the history

Commits on Oct 4, 2024

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

Commits on Oct 16, 2024

  1. [CI] Update to Swift 6 CI (#122)

    # Motivation
    
    We just updated our CI matrix in NIO to only support 5.9, 5.10 and 6.
    
    # Modification
    
    This PR updates the trigger files in this repo. Since this repo was
    always 5.9+ this is easy.
    
    # Result
    
    Up to date CI
    FranzBusch authored Oct 16, 2024
    Configuration menu
    Copy the full SHA
    a79c21c View commit details
    Browse the repository at this point in the history

Commits on Oct 19, 2024

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