forked from Ivasoft/traefik
Update dependencies
This commit is contained in:
19
vendor/github.com/go-openapi/spec/items.go
generated
vendored
19
vendor/github.com/go-openapi/spec/items.go
generated
vendored
@@ -16,9 +16,7 @@ package spec
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"strings"
|
||||
|
||||
"github.com/go-openapi/jsonpointer"
|
||||
"github.com/go-openapi/swag"
|
||||
)
|
||||
|
||||
@@ -199,20 +197,3 @@ func (i Items) MarshalJSON() ([]byte, error) {
|
||||
}
|
||||
return swag.ConcatJSON(b3, b1, b2), nil
|
||||
}
|
||||
|
||||
// JSONLookup look up a value by the json property name
|
||||
func (p Items) JSONLookup(token string) (interface{}, error) {
|
||||
if token == "$ref" {
|
||||
return &p.Ref, nil
|
||||
}
|
||||
|
||||
r, _, err := jsonpointer.GetForToken(p.CommonValidations, token)
|
||||
if err != nil && !strings.HasPrefix(err.Error(), "object has no field") {
|
||||
return nil, err
|
||||
}
|
||||
if r != nil {
|
||||
return r, nil
|
||||
}
|
||||
r, _, err = jsonpointer.GetForToken(p.SimpleSchema, token)
|
||||
return r, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user