Comments (3)
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?
from rules_openapi.
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 typescript-fetch
and go
libraries (as supported by swagger-codegen -l ...
). In other words:
openapi_gen(
language = "go",
# ...
)
But it seems like the openapi_gen
rule always packages the generated files into a jar, which I don't think can be easily consumed by languages other than java/scala. Am I missing an obvious way to depend on and openapi_gen
rule from another language?
from rules_openapi.
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
from rules_openapi.
Related Issues (7)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rules_openapi.