Skip to content
This repository has been archived by the owner on Jul 4, 2023. It is now read-only.

Commit

Permalink
swagger-codegen 2.1.4 (new formula)
Browse files Browse the repository at this point in the history
Closes #45360.

Signed-off-by: Dominyk Tiller <[email protected]>
  • Loading branch information
arnested authored and DomT4 committed Oct 31, 2015
1 parent 83e6d5a commit 5be8732
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions Library/Formula/swagger-codegen.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
class SwaggerCodegen < Formula
desc "Generation of client and server from Swagger definition"
homepage "http://swagger.io/swagger-codegen/"
url "https://github.com/swagger-api/swagger-codegen/archive/v2.1.4.tar.gz"
sha256 "b4965158fb8abbebdfcaab2fdc0c5556001c587a526279d44ea9878f7ef9ef4c"
head "https://github.com/swagger-api/swagger-codegen.git"

depends_on :java => "1.7"
depends_on "maven" => :build

def install
system "mvn", "clean", "package"
libexec.install "modules/swagger-codegen-cli/target/swagger-codegen-cli.jar"
bin.write_jar_script libexec/"swagger-codegen-cli.jar", "swagger-codegen"
end

test do
(testpath/"minimal.yaml").write <<-EOS.undent
---
swagger: '2.0'
info:
version: 0.0.0
title: Simple API
paths:
/:
get:
responses:
200:
description: OK
EOS
system "#{bin}/swagger-codegen", "generate", "-i", "minimal.yaml", "-l", "swagger"
end
end

0 comments on commit 5be8732

Please sign in to comment.