Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

openapi generator v7.4.0 #62

Open
loeffel-io opened this issue Mar 19, 2024 · 1 comment
Open

openapi generator v7.4.0 #62

loeffel-io opened this issue Mar 19, 2024 · 1 comment

Comments

@loeffel-io
Copy link

loeffel-io commented Mar 19, 2024

Hello, in order to use v7.4.0 from https://github.com/OpenAPITools/openapi-generator it was necessary for me to run the tool (in the ci pipeline) with another java toolchain:

container_pull(
    name = "bazel",
    digest = "sha256:3348b14c7b45a4fbf06fee34996a8d15da72f43bb282a81f4720a0c0a5c37dca",  # https://console.cloud.google.com/gcr/images/bazel-public/global/bazel
    registry = "gcr.io",
    repository = "bazel-public/bazel",
)
diff --git openapi/openapi.bzl openapi/openapi.bzl
index 76f4467..8296635 100644
--- openapi/openapi.bzl
+++ openapi/openapi.bzl
@@ -141,7 +141,7 @@ def _new_generator_command(ctx, gen_dir, rjars):

     # fixme: by default, swagger-codegen is rather verbose. this helps with that but can also mask useful error messages
     # when it fails. look into log configuration options. it's a java app so perhaps just a log4j.properties or something
-    gen_cmd += " 2>/dev/null"
+    #gen_cmd += " 2>/dev/null"
     return gen_cmd

 def _impl(ctx):
@@ -243,7 +243,7 @@ openapi_gen = rule(
         "type_mappings": attr.string_dict(),
         "import_mappings": attr.string(),
         "_jdk": attr.label(
-            default = Label("@bazel_tools//tools/jdk:current_java_runtime"),
+            default = Label("@bazel_tools//tools/jdk:remote_jdk11"),
             providers = [java_common.JavaRuntimeInfo],
         ),
         "codegen_cli": attr.label(

would you be open to make the _jdk arg public? ref: https://github.com/meetup/rules_openapi/blob/master/openapi/openapi.bzl#L245

openapi generator v7.4.0
rules_openapi e42769a98fef5634bee0f921e4b90786a6b3292aa11fe8d2f84c045ac435ab29
bazel 7.1.0

@chenrui333
Copy link
Owner

@loeffel-io feel free to drop a PR, thanks!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants