Comments (9)
Thanks a lot!
from openapi-generator.
from openapi-generator.
I guess @wing328 plans to add this support, but for the moment openapi-generator was not added to Homebrew formulas.
Maybe this request the generator to be released first...
@flozano: Have you an other way to test this? Do you need help with the setup?
EDIT: @wing328: was quicker...
from openapi-generator.
Here's a script that you can use in the meantime.
#!/usr/bin/env bash
set -io pipefail
ver=${version:-3.0.0-SNAPSHOT}
groupid=org.openapitools
artifactid=openapi-generator-cli
jar=openapi-generator-cli-${ver}.jar
repo="https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli"
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
if [[ ${ver} =~ ^.*-SNAPSHOT$ ]]; then
repo="https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-cli"
fi
if [ ! -f ${DIR}/${jar} ]; then
if ! command -v mvn > /dev/null; then
>&2 echo "This script requires maven to be installed."
exit 1
fi
mvn org.apache.maven.plugins:maven-dependency-plugin:2.8:get \
-DrepoUrl=${repo} \
-Dartifact=${groupid}:${artifactid}:${ver} \
-Dtransitive=false \
-Ddest=${DIR}/${jar}
fi
java -ea \
${JAVA_OPTS} \
-Xms512M \
-Xmx1024M \
-server \
-jar ${DIR}/${jar} "$@"
Install: save as openapi-generator
(be sure to chmod u+x openapi-generator
) under ~/.bin
and add to your path.
Usage:
# Uses 3.0.0-SNAPSHOT by default
$ ./openapi-generator help
usage: openapi-generator-cli <command> [<args>]
The most commonly used openapi-generator-cli commands are:
config-help Config help for chosen lang
generate Generate code with chosen lang
help Display help information
langs Shows available languages (generators)
meta MetaGenerator. Generator for creating a new template set and configuration for Codegen. The output will be based on the language you specify, and includes default templates to include.
validate Validate specification
version Show version information
See 'openapi-generator-cli help <command>' for more information on a specific
command.
# Can target specific versions with environment variable "version"
# fails because we haven't released
$ version=3.0.0 ./openapi-generator help
The CLI jar(s) get pulled to the same directory where this script exists.
from openapi-generator.
any update on this?
from openapi-generator.
From PR #217
The new brew formula is pending Homebrew/homebrew-core#28584
from openapi-generator.
excellent, thanks!
from openapi-generator.
UPDATE: I've submitted Homebrew/homebrew-core#28921 for OpenAPI Generator CLI 3.0.1 and closed the previous one.
from openapi-generator.
Added the homebrew formula 🎉
https://twitter.com/oas_generator/status/1008230904488062978
from openapi-generator.
Related Issues (20)
- [BUG][C#] Project with some inheritance fails to compile.
- [BUG][RUST] json parser expects quotes with integer enum
- Question: [Java] How to customise Base-class if oneOf is used as request body
- [BUG] Enum default values do not work in Python when enum is a `$ref` HOT 1
- [REQ] [typescript-fetch] Add support for splitting models into separate files when runtime checks are disabled.
- [REQ][typescript] Enable header override at request time
- [REQ] request middleware for Zapier generator. HOT 1
- [BUG] JAX-RS does not honor sourceFolder for invoker package
- [REQ] [JAVA] Generation should exit with error when an unsupported serialization library is chosen
- [BUG][Typescript][Axios/Fetch] Wrong generated code for array of items using FormData (multipart/form-data)
- [BUG] [kotlin-spring] Unbalanced parenthesis in generated function declarations when using default value HOT 3
- [REQ] Feature Request Description docker openapi-generator-online
- [BUG] Kotlin-retrofit2-gson-coroutines CollectionsFormat.CSVParams default value is set to arrayListOf()
- [REQ] Is support for Angular V18 planned? HOT 1
- [BUG] [Java] hasMore is not working as expected with Java using version 7.6.0 of openapi-generator-maven-plugin HOT 2
- [BUG][JavaSpring] wrong parsing of space separated lombok annotations HOT 4
- [BUG] [JAVA] Microprofile library doesn't create @JacksonXmlRootElement on class when Jackson selected
- [BUG] [python] the client should not forcefully turn off httplib debug
- [BUG] Use API version in npm, not the npm version HOT 6
- [REQ] Update boundary for http package in dart generator
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 openapi-generator.