The output of the bazel build goes to the bazel-bin/... dir by default. There should be an attribute to specify the generated code:
openapi_generator(
name = "code-gen",
generator = "spring",
output = "generated", # this should allow the user specify the output dir.
...
The output of the bazel build goes to the bazel-bin/... dir by default. There should be an attribute to specify the generated code: