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-generator
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 1.7.2
Choose a base ref
...
head repository: apple/swift-openapi-generator
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 1.8.0
Choose a head ref
  • 7 commits
  • 44 files changed
  • 4 contributors

Commits on Apr 8, 2025

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

Commits on Apr 9, 2025

  1. examples: Update streaming ChatGPT example for Swift 6.1 (#759)

    ### Motivation
    
    The streaming ChatGPT example we have uses Swift 6.0 and the Swift VS
    Code extension from the SSWG. Since then, Swift 6.1 has been released,
    which contains fixes for indexing and editor functionality for code
    generated by Swift package plugins. The VS Code plugin has also been
    moved to the Swift project.
    
    ### Modifications
    
    - Update the example dev container to Swift 6.1.
    - Update the example dev container to use `swiftlang.swift-vscode`.
    - Clean up redundant workarounds in VS Code settings.
    - Link to try! Swift in addition to FOSDEM for folks looking for
    reference sources from conference talk.
    
    ### Result
    
    Example represents what was most recently presented.
    
    ### Test Plan
    
    CI will ensure the package has not regressed.
    simonjbeaumont authored Apr 9, 2025
    Configuration menu
    Copy the full SHA
    1e75aee View commit details
    Browse the repository at this point in the history

Commits on Apr 14, 2025

  1. Enable Swift 6.1 jobs in CI (#761)

    Motivation:
    
    Swift 6.1 has been released, we should add it to our CI coverage.
    
    Modifications:
    
    Add additional Swift 6.1 jobs where appropriate in main.yml,
    pull_request.yml
    
    Result:
    
    Improved test coverage.
    rnro authored Apr 14, 2025
    Configuration menu
    Copy the full SHA
    2cfb357 View commit details
    Browse the repository at this point in the history

Commits on Apr 16, 2025

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

Commits on May 7, 2025

  1. Drop Swift 5.9 (#765)

    Motivation:
    
    Swift 5.9 is no longer supported, we should bump the tools version and
    remove it from our CI.
    
    Modifications:
    
    * Bump the Swift tools version to Swift 5.10
    * Remove Swift 5.9 jobs where appropriate in main.yml, pull_request.yml
    
    Result:
    
    Code reflects our support window.
    rnro authored May 7, 2025
    Configuration menu
    Copy the full SHA
    af4cb85 View commit details
    Browse the repository at this point in the history

Commits on May 21, 2025

  1. Increase the upper version on Yams to include the new 6.0.0 (#770)

    ### Motivation
    
    Yams released a mostly compatible version 6.0.0.
    
    OpenAPIKit just did the same:
    mattpolzin/OpenAPIKit#410
    
    ### Modifications
    
    Increased the upper bound for the Yams dependency, so that our common
    adopters can use it.
    
    ### Result
    
    Ability to resolve Yams 6.0.0 when Swift OpenAPI Generator is also in a
    dependency graph.
    
    ### Test Plan
    
    PR CI.
    czechboy0 authored May 21, 2025
    Configuration menu
    Copy the full SHA
    0bd6d84 View commit details
    Browse the repository at this point in the history

Commits on May 23, 2025

  1. Add support for configurable comments in generated files (#773)

    ### Motivation
    
    Users want the ability to add custom comments to generated files. One
    concrete use case is adding directives like `swift-format-ignore-file`
    and `swiftlint:disable all` to prevent these tools from processing
    generated code.
    
    ### Modifications
    
    - Added `additionalFileComments` property to `Config` and `UserConfig`
    structs
    - Modified `FileTranslator` to include additional comments along with
    the do-not-edit comment
    - Added CLI support with `--additional-file-comment` option
    - Added config tests to confirm the option propagates and the default is
    empty
    - Added snippet tests to validate the actual rendering
    - Updated documentation with examples and usage instructions
    
    ### Result
    
    Users can now configure additional comments to be added to generated
    files using either the config file or a command line option.
    
    Fixes #738.
    
    ### Test plan
    
    - Added unit tests for `Config`
    - Added snippet tests for rendering
    - Manual tests of generator using config and CLI on real OpenAPI doc:
    
    ```console
    % swift run swift-openapi-generator generate openapi-documents/petstore.yaml \
      --mode types \
      --output-directory test-output-cli \
      --additional-file-comment "hello world" \
      --additional-file-comment "testing, testing, 1, 2, 3"
    Build of product 'swift-openapi-generator' complete! (3.27s)
    Swift OpenAPI Generator is running with the following configuration:
    - OpenAPI document path: /Users/Si/work/code/swift-openapi-workspace/packages/swift-openapi-generator/openapi-documents/petstore.yaml
    - Configuration path: <none>
    - Generator modes: types
    - Access modifier: internal
    - Naming strategy: defensive
    - Name overrides: <none>
    - Feature flags: <none>
    - Output file names: Types.swift
    - Output directory: /Users/Si/work/code/swift-openapi-workspace/packages/swift-openapi-generator/test-output-cli
    - Diagnostics output path: <none - logs to stderr>
    - Current directory: /Users/Si/work/code/swift-openapi-workspace/packages/swift-openapi-generator
    - Plugin source: <none>
    - Is dry run: false
    - Additional imports: <none>
    - Additional file comments: hello world, testing, testing, 1, 2, 3
    Writing data to file Types.swift...
    
    % head -5 test-output-cli/Types.swift
    // Generated by swift-openapi-generator, do not modify.
    // hello world
    // testing, testing, 1, 2, 3
    @_spi(Generated) import OpenAPIRuntime
    ```
    simonjbeaumont authored May 23, 2025
    Configuration menu
    Copy the full SHA
    09ed6c4 View commit details
    Browse the repository at this point in the history
Loading