diff --git a/.drone.sec b/.drone.sec
deleted file mode 100644
index 9cc7e64..0000000
--- a/.drone.sec
+++ /dev/null
@@ -1 +0,0 @@
-eyJhbGciOiJSU0EtT0FFUCIsImVuYyI6IkExMjhHQ00ifQ.darMHuSYnLhsknrnqjdXLGcyEJ5kM13yQbLGi2UWcKXpddHvPT3dMCnP5y7e27c76R2HFnvr56BqDMI-x0zyuQtjYKzSFUGjOcEhOH3OL1Hxu-Cm2z2443BS8asXNA3sEveAGQvG68jffm7CvtEtMo57wBpggI7UHbfIdLMK47s1EDpC4xanjiS1BJe5NC_Ikf0jfa6vf18oggbjxuoqSEvSNVdNRyZwG_npFaZFJzvdtehTG7GqunWjGiqBb81qNcEdzSdIZW7A_Esv4U-nOL5gGr55E9jKhv3bX4Z9ygGcSrJ3NCgR_3zRhYKkPEAOXIqQKfL6-h82BY--cHq9uw.NHL3X-1tjb8a8zF7.eRmLvOG32e7260K8rkI-HmUGG5Gb6Hu-obKKxBqHd-vVzsKnwTVJavLWktPqlXGMsnDt7MimSysNqsWemMUEviW2p3godnvjOOXTDb-RAtQ-39rvxnZ2bN8qwUVFrdiKTZD06l60yTeLW7L1psyLj50NxklFObhkpUcK5uukxLXT1SzGM9aY6_3dzW4HU9pZGQrIH1pj1UzvWIjz7iIzE1a37DHBN-FiYSASsw01v1SSIFr34gwlGcqzGfJBonffVrM4ordm3IiVm50Zvr25DrmYTKrQpJRB-KOvYxBNYDzjCaanHDyWGUGN44FUx38azHHEVBTaiOM7xwPeyCc-xTTv8WXGnL1xrhL3M_jNuwnbAjzL9X_li7KUSeYajwhGihdMZaHLYaqxh3NNnbPfYhR6sBxu8vaT1Sc4eE84QC4dV4OaAglPvrPdWL-DC7OYQyoPU8u9ggwUQHpFUzJyD549T_Tlgn-2Cw7kTe41VonH9HkoXGANDGtQCGTqTIEeFQJ3MDDucf5VteFP8_SJPfyJYxpStFt5U1AuULV9sXmpGQL_-GGFXowd0X0bHxFeo_eu1vm-oTqQQNbKRnyt5V3n4U9jhOUGnnIBy3JOG3DA2YhVJsHdlLZ9vaDpFYcxts4.SqYfES30FqVSufGbPZ6YXA
\ No newline at end of file
diff --git a/.drone.yml b/.drone.yml
deleted file mode 100644
index acf10fd..0000000
--- a/.drone.yml
+++ /dev/null
@@ -1,32 +0,0 @@
-clone:
-  path: github.com/go-openapi/swag
-
-matrix:
-  GO_VERSION:
-    - "1.6"
-
-build:
-  integration:
-    image: golang:$$GO_VERSION
-    pull: true
-    commands:
-      - go get -u github.com/stretchr/testify
-      - go get -u github.com/mailru/easyjson
-      - go test -race
-      - go test -v -cover -coverprofile=coverage.out -covermode=count ./...
-
-notify:
-  slack:
-    channel: bots
-    webhook_url: $$SLACK_URL
-    username: drone
-
-publish:
-  coverage:
-    server: https://coverage.vmware.run
-    token: $$GITHUB_TOKEN
-    # threshold: 70
-    # must_increase: true
-    when:
-      matrix:
-        GO_VERSION: "1.6"
diff --git a/.editorconfig b/.editorconfig
new file mode 100644
index 0000000..3152da6
--- /dev/null
+++ b/.editorconfig
@@ -0,0 +1,26 @@
+# top-most EditorConfig file
+root = true
+
+# Unix-style newlines with a newline ending every file
+[*]
+end_of_line = lf
+insert_final_newline = true
+indent_style = space
+indent_size = 2
+trim_trailing_whitespace = true
+
+# Set default charset
+[*.{js,py,go,scala,rb,java,html,css,less,sass,md}]
+charset = utf-8
+
+# Tab indentation (no size specified)
+[*.go]
+indent_style = tab
+
+[*.md]
+trim_trailing_whitespace = false
+
+# Matches the exact files either package.json or .travis.yml
+[{package.json,.travis.yml}]
+indent_style = space
+indent_size = 2
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..5862205
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,3 @@
+secrets.yml
+vendor
+Godeps
diff --git a/.golangci.yml b/.golangci.yml
new file mode 100644
index 0000000..625c3d6
--- /dev/null
+++ b/.golangci.yml
@@ -0,0 +1,22 @@
+linters-settings:
+  govet:
+    check-shadowing: true
+  golint:
+    min-confidence: 0
+  gocyclo:
+    min-complexity: 25
+  maligned:
+    suggest-new: true
+  dupl:
+    threshold: 100
+  goconst:
+    min-len: 3
+    min-occurrences: 2
+
+linters:
+  enable-all: true
+  disable:
+    - maligned
+    - lll
+    - gochecknoinits
+    - gochecknoglobals
diff --git a/.pullapprove.yml b/.pullapprove.yml
deleted file mode 100644
index 5ec183e..0000000
--- a/.pullapprove.yml
+++ /dev/null
@@ -1,13 +0,0 @@
-approve_by_comment: true
-approve_regex: '^(:shipit:|:\+1:|\+1|LGTM|lgtm|Approved)'
-reject_regex: ^[Rr]ejected
-reset_on_push: false
-reviewers:
-  members:
-  - casualjim
-  - chancez
-  - frapposelli
-  - vburenin
-  - pytlesk4
-  name: pullapprove
-  required: 1
diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 0000000..aa26d87
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,15 @@
+after_success:
+- bash <(curl -s https://codecov.io/bash)
+go:
+- 1.11.x
+- 1.12.x
+install:
+- GO111MODULE=off go get -u gotest.tools/gotestsum
+env:
+- GO111MODULE=on
+language: go
+notifications:
+  slack:
+    secure: QUWvCkBBK09GF7YtEvHHVt70JOkdlNBG0nIKu/5qc4/nW5HP8I2w0SEf/XR2je0eED1Qe3L/AfMCWwrEj+IUZc3l4v+ju8X8R3Lomhme0Eb0jd1MTMCuPcBT47YCj0M7RON7vXtbFfm1hFJ/jLe5+9FXz0hpXsR24PJc5ZIi/ogNwkaPqG4BmndzecpSh0vc2FJPZUD9LT0I09REY/vXR0oQAalLkW0asGD5taHZTUZq/kBpsNxaAFrLM23i4mUcf33M5fjLpvx5LRICrX/57XpBrDh2TooBU6Qj3CgoY0uPRYUmSNxbVx1czNzl2JtEpb5yjoxfVPQeg0BvQM00G8LJINISR+ohrjhkZmAqchDupAX+yFrxTtORa78CtnIL6z/aTNlgwwVD8kvL/1pFA/JWYmKDmz93mV/+6wubGzNSQCstzjkFA4/iZEKewKUoRIAi/fxyscP6L/rCpmY/4llZZvrnyTqVbt6URWpopUpH4rwYqreXAtJxJsfBJIeSmUIiDIOMGkCTvyTEW3fWGmGoqWtSHLoaWDyAIGb7azb+KvfpWtEcoPFWfSWU+LGee0A/YsUhBl7ADB9A0CJEuR8q4BPpKpfLwPKSiKSAXL7zDkyjExyhtgqbSl2jS+rKIHOZNL8JkCcTP2MKMVd563C5rC5FMKqu3S9m2b6380E=
+script:
+- gotestsum -f short-verbose -- -race -coverprofile=coverage.txt -covermode=atomic ./...
diff --git a/README.md b/README.md
index c1d3c19..eb60ae8 100644
--- a/README.md
+++ b/README.md
@@ -1,12 +1,22 @@
-# Swag [![Build Status](https://ci.vmware.run/api/badges/go-openapi/swag/status.svg)](https://ci.vmware.run/go-openapi/swag) [![Coverage](https://coverage.vmware.run/badges/go-openapi/swag/coverage.svg)](https://coverage.vmware.run/go-openapi/swag) [![Slack Status](https://slackin.goswagger.io/badge.svg)](https://slackin.goswagger.io)
+# Swag [![Build Status](https://travis-ci.org/go-openapi/swag.svg?branch=master)](https://travis-ci.org/go-openapi/swag) [![codecov](https://codecov.io/gh/go-openapi/swag/branch/master/graph/badge.svg)](https://codecov.io/gh/go-openapi/swag) [![Slack Status](https://slackin.goswagger.io/badge.svg)](https://slackin.goswagger.io)
 
-[![license](http://img.shields.io/badge/license-Apache%20v2-orange.svg)](https://raw.githubusercontent.com/go-openapi/swag/master/LICENSE) [![GoDoc](https://godoc.org/github.com/go-openapi/swag?status.svg)](http://godoc.org/github.com/go-openapi/swag)
+[![license](http://img.shields.io/badge/license-Apache%20v2-orange.svg)](https://raw.githubusercontent.com/go-openapi/swag/master/LICENSE)
+[![GoDoc](https://godoc.org/github.com/go-openapi/swag?status.svg)](http://godoc.org/github.com/go-openapi/swag)
+[![GolangCI](https://golangci.com/badges/github.com/go-openapi/swag.svg)](https://golangci.com)
+[![Go Report Card](https://goreportcard.com/badge/github.com/go-openapi/swag)](https://goreportcard.com/report/github.com/go-openapi/swag)
 
-Contains a bunch of helper functions:
+Contains a bunch of helper functions for go-openapi and go-swagger projects.
 
-* convert between value and pointers for builtins
-* convert from string to builtin
+You may also use it standalone for your projects.
+
+* convert between value and pointers for builtin types
+* convert from string to builtin types (wraps strconv)
 * fast json concatenation
 * search in path
 * load from file or http
-* name manglin
\ No newline at end of file
+* name mangling
+
+
+This repo has only few dependencies outside of the standard library:
+
+* YAML utilities depend on gopkg.in/yaml.v2
diff --git a/convert.go b/convert.go
index 28d9124..4e446ff 100644
--- a/convert.go
+++ b/convert.go
@@ -22,8 +22,9 @@ import (
 
 // same as ECMA Number.MAX_SAFE_INTEGER and Number.MIN_SAFE_INTEGER
 const (
-	maxJSONFloat = float64(1<<53 - 1)  // 9007199254740991.0 	 	 2^53 - 1
-	minJSONFloat = -float64(1<<53 - 1) //-9007199254740991.0	-2^53 - 1
+	maxJSONFloat         = float64(1<<53 - 1)  // 9007199254740991.0 	 	 2^53 - 1
+	minJSONFloat         = -float64(1<<53 - 1) //-9007199254740991.0	-2^53 - 1
+	epsilon      float64 = 1e-9
 )
 
 // IsFloat64AJSONInteger allow for integers [-2^53, 2^53-1] inclusive
@@ -31,21 +32,39 @@ func IsFloat64AJSONInteger(f float64) bool {
 	if math.IsNaN(f) || math.IsInf(f, 0) || f < minJSONFloat || f > maxJSONFloat {
 		return false
 	}
-
-	return f == float64(int64(f)) || f == float64(uint64(f))
-}
-
-var evaluatesAsTrue = map[string]struct{}{
-	"true":     struct{}{},
-	"1":        struct{}{},
-	"yes":      struct{}{},
-	"ok":       struct{}{},
-	"y":        struct{}{},
-	"on":       struct{}{},
-	"selected": struct{}{},
-	"checked":  struct{}{},
-	"t":        struct{}{},
-	"enabled":  struct{}{},
+	fa := math.Abs(f)
+	g := float64(uint64(f))
+	ga := math.Abs(g)
+
+	diff := math.Abs(f - g)
+
+	// more info: https://floating-point-gui.de/errors/comparison/#look-out-for-edge-cases
+	if f == g { // best case
+		return true
+	} else if f == float64(int64(f)) || f == float64(uint64(f)) { // optimistic case
+		return true
+	} else if f == 0 || g == 0 || diff < math.SmallestNonzeroFloat64 { // very close to 0 values
+		return diff < (epsilon * math.SmallestNonzeroFloat64)
+	}
+	// check the relative error
+	return diff/math.Min(fa+ga, math.MaxFloat64) < epsilon
+}
+
+var evaluatesAsTrue map[string]struct{}
+
+func init() {
+	evaluatesAsTrue = map[string]struct{}{
+		"true":     {},
+		"1":        {},
+		"yes":      {},
+		"ok":       {},
+		"y":        {},
+		"on":       {},
+		"selected": {},
+		"checked":  {},
+		"t":        {},
+		"enabled":  {},
+	}
 }
 
 // ConvertBool turn a string into a boolean
@@ -159,7 +178,7 @@ func FormatInt16(value int16) string {
 
 // FormatInt32 turns an int32 into a string
 func FormatInt32(value int32) string {
-	return strconv.FormatInt(int64(value), 10)
+	return strconv.Itoa(int(value))
 }
 
 // FormatInt64 turns an int64 into a string
diff --git a/convert_test.go b/convert_test.go
index 2f00732..f54ae23 100644
--- a/convert_test.go
+++ b/convert_test.go
@@ -207,6 +207,7 @@ func TestIsFloat64AJSONInteger(t *testing.T) {
 	assert.True(t, IsFloat64AJSONInteger(1.0))
 	assert.True(t, IsFloat64AJSONInteger(maxJSONFloat))
 	assert.True(t, IsFloat64AJSONInteger(minJSONFloat))
+	assert.True(t, IsFloat64AJSONInteger(1/0.01*67.15000001))
 }
 
 func TestFormatBool(t *testing.T) {
diff --git a/convert_types_test.go b/convert_types_test.go
index 978cf3a..1385957 100644
--- a/convert_types_test.go
+++ b/convert_types_test.go
@@ -1,12 +1,84 @@
+// Copyright 2015 go-swagger maintainers
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//    http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
 package swag
 
 import (
+	"reflect"
 	"testing"
 	"time"
 
 	"github.com/stretchr/testify/assert"
 )
 
+func assertSingleValue(t *testing.T, inElem, elem reflect.Value, expectPointer bool, idx int) {
+	if !assert.Truef(t,
+		(elem.Kind() == reflect.Ptr) == expectPointer,
+		"Unexpected expectPointer=%t value type", expectPointer) {
+		return
+	}
+	if inElem.Kind() == reflect.Ptr && !inElem.IsNil() {
+		inElem = reflect.Indirect(inElem)
+	}
+	if elem.Kind() == reflect.Ptr && !elem.IsNil() {
+		elem = reflect.Indirect(elem)
+	}
+
+	if !assert.Truef(t,
+		(elem.Kind() == reflect.Ptr && elem.IsNil()) || IsZero(elem.Interface()) ==
+			(inElem.Kind() == reflect.Ptr && inElem.IsNil()) || IsZero(inElem.Interface()),
+		"Unexpected nil pointer at idx %d", idx) {
+		return
+	}
+
+	if !((elem.Kind() == reflect.Ptr && elem.IsNil()) || IsZero(elem.Interface())) {
+		if !assert.IsTypef(t, inElem.Interface(), elem.Interface(), "Expected in/out to match types") {
+			return
+		}
+		assert.EqualValuesf(t, inElem.Interface(), elem.Interface(), "Unexpected value at idx %d: %v", idx, elem.Interface())
+	}
+}
+
+// assertValues checks equivalent representation pointer vs values for single var, slices and maps
+func assertValues(t *testing.T, in, out interface{}, expectPointer bool, idx int) {
+	vin := reflect.ValueOf(in)
+	vout := reflect.ValueOf(out)
+	switch vin.Kind() {
+	case reflect.Slice, reflect.Map:
+		if !assert.Equalf(t, vin.Kind(), vout.Kind(), "Unexpected output type at idx %d", idx) ||
+			!assert.Equalf(t, vin.Len(), vout.Len(), "Unexpected len at idx %d", idx) {
+			break
+		}
+		var elem, inElem reflect.Value
+		for i := 0; i < vin.Len(); i++ {
+			if vin.Kind() == reflect.Slice {
+				elem = vout.Index(i)
+				inElem = vin.Index(i)
+			} else if vin.Kind() == reflect.Map {
+				keys := vin.MapKeys()
+				elem = vout.MapIndex(keys[i])
+				inElem = vout.MapIndex(keys[i])
+			}
+			assertSingleValue(t, inElem, elem, expectPointer, idx)
+		}
+	default:
+		inElem := vin
+		elem := vout
+		assertSingleValue(t, inElem, elem, expectPointer, idx)
+	}
+}
+
 var testCasesStringSlice = [][]string{
 	{"a", "b", "c", "d", "e"},
 	{"a", "b", "", "", "e"},
@@ -18,14 +90,10 @@ func TestStringSlice(t *testing.T) {
 			continue
 		}
 		out := StringSlice(in)
-		assert.Len(t, out, len(in), "Unexpected len at idx %d", idx)
-		for i := range out {
-			assert.Equal(t, in[i], *(out[i]), "Unexpected value at idx %d", idx)
-		}
+		assertValues(t, in, out, true, idx)
 
 		out2 := StringValueSlice(out)
-		assert.Len(t, out2, len(in), "Unexpected len at idx %d", idx)
-		assert.Equal(t, in, out2, "Unexpected value at idx %d", idx)
+		assertValues(t, in, out2, false, idx)
 	}
 }
 
@@ -39,24 +107,10 @@ func TestStringValueSlice(t *testing.T) {
 			continue
 		}
 		out := StringValueSlice(in)
-		assert.Len(t, out, len(in), "Unexpected len at idx %d", idx)
-		for i := range out {
-			if in[i] == nil {
-				assert.Empty(t, out[i], "Unexpected value at idx %d", idx)
-			} else {
-				assert.Equal(t, *(in[i]), out[i], "Unexpected value at idx %d", idx)
-			}
-		}
+		assertValues(t, in, out, false, idx)
 
 		out2 := StringSlice(out)
-		assert.Len(t, out2, len(in), "Unexpected len at idx %d", idx)
-		for i := range out2 {
-			if in[i] == nil {
-				assert.Empty(t, *(out2[i]), "Unexpected value at idx %d", idx)
-			} else {
-				assert.Equal(t, in[i], out2[i], "Unexpected value at idx %d", idx)
-			}
-		}
+		assertValues(t, in, out2, true, idx)
 	}
 }
 
@@ -70,14 +124,10 @@ func TestStringMap(t *testing.T) {
 			continue
 		}
 		out := StringMap(in)
-		assert.Len(t, out, len(in), "Unexpected len at idx %d", idx)
-		for i := range out {
-			assert.Equal(t, in[i], *(out[i]), "Unexpected value at idx %d", idx)
-		}
+		assertValues(t, in, out, true, idx)
 
 		out2 := StringValueMap(out)
-		assert.Len(t, out2, len(in), "Unexpected len at idx %d", idx)
-		assert.Equal(t, in, out2, "Unexpected value at idx %d", idx)
+		assertValues(t, in, out2, false, idx)
 	}
 }
 
@@ -91,18 +141,16 @@ func TestBoolSlice(t *testing.T) {
 			continue
 		}
 		out := BoolSlice(in)
-		assert.Len(t, out, len(in), "Unexpected len at idx %d", idx)
-		for i := range out {
-			assert.Equal(t, in[i], *(out[i]), "Unexpected value at idx %d", idx)
-		}
+		assertValues(t, in, out, true, idx)
 
 		out2 := BoolValueSlice(out)
-		assert.Len(t, out2, len(in), "Unexpected len at idx %d", idx)
-		assert.Equal(t, in, out2, "Unexpected value at idx %d", idx)
+		assertValues(t, in, out2, false, idx)
 	}
 }
 
-var testCasesBoolValueSlice = [][]*bool{}
+var testCasesBoolValueSlice = [][]*bool{
+	{Bool(true), Bool(true), Bool(false), Bool(false)},
+}
 
 func TestBoolValueSlice(t *testing.T) {
 	for idx, in := range testCasesBoolValueSlice {
@@ -110,24 +158,10 @@ func TestBoolValueSlice(t *testing.T) {
 			continue
 		}
 		out := BoolValueSlice(in)
-		assert.Len(t, out, len(in), "Unexpected len at idx %d", idx)
-		for i := range out {
-			if in[i] == nil {
-				assert.Empty(t, out[i], "Unexpected value at idx %d", idx)
-			} else {
-				assert.Equal(t, *(in[i]), out[i], "Unexpected value at idx %d", idx)
-			}
-		}
+		assertValues(t, in, out, false, idx)
 
 		out2 := BoolSlice(out)
-		assert.Len(t, out2, len(in), "Unexpected len at idx %d", idx)
-		for i := range out2 {
-			if in[i] == nil {
-				assert.Empty(t, *(out2[i]), "Unexpected value at idx %d", idx)
-			} else {
-				assert.Equal(t, in[i], out2[i], "Unexpected value at idx %d", idx)
-			}
-		}
+		assertValues(t, in, out2, true, idx)
 	}
 }
 
@@ -141,14 +175,10 @@ func TestBoolMap(t *testing.T) {
 			continue
 		}
 		out := BoolMap(in)
-		assert.Len(t, out, len(in), "Unexpected len at idx %d", idx)
-		for i := range out {
-			assert.Equal(t, in[i], *(out[i]), "Unexpected value at idx %d", idx)
-		}
+		assertValues(t, in, out, true, idx)
 
 		out2 := BoolValueMap(out)
-		assert.Len(t, out2, len(in), "Unexpected len at idx %d", idx)
-		assert.Equal(t, in, out2, "Unexpected value at idx %d", idx)
+		assertValues(t, in, out2, false, idx)
 	}
 }
 
@@ -162,18 +192,16 @@ func TestIntSlice(t *testing.T) {
 			continue
 		}
 		out := IntSlice(in)
-		assert.Len(t, out, len(in), "Unexpected len at idx %d", idx)
-		for i := range out {
-			assert.Equal(t, in[i], *(out[i]), "Unexpected value at idx %d", idx)
-		}
+		assertValues(t, in, out, true, idx)
 
 		out2 := IntValueSlice(out)
-		assert.Len(t, out2, len(in), "Unexpected len at idx %d", idx)
-		assert.Equal(t, in, out2, "Unexpected value at idx %d", idx)
+		assertValues(t, in, out2, false, idx)
 	}
 }
 
-var testCasesIntValueSlice = [][]*int{}
+var testCasesIntValueSlice = [][]*int{
+	{Int(1), Int(2), Int(3), Int(4)},
+}
 
 func TestIntValueSlice(t *testing.T) {
 	for idx, in := range testCasesIntValueSlice {
@@ -181,24 +209,10 @@ func TestIntValueSlice(t *testing.T) {
 			continue
 		}
 		out := IntValueSlice(in)
-		assert.Len(t, out, len(in), "Unexpected len at idx %d", idx)
-		for i := range out {
-			if in[i] == nil {
-				assert.Empty(t, out[i], "Unexpected value at idx %d", idx)
-			} else {
-				assert.Equal(t, *(in[i]), out[i], "Unexpected value at idx %d", idx)
-			}
-		}
+		assertValues(t, in, out, false, idx)
 
 		out2 := IntSlice(out)
-		assert.Len(t, out2, len(in), "Unexpected len at idx %d", idx)
-		for i := range out2 {
-			if in[i] == nil {
-				assert.Empty(t, *(out2[i]), "Unexpected value at idx %d", idx)
-			} else {
-				assert.Equal(t, in[i], out2[i], "Unexpected value at idx %d", idx)
-			}
-		}
+		assertValues(t, in, out2, true, idx)
 	}
 }
 
@@ -212,14 +226,10 @@ func TestIntMap(t *testing.T) {
 			continue
 		}
 		out := IntMap(in)
-		assert.Len(t, out, len(in), "Unexpected len at idx %d", idx)
-		for i := range out {
-			assert.Equal(t, in[i], *(out[i]), "Unexpected value at idx %d", idx)
-		}
+		assertValues(t, in, out, true, idx)
 
 		out2 := IntValueMap(out)
-		assert.Len(t, out2, len(in), "Unexpected len at idx %d", idx)
-		assert.Equal(t, in, out2, "Unexpected value at idx %d", idx)
+		assertValues(t, in, out2, false, idx)
 	}
 }
 
@@ -233,18 +243,16 @@ func TestInt64Slice(t *testing.T) {
 			continue
 		}
 		out := Int64Slice(in)
-		assert.Len(t, out, len(in), "Unexpected len at idx %d", idx)
-		for i := range out {
-			assert.Equal(t, in[i], *(out[i]), "Unexpected value at idx %d", idx)
-		}
+		assertValues(t, in, out, true, idx)
 
 		out2 := Int64ValueSlice(out)
-		assert.Len(t, out2, len(in), "Unexpected len at idx %d", idx)
-		assert.Equal(t, in, out2, "Unexpected value at idx %d", idx)
+		assertValues(t, in, out2, false, idx)
 	}
 }
 
-var testCasesInt64ValueSlice = [][]*int64{}
+var testCasesInt64ValueSlice = [][]*int64{
+	{Int64(1), Int64(2), Int64(3), Int64(4)},
+}
 
 func TestInt64ValueSlice(t *testing.T) {
 	for idx, in := range testCasesInt64ValueSlice {
@@ -252,24 +260,10 @@ func TestInt64ValueSlice(t *testing.T) {
 			continue
 		}
 		out := Int64ValueSlice(in)
-		assert.Len(t, out, len(in), "Unexpected len at idx %d", idx)
-		for i := range out {
-			if in[i] == nil {
-				assert.Empty(t, out[i], "Unexpected value at idx %d", idx)
-			} else {
-				assert.Equal(t, *(in[i]), out[i], "Unexpected value at idx %d", idx)
-			}
-		}
+		assertValues(t, in, out, false, idx)
 
 		out2 := Int64Slice(out)
-		assert.Len(t, out2, len(in), "Unexpected len at idx %d", idx)
-		for i := range out2 {
-			if in[i] == nil {
-				assert.Empty(t, *(out2[i]), "Unexpected value at idx %d", idx)
-			} else {
-				assert.Equal(t, in[i], out2[i], "Unexpected value at idx %d", idx)
-			}
-		}
+		assertValues(t, in, out2, true, idx)
 	}
 }
 
@@ -283,14 +277,10 @@ func TestInt64Map(t *testing.T) {
 			continue
 		}
 		out := Int64Map(in)
-		assert.Len(t, out, len(in), "Unexpected len at idx %d", idx)
-		for i := range out {
-			assert.Equal(t, in[i], *(out[i]), "Unexpected value at idx %d", idx)
-		}
+		assertValues(t, in, out, true, idx)
 
 		out2 := Int64ValueMap(out)
-		assert.Len(t, out2, len(in), "Unexpected len at idx %d", idx)
-		assert.Equal(t, in, out2, "Unexpected value at idx %d", idx)
+		assertValues(t, in, out2, false, idx)
 	}
 }
 
@@ -304,14 +294,10 @@ func TestFloat64Slice(t *testing.T) {
 			continue
 		}
 		out := Float64Slice(in)
-		assert.Len(t, out, len(in), "Unexpected len at idx %d", idx)
-		for i := range out {
-			assert.Equal(t, in[i], *(out[i]), "Unexpected value at idx %d", idx)
-		}
+		assertValues(t, in, out, true, idx)
 
 		out2 := Float64ValueSlice(out)
-		assert.Len(t, out2, len(in), "Unexpected len at idx %d", idx)
-		assert.Equal(t, in, out2, "Unexpected value at idx %d", idx)
+		assertValues(t, in, out2, false, idx)
 	}
 }
 
@@ -325,14 +311,10 @@ func TestUintSlice(t *testing.T) {
 			continue
 		}
 		out := UintSlice(in)
-		assert.Len(t, out, len(in), "Unexpected len at idx %d", idx)
-		for i := range out {
-			assert.Equal(t, in[i], *(out[i]), "Unexpected value at idx %d", idx)
-		}
+		assertValues(t, in, out, true, idx)
 
 		out2 := UintValueSlice(out)
-		assert.Len(t, out2, len(in), "Unexpected len at idx %d", idx)
-		assert.Equal(t, in, out2, "Unexpected value at idx %d", idx)
+		assertValues(t, in, out2, false, idx)
 	}
 }
 
@@ -344,24 +326,10 @@ func TestUintValueSlice(t *testing.T) {
 			continue
 		}
 		out := UintValueSlice(in)
-		assert.Len(t, out, len(in), "Unexpected len at idx %d", idx)
-		for i := range out {
-			if in[i] == nil {
-				assert.Empty(t, out[i], "Unexpected value at idx %d", idx)
-			} else {
-				assert.Equal(t, *(in[i]), out[i], "Unexpected value at idx %d", idx)
-			}
-		}
+		assertValues(t, in, out, true, idx)
 
 		out2 := UintSlice(out)
-		assert.Len(t, out2, len(in), "Unexpected len at idx %d", idx)
-		for i := range out2 {
-			if in[i] == nil {
-				assert.Empty(t, *(out2[i]), "Unexpected value at idx %d", idx)
-			} else {
-				assert.Equal(t, in[i], out2[i], "Unexpected value at idx %d", idx)
-			}
-		}
+		assertValues(t, in, out2, false, idx)
 	}
 }
 
@@ -375,14 +343,10 @@ func TestUintMap(t *testing.T) {
 			continue
 		}
 		out := UintMap(in)
