-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5ea617b
commit c4136e4
Showing
17 changed files
with
2,309 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
module( | ||
name = "openapi_tools_generator_bazel", | ||
version = "0.1.7", | ||
compatibility_level = 0, | ||
) | ||
|
||
bazel_dep(name = "rules_pkg", version = "1.0.1") | ||
openapi_gen = use_extension("@openapi_tools_generator_bazel//:extension.bzl", "openapi_gen") | ||
openapi_gen.client() | ||
use_repo(openapi_gen, "openapi_tools_generator_bazel_cli") | ||
|
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
"modules extension to use with openapi-generator-bazel" | ||
load("@bazel_tools//tools/build_defs/repo:jvm.bzl", "jvm_maven_import_external") | ||
|
||
def _openapi_generator_impl(module_ctx): | ||
for mod in module_ctx.modules: | ||
for install in mod.tags.client: | ||
jvm_maven_import_external( | ||
name = "openapi_tools_generator_bazel_cli", | ||
artifact_sha256 = install.sha256, | ||
artifact = "org.openapitools:openapi-generator-cli:" + install.version, | ||
server_urls = install.server_urls, | ||
) | ||
|
||
_cli = tag_class(attrs = { | ||
"version": attr.string( | ||
default = "7.2.0", | ||
), | ||
"sha256": attr.string( | ||
default = "1cf0c80de12c0fdc8594289c19e414b402108ef10b8dd0bfda1953151341ab5d", | ||
), | ||
"server_urls": attr.string_list( | ||
default = ["https://repo1.maven.org/maven2"], | ||
), | ||
}) | ||
openapi_gen = module_extension( | ||
implementation = _openapi_generator_impl, | ||
tag_classes = {"client": _cli}, | ||
) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
bazel-bcr | ||
bazel-bin | ||
bazel-out | ||
bazel-testlogs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
load("@openapi_tools_generator_bazel//:defs.bzl", "openapi_generator") | ||
|
||
openapi_generator( | ||
name = "pylib", | ||
config = "config.yaml", | ||
spec = "petstore.yaml", | ||
generator = "python", | ||
) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
module( | ||
name = "openapi_tools_generator_bazel_bcr_tests", | ||
version = "1.2.3", | ||
) | ||
|
||
bazel_dep(name = "openapi_tools_generator_bazel", version = "") | ||
local_path_override( | ||
module_name = "openapi_tools_generator_bazel", | ||
path = "../../..", | ||
) | ||
openapi_gen = use_extension("@openapi_tools_generator_bazel//:extension.bzl", "openapi_gen") | ||
use_repo(openapi_gen, "openapi_tools_generator_bazel_cli") | ||
|
Oops, something went wrong.