cd `mktemp -d /tmp/codegen.XXXXXXXX`;
git clone https://github.com/swagger-api/swagger-codegen.git;
cd swagger-codegen;
mvn package;
java -jar modules/swagger-codegen-cli/target/swagger-codegen-cli.jar meta -o output/myLibrary -n FooBarGen -p com.foo.example.generated;
This is a quick guide on executing the new javascript generator in swagger 2.1.6
Go to a tmp directory
cd `mktemp -d /tmp/swagger-codegen-XXXXXX`;
Download swagger codegen 2.1.6 jar
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"swagger" : "2.0", | |
"info" : { | |
"description" : "foo", | |
"version" : "v1", | |
"title" : "foo", | |
"contact" : { | |
"name" : "foo", | |
"url" : "http://www.example.com", | |
"email" : "example@example.com" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
securityDefinitions: | |
hmac: | |
algorithm: "sha256" | |
inputs: | |
timestamp: | |
type: "integer" | |
format: "int64" | |
uri: | |
type: "string" | |
description: "The full URI of the request" |
this is a quote
this is monospaced
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ wget http://www.igniterealtime.org/projects/openfire/plugins/restAPI.jar -q | |
$ jar xf restAPI.jar | |
$ tree | |
. | |
├── META-INF | |
│ └── MANIFEST.MF | |
├── changelog.html | |
├── java | |
│ └── org | |
│ └── jivesoftware |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"swagger": "2.0", | |
"info": { | |
"version": "0.0.0", | |
"title": "Simple API" | |
}, | |
"paths": { | |
"/": { | |
"get": { | |
"operationId":"repro", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"swagger": "2.0", | |
"info": { | |
"version": "0.0.0", | |
"title": "Simple API" | |
}, | |
"host":"api.example.com", | |
"paths": { | |
"/api": { | |
"get": { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
TMP=$(mktemp /tmp/svn_revisions_XXXXXXXXXXXX.csv); | |
echo "Processing ..."; | |
echo "PATH,REVISION" > $TMP; | |
for svndir in $(find . -name .svn) | |
do | |
PARENTDIR=$(dirname $svndir); |
NewerOlder