Skip to content

Instantly share code, notes, and snippets.

View swagger-codegen-custom-module-test.md

Getting Started

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;
View using-swagger-codegen-2.1.6-for-js.md

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

View apigee-127_swagger-tools_issues_376_sample.json
{
"swagger" : "2.0",
"info" : {
"description" : "foo",
"version" : "v1",
"title" : "foo",
"contact" : {
"name" : "foo",
"url" : "http://www.example.com",
"email" : "example@example.com"
View hmac_security_definitions.yml
securityDefinitions:
hmac:
algorithm: "sha256"
inputs:
timestamp:
type: "integer"
format: "int64"
uri:
type: "string"
description: "The full URI of the request"
View test.md

this is a quote

this is monospaced

View openfire_restapi_jar_download_tree
$ 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
View spaced_tags.json
{
"swagger": "2.0",
"info": {
"version": "0.0.0",
"title": "Simple API"
},
"tags":[{"name":"foo bar"}],
"paths": {
"/": {
"get": {
View repro_1051.json
{
"swagger": "2.0",
"info": {
"version": "0.0.0",
"title": "Simple API"
},
"paths": {
"/": {
"get": {
"operationId":"repro",
View extra-slash-repro.json
{
"swagger": "2.0",
"info": {
"version": "0.0.0",
"title": "Simple API"
},
"host":"api.example.com",
"paths": {
"/api": {
"get": {
View svn_revision_mapper.sh
#!/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);