-
Notifications
You must be signed in to change notification settings - Fork 25
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
Handle other implementations #2
Comments
This project is current based on swagger. I'm not familiar with go-swagger or what differentiates it from swagger. Swagger supports arbitrary programming languages and is extensible in allowing you to define your own code generators. We actually do this with our own scala client and server generators at Meetup. Here is an example client generator load(
"@io_bazel_rules_openapi//openapi:openapi.bzl",
"openapi_gen",
)
load(
"@io_bazel_rules_scala//scala:scala.bzl",
"scala_library",
)
# helpers for meetup classic's common case
_base_package = "com.meetup"
def openapi_client(svc):
openapi_gen(
name = "{svc}-client-src".format(svc=svc),
api_package = "{base_package}.{svc}.api".format(base_package = _base_package, svc = svc),
invoker_package = "{base_package}.{svc}".format(base_package = _base_package, svc = svc),
language = "meetup-scala-client",
model_package = "{base_package}.{svc}.model".format(base_package = _base_package, svc = svc),
spec = "src/main/openapi/meetup-scala-client/{svc}.yaml".format(svc = svc),
deps = [
"@meetuplib//:meetup-scala-generator",
],
)
scala_library(
name = "{svc}-client".format(svc=svc),
srcs = ["{svc}-client-src".format(svc=svc)],
deps = ["@meetuplib//:meetup-scala-gen-deps"],
visibility = ["//visibility:public"],
) Can you elaborate a bit more on go-swagger and how it differs in goals from swagger proper? |
I'm not sure if this is exactly the OP's question, but I'd like to be able to use this rule to generate both openapi_gen(
language = "go",
# ...
) But it seems like the |
We've only implemented what we've needed, in our case jvm bundles. The underlying tool itself supports a number of languages. What would be the ideal archive type you'd be looking for? I could help guide you on how to add support for other package types. The current format of is implemented here |
To me the question is how to handle other openapi implementations e.g. go-swagger? We have prel. support in
rules_go
since it needs the go toolchain.The text was updated successfully, but these errors were encountered: