Skip to content

Releases: Dreksh/bazel-swift-openapi-generator

Update to use swift-openapi-generator 1.2.1

25 Apr 13:29

Choose a tag to compare

Changes:

  • Uses v1.2.1 of swift-opernapi-generator
  • Updates swift-package-manager to v0.30.0

For using this version, add this to the MODULE.bazel file instead:

bazel_dep(name = "swift-openapi-generator", version = "1.2.1")
archive_override(
    module_name = "swift-openapi-generator",
    integrity = "sha256-2vj0En8V30NhPrIxYN3oVoFxn/cX8jTHytuajdmCn5Q=",
    strip_prefix = "bazel-swift-openapi-generator-1.2.1",
    urls = ["https://github.com/Dreksh/bazel-swift-openapi-generator/archive/refs/tags/v1.2.1.tar.gz"],
)

Update to use swift-openapi-generator 1.2.0

26 Jan 08:36

Choose a tag to compare

For using this version, add this to the MODULE.bazel file instead:

bazel_dep(name = "swift-openapi-generator", version = "1.2.0")
archive_override(
    module_name = "swift-openapi-generator",
    integrity = "sha256-Z0ES7iRY2T0HQVDPan6QAiGuz9ATyyNZZktXNGpZsB8=",
    strip_prefix = "bazel-swift-openapi-generator-1.2.0",
    urls = ["https://github.com/Dreksh/bazel-swift-openapi-generator/archive/refs/tags/v1.2.0.tar.gz"],
)

README + Example Updates

05 Dec 06:17

Choose a tag to compare

Changes:

  • Updated Package.swift in example/GreetingService to use 1.0.0-alpha.1
  • Updated README.md to have the values for this repository's 1.0.0-alpha.1 release, the outdated pre-release release will be removed.

For using this version, add this to the MODULE.bazel file instead:

bazel_dep(name = "swift-openapi-generator", version = "1.0.0-alpha.2")
archive_override(
    module_name = "swift-openapi-generator",
    integrity = "sha256-9akvAHYYQ/Qei6gr1QCVOQA89a1dvUCjLTxD5s/gPBQ=",
    strip_prefix = "bazel-swift-openapi-generator-1.0.0-alpha.2",
    urls = ["https://github.com/Dreksh/bazel-swift-openapi-generator/archive/refs/tags/v1.0.0-alpha.2.tar.gz"],
)

Swift OpenAPI Generator v1.0.0-alpha.1

05 Dec 00:53

Choose a tag to compare

Our first release to add a bazel wrapper for https://github.com/apple/swift-openapi-generator/tree/1.0.0-alpha.1

Follow the instructions in the README.md to use it!

TL;DR

  1. Add this into your MODULE.bazel:
bazel_dep(name = "swift-openapi-generator", version = "1.0.0-alpha.1")
archive_override(
    module_name = "swift-openapi-generator",
    integrity = "sha256-mKdLcKFsRxeIH57RVrVfm4t9raC/WfIYEYdZvgO8J5M=",
    strip_prefix = "bazel-swift-openapi-generator-1.0.0-alpha.1",
    urls = ["https://github.com/Dreksh/bazel-swift-openapi-generator/archive/refs/tags/v1.0.0-alpha.1.tar.gz"],
)
  1. Copy rules_swift_package_manager.patch into your repository
  2. Add this override after declaring the rules_swift_package_manager dependency
single_version_override(
    module_name = "rules_swift_package_manager",
    patches = ["//:rules_swift_package_manager.patch"],
    patch_strip = 1, # Remove 1 directory level, as it's a git diff
)
  1. Use it in a BUILD.bazel file:
load("@swift-openapi-generator//:defs.bzl", "swift_openapi_generate")

swift_openapi_generate(
    name = "server_stub",
    spec = "openapi.yaml",
    config = "openapi-generator-config.yaml",
)

Updated instructions for adding the repo via WORKSPACE

04 Dec 23:42

Choose a tag to compare

The previous instructions did not work, made some modifications to allow it being called from the WORKSPACE.