From 7e63bdbee8340d3ce2d2488f93d0fb1d4d16a201 Mon Sep 17 00:00:00 2001 From: Miek Gieben Date: Mon, 28 Aug 2017 17:49:28 +0200 Subject: dep ensure -update (#1001) * dep ensure -update Run "dep ensure -update` to update all dependencies. No code changes; just the dependencies. * dep prune * add new venderod --- vendor/github.com/go-openapi/spec/ref.go | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) (limited to 'vendor/github.com/go-openapi/spec/ref.go') diff --git a/vendor/github.com/go-openapi/spec/ref.go b/vendor/github.com/go-openapi/spec/ref.go index f6bfbfb56..4833b87e2 100644 --- a/vendor/github.com/go-openapi/spec/ref.go +++ b/vendor/github.com/go-openapi/spec/ref.go @@ -120,25 +120,18 @@ func NewRef(refURI string) (Ref, error) { return Ref{Ref: ref}, nil } -// MustCreateRef creates a ref object but +// MustCreateRef creates a ref object but panics when refURI is invalid. +// Use the NewRef method for a version that returns an error. func MustCreateRef(refURI string) Ref { return Ref{Ref: jsonreference.MustCreateRef(refURI)} } -// // NewResolvedRef creates a resolved ref -// func NewResolvedRef(refURI string, data interface{}) Ref { -// return Ref{ -// Ref: jsonreference.MustCreateRef(refURI), -// Resolved: data, -// } -// } - // MarshalJSON marshals this ref into a JSON object func (r Ref) MarshalJSON() ([]byte, error) { str := r.String() if str == "" { if r.IsRoot() { - return []byte(`{"$ref":"#"}`), nil + return []byte(`{"$ref":""}`), nil } return []byte("{}"), nil } -- cgit v1.2.3