-		assert.Len(t, out, len(in), "Unexpected len at idx %d", idx)
-		for i := range out {
-			assert.Equal(t, in[i], *(out[i]), "Unexpected value at idx %d", idx)
-		}
+		assertValues(t, in, out, true, idx)
 
 		out2 := UintValueMap(out)
-		assert.Len(t, out2, len(in), "Unexpected len at idx %d", idx)
-		assert.Equal(t, in, out2, "Unexpected value at idx %d", idx)
+		assertValues(t, in, out2, false, idx)
 	}
 }
 
@@ -396,14 +360,10 @@ func TestUint64Slice(t *testing.T) {
 			continue
 		}
 		out := Uint64Slice(in)
-		assert.Len(t, out, len(in), "Unexpected len at idx %d", idx)
-		for i := range out {
-			assert.Equal(t, in[i], *(out[i]), "Unexpected value at idx %d", idx)
-		}
+		assertValues(t, in, out, true, idx)
 
 		out2 := Uint64ValueSlice(out)
-		assert.Len(t, out2, len(in), "Unexpected len at idx %d", idx)
-		assert.Equal(t, in, out2, "Unexpected value at idx %d", idx)
+		assertValues(t, in, out2, false, idx)
 	}
 }
 
@@ -415,24 +375,10 @@ func TestUint64ValueSlice(t *testing.T) {
 			continue
 		}
 		out := Uint64ValueSlice(in)
-		assert.Len(t, out, len(in), "Unexpected len at idx %d", idx)
-		for i := range out {
-			if in[i] == nil {
-				assert.Empty(t, out[i], "Unexpected value at idx %d", idx)
-			} else {
-				assert.Equal(t, *(in[i]), out[i], "Unexpected value at idx %d", idx)
-			}
-		}
+		assertValues(t, in, out, true, idx)
 
 		out2 := Uint64Slice(out)
-		assert.Len(t, out2, len(in), "Unexpected len at idx %d", idx)
-		for i := range out2 {
-			if in[i] == nil {
-				assert.Empty(t, *(out2[i]), "Unexpected value at idx %d", idx)
-			} else {
-				assert.Equal(t, in[i], out2[i], "Unexpected value at idx %d", idx)
-			}
-		}
+		assertValues(t, in, out2, false, idx)
 	}
 }
 
@@ -446,14 +392,10 @@ func TestUint64Map(t *testing.T) {
 			continue
 		}
 		out := Uint64Map(in)
-		assert.Len(t, out, len(in), "Unexpected len at idx %d", idx)
-		for i := range out {
-			assert.Equal(t, in[i], *(out[i]), "Unexpected value at idx %d", idx)
-		}
+		assertValues(t, in, out, true, idx)
 
 		out2 := Uint64ValueMap(out)
-		assert.Len(t, out2, len(in), "Unexpected len at idx %d", idx)
-		assert.Equal(t, in, out2, "Unexpected value at idx %d", idx)
+		assertValues(t, in, out2, false, idx)
 	}
 }
 
@@ -465,24 +407,10 @@ func TestFloat64ValueSlice(t *testing.T) {
 			continue
 		}
 		out := Float64ValueSlice(in)
-		assert.Len(t, out, len(in), "Unexpected len at idx %d", idx)
-		for i := range out {
-			if in[i] == nil {
-				assert.Empty(t, out[i], "Unexpected value at idx %d", idx)
-			} else {
-				assert.Equal(t, *(in[i]), out[i], "Unexpected value at idx %d", idx)
-			}
-		}
+		assertValues(t, in, out, true, idx)
 
 		out2 := Float64Slice(out)
-		assert.Len(t, out2, len(in), "Unexpected len at idx %d", idx)
-		for i := range out2 {
-			if in[i] == nil {
-				assert.Empty(t, *(out2[i]), "Unexpected value at idx %d", idx)
-			} else {
-				assert.Equal(t, in[i], out2[i], "Unexpected value at idx %d", idx)
-			}
-		}
+		assertValues(t, in, out2, false, idx)
 	}
 }
 
@@ -496,14 +424,10 @@ func TestFloat64Map(t *testing.T) {
 			continue
 		}
 		out := Float64Map(in)
-		assert.Len(t, out, len(in), "Unexpected len at idx %d", idx)
-		for i := range out {
-			assert.Equal(t, in[i], *(out[i]), "Unexpected value at idx %d", idx)
-		}
+		assertValues(t, in, out, true, idx)
 
 		out2 := Float64ValueMap(out)
-		assert.Len(t, out2, len(in), "Unexpected len at idx %d", idx)
-		assert.Equal(t, in, out2, "Unexpected value at idx %d", idx)
+		assertValues(t, in, out2, false, idx)
 	}
 }
 
@@ -517,18 +441,16 @@ func TestTimeSlice(t *testing.T) {
 			continue
 		}
 		out := TimeSlice(in)
-		assert.Len(t, out, len(in), "Unexpected len at idx %d", idx)
-		for i := range out {
-			assert.Equal(t, in[i], *(out[i]), "Unexpected value at idx %d", idx)
-		}
+		assertValues(t, in, out, true, idx)
 
 		out2 := TimeValueSlice(out)
-		assert.Len(t, out2, len(in), "Unexpected len at idx %d", idx)
-		assert.Equal(t, in, out2, "Unexpected value at idx %d", idx)
+		assertValues(t, in, out2, false, idx)
 	}
 }
 
-var testCasesTimeValueSlice = [][]*time.Time{}
+var testCasesTimeValueSlice = [][]*time.Time{
+	{Time(time.Now()), Time(time.Now().AddDate(100, 0, 0))},
+}
 
 func TestTimeValueSlice(t *testing.T) {
 	for idx, in := range testCasesTimeValueSlice {
@@ -536,24 +458,10 @@ func TestTimeValueSlice(t *testing.T) {
 			continue
 		}
 		out := TimeValueSlice(in)
-		assert.Len(t, out, len(in), "Unexpected len at idx %d", idx)
-		for i := range out {
-			if in[i] == nil {
-				assert.Empty(t, out[i], "Unexpected value at idx %d", idx)
-			} else {
-				assert.Equal(t, *(in[i]), out[i], "Unexpected value at idx %d", idx)
-			}
-		}
+		assertValues(t, in, out, false, idx)
 
 		out2 := TimeSlice(out)
-		assert.Len(t, out2, len(in), "Unexpected len at idx %d", idx)
-		for i := range out2 {
-			if in[i] == nil {
-				assert.Empty(t, *(out2[i]), "Unexpected value at idx %d", idx)
-			} else {
-				assert.Equal(t, in[i], out2[i], "Unexpected value at idx %d", idx)
-			}
-		}
+		assertValues(t, in, out2, true, idx)
 	}
 }
 
@@ -567,13 +475,243 @@ func TestTimeMap(t *testing.T) {
 			continue
 		}
 		out := TimeMap(in)
-		assert.Len(t, out, len(in), "Unexpected len at idx %d", idx)
-		for i := range out {
-			assert.Equal(t, in[i], *(out[i]), "Unexpected value at idx %d", idx)
-		}
+		assertValues(t, in, out, true, idx)
 
 		out2 := TimeValueMap(out)
-		assert.Len(t, out2, len(in), "Unexpected len at idx %d", idx)
-		assert.Equal(t, in, out2, "Unexpected value at idx %d", idx)
+		assertValues(t, in, out2, false, idx)
+	}
+}
+
+var testCasesInt32Slice = [][]int32{
+	{1, 2, 3, 4},
+}
+
+func TestInt32Slice(t *testing.T) {
+	for idx, in := range testCasesInt32Slice {
+		if in == nil {
+			continue
+		}
+		out := Int32Slice(in)
+		assertValues(t, in, out, true, idx)
+
+		out2 := Int32ValueSlice(out)
+		assertValues(t, in, out2, false, idx)
+	}
+}
+
+var testCasesInt32ValueSlice = [][]*int32{
+	{Int32(1), Int32(2), Int32(3), Int32(4)},
+}
+
+func TestInt32ValueSlice(t *testing.T) {
+	for idx, in := range testCasesInt32ValueSlice {
+		if in == nil {
+			continue
+		}
+		out := Int32ValueSlice(in)
+		assertValues(t, in, out, false, idx)
+
+		out2 := Int32Slice(out)
+		assertValues(t, in, out2, true, idx)
+	}
+}
+
+var testCasesInt32Map = []map[string]int32{
+	{"a": 3, "b": 2, "c": 1},
+}
+
+func TestInt32Map(t *testing.T) {
+	for idx, in := range testCasesInt32Map {
+		if in == nil {
+			continue
+		}
+		out := Int32Map(in)
+		assertValues(t, in, out, true, idx)
+
+		out2 := Int32ValueMap(out)
+		assertValues(t, in, out2, false, idx)
+	}
+}
+
+var testCasesUint32Slice = [][]uint32{
+	{1, 2, 3, 4},
+}
+
+func TestUint32Slice(t *testing.T) {
+	for idx, in := range testCasesUint32Slice {
+		if in == nil {
+			continue
+		}
+		out := Uint32Slice(in)
+		assertValues(t, in, out, true, idx)
+
+		out2 := Uint32ValueSlice(out)
+		assertValues(t, in, out2, false, idx)
+	}
+}
+
+var testCasesUint32ValueSlice = [][]*uint32{
+	{Uint32(1), Uint32(2), Uint32(3), Uint32(4)},
+}
+
+func TestUint32ValueSlice(t *testing.T) {
+	for idx, in := range testCasesUint32ValueSlice {
+		if in == nil {
+			continue
+		}
+		out := Uint32ValueSlice(in)
+		assertValues(t, in, out, false, idx)
+
+		out2 := Uint32Slice(out)
+		assertValues(t, in, out2, true, idx)
+	}
+}
+
+var testCasesUint32Map = []map[string]uint32{
+	{"a": 3, "b": 2, "c": 1},
+}
+
+func TestUint32Map(t *testing.T) {
+	for idx, in := range testCasesUint32Map {
+		if in == nil {
+			continue
+		}
+		out := Uint32Map(in)
+		assertValues(t, in, out, true, idx)
+
+		out2 := Uint32ValueMap(out)
+		assertValues(t, in, out2, false, idx)
+	}
+}
+
+var testCasesString = []string{"a", "b", "c", "d", "e", ""}
+
+func TestStringValue(t *testing.T) {
+	for idx, in := range testCasesString {
+		out := String(in)
+		assertValues(t, in, out, true, idx)
+
+		out2 := StringValue(out)
+		assertValues(t, in, out2, false, idx)
+	}
+	assert.Zerof(t, StringValue(nil), "expected conversion from nil to return zero value")
+}
+
+var testCasesBool = []bool{true, false}
+
+func TestBoolValue(t *testing.T) {
+	for idx, in := range testCasesBool {
+		out := Bool(in)
+		assertValues(t, in, out, true, idx)
+
+		out2 := BoolValue(out)
+		assertValues(t, in, out2, false, idx)
+	}
+	assert.Zerof(t, BoolValue(nil), "expected conversion from nil to return zero value")
+}
+
+var testCasesInt = []int{1, 2, 3, 0}
+
+func TestIntValue(t *testing.T) {
+	for idx, in := range testCasesInt {
+		out := Int(in)
+		assertValues(t, in, out, true, idx)
+
+		out2 := IntValue(out)
+		assertValues(t, in, out2, false, idx)
+	}
+	assert.Zerof(t, IntValue(nil), "expected conversion from nil to return zero value")
+}
+
+var testCasesInt32 = []int32{1, 2, 3, 0}
+
+func TestInt32Value(t *testing.T) {
+	for idx, in := range testCasesInt32 {
+		out := Int32(in)
+		assertValues(t, in, out, true, idx)
+
+		out2 := Int32Value(out)
+		assertValues(t, in, out2, false, idx)
+	}
+	assert.Zerof(t, Int32Value(nil), "expected conversion from nil to return zero value")
+}
+
+var testCasesInt64 = []int64{1, 2, 3, 0}
+
+func TestInt64Value(t *testing.T) {
+	for idx, in := range testCasesInt64 {
+		out := Int64(in)
+		assertValues(t, in, out, true, idx)
+
+		out2 := Int64Value(out)
+		assertValues(t, in, out2, false, idx)
+	}
+	assert.Zerof(t, Int64Value(nil), "expected conversion from nil to return zero value")
+}
+
+var testCasesUint = []uint{1, 2, 3, 0}
+
+func TestUintValue(t *testing.T) {
+	for idx, in := range testCasesUint {
+		out := Uint(in)
+		assertValues(t, in, out, true, idx)
+
+		out2 := UintValue(out)
+		assertValues(t, in, out2, false, idx)
+	}
+	assert.Zerof(t, UintValue(nil), "expected conversion from nil to return zero value")
+}
+
+var testCasesUint32 = []uint32{1, 2, 3, 0}
+
+func TestUint32Value(t *testing.T) {
+	for idx, in := range testCasesUint32 {
+		out := Uint32(in)
+		assertValues(t, in, out, true, idx)
+
+		out2 := Uint32Value(out)
+		assertValues(t, in, out2, false, idx)
+	}
+	assert.Zerof(t, Uint32Value(nil), "expected conversion from nil to return zero value")
+}
+
+var testCasesUint64 = []uint64{1, 2, 3, 0}
+
+func TestUint64Value(t *testing.T) {
+	for idx, in := range testCasesUint64 {
+		out := Uint64(in)
+		assertValues(t, in, out, true, idx)
+
+		out2 := Uint64Value(out)
+		assertValues(t, in, out2, false, idx)
+	}
+	assert.Zerof(t, Uint64Value(nil), "expected conversion from nil to return zero value")
+}
+
+var testCasesFloat64 = []float64{1, 2, 3, 0}
+
+func TestFloat64Value(t *testing.T) {
+	for idx, in := range testCasesFloat64 {
+		out := Float64(in)
+		assertValues(t, in, out, true, idx)
+
+		out2 := Float64Value(out)
+		assertValues(t, in, out2, false, idx)
+	}
+	assert.Zerof(t, Float64Value(nil), "expected conversion from nil to return zero value")
+}
+
+var testCasesTime = []time.Time{
+	time.Now().AddDate(-100, 0, 0), time.Now(),
+}
+
+func TestTimeValue(t *testing.T) {
+	for idx, in := range testCasesTime {
+		out := Time(in)
+		assertValues(t, in, out, true, idx)
+
+		out2 := TimeValue(out)
+		assertValues(t, in, out2, false, idx)
 	}
+	assert.Zerof(t, TimeValue(nil), "expected conversion from nil to return zero value")
 }
diff --git a/debian/changelog b/debian/changelog
index 422aa1c..e1433c3 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,8 +1,14 @@
-golang-github-go-openapi-swag (1:0.0~git20160704.0.1d0bd11-2) UNRELEASED; urgency=medium
+golang-github-go-openapi-swag (1:0.19.2-1) UNRELEASED; urgency=medium
 
+  [ Alexandre Viau ]
   * Point Vcs-* urls to salsa.debian.org.
 
- -- Alexandre Viau <aviau@debian.org>  Mon, 02 Apr 2018 17:11:43 -0400
+  [ Debian Janitor ]
+  * New upstream release.
+  * Add missing dependency on golang-gopkg-yaml.v2-dev.
+  * New upstream release.
+
+ -- Debian Janitor <janitor@jelmer.uk>  Mon, 24 Jun 2019 03:05:18 +0000
 
 golang-github-go-openapi-swag (1:0.0~git20160704.0.1d0bd11-1) unstable; urgency=medium
 
diff --git a/debian/control b/debian/control
index 9094c9f..4496836 100644
--- a/debian/control
+++ b/debian/control
@@ -7,7 +7,8 @@ Build-Depends: debhelper (>= 9),
                dh-golang,
                golang-go,
                golang-github-mailru-easyjson-dev,
-               golang-github-stretchr-testify-dev
+               golang-github-stretchr-testify-dev,
+               golang-gopkg-yaml.v2-dev
 Standards-Version: 3.9.8
 Homepage: https://github.com/go-openapi/swag
 Vcs-Browser: https://salsa.debian.org/go-team/packages/golang-github-go-openapi-swag
diff --git a/doc.go b/doc.go
new file mode 100644
index 0000000..8d2c8c5
--- /dev/null
+++ b/doc.go
@@ -0,0 +1,32 @@
+// Copyright 2015 go-swagger maintainers
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//    http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+/*
+Package swag contains a bunch of helper functions for go-openapi and go-swagger projects.
+
+You may also use it standalone for your projects.
+
+  * convert between value and pointers for builtin types
+  * convert from string to builtin types (wraps strconv)
+  * fast json concatenation
+  * search in path
+  * load from file or http
+  * name mangling
+
+
+This repo has only few dependencies outside of the standard library:
+
+  * YAML utilities depend on gopkg.in/yaml.v2
+*/
+package swag
diff --git a/go.mod b/go.mod
new file mode 100644
index 0000000..15bbb08
--- /dev/null
+++ b/go.mod
@@ -0,0 +1,14 @@
+module github.com/go-openapi/swag
+
+require (
+	github.com/davecgh/go-spew v1.1.1 // indirect
+	github.com/kr/pretty v0.1.0 // indirect
+	github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63
+	github.com/stretchr/testify v1.3.0
+	gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 // indirect
+	gopkg.in/yaml.v2 v2.2.2
+)
+
+replace github.com/golang/lint => golang.org/x/lint v0.0.0-20190409202823-959b441ac422
+
+replace sourcegraph.com/sourcegraph/go-diff => github.com/sourcegraph/go-diff v0.5.1
diff --git a/go.sum b/go.sum
new file mode 100644
index 0000000..33469f5
--- /dev/null
+++ b/go.sum
@@ -0,0 +1,20 @@
+github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
+github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
+github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
+github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI=
+github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
+github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
+github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=
+github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
+github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63 h1:nTT4s92Dgz2HlrB2NaMgvlfqHH39OgMhA7z3PK7PGD4=
+github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
+github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
+github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
+github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
+github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q=
+github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
+gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
+gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY=
+gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
+gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw=
+gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
diff --git a/json.go b/json.go
index 6e9ec20..62ab15e 100644
--- a/json.go
+++ b/json.go
@@ -17,6 +17,7 @@ package swag
 import (
 	"bytes"
 	"encoding/json"
+	"log"
 	"reflect"
 	"strings"
 	"sync"
@@ -25,14 +26,21 @@ import (
 	"github.com/mailru/easyjson/jwriter"
 )
 
+// nullJSON represents a JSON object with null type
+var nullJSON = []byte("null")
+
 // DefaultJSONNameProvider the default cache for types
 var DefaultJSONNameProvider = NewNameProvider()
 
 const comma = byte(',')
 
-var closers = map[byte]byte{
-	'{': '}',
-	'[': ']',
+var closers map[byte]byte
+
+func init() {
+	closers = map[byte]byte{
+		'{': '}',
+		'[': ']',
+	}
 }
 
 type ejMarshaler interface {
@@ -60,15 +68,16 @@ func WriteJSON(data interface{}) ([]byte, error) {
 // ReadJSON reads json data, prefers finding an appropriate interface to short-circuit the unmarshaller
 // so it takes the fastes option available
 func ReadJSON(data []byte, value interface{}) error {
+	trimmedData := bytes.Trim(data, "\x00")
 	if d, ok := value.(ejUnmarshaler); ok {
-		jl := &jlexer.Lexer{Data: data}
+		jl := &jlexer.Lexer{Data: trimmedData}
 		d.UnmarshalEasyJSON(jl)
 		return jl.Error()
 	}
 	if d, ok := value.(json.Unmarshaler); ok {
-		return d.UnmarshalJSON(data)
+		return d.UnmarshalJSON(trimmedData)
 	}
-	return json.Unmarshal(data, value)
+	return json.Unmarshal(trimmedData, value)
 }
 
 // DynamicJSONToStruct converts an untyped json structure into a struct
@@ -78,10 +87,7 @@ func DynamicJSONToStruct(data interface{}, target interface{}) error {
 	if err != nil {
 		return err
 	}
-	if err := ReadJSON(b, target); err != nil {
-		return err
-	}
-	return nil
+	return ReadJSON(b, target)
 }
 
 // ConcatJSON concatenates multiple json objects efficiently
@@ -89,17 +95,29 @@ func ConcatJSON(blobs ...[]byte) []byte {
 	if len(blobs) == 0 {
 		return nil
 	}
-	if len(blobs) == 1 {
+
+	last := len(blobs) - 1
+	for blobs[last] == nil || bytes.Equal(blobs[last], nullJSON) {
+		// strips trailing null objects
+		last = last - 1
+		if last < 0 {
+			// there was nothing but "null"s or nil...
+			return nil
+		}
+	}
+	if last == 0 {
 		return blobs[0]
 	}
 
-	last := len(blobs) - 1
 	var opening, closing byte
-	a := 0
-	idx := 0
+	var idx, a int
 	buf := bytes.NewBuffer(nil)
 
-	for i, b := range blobs {
+	for i, b := range blobs[:last+1] {
+		if b == nil || bytes.Equal(b, nullJSON) {
+			// a null object is in the list: skip it
+			continue
+		}
 		if len(b) > 0 && opening == 0 { // is this an array or an object?
 			opening, closing = b[0], closers[b[0]]
 		}
@@ -110,28 +128,40 @@ func ConcatJSON(blobs ...[]byte) []byte {
 
 		if len(b) < 3 { // yep empty but also the last one, so closing this thing
 			if i == last && a > 0 {
-				buf.WriteByte(closing)
+				if err := buf.WriteByte(closing); err != nil {
+					log.Println(err)
+				}
 			}
 			continue
 		}
 
 		idx = 0
 		if a > 0 { // we need to join with a comma for everything beyond the first non-empty item
-			buf.WriteByte(comma)
+			if err := buf.WriteByte(comma); err != nil {
+				log.Println(err)
+			}
 			idx = 1 // this is not the first or the last so we want to drop the leading bracket
 		}
 
 		if i != last { // not the last one, strip brackets
-			buf.Write(b[idx : len(b)-1])
+			if _, err := buf.Write(b[idx : len(b)-1]); err != nil {
+				log.Println(err)
+			}
 		} else { // last one, strip only the leading bracket
-			buf.Write(b[idx:])
+			if _, err := buf.Write(b[idx:]); err != nil {
+				log.Println(err)
+			}
 		}
 		a++
 	}
 	// somehow it ended up being empty, so provide a default value
 	if buf.Len() == 0 {
-		buf.WriteByte(opening)
-		buf.WriteByte(closing)
+		if err := buf.WriteByte(opening); err != nil {
+			log.Println(err)
+		}
+		if err := buf.WriteByte(closing); err != nil {
+			log.Println(err)
+		}
 	}
 	return buf.Bytes()
 }
@@ -139,15 +169,23 @@ func ConcatJSON(blobs ...[]byte) []byte {
 // ToDynamicJSON turns an object into a properly JSON typed structure
 func ToDynamicJSON(data interface{}) interface{} {
 	// TODO: convert straight to a json typed map (mergo + iterate?)
-	b, _ := json.Marshal(data)
+	b, err := json.Marshal(data)
+	if err != nil {
+		log.Println(err)
+	}
 	var res interface{}
-	json.Unmarshal(b, &res)
+	if err := json.Unmarshal(b, &res); err != nil {
+		log.Println(err)
+	}
 	return res
 }
 
 // FromDynamicJSON turns an object into a properly JSON typed structure
 func FromDynamicJSON(data, target interface{}) error {
-	b, _ := json.Marshal(data)
+	b, err := json.Marshal(data)
+	if err != nil {
+		log.Println(err)
+	}
 	return json.Unmarshal(b, target)
 }
 
@@ -216,13 +254,15 @@ func newNameIndex(tpe reflect.Type) nameIndex {
 
 // GetJSONNames gets all the json property names for a type
 func (n *NameProvider) GetJSONNames(subject interface{}) []string {
+	n.lock.Lock()
+	defer n.lock.Unlock()
 	tpe := reflect.Indirect(reflect.ValueOf(subject)).Type()
 	names, ok := n.index[tpe]
 	if !ok {
 		names = n.makeNameIndex(tpe)
 	}
 
-	var res []string
+	res := make([]string, 0, len(names.jsonNames))
 	for k := range names.jsonNames {
 		res = append(res, k)
 	}
@@ -237,6 +277,8 @@ func (n *NameProvider) GetJSONName(subject interface{}, name string) (string, bo
 
 // GetJSONNameForType gets the json name for a go property name on a given type
 func (n *NameProvider) GetJSONNameForType(tpe reflect.Type, name string) (string, bool) {
+	n.lock.Lock()
+	defer n.lock.Unlock()
 	names, ok := n.index[tpe]
 	if !ok {
 		names = n.makeNameIndex(tpe)
@@ -246,8 +288,6 @@ func (n *NameProvider) GetJSONNameForType(tpe reflect.Type, name string) (string
 }
 
 func (n *NameProvider) makeNameIndex(tpe reflect.Type) nameIndex {
-	n.lock.Lock()
-	defer n.lock.Unlock()
 	names := newNameIndex(tpe)
 	n.index[tpe] = names
 	return names
@@ -261,6 +301,8 @@ func (n *NameProvider) GetGoName(subject interface{}, name string) (string, bool
 
 // GetGoNameForType gets the go name for a given type for a json property name
 func (n *NameProvider) GetGoNameForType(tpe reflect.Type, name string) (string, bool) {
+	n.lock.Lock()
+	defer n.lock.Unlock()
 	names, ok := n.index[tpe]
 	if !ok {
 		names = n.makeNameIndex(tpe)
diff --git a/json_test.go b/json_test.go
index a7d0d98..853c672 100644
--- a/json_test.go
+++ b/json_test.go
@@ -160,4 +160,10 @@ func TestJSONConcatenation(t *testing.T) {
 	assert.Equal(t, ConcatJSON([]byte(`{"id":1}`), []byte(`{"name":"Rachel"}`), []byte(`{}`)), []byte(`{"id":1,"name":"Rachel"}`))
 	assert.Equal(t, ConcatJSON([]byte(`[{"id":1}]`), []byte(`[{"name":"Rachel"}]`), []byte(`[]`)), []byte(`[{"id":1},{"name":"Rachel"}]`))
 
+	// add test on null
+	assert.Equal(t, ConcatJSON([]byte(nil)), []byte(nil))
+	assert.Equal(t, ConcatJSON([]byte(`null`)), []byte(nil))
+	assert.Equal(t, ConcatJSON([]byte(nil), []byte(`null`)), []byte(nil))
+	assert.Equal(t, ConcatJSON([]byte(`{"id":null}`), []byte(`null`)), []byte(`{"id":null}`))
+	assert.Equal(t, ConcatJSON([]byte(`{"id":null}`), []byte(`null`), []byte(`{"name":"Rachel"}`)), []byte(`{"id":null,"name":"Rachel"}`))
 }
diff --git a/loading.go b/loading.go
index 6dbc313..70f4fb3 100644
--- a/loading.go
+++ b/loading.go
@@ -17,13 +17,25 @@ package swag
 import (
 	"fmt"
 	"io/ioutil"
+	"log"
 	"net/http"
+	"path/filepath"
 	"strings"
+	"time"
 )
 
+// LoadHTTPTimeout the default timeout for load requests
+var LoadHTTPTimeout = 30 * time.Second
+
 // LoadFromFileOrHTTP loads the bytes from a file or a remote http server based on the path passed in
 func LoadFromFileOrHTTP(path string) ([]byte, error) {
-	return LoadStrategy(path, ioutil.ReadFile, loadHTTPBytes)(path)
+	return LoadStrategy(path, ioutil.ReadFile, loadHTTPBytes(LoadHTTPTimeout))(path)
+}
+
+// LoadFromFileOrHTTPWithTimeout loads the bytes from a file or a remote http server based on the path passed in
+// timeout arg allows for per request overriding of the request timeout
+func LoadFromFileOrHTTPWithTimeout(path string, timeout time.Duration) ([]byte, error) {
+	return LoadStrategy(path, ioutil.ReadFile, loadHTTPBytes(timeout))(path)
 }
 
 // LoadStrategy returns a loader function for a given path or uri
@@ -31,19 +43,38 @@ func LoadStrategy(path string, local, remote func(string) ([]byte, error)) func(
 	if strings.HasPrefix(path, "http") {
 		return remote
 	}
-	return local
+	return func(pth string) ([]byte, error) {
+		upth, err := pathUnescape(pth)
+		if err != nil {
+			return nil, err
+		}
+		return local(filepath.FromSlash(upth))
+	}
 }
 
-func loadHTTPBytes(path string) ([]byte, error) {
-	resp, err := http.Get(path)
-	if err != nil {
-		return nil, err
-	}
-	defer resp.Body.Close()
+func loadHTTPBytes(timeout time.Duration) func(path string) ([]byte, error) {
+	return func(path string) ([]byte, error) {
+		client := &http.Client{Timeout: timeout}
+		req, err := http.NewRequest("GET", path, nil)
+		if err != nil {
+			return nil, err
+		}
+		resp, err := client.Do(req)
+		defer func() {
+			if resp != nil {
+				if e := resp.Body.Close(); e != nil {
+					log.Println(e)
+				}
+			}
+		}()
+		if err != nil {
+			return nil, err
+		}
 
-	if resp.StatusCode != http.StatusOK {
-		return nil, fmt.Errorf("could not access document at %q [%s] ", path, resp.Status)
-	}
+		if resp.StatusCode != http.StatusOK {
+			return nil, fmt.Errorf("could not access document at %q [%s] ", path, resp.Status)
+		}
 
-	return ioutil.ReadAll(resp.Body)
+		return ioutil.ReadAll(resp.Body)
+	}
 }
diff --git a/loading_test.go b/loading_test.go
index 7b8bdf4..accb1c5 100644
--- a/loading_test.go
+++ b/loading_test.go
@@ -37,7 +37,7 @@ func TestLoadFromHTTP(t *testing.T) {
 
 	ts2 := httptest.NewServer(http.HandlerFunc(func(rw http.ResponseWriter, r *http.Request) {
 		rw.WriteHeader(http.StatusOK)
-		rw.Write([]byte("the content"))
+		_, _ = rw.Write([]byte("the content"))
 	}))
 	defer ts2.Close()
 
diff --git a/name_lexem.go b/name_lexem.go
new file mode 100644
index 0000000..aa7f6a9
--- /dev/null
+++ b/name_lexem.go
@@ -0,0 +1,87 @@
+// Copyright 2015 go-swagger maintainers
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//    http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package swag
+
+import "unicode"
+
+type (
+	nameLexem interface {
+		GetUnsafeGoName() string
+		GetOriginal() string
+		IsInitialism() bool
+	}
+
+	initialismNameLexem struct {
+		original          string
+		matchedInitialism string
+	}
+
+	casualNameLexem struct {
+		original string
+	}
+)
+
+func newInitialismNameLexem(original, matchedInitialism string) *initialismNameLexem {
+	return &initialismNameLexem{
+		original:          original,
+		matchedInitialism: matchedInitialism,
+	}
+}
+
+func newCasualNameLexem(original string) *casualNameLexem {
+	return &casualNameLexem{
+		original: original,
+	}
+}
+
+func (l *initialismNameLexem) GetUnsafeGoName() string {
+	return l.matchedInitialism
+}
+
+func (l *casualNameLexem) GetUnsafeGoName() string {
+	var first rune
+	var rest string
+	for i, orig := range l.original {
+		if i == 0 {
+			first = orig
+			continue
+		}
+		if i > 0 {
+			rest = l.original[i:]
+			break
+		}
+	}
+	if len(l.original) > 1 {
+		return string(unicode.ToUpper(first)) + lower(rest)
+	}
+
+	return l.original
+}
+
+func (l *initialismNameLexem) GetOriginal() string {
+	return l.original
+}
+
+func (l *casualNameLexem) GetOriginal() string {
+	return l.original
+}
+
+func (l *initialismNameLexem) IsInitialism() bool {
+	return true
+}
+
+func (l *casualNameLexem) IsInitialism() bool {
+	return false
+}
diff --git a/net.go b/net.go
index 8323fa3..821235f 100644
--- a/net.go
+++ b/net.go
@@ -1,3 +1,17 @@
+// Copyright 2015 go-swagger maintainers
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//    http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
 package swag
 
 import (
diff --git a/net_test.go b/net_test.go
index 041db60..79e5860 100644
--- a/net_test.go
+++ b/net_test.go
@@ -1,3 +1,17 @@
+// Copyright 2015 go-swagger maintainers
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//    http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
 package swag
 
 import (
diff --git a/path.go b/path.go
index 273e9fb..941bd01 100644
--- a/path.go
+++ b/path.go
@@ -47,6 +47,9 @@ func FindInGoSearchPath(pkg string) string {
 // FullGoSearchPath gets the search paths for finding packages
 func FullGoSearchPath() string {
 	allPaths := os.Getenv(GOPATHKey)
+	if allPaths == "" {
+		allPaths = filepath.Join(os.Getenv("HOME"), "go")
+	}
 	if allPaths != "" {
 		allPaths = strings.Join([]string{allPaths, runtime.GOROOT()}, ":")
 	} else {
diff --git a/path_test.go b/path_test.go
index 743bba5..7f7dd10 100644
--- a/path_test.go
+++ b/path_test.go
@@ -17,15 +17,15 @@ package swag
 import (
 	"io/ioutil"
 	"os"
-	"path/filepath"
 	"path"
+	"path/filepath"
 	"runtime"
 	"testing"
 
 	"github.com/stretchr/testify/assert"
 )
 
-func makeDirStructure(t *testing.T, tgt string) (string, string, error) {
+func makeDirStructure(tgt string) (string, string, error) {
 	if tgt == "" {
 		tgt = "pkgpaths"
 	}
@@ -66,7 +66,7 @@ func makeDirStructure(t *testing.T, tgt string) (string, string, error) {
 }
 
 func TestFindPackage(t *testing.T) {
-	pth, pth2, err := makeDirStructure(t, "")
+	pth, pth2, err := makeDirStructure("")
 	if err != nil {
 		t.Fatal(err)
 	}
@@ -75,7 +75,7 @@ func TestFindPackage(t *testing.T) {
 		os.RemoveAll(pth2)
 	}()
 
-	searchPath := pth + string(filepath.ListSeparator)  + pth2
+	searchPath := pth + string(filepath.ListSeparator) + pth2
 	// finds package when real name mentioned
 	pkg := FindInSearchPath(searchPath, "foo/bar")
 	assert.NotEmpty(t, pkg)
diff --git a/post_go18.go b/post_go18.go
new file mode 100644
index 0000000..c2e686d
--- /dev/null
+++ b/post_go18.go
@@ -0,0 +1,23 @@
+// Copyright 2015 go-swagger maintainers
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//    http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+// +build go1.8
+
+package swag
+
+import "net/url"
+
+func pathUnescape(path string) (string, error) {
+	return url.PathUnescape(path)
+}
diff --git a/post_go19.go b/post_go19.go
new file mode 100644
index 0000000..eb2f2d8
--- /dev/null
+++ b/post_go19.go
@@ -0,0 +1,67 @@
+// Copyright 2015 go-swagger maintainers
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//    http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+// +build go1.9
+
+package swag
+
+import (
+	"sort"
+	"sync"
+)
+
+// indexOfInitialisms is a thread-safe implementation of the sorted index of initialisms.
+// Since go1.9, this may be implemented with sync.Map.
+type indexOfInitialisms struct {
+	sortMutex *sync.Mutex
+	index     *sync.Map
+}
+
+func newIndexOfInitialisms() *indexOfInitialisms {
+	return &indexOfInitialisms{
+		sortMutex: new(sync.Mutex),
+		index:     new(sync.Map),
+	}
+}
+
+func (m *indexOfInitialisms) load(initial map[string]bool) *indexOfInitialisms {
+	m.sortMutex.Lock()
+	defer m.sortMutex.Unlock()
+	for k, v := range initial {
+		m.index.Store(k, v)
+	}
+	return m
+}
+
+func (m *indexOfInitialisms) isInitialism(key string) bool {
+	_, ok := m.index.Load(key)
+	return ok
+}
+
+func (m *indexOfInitialisms) add(key string) *indexOfInitialisms {
+	m.index.Store(key, true)
+	return m
+}
+
+func (m *indexOfInitialisms) sorted() (result []string) {
+	m.sortMutex.Lock()
+	defer m.sortMutex.Unlock()
+	m.index.Range(func(key, value interface{}) bool {
+		k := key.(string)
+		result = append(result, k)
+		return true
+	})
+	sort.Sort(sort.Reverse(byInitialism(result)))
+	return
+}
diff --git a/pre_go18.go b/pre_go18.go
new file mode 100644
index 0000000..6607f33
--- /dev/null
+++ b/pre_go18.go
@@ -0,0 +1,23 @@
+// Copyright 2015 go-swagger maintainers
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//    http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+// +build !go1.8
+
+package swag
+
+import "net/url"
+
+func pathUnescape(path string) (string, error) {
+	return url.QueryUnescape(path)
+}
diff --git a/pre_go19.go b/pre_go19.go
new file mode 100644
index 0000000..4bae187
--- /dev/null
+++ b/pre_go19.go
@@ -0,0 +1,69 @@
+// Copyright 2015 go-swagger maintainers
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//    http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+// +build !go1.9
+
+package swag
+
+import (
+	"sort"
+	"sync"
+)
+
+// indexOfInitialisms is a thread-safe implementation of the sorted index of initialisms.
+// Before go1.9, this may be implemented with a mutex on the map.
+type indexOfInitialisms struct {
+	getMutex *sync.Mutex
+	index    map[string]bool
+}
+
+func newIndexOfInitialisms() *indexOfInitialisms {
+	return &indexOfInitialisms{
+		getMutex: new(sync.Mutex),
+		index:    make(map[string]bool, 50),
+	}
+}
+
+func (m *indexOfInitialisms) load(initial map[string]bool) *indexOfInitialisms {
+	m.getMutex.Lock()
+	defer m.getMutex.Unlock()
+	for k, v := range initial {
+		m.index[k] = v
+	}
+	return m
+}
+
+func (m *indexOfInitialisms) isInitialism(key string) bool {
+	m.getMutex.Lock()
+	defer m.getMutex.Unlock()
+	_, ok := m.index[key]
+	return ok
+}
+
+func (m *indexOfInitialisms) add(key string) *indexOfInitialisms {
+	m.getMutex.Lock()
+	defer m.getMutex.Unlock()
+	m.index[key] = true
+	return m
+}
+
+func (m *indexOfInitialisms) sorted() (result []string) {
+	m.getMutex.Lock()
+	defer m.getMutex.Unlock()
+	for k := range m.index {
+		result = append(result, k)
+	}
+	sort.Sort(sort.Reverse(byInitialism(result)))
+	return
+}
diff --git a/split.go b/split.go
new file mode 100644
index 0000000..a1825fb
--- /dev/null
+++ b/split.go
@@ -0,0 +1,262 @@
+// Copyright 2015 go-swagger maintainers
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//    http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package swag
+
+import (
+	"unicode"
+)
+
+var nameReplaceTable = map[rune]string{
+	'@': "At ",
+	'&': "And ",
+	'|': "Pipe ",
+	'$': "Dollar ",
+	'!': "Bang ",
+	'-': "",
+	'_': "",
+}
+
+type (
+	splitter struct {
+		postSplitInitialismCheck bool
+		initialisms              []string
+	}
+
+	splitterOption func(*splitter) *splitter
+)
+
+// split calls the splitter; splitter provides more control and post options
+func split(str string) []string {
+	lexems := newSplitter().split(str)
+	result := make([]string, 0, len(lexems))
+
+	for _, lexem := range lexems {
+		result = append(result, lexem.GetOriginal())
+	}
+
+	return result
+
+}
+
+func (s *splitter) split(str string) []nameLexem {
+	return s.toNameLexems(str)
+}
+
+func newSplitter(options ...splitterOption) *splitter {
+	splitter := &splitter{
+		postSplitInitialismCheck: false,
+		initialisms:              initialisms,
+	}
+
+	for _, option := range options {
+		splitter = option(splitter)
+	}
+
+	return splitter
+}
+
+// withPostSplitInitialismCheck allows to catch initialisms after main split process
+func withPostSplitInitialismCheck(s *splitter) *splitter {
+	s.postSplitInitialismCheck = true
+	return s
+}
+
+type (
+	initialismMatch struct {
+		start, end int
+		body       []rune
+		complete   bool
+	}
+	initialismMatches []*initialismMatch
+)
+
+func (s *splitter) toNameLexems(name string) []nameLexem {
+	nameRunes := []rune(name)
+	matches := s.gatherInitialismMatches(nameRunes)
+	return s.mapMatchesToNameLexems(nameRunes, matches)
+}
+
+func (s *splitter) gatherInitialismMatches(nameRunes []rune) initialismMatches {
+	matches := make(initialismMatches, 0)
+
+	for currentRunePosition, currentRune := range nameRunes {
+		newMatches := make(initialismMatches, 0, len(matches))
+
+		// check current initialism matches
+		for _, match := range matches {
+			if keepCompleteMatch := match.complete; keepCompleteMatch {
+				newMatches = append(newMatches, match)
+				continue
+			}
+
+			// drop failed match
+			currentMatchRune := match.body[currentRunePosition-match.start]
+			if !s.initialismRuneEqual(currentMatchRune, currentRune) {
+				continue
+			}
+
+			// try to complete ongoing match
+			if currentRunePosition-match.start == len(match.body)-1 {
+				// we are close; the next step is to check the symbol ahead
+				// if it is a small letter, then it is not the end of match
+				// but beginning of the next word
+
+				if currentRunePosition < len(nameRunes)-1 {
+					nextRune := nameRunes[currentRunePosition+1]
+					if newWord := unicode.IsLower(nextRune); newWord {
+						// oh ok, it was the start of a new word
+						continue
+					}
+				}
+
+				match.complete = true
+				match.end = currentRunePosition
+			}
+
+			newMatches = append(newMatches, match)
+		}
+
+		// check for new initialism matches
+		for _, initialism := range s.initialisms {
+			initialismRunes := []rune(initialism)
+			if s.initialismRuneEqual(initialismRunes[0], currentRune) {
+				newMatches = append(newMatches, &initialismMatch{
+					start:    currentRunePosition,
+					body:     initialismRunes,
+					complete: false,
+				})
+			}
+		}
+
+		matches = newMatches
+	}
+
+	return matches
+}
+
+func (s *splitter) mapMatchesToNameLexems(nameRunes []rune, matches initialismMatches) []nameLexem {
+	nameLexems := make([]nameLexem, 0)
+
+	var lastAcceptedMatch *initialismMatch
+	for _, match := range matches {
+		if !match.complete {
+			continue
+		}
+
+		if firstMatch := lastAcceptedMatch == nil; firstMatch {
+			nameLexems = append(nameLexems, s.breakCasualString(nameRunes[:match.start])...)
+			nameLexems = append(nameLexems, s.breakInitialism(string(match.body)))
+
+			lastAcceptedMatch = match
+
+			continue
+		}
+
+		if overlappedMatch := match.start <= lastAcceptedMatch.end; overlappedMatch {
+			continue
+		}
+
+		middle := nameRunes[lastAcceptedMatch.end+1 : match.start]
+		nameLexems = append(nameLexems, s.breakCasualString(middle)...)
+		nameLexems = append(nameLexems, s.breakInitialism(string(match.body)))
+
+		lastAcceptedMatch = match
+	}
+
+	// we have not found any accepted matches
+	if lastAcceptedMatch == nil {
+		return s.breakCasualString(nameRunes)
+	}
+
+	if lastAcceptedMatch.end+1 != len(nameRunes) {
+		rest := nameRunes[lastAcceptedMatch.end+1:]
+		nameLexems = append(nameLexems, s.breakCasualString(rest)...)
+	}
+
+	return nameLexems
+}
+
+func (s *splitter) initialismRuneEqual(a, b rune) bool {
+	return a == b
+}
+
+func (s *splitter) breakInitialism(original string) nameLexem {
+	return newInitialismNameLexem(original, original)
+}
+
+func (s *splitter) breakCasualString(str []rune) []nameLexem {
+	segments := make([]nameLexem, 0)
+	currentSegment := ""
+
+	addCasualNameLexem := func(original string) {
+		segments = append(segments, newCasualNameLexem(original))
+	}
+
+	addInitialismNameLexem := func(original, match string) {
+		segments = append(segments, newInitialismNameLexem(original, match))
+	}
+
+	addNameLexem := func(original string) {
+		if s.postSplitInitialismCheck {
+			for _, initialism := range s.initialisms {
+				if upper(initialism) == upper(original) {
+					addInitialismNameLexem(original, initialism)
+					return
+				}
+			}
+		}
+
+		addCasualNameLexem(original)
+	}
+
+	for _, rn := range string(str) {
+		if replace, found := nameReplaceTable[rn]; found {
+			if currentSegment != "" {
+				addNameLexem(currentSegment)
+				currentSegment = ""
+			}
+
+			if replace != "" {
+				addNameLexem(replace)
+			}
+
+			continue
+		}
+
+		if !unicode.In(rn, unicode.L, unicode.M, unicode.N, unicode.Pc) {
+			if currentSegment != "" {
+				addNameLexem(currentSegment)
+				currentSegment = ""
+			}
+
+			continue
+		}
+
+		if unicode.IsUpper(rn) {
+			if currentSegment != "" {
+				addNameLexem(currentSegment)
+			}
+			currentSegment = ""
+		}
+
+		currentSegment += string(rn)
+	}
+
+	if currentSegment != "" {
+		addNameLexem(currentSegment)
+	}
+
+	return segments
+}
diff --git a/util.go b/util.go
index d8b54ee..8748827 100644
--- a/util.go
+++ b/util.go
@@ -15,61 +15,82 @@
 package swag
 
 import (
-	"math"
 	"reflect"
-	"regexp"
-	"sort"
 	"strings"
+	"unicode"
 )
 
-// Taken from https://github.com/golang/lint/blob/1fab560e16097e5b69afb66eb93aab843ef77845/lint.go#L663-L698
-var commonInitialisms = map[string]bool{
-	"API":   true,
-	"ASCII": true,
-	"CPU":   true,
-	"CSS":   true,
-	"DNS":   true,
-	"EOF":   true,
-	"GUID":  true,
-	"HTML":  true,
-	"HTTPS": true,
-	"HTTP":  true,
-	"ID":    true,
-	"IP":    true,
-	"JSON":  true,
-	"LHS":   true,
-	"QPS":   true,
-	"RAM":   true,
-	"RHS":   true,
-	"RPC":   true,
-	"SLA":   true,
-	"SMTP":  true,
-	"SSH":   true,
-	"TCP":   true,
-	"TLS":   true,
-	"TTL":   true,
-	"UDP":   true,
-	"UUID":  true,
-	"UID":   true,
-	"UI":    true,
-	"URI":   true,
-	"URL":   true,
-	"UTF8":  true,
-	"VM":    true,
-	"XML":   true,
-	"XSRF":  true,
-	"XSS":   true,
-}
+// commonInitialisms are common acronyms that are kept as whole uppercased words.
+var commonInitialisms *indexOfInitialisms
+
+// initialisms is a slice of sorted initialisms
 var initialisms []string
 
+var isInitialism func(string) bool
+
 func init() {
-	for k := range commonInitialisms {
-		initialisms = append(initialisms, k)
+	// Taken from https://github.com/golang/lint/blob/3390df4df2787994aea98de825b964ac7944b817/lint.go#L732-L769
+	var configuredInitialisms = map[string]bool{
+		"ACL":   true,
+		"API":   true,
+		"ASCII": true,
+		"CPU":   true,
+		"CSS":   true,
+		"DNS":   true,
+		"EOF":   true,
+		"GUID":  true,
+		"HTML":  true,
+		"HTTPS": true,
+		"HTTP":  true,
+		"ID":    true,
+		"IP":    true,
+		"IPv4":  true,
+		"IPv6":  true,
+		"JSON":  true,
+		"LHS":   true,
+		"OAI":   true,
+		"QPS":   true,
+		"RAM":   true,
+		"RHS":   true,
+		"RPC":   true,
+		"SLA":   true,
+		"SMTP":  true,
+		"SQL":   true,
+		"SSH":   true,
+		"TCP":   true,
+		"TLS":   true,
+		"TTL":   true,
+		"UDP":   true,
+		"UI":    true,
+		"UID":   true,
+		"UUID":  true,
+		"URI":   true,
+		"URL":   true,
+		"UTF8":  true,
+		"VM":    true,
+		"XML":   true,
+		"XMPP":  true,
+		"XSRF":  true,
+		"XSS":   true,
 	}
-	sort.Sort(sort.Reverse(byLength(initialisms)))
+
+	// a thread-safe index of initialisms
+	commonInitialisms = newIndexOfInitialisms().load(configuredInitialisms)
+	initialisms = commonInitialisms.sorted()
+
+	// a test function
+	isInitialism = commonInitialisms.isInitialism
 }
 
-// JoinByFormat joins a string array by a known format:
+const (
+	//collectionFormatComma = "csv"
+	collectionFormatSpace = "ssv"
+	collectionFormatTab   = "tsv"
+	collectionFormatPipe  = "pipes"
+	collectionFormatMulti = "multi"
+)
+
+// JoinByFormat joins a string array by a known format (e.g. swagger's collectionFormat attribute):
 //		ssv: space separated value
 //		tsv: tab separated value
 //		pipes: pipe (|) separated value
@@ -80,13 +101,13 @@ func JoinByFormat(data []string, format string) []string {
 	}
 	var sep string
 	switch format {
-	case "ssv":
+	case collectionFormatSpace:
 		sep = " "
-	case "tsv":
+	case collectionFormatTab:
 		sep = "\t"
-	case "pipes":
+	case collectionFormatPipe:
 		sep = "|"
-	case "multi":
+	case collectionFormatMulti:
 		return data
 	default:
 		sep = ","
@@ -99,19 +120,20 @@ func JoinByFormat(data []string, format string) []string {
 //		tsv: tab separated value
 //		pipes: pipe (|) separated value
 //		csv: comma separated value (default)
+//
 func SplitByFormat(data, format string) []string {
 	if data == "" {
 		return nil
 	}
 	var sep string
 	switch format {
-	case "ssv":
+	case collectionFormatSpace:
 		sep = " "
-	case "tsv":
+	case collectionFormatTab:
 		sep = "\t"
-	case "pipes":
+	case collectionFormatPipe:
 		sep = "|"
-	case "multi":
+	case collectionFormatMulti:
 		return nil
 	default:
 		sep = ","
@@ -125,49 +147,20 @@ func SplitByFormat(data, format string) []string {
 	return result
 }
 
-type byLength []string
+type byInitialism []string
 
-func (s byLength) Len() int {
+func (s byInitialism) Len() int {
 	return len(s)
 }
-func (s byLength) Swap(i, j int) {
+func (s byInitialism) Swap(i, j int) {
 	s[i], s[j] = s[j], s[i]
 }
-func (s byLength) Less(i, j int) bool {
-	return len(s[i]) < len(s[j])
-}
-
-// Prepares strings by splitting by caps, spaces, dashes, and underscore
-func split(str string) (words []string) {
-	repl := strings.NewReplacer(
-		"@", "At ",
-		"&", "And ",
-		"|", "Pipe ",
-		"$", "Dollar ",
-		"!", "Bang ",
-		"-", " ",
-		"_", " ",
-	)
-
-	rex1 := regexp.MustCompile(`(\p{Lu})`)
-	rex2 := regexp.MustCompile(`(\pL|\pM|\pN|\p{Pc})+`)
-
-	str = trim(str)
-
-	// Convert dash and underscore to spaces
-	str = repl.Replace(str)
-
-	// Split when uppercase is found (needed for Snake)
-	str = rex1.ReplaceAllString(str, " $1")
-	// check if consecutive single char things make up an initialism
-
-	for _, k := range initialisms {
-		str = strings.Replace(str, rex1.ReplaceAllString(k, " $1"), " "+k, -1)
+func (s byInitialism) Less(i, j int) bool {
+	if len(s[i]) != len(s[j]) {
+		return len(s[i]) < len(s[j])
 	}
-	// Get the final list of words
-	words = rex2.FindAllString(str, -1)
 
-	return
+	return strings.Compare(s[i], s[j]) > 0
 }
 
 // Removes leading whitespaces
@@ -185,19 +178,36 @@ func lower(str string) string {
 	return strings.ToLower(trim(str))
 }
 
+// Camelize an uppercased word
+func Camelize(word string) (camelized string) {
+	for pos, ru := range []rune(word) {
+		if pos > 0 {
+			camelized += string(unicode.ToLower(ru))
+		} else {
+			camelized += string(unicode.ToUpper(ru))
+		}
+	}
+	return
+}
+
 // ToFileName lowercases and underscores a go type name
 func ToFileName(name string) string {
-	var out []string
-	for _, w := range split(name) {
+	in := split(name)
+	out := make([]string, 0, len(in))
+
+	for _, w := range in {
 		out = append(out, lower(w))
 	}
+
 	return strings.Join(out, "_")
 }
 
 // ToCommandName lowercases and underscores a go type name
 func ToCommandName(name string) string {
-	var out []string
-	for _, w := range split(name) {
+	in := split(name)
+	out := make([]string, 0, len(in))
+
+	for _, w := range in {
 		out = append(out, lower(w))
 	}
 	return strings.Join(out, "-")
@@ -205,26 +215,31 @@ func ToCommandName(name string) string {
 
 // ToHumanNameLower represents a code name as a human series of words
 func ToHumanNameLower(name string) string {
-	var out []string
-	for _, w := range split(name) {
-		if !commonInitialisms[upper(w)] {
-			out = append(out, lower(w))
+	in := newSplitter(withPostSplitInitialismCheck).split(name)
+	out := make([]string, 0, len(in))
+
+	for _, w := range in {
+		if !w.IsInitialism() {
+			out = append(out, lower(w.GetOriginal()))
 		} else {
-			out = append(out, w)
+			out = append(out, w.GetOriginal())
 		}
 	}
+
 	return strings.Join(out, " ")
 }
 
 // ToHumanNameTitle represents a code name as a human series of words with the first letters titleized
 func ToHumanNameTitle(name string) string {
-	var out []string
-	for _, w := range split(name) {
-		uw := upper(w)
-		if !commonInitialisms[uw] {
-			out = append(out, upper(w[:1])+lower(w[1:]))
+	in := newSplitter(withPostSplitInitialismCheck).split(name)
+
+	out := make([]string, 0, len(in))
+	for _, w := range in {
+		original := w.GetOriginal()
+		if !w.IsInitialism() {
+			out = append(out, Camelize(original))
 		} else {
-			out = append(out, w)
+			out = append(out, original)
 		}
 	}
 	return strings.Join(out, " ")
@@ -232,13 +247,15 @@ func ToHumanNameTitle(name string) string {
 
 // ToJSONName camelcases a name which can be underscored or pascal cased
 func ToJSONName(name string) string {
-	var out []string
-	for i, w := range split(name) {
+	in := split(name)
+	out := make([]string, 0, len(in))
+
+	for i, w := range in {
 		if i == 0 {
 			out = append(out, lower(w))
 			continue
 		}
-		out = append(out, upper(w[:1])+lower(w[1:]))
+		out = append(out, Camelize(w))
 	}
 	return strings.Join(out, "")
 }
@@ -246,6 +263,9 @@ func ToJSONName(name string) string {
 // ToVarName camelcases a name which can be underscored or pascal cased
 func ToVarName(name string) string {
 	res := ToGoName(name)
+	if isInitialism(res) {
+		return lower(res)
+	}
 	if len(res) <= 1 {
 		return lower(res)
 	}
@@ -254,16 +274,36 @@ func ToVarName(name string) string {
 
 // ToGoName translates a swagger name which can be underscored or camel cased to a name that golint likes
 func ToGoName(name string) string {
-	var out []string
-	for _, w := range split(name) {
-		uw := upper(w)
-		mod := int(math.Min(float64(len(uw)), 2))
-		if !commonInitialisms[uw] && !commonInitialisms[uw[:len(uw)-mod]] {
-			uw = upper(w[:1]) + lower(w[1:])
+	lexems := newSplitter(withPostSplitInitialismCheck).split(name)
+
+	result := ""
+	for _, lexem := range lexems {
+		goName := lexem.GetUnsafeGoName()
+
+		// to support old behavior
+		if lexem.IsInitialism() {
+			goName = upper(goName)
 		}
-		out = append(out, uw)
+		result += goName
 	}
-	return strings.Join(out, "")
+
+	if len(result) > 0 {
+		if !unicode.IsUpper([]rune(result)[0]) {
+			result = "X" + result
+		}
+	}
+
+	return result
+}
+
+// ContainsStrings searches a slice of strings for a case-sensitive match
+func ContainsStrings(coll []string, item string) bool {
+	for _, a := range coll {
+		if a == item {
+			return true
+		}
+	}
+	return false
 }
 
 // ContainsStringsCI searches a slice of strings for a case-insensitive match
@@ -310,6 +350,16 @@ func IsZero(data interface{}) bool {
 	return false
 }
 
+// AddInitialisms add additional initialisms
+func AddInitialisms(words ...string) {
+	for _, word := range words {
+		//commonInitialisms[upper(word)] = true
+		commonInitialisms.add(upper(word))
+	}
+	// sort again
+	initialisms = commonInitialisms.sorted()
+}
+
 // CommandLineOptionsGroup represents a group of user-defined command line options
 type CommandLineOptionsGroup struct {
 	ShortDescription string
diff --git a/util_test.go b/util_test.go
index 7e4d9f2..3b85791 100644
--- a/util_test.go
+++ b/util_test.go
@@ -29,17 +29,70 @@ type translationSample struct {
 
 func titleize(s string) string { return strings.ToTitle(s[:1]) + lower(s[1:]) }
 
+func init() {
+	AddInitialisms("elb", "cap", "capwd", "wd")
+}
+
+func TestIndexOfInitialismsSorted(t *testing.T) {
+	configuredInitialisms := map[string]bool{
+		"ACL":   true,
+		"API":   true,
+		"ASCII": true,
+		"CPU":   true,
+		"CSS":   true,
+		"DNS":   true,
+		"VM":    true,
+		"XML":   true,
+		"XMPP":  true,
+		"XSRF":  true,
+		"XSS":   true,
+	}
+
+	goldenSample := []string{
+		"ASCII",
+		"XMPP",
+		"XSRF",
+		"ACL",
+		"API",
+		"CPU",
+		"CSS",
+		"DNS",
+		"XML",
+		"XSS",
+		"VM",
+	}
+	for i := 0; i < 50; i++ {
+		sample := newIndexOfInitialisms().load(configuredInitialisms).sorted()
+		failMsg := "equal sorted initialisms should be always equal"
+
+		if !assert.Equal(t, goldenSample, sample, failMsg) {
+			t.FailNow()
+		}
+	}
+}
+
 func TestToGoName(t *testing.T) {
 	samples := []translationSample{
+		{"@Type", "AtType"},
+		{"Sample@where", "SampleAtWhere"},
+		{"Id", "ID"},
+		{"SomethingTTLSeconds", "SomethingTTLSeconds"},
 		{"sample text", "SampleText"},
+		{"IPv6Address", "IPV6Address"},
+		{"IPv4Address", "IPV4Address"},
 		{"sample-text", "SampleText"},
 		{"sample_text", "SampleText"},
 		{"sampleText", "SampleText"},
 		{"sample 2 Text", "Sample2Text"},
 		{"findThingById", "FindThingByID"},
+		{"日本語sample 2 Text", "X日本語sample2Text"},
+		{"日本語findThingById", "X日本語findThingByID"},
+		{"findTHINGSbyID", "FindTHINGSbyID"},
 	}
 
-	for k := range commonInitialisms {
+	for _, k := range commonInitialisms.sorted() {
+		k = upper(k)
+
 		samples = append(samples,
 			translationSample{"sample " + lower(k) + " text", "Sample" + k + "Text"},
 			translationSample{"sample-" + lower(k) + "-text", "Sample" + k + "Text"},
@@ -56,7 +109,28 @@ func TestToGoName(t *testing.T) {
 	}
 
 	for _, sample := range samples {
-		assert.Equal(t, sample.out, ToGoName(sample.str))
+		result := ToGoName(sample.str)
+		assert.Equal(t, sample.out, result,
+			"ToGoName(%q) == %q but %q", sample.str, sample.out, result)
+	}
+}
+
+func BenchmarkToGoName(b *testing.B) {
+	samples := []string{
+		"sample text",
+		"sample-text",
+		"sample_text",
+		"sampleText",
+		"sample 2 Text",
+		"findThingById",
+		"日本語sample 2 Text",
+		"日本語findThingById",
+		"findTHINGSbyID",
+	}
+	for i := 0; i < b.N; i++ {
+		for _, s := range samples {
+			ToGoName(s)
+		}
 	}
 }
 
@@ -69,22 +143,38 @@ func TestContainsStringsCI(t *testing.T) {
 	assert.False(t, ContainsStringsCI(list, "nuts"))
 }
 
+func TestContainsStrings(t *testing.T) {
+	list := []string{"hello", "world", "and", "such"}
+
+	assert.True(t, ContainsStrings(list, "hello"))
+	assert.False(t, ContainsStrings(list, "hELLo"))
+	assert.True(t, ContainsStrings(list, "world"))
+	assert.False(t, ContainsStrings(list, "World"))
+	assert.True(t, ContainsStrings(list, "and"))
+	assert.False(t, ContainsStrings(list, "AND"))
+	assert.False(t, ContainsStrings(list, "nuts"))
+}
+
+const (
+	collectionFormatComma = "csv"
+)
+
 func TestSplitByFormat(t *testing.T) {
 	expected := []string{"one", "two", "three"}
-	for _, fmt := range []string{"csv", "pipes", "tsv", "ssv", "multi"} {
+	for _, fmt := range []string{collectionFormatComma, collectionFormatPipe, collectionFormatTab, collectionFormatSpace, collectionFormatMulti} {
 
 		var actual []string
 		switch fmt {
-		case "multi":
+		case collectionFormatMulti:
 			assert.Nil(t, SplitByFormat("", fmt))
 			assert.Nil(t, SplitByFormat("blah", fmt))
-		case "ssv":
+		case collectionFormatSpace:
 			actual = SplitByFormat(strings.Join(expected, " "), fmt)
 			assert.EqualValues(t, expected, actual)
-		case "pipes":
+		case collectionFormatPipe:
 			actual = SplitByFormat(strings.Join(expected, "|"), fmt)
 			assert.EqualValues(t, expected, actual)
-		case "tsv":
+		case collectionFormatTab:
 			actual = SplitByFormat(strings.Join(expected, "\t"), fmt)
 			assert.EqualValues(t, expected, actual)
 		default:
@@ -95,18 +185,18 @@ func TestSplitByFormat(t *testing.T) {
 }
 
 func TestJoinByFormat(t *testing.T) {
-	for _, fmt := range []string{"csv", "pipes", "tsv", "ssv", "multi"} {
+	for _, fmt := range []string{collectionFormatComma, collectionFormatPipe, collectionFormatTab, collectionFormatSpace, collectionFormatMulti} {
 
 		lval := []string{"one", "two", "three"}
 		var expected []string
 		switch fmt {
-		case "multi":
+		case collectionFormatMulti:
 			expected = lval
-		case "ssv":
+		case collectionFormatSpace:
 			expected = []string{strings.Join(lval, " ")}
-		case "pipes":
+		case collectionFormatPipe:
 			expected = []string{strings.Join(lval, "|")}
-		case "tsv":
+		case collectionFormatTab:
 			expected = []string{strings.Join(lval, "\t")}
 		default:
 			expected = []string{strings.Join(lval, ",")}
@@ -120,16 +210,26 @@ func TestToFileName(t *testing.T) {
 	samples := []translationSample{
 		{"SampleText", "sample_text"},
 		{"FindThingByID", "find_thing_by_id"},
+		{"CAPWD.folwdBylc", "capwd_folwd_bylc"},
+		{"CAPWDfolwdBylc", "cap_w_dfolwd_bylc"},
+		{"CAP_WD_folwdBylc", "cap_wd_folwd_bylc"},
+		{"TypeOAI_alias", "type_oai_alias"},
+		{"Type_OAI_alias", "type_oai_alias"},
+		{"Type_OAIAlias", "type_oai_alias"},
+		{"ELB.HTTPLoadBalancer", "elb_http_load_balancer"},
+		{"elbHTTPLoadBalancer", "elb_http_load_balancer"},
+		{"ELBHTTPLoadBalancer", "elb_http_load_balancer"},
 	}
-
-	for k := range commonInitialisms {
+	for _, k := range commonInitialisms.sorted() {
 		samples = append(samples,
 			translationSample{"Sample" + k + "Text", "sample_" + lower(k) + "_text"},
 		)
 	}
 
 	for _, sample := range samples {
-		assert.Equal(t, sample.out, ToFileName(sample.str))
+		result := ToFileName(sample.str)
+		assert.Equal(t, sample.out, ToFileName(sample.str),
+			"ToFileName(%q) == %q but got %q", sample.str, sample.out, result)
 	}
 }
 
@@ -137,9 +237,10 @@ func TestToCommandName(t *testing.T) {
 	samples := []translationSample{
 		{"SampleText", "sample-text"},
 		{"FindThingByID", "find-thing-by-id"},
+		{"elbHTTPLoadBalancer", "elb-http-load-balancer"},
 	}
 
-	for k := range commonInitialisms {
+	for _, k := range commonInitialisms.sorted() {
 		samples = append(samples,
 			translationSample{"Sample" + k + "Text", "sample-" + lower(k) + "-text"},
 		)
@@ -152,11 +253,13 @@ func TestToCommandName(t *testing.T) {
 
 func TestToHumanName(t *testing.T) {
 	samples := []translationSample{
+		{"Id", "Id"},
 		{"SampleText", "sample text"},
 		{"FindThingByID", "find thing by ID"},
+		{"elbHTTPLoadBalancer", "elb HTTP load balancer"},
 	}
 
-	for k := range commonInitialisms {
+	for _, k := range commonInitialisms.sorted() {
 		samples = append(samples,
 			translationSample{"Sample" + k + "Text", "sample " + k + " text"},
 		)
@@ -171,9 +274,10 @@ func TestToJSONName(t *testing.T) {
 	samples := []translationSample{
 		{"SampleText", "sampleText"},
 		{"FindThingByID", "findThingById"},
+		{"elbHTTPLoadBalancer", "elbHttpLoadBalancer"},
 	}
 
-	for k := range commonInitialisms {
+	for _, k := range commonInitialisms.sorted() {
 		samples = append(samples,
 			translationSample{"Sample" + k + "Text", "sample" + titleize(k) + "Text"},
 		)
@@ -273,3 +377,69 @@ func TestIsZero(t *testing.T) {
 		assert.Equal(t, it.Expected, IsZero(it.Data), fmt.Sprintf("%#v", it.Data))
 	}
 }
+
+func TestCamelize(t *testing.T) {
+	samples := []translationSample{
+		{"SampleText", "Sampletext"},
+		{"FindThingByID", "Findthingbyid"},
+		{"CAPWD.folwdBylc", "Capwd.folwdbylc"},
+		{"CAPWDfolwdBylc", "Capwdfolwdbylc"},
+		{"CAP_WD_folwdBylc", "Cap_wd_folwdbylc"},
+		{"TypeOAI_alias", "Typeoai_alias"},
+		{"Type_OAI_alias", "Type_oai_alias"},
+		{"Type_OAIAlias", "Type_oaialias"},
+		{"ELB.HTTPLoadBalancer", "Elb.httploadbalancer"},
+		{"elbHTTPLoadBalancer", "Elbhttploadbalancer"},
+		{"ELBHTTPLoadBalancer", "Elbhttploadbalancer"},
+	}
+
+	for _, sample := range samples {
+		res := Camelize(sample.str)
+		assert.Equalf(t, sample.out, res, "expected Camelize(%q)=%q, got %q", sample.str, sample.out, res)
+	}
+}
+
+func TestToHumanNameTitle(t *testing.T) {
+	samples := []translationSample{
+		{"SampleText", "Sample Text"},
+		{"FindThingByID", "Find Thing By ID"},
+		{"CAPWD.folwdBylc", "CAPWD Folwd Bylc"},
+		{"CAPWDfolwdBylc", "CAP W Dfolwd Bylc"},
+		{"CAP_WD_folwdBylc", "CAP WD Folwd Bylc"},
+		{"TypeOAI_alias", "Type OAI Alias"},
+		{"Type_OAI_alias", "Type OAI Alias"},
+		{"Type_OAIAlias", "Type OAI Alias"},
+		{"ELB.HTTPLoadBalancer", "ELB HTTP Load Balancer"},
+		{"elbHTTPLoadBalancer", "elb HTTP Load Balancer"},
+		{"ELBHTTPLoadBalancer", "ELB HTTP Load Balancer"},
+	}
+
+	for _, sample := range samples {
+		res := ToHumanNameTitle(sample.str)
+		assert.Equalf(t, sample.out, res, "expected ToHumanNameTitle(%q)=%q, got %q", sample.str, sample.out, res)
+	}
+}
+
+func TestToVarName(t *testing.T) {
+	samples := []translationSample{
+		{"SampleText", "sampleText"},
+		{"FindThingByID", "findThingByID"},
+		{"CAPWD.folwdBylc", "cAPWDFolwdBylc"},
+		{"CAPWDfolwdBylc", "cAPWDfolwdBylc"},
+		{"CAP_WD_folwdBylc", "cAPWDFolwdBylc"},
+		{"TypeOAI_alias", "typeOAIAlias"},
+		{"Type_OAI_alias", "typeOAIAlias"},
+		{"Type_OAIAlias", "typeOAIAlias"},
+		{"ELB.HTTPLoadBalancer", "eLBHTTPLoadBalancer"},
+		{"elbHTTPLoadBalancer", "eLBHTTPLoadBalancer"},
+		{"ELBHTTPLoadBalancer", "eLBHTTPLoadBalancer"},
+		{"Id", "id"},
+		{"HTTP", "http"},
+		{"A", "a"},
+	}
+
+	for _, sample := range samples {
+		res := ToVarName(sample.str)
+		assert.Equalf(t, sample.out, res, "expected ToVarName(%q)=%q, got %q", sample.str, sample.out, res)
+	}
+}
diff --git a/yaml.go b/yaml.go
new file mode 100644
index 0000000..435e294
--- /dev/null
+++ b/yaml.go
@@ -0,0 +1,227 @@
+// Copyright 2015 go-swagger maintainers
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//    http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package swag
+
+import (
+	"encoding/json"
+	"fmt"
+	"path/filepath"
+	"strconv"
+
+	"github.com/mailru/easyjson/jlexer"
+	"github.com/mailru/easyjson/jwriter"
+	yaml "gopkg.in/yaml.v2"
+)
+
+// YAMLMatcher matches yaml
+func YAMLMatcher(path string) bool {
+	ext := filepath.Ext(path)
+	return ext == ".yaml" || ext == ".yml"
+}
+
+// YAMLToJSON converts YAML unmarshaled data into json compatible data
+func YAMLToJSON(data interface{}) (json.RawMessage, error) {
+	jm, err := transformData(data)
+	if err != nil {
+		return nil, err
+	}
+	b, err := WriteJSON(jm)
+	return json.RawMessage(b), err
+}
+
+// BytesToYAMLDoc converts a byte slice into a YAML document
+func BytesToYAMLDoc(data []byte) (interface{}, error) {
+	var canary map[interface{}]interface{} // validate this is an object and not a different type
+	if err := yaml.Unmarshal(data, &canary); err != nil {
+		return nil, err
+	}
+
+	var document yaml.MapSlice // preserve order that is present in the document
+	if err := yaml.Unmarshal(data, &document); err != nil {
+		return nil, err
+	}
+	return document, nil
+}
+
+// JSONMapSlice represent a JSON object, with the order of keys maintained
+type JSONMapSlice []JSONMapItem
+
+// MarshalJSON renders a JSONMapSlice as JSON
+func (s JSONMapSlice) MarshalJSON() ([]byte, error) {
+	w := &jwriter.Writer{Flags: jwriter.NilMapAsEmpty | jwriter.NilSliceAsEmpty}
+	s.MarshalEasyJSON(w)
+	return w.BuildBytes()
+}
+
+// MarshalEasyJSON renders a JSONMapSlice as JSON, using easyJSON
+func (s JSONMapSlice) MarshalEasyJSON(w *jwriter.Writer) {
+	w.RawByte('{')
+
+	ln := len(s)
+	last := ln - 1
+	for i := 0; i < ln; i++ {
+		s[i].MarshalEasyJSON(w)
+		if i != last { // last item
+			w.RawByte(',')
+		}
+	}
+
+	w.RawByte('}')
+}
+
+// UnmarshalJSON makes a JSONMapSlice from JSON
+func (s *JSONMapSlice) UnmarshalJSON(data []byte) error {
+	l := jlexer.Lexer{Data: data}
+	s.UnmarshalEasyJSON(&l)
+	return l.Error()
+}
+
+// UnmarshalEasyJSON makes a JSONMapSlice from JSON, using easyJSON
+func (s *JSONMapSlice) UnmarshalEasyJSON(in *jlexer.Lexer) {
+	if in.IsNull() {
+		in.Skip()
+		return
+	}
+
+	var result JSONMapSlice
+	in.Delim('{')
+	for !in.IsDelim('}') {
+		var mi JSONMapItem
+		mi.UnmarshalEasyJSON(in)
+		result = append(result, mi)
+	}
+	*s = result
+}
+
+// JSONMapItem represents the value of a key in a JSON object held by JSONMapSlice
+type JSONMapItem struct {
+	Key   string
+	Value interface{}
+}
+
+// MarshalJSON renders a JSONMapItem as JSON
+func (s JSONMapItem) MarshalJSON() ([]byte, error) {
+	w := &jwriter.Writer{Flags: jwriter.NilMapAsEmpty | jwriter.NilSliceAsEmpty}
+	s.MarshalEasyJSON(w)
+	return w.BuildBytes()
+}
+
+// MarshalEasyJSON renders a JSONMapItem as JSON, using easyJSON
+func (s JSONMapItem) MarshalEasyJSON(w *jwriter.Writer) {
+	w.String(s.Key)
+	w.RawByte(':')
+	w.Raw(WriteJSON(s.Value))
+}
+
+// UnmarshalJSON makes a JSONMapItem from JSON
+func (s *JSONMapItem) UnmarshalJSON(data []byte) error {
+	l := jlexer.Lexer{Data: data}
+	s.UnmarshalEasyJSON(&l)
+	return l.Error()
+}
+
+// UnmarshalEasyJSON makes a JSONMapItem from JSON, using easyJSON
+func (s *JSONMapItem) UnmarshalEasyJSON(in *jlexer.Lexer) {
+	key := in.UnsafeString()
+	in.WantColon()
+	value := in.Interface()
+	in.WantComma()
+	s.Key = key
+	s.Value = value
+}
+
+func transformData(input interface{}) (out interface{}, err error) {
+	switch in := input.(type) {
+	case yaml.MapSlice:
+
+		o := make(JSONMapSlice, len(in))
+		for i, mi := range in {
+			var nmi JSONMapItem
+			switch k := mi.Key.(type) {
+			case string:
+				nmi.Key = k
+			case int:
+				nmi.Key = strconv.Itoa(k)
+			default:
+				return nil, fmt.Errorf("types don't match expect map key string or int got: %T", mi.Key)
+			}
+
+			v, ert := transformData(mi.Value)
+			if ert != nil {
+				return nil, ert
+			}
+			nmi.Value = v
+			o[i] = nmi
+		}
+		return o, nil
+	case map[interface{}]interface{}:
+		o := make(JSONMapSlice, 0, len(in))
+		for ke, va := range in {
+			var nmi JSONMapItem
+			switch k := ke.(type) {
+			case string:
+				nmi.Key = k
+			case int:
+				nmi.Key = strconv.Itoa(k)
+			default:
+				return nil, fmt.Errorf("types don't match expect map key string or int got: %T", ke)
+			}
+
+			v, ert := transformData(va)
+			if ert != nil {
+				return nil, ert
+			}
+			nmi.Value = v
+			o = append(o, nmi)
+		}
+		return o, nil
+	case []interface{}:
+		len1 := len(in)
+		o := make([]interface{}, len1)
+		for i := 0; i < len1; i++ {
+			o[i], err = transformData(in[i])
+			if err != nil {
+				return nil, err
+			}
+		}
+		return o, nil
+	}
+	return input, nil
+}
+
+// YAMLDoc loads a yaml document from either http or a file and converts it to json
+func YAMLDoc(path string) (json.RawMessage, error) {
+	yamlDoc, err := YAMLData(path)
+	if err != nil {
+		return nil, err
+	}
+
+	data, err := YAMLToJSON(yamlDoc)
+	if err != nil {
+		return nil, err
+	}
+
+	return data, nil
+}
+
+// YAMLData loads a yaml document from either http or a file
+func YAMLData(path string) (interface{}, error) {
+	data, err := LoadFromFileOrHTTP(path)
+	if err != nil {
+		return nil, err
+	}
+
+	return BytesToYAMLDoc(data)
+}
diff --git a/yaml_test.go b/yaml_test.go
new file mode 100644
index 0000000..784de02
--- /dev/null
+++ b/yaml_test.go
@@ -0,0 +1,444 @@
+// Copyright 2015 go-swagger maintainers
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//    http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package swag
+
+import (
+	"encoding/json"
+	"net/http"
+	"net/http/httptest"
+	"testing"
+
+	"github.com/stretchr/testify/assert"
+	yaml "gopkg.in/yaml.v2"
+)
+
+/* currently unused:
+type failJSONMarshal struct {
+}
+
+func (f failJSONMarshal) MarshalJSON() ([]byte, error) {
+	return nil, errors.New("expected")
+}
+*/
+
+func TestLoadHTTPBytes(t *testing.T) {
+	_, err := LoadFromFileOrHTTP("httx://12394:abd")
+	assert.Error(t, err)
+
+	serv := httptest.NewServer(http.HandlerFunc(func(rw http.ResponseWriter, r *http.Request) {
+		rw.WriteHeader(http.StatusNotFound)
+	}))
+	defer serv.Close()
+
+	_, err = LoadFromFileOrHTTP(serv.URL)
+	assert.Error(t, err)
+
+	ts2 := httptest.NewServer(http.HandlerFunc(func(rw http.ResponseWriter, r *http.Request) {
+		rw.WriteHeader(http.StatusOK)
+		_, _ = rw.Write([]byte("the content"))
+	}))
+	defer ts2.Close()
+
+	d, err := LoadFromFileOrHTTP(ts2.URL)
+	assert.NoError(t, err)
+	assert.Equal(t, []byte("the content"), d)
+}
+
+func TestYAMLToJSON(t *testing.T) {
+
+	sd := `---
+1: the int key value
+name: a string value
+'y': some value
+`
+	var data yaml.MapSlice
+	_ = yaml.Unmarshal([]byte(sd), &data)
+
+	d, err := YAMLToJSON(data)
+	if assert.NoError(t, err) {
+		assert.Equal(t, `{"1":"the int key value","name":"a string value","y":"some value"}`, string(d))
+	}
+
+	data = append(data, yaml.MapItem{Key: true, Value: "the bool value"})
+	d, err = YAMLToJSON(data)
+	assert.Error(t, err)
+	assert.Nil(t, d)
+
+	data = data[:len(data)-1]
+
+	tag := yaml.MapSlice{{Key: "name", Value: "tag name"}}
+	data = append(data, yaml.MapItem{Key: "tag", Value: tag})
+
+	d, err = YAMLToJSON(data)
+	assert.NoError(t, err)
+	assert.Equal(t, `{"1":"the int key value","name":"a string value","y":"some value","tag":{"name":"tag name"}}`, string(d))
+
+	tag = yaml.MapSlice{{Key: true, Value: "bool tag name"}}
+	data = append(data[:len(data)-1], yaml.MapItem{Key: "tag", Value: tag})
+
+	d, err = YAMLToJSON(data)
+	assert.Error(t, err)
+	assert.Nil(t, d)
+
+	var lst []interface{}
+	lst = append(lst, "hello")
+
+	d, err = YAMLToJSON(lst)
+	assert.NoError(t, err)
+	assert.Equal(t, []byte(`["hello"]`), []byte(d))
+
+	lst = append(lst, data)
+
+	d, err = YAMLToJSON(lst)
+	assert.Error(t, err)
+	assert.Nil(t, d)
+
+	// _, err := yamlToJSON(failJSONMarhal{})
+	// assert.Error(t, err)
+
+	_, err = BytesToYAMLDoc([]byte("- name: hello\n"))
+	assert.Error(t, err)
+
+	dd, err := BytesToYAMLDoc([]byte("description: 'object created'\n"))
+	assert.NoError(t, err)
+
+	d, err = YAMLToJSON(dd)
+	assert.NoError(t, err)
+	assert.Equal(t, json.RawMessage(`{"description":"object created"}`), d)
+}
+
+func TestLoadStrategy(t *testing.T) {
+
+	loader := func(p string) ([]byte, error) {
+		return []byte(yamlPetStore), nil
+	}
+	remLoader := func(p string) ([]byte, error) {
+		return []byte("not it"), nil
+	}
+
+	ld := LoadStrategy("blah", loader, remLoader)
+	b, _ := ld("")
+	assert.Equal(t, []byte(yamlPetStore), b)
+
+	serv := httptest.NewServer(http.HandlerFunc(yamlPestoreServer))
+	defer serv.Close()
+
+	s, err := YAMLDoc(serv.URL)
+	assert.NoError(t, err)
+	assert.NotNil(t, s)
+
+	ts2 := httptest.NewServer(http.HandlerFunc(func(rw http.ResponseWriter, r *http.Request) {
+		rw.WriteHeader(http.StatusNotFound)
+		_, _ = rw.Write([]byte("\n"))
+	}))
+	defer ts2.Close()
+	_, err = YAMLDoc(ts2.URL)
+	assert.Error(t, err)
+}
+
+var yamlPestoreServer = func(rw http.ResponseWriter, r *http.Request) {
+	rw.WriteHeader(http.StatusOK)
+	_, _ = rw.Write([]byte(yamlPetStore))
+}
+
+func TestWithYKey(t *testing.T) {
+	doc, err := BytesToYAMLDoc([]byte(withYKey))
+	if assert.NoError(t, err) {
+		_, err := YAMLToJSON(doc)
+		if assert.Error(t, err) {
+			doc, err := BytesToYAMLDoc([]byte(withQuotedYKey))
+			if assert.NoError(t, err) {
+				jsond, err := YAMLToJSON(doc)
+				if assert.NoError(t, err) {
+					var yt struct {
+						Definitions struct {
+							Viewbox struct {
+								Properties struct {
+									Y struct {
+										Type string `json:"type"`
+									} `json:"y"`
+								} `json:"properties"`
+							} `json:"viewbox"`
+						} `json:"definitions"`
+					}
+					if assert.NoError(t, json.Unmarshal(jsond, &yt)) {
+						assert.Equal(t, "integer", yt.Definitions.Viewbox.Properties.Y.Type)
+					}
+				}
+			}
+		}
+
+	}
+}
+
+const withQuotedYKey = `consumes:
+- application/json
+definitions:
+  viewBox:
+    type: object
+    properties:
+      x:
+        type: integer
+        format: int16
+      # y -> types don't match: expect map key string or int get: bool
+      "y":
+        type: integer
+        format: int16
+      width:
+        type: integer
+        format: int16
+      height:
+        type: integer
+        format: int16
+info:
+  description: Test RESTful APIs
+  title: Test Server
+  version: 1.0.0
+basePath: /api
+paths:
+  /test:
+    get:
+      operationId: findAll
+      parameters:
+        - name: since
+          in: query
+          type: integer
+          format: int64
+        - name: limit
+          in: query
+          type: integer
+          format: int32
+          default: 20
+      responses:
+        200:
+          description: Array[Trigger]
+          schema:
+            type: array
+            items:
+              $ref: "#/definitions/viewBox"
+produces:
+- application/json
+schemes:
+- https
+swagger: "2.0"
+`
+
+const withYKey = `consumes:
+- application/json
+definitions:
+  viewBox:
+    type: object
+    properties:
+      x:
+        type: integer
+        format: int16
+      # y -> types don't match: expect map key string or int get: bool
+      y:
+        type: integer
+        format: int16
+      width:
+        type: integer
+        format: int16
+      height:
+        type: integer
+        format: int16
+info:
+  description: Test RESTful APIs
+  title: Test Server
+  version: 1.0.0
+basePath: /api
+paths:
+  /test:
+    get:
+      operationId: findAll
+      parameters:
+        - name: since
+          in: query
+          type: integer
+          format: int64
+        - name: limit
+          in: query
+          type: integer
+          format: int32
+          default: 20
+      responses:
+        200:
+          description: Array[Trigger]
+          schema:
+            type: array
+            items:
+              $ref: "#/definitions/viewBox"
+produces:
+- application/json
+schemes:
+- https
+swagger: "2.0"
+`
+
+const yamlPetStore = `swagger: '2.0'
+info:
+  version: '1.0.0'
+  title: Swagger Petstore
+  description: A sample API that uses a petstore as an example to demonstrate features in the swagger-2.0 specification
+  termsOfService: http://helloreverb.com/terms/
+  contact:
+    name: Swagger API team
+    email: foo@example.com
+    url: http://swagger.io
+  license:
+    name: MIT
+    url: http://opensource.org/licenses/MIT
+host: petstore.swagger.wordnik.com
+basePath: /api
+schemes:
+  - http
+consumes:
+  - application/json
+produces:
+  - application/json
+paths:
+  /pets:
+    get:
+      description: Returns all pets from the system that the user has access to
+      operationId: findPets
+      produces:
+        - application/json
+        - application/xml
+        - text/xml
+        - text/html
+      parameters:
+        - name: tags
+          in: query
+          description: tags to filter by
+          required: false
+          type: array
+          items:
+            type: string
+          collectionFormat: csv
+        - name: limit
+          in: query
+          description: maximum number of results to return
+          required: false
+          type: integer
+          format: int32
+      responses:
+        '200':
+          description: pet response
+          schema:
+            type: array
+            items:
+              $ref: '#/definitions/pet'
+        default:
+          description: unexpected error
+          schema:
+            $ref: '#/definitions/errorModel'
+    post:
+      description: Creates a new pet in the store.  Duplicates are allowed
+      operationId: addPet
+      produces:
+        - application/json
+      parameters:
+        - name: pet
+          in: body
+          description: Pet to add to the store
+          required: true
+          schema:
+            $ref: '#/definitions/newPet'
+      responses:
+        '200':
+          description: pet response
+          schema:
+            $ref: '#/definitions/pet'
+        default:
+          description: unexpected error
+          schema:
+            $ref: '#/definitions/errorModel'
+  /pets/{id}:
+    get:
+      description: Returns a user based on a single ID, if the user does not have access to the pet
+      operationId: findPetById
+      produces:
+        - application/json
+        - application/xml
+        - text/xml
+        - text/html
+      parameters:
+        - name: id
+          in: path
+          description: ID of pet to fetch
+          required: true
+          type: integer
+          format: int64
+      responses:
+        '200':
+          description: pet response
+          schema:
+            $ref: '#/definitions/pet'
+        default:
+          description: unexpected error
+          schema:
+            $ref: '#/definitions/errorModel'
+    delete:
+      description: deletes a single pet based on the ID supplied
+      operationId: deletePet
+      parameters:
+        - name: id
+          in: path
+          description: ID of pet to delete
+          required: true
+          type: integer
+          format: int64
+      responses:
+        '204':
+          description: pet deleted
+        default:
+          description: unexpected error
+          schema:
+            $ref: '#/definitions/errorModel'
+definitions:
+  pet:
+    required:
+      - id
+      - name
+    properties:
+      id:
+        type: integer
+        format: int64
+      name:
+        type: string
+      tag:
+        type: string
+  newPet:
+    allOf:
+      - $ref: '#/definitions/pet'
+      - required:
+          - name
+        properties:
+          id:
+            type: integer
+            format: int64
+          name:
+            type: string
+  errorModel:
+    required:
+      - code
+      - message
+    properties:
+      code:
+        type: integer
+        format: int32
+      message:
+        type: string
+`