Releases: Dreksh/bazel-swift-openapi-generator
Releases · Dreksh/bazel-swift-openapi-generator
Update to use swift-openapi-generator 1.2.1
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
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
Changes:
- Updated
Package.swiftin 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
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
- 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"],
)
- Copy
rules_swift_package_manager.patchinto your repository - Add this override after declaring the
rules_swift_package_managerdependency
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
)
- 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
The previous instructions did not work, made some modifications to allow it being called from the WORKSPACE.