@@ -15,14 +15,15 @@ Here are the instructions for quickly using the generator:
1515
1616### Adding the Module
1717
18- There is a [ known issue] ( #not-hosted-in-a-bazel-registry ) where this module can't be manually added
19- into the ` MODULE.bazel ` file.
20- The current method is to follow modify the ` WORKSPACE ` file, not relying on Bazel's module system.
21-
22- When the issue is resolved, and this module is added to a Bazel registry,
23- the dependency is added by inserting this line into ` MODULE.bazel ` :
18+ The dependency is added by inserting these lines into ` MODULE.bazel ` :
2419``` skylark
2520bazel_dep(name = "swift-openapi-generator", version = "1.0.0-alpha1")
21+ archive_override(
22+ module_name = "swift-openapi-generator",
23+ integrity = "sha256-wx04p5+/Kzp062CkvY+I+Dho+qRqEY9rQd7Ow/uI9KA=",
24+ strip_prefix = "bazel-swift-openapi-generator-0.0.1-dev.2",
25+ urls = ["https://github.com/Dreksh/bazel-swift-openapi-generator/archive/refs/tags/v0.0.1-dev.2.tar.gz"],
26+ )
2627```
2728
2829### Using the Rule
@@ -80,24 +81,3 @@ single_version_override(
8081 patch_strip = 1, # Remove 1 directory level, as it's a git diff
8182)
8283```
83-
84- ### Not Hosted in a Bazel Registry
85-
86- Since this is not in the bazel registry yet, the module will need to be added via the WORKSPACE.
87- This is due to the ` swift-openapi-generator ` bazel module containing another repository dependency, which requires
88- Accessing the ` @swift-openapi-generator//:extensions.bzl ` file to load.
89-
90- The steps to do this is:
91- 1 . Add this to the ` WORKSPACE ` file:
92- ``` skylark
93- load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
94-
95- http_archive(
96- name = "swift-openapi-generator",
97- url = "https://github.com/Dreksh/bazel-swift-openapi-generator/archive/refs/tags/v1.0.0-alpha.1.tar.gz",
98- # sha256 = "5ddbe9c50cb72017e93b83531af6dd5f580b04e3f2e922a093af4e609db35dfa", (SHA not known at time of writing)
99- strip_prefix = "bazel-swift-openapi-generator-1.0.0-alpha.1",
100- )
101- load("@swift-openapi-generator//:extensions.bzl", swift_openapi_generator_deps = "deps")
102- swift_openapi_generator_deps(repository_name="@swift-openapi-generator")
103- ```
0 commit comments