Giter VIP home page Giter VIP logo

Comments (9)

flozano avatar flozano commented on July 3, 2024 1

Thanks a lot!

from openapi-generator.

wing328 avatar wing328 commented on July 3, 2024

from openapi-generator.

jmini avatar jmini commented on July 3, 2024

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.

jimschubert avatar jimschubert commented on July 3, 2024

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.

macjohnny avatar macjohnny commented on July 3, 2024

any update on this?

from openapi-generator.

jmini avatar jmini commented on July 3, 2024

From PR #217

The new brew formula is pending Homebrew/homebrew-core#28584

from openapi-generator.

macjohnny avatar macjohnny commented on July 3, 2024

excellent, thanks!

from openapi-generator.

wing328 avatar wing328 commented on July 3, 2024

UPDATE: I've submitted Homebrew/homebrew-core#28921 for OpenAPI Generator CLI 3.0.1 and closed the previous one.

from openapi-generator.

ackintosh avatar ackintosh commented on July 3, 2024

Added the homebrew formula 🎉
https://twitter.com/oas_generator/status/1008230904488062978

from openapi-generator.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.