diff --git a/cache.go b/cache.go index 122993b..537f53a 100644 --- a/cache.go +++ b/cache.go @@ -16,6 +16,8 @@ package spec import ( "sync" + + jsoniter "github.com/json-iterator/go" ) // ResolutionCache a cache for resolving urls @@ -71,7 +73,8 @@ var ( resCache *simpleCache onceCache sync.Once - _ ResolutionCache = &simpleCache{} + _ ResolutionCache = &simpleCache{} + json jsoniter.API ) // initResolutionCache initializes the URI resolution cache. To be wrapped in a sync.Once.Do call. @@ -79,6 +82,10 @@ func initResolutionCache() { resCache = defaultResolutionCache() } +func init() { + json = jsoniter.ConfigFastest +} + func defaultResolutionCache() *simpleCache { return &simpleCache{store: map[string]interface{}{ "http://swagger.io/v2/schema.json": MustLoadSwagger20Schema(), diff --git a/circular_test.go b/circular_test.go index c064b61..9e2eb5f 100644 --- a/circular_test.go +++ b/circular_test.go @@ -1,7 +1,6 @@ package spec import ( - "encoding/json" "net/http" "net/http/httptest" "os" diff --git a/contact_info.go b/contact_info.go index 2f7bb21..41d210f 100644 --- a/contact_info.go +++ b/contact_info.go @@ -15,8 +15,6 @@ package spec import ( - "encoding/json" - "github.com/go-openapi/swag" ) diff --git a/contact_info_test.go b/contact_info_test.go index fedd81a..97cbd5f 100644 --- a/contact_info_test.go +++ b/contact_info_test.go @@ -15,7 +15,6 @@ package spec import ( - "encoding/json" "testing" "github.com/stretchr/testify/assert" @@ -23,10 +22,10 @@ import ( ) const contactInfoJSON = `{ - "name": "wordnik api team", - "url": "http://developer.wordnik.com", - "email": "some@mailayada.dkdkd", - "x-teams": "test team" + "name": "wordnik api team", + "url": "http://developer.wordnik.com", + "email": "some@mailayada.dkdkd", + "x-teams": "test team" }` var contactInfo = ContactInfo{ContactInfoProps: ContactInfoProps{ @@ -36,9 +35,9 @@ var contactInfo = ContactInfo{ContactInfoProps: ContactInfoProps{ }, VendorExtensible: VendorExtensible{Extensions: map[string]interface{}{"x-teams": "test team"}}} func TestIntegrationContactInfo(t *testing.T) { - b, err := json.MarshalIndent(contactInfo, "", "\t") + b, err := json.MarshalIndent(contactInfo, "", " ") require.NoError(t, err) - assert.Equal(t, contactInfoJSON, string(b)) + assert.JSONEq(t, contactInfoJSON, string(b)) actual := ContactInfo{} err = json.Unmarshal([]byte(contactInfoJSON), &actual) diff --git a/expander.go b/expander.go index 74f91c3..124616c 100644 --- a/expander.go +++ b/expander.go @@ -15,7 +15,7 @@ package spec import ( - "encoding/json" + stdjson "encoding/json" "fmt" ) @@ -28,11 +28,11 @@ import ( // // PathLoader injects a document loading method. By default, this resolves to the function provided by the SpecLoader package variable. type ExpandOptions struct { - RelativeBase string // the path to the root document to expand. This is a file, not a directory - SkipSchemas bool // do not expand schemas, just paths, parameters and responses - ContinueOnError bool // continue expanding even after and error is found - PathLoader func(string) (json.RawMessage, error) `json:"-"` // the document loading method that takes a path as input and yields a json document - AbsoluteCircularRef bool // circular $ref remaining after expansion remain absolute URLs + RelativeBase string // the path to the root document to expand. This is a file, not a directory + SkipSchemas bool // do not expand schemas, just paths, parameters and responses + ContinueOnError bool // continue expanding even after and error is found + PathLoader func(string) (stdjson.RawMessage, error) `json:"-"` // the document loading method that takes a path as input and yields a json document + AbsoluteCircularRef bool // circular $ref remaining after expansion remain absolute URLs } func optionsOrDefault(opts *ExpandOptions) *ExpandOptions { diff --git a/expander_test.go b/expander_test.go index 1ba1aac..a218d36 100644 --- a/expander_test.go +++ b/expander_test.go @@ -15,7 +15,7 @@ package spec import ( - "encoding/json" + stdjson "encoding/json" "io" "log" "net/http" @@ -38,7 +38,7 @@ const ( var ( // PetStoreJSONMessage json raw message for Petstore20 - PetStoreJSONMessage = json.RawMessage([]byte(PetStore20)) + PetStoreJSONMessage = stdjson.RawMessage([]byte(PetStore20)) specs = filepath.Join("fixtures", "specs") ) diff --git a/go.mod b/go.mod index 898a3e9..d57926a 100644 --- a/go.mod +++ b/go.mod @@ -4,6 +4,7 @@ require ( github.com/go-openapi/jsonpointer v0.20.2 github.com/go-openapi/jsonreference v0.20.4 github.com/go-openapi/swag v0.22.6 + github.com/json-iterator/go v1.1.12 github.com/stretchr/testify v1.8.4 gopkg.in/yaml.v3 v3.0.1 ) @@ -12,6 +13,8 @@ require ( github.com/davecgh/go-spew v1.1.1 // indirect github.com/josharian/intern v1.0.0 // indirect github.com/mailru/easyjson v0.7.7 // indirect + github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect + github.com/modern-go/reflect2 v1.0.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect ) diff --git a/go.sum b/go.sum index 3d2ef0b..ca17d9f 100644 --- a/go.sum +++ b/go.sum @@ -1,3 +1,4 @@ +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/go-openapi/jsonpointer v0.20.2 h1:mQc3nmndL8ZBzStEo3JYF8wzmeWffDH4VbXz58sAx6Q= @@ -6,15 +7,25 @@ github.com/go-openapi/jsonreference v0.20.4 h1:bKlDxQxQJgwpUSgOENiMPzCTBVuc7vTdX github.com/go-openapi/jsonreference v0.20.4/go.mod h1:5pZJyJP2MnYCpoeoMAql78cCHauHj0V9Lhc506VOpw4= github.com/go-openapi/swag v0.22.6 h1:dnqg1XfHXL9aBxSbktBqFR5CxVyVI+7fYWhAf1JOeTw= github.com/go-openapi/swag v0.22.6/go.mod h1:Gl91UqO+btAM0plGGxHqJcQZ1ZTy6jbmridBTsDy8A0= +github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= +github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= +github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= +github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= +github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= 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/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/header.go b/header.go index 9dfd17b..b4d1249 100644 --- a/header.go +++ b/header.go @@ -15,7 +15,6 @@ package spec import ( - "encoding/json" "strings" "github.com/go-openapi/jsonpointer" diff --git a/header_test.go b/header_test.go index 67a893a..898f3de 100644 --- a/header_test.go +++ b/header_test.go @@ -15,7 +15,6 @@ package spec import ( - "encoding/json" "testing" "github.com/go-openapi/swag" diff --git a/helpers_spec_test.go b/helpers_spec_test.go index 4dd12c5..df8ab5d 100644 --- a/helpers_spec_test.go +++ b/helpers_spec_test.go @@ -2,6 +2,7 @@ package spec_test import ( "encoding/json" + stdjson "encoding/json" "fmt" "regexp" "strings" @@ -15,12 +16,12 @@ import ( var ( rex = regexp.MustCompile(`"\$ref":\s*"(.*?)"`) - testLoader func(string) (json.RawMessage, error) + testLoader func(string) (stdjson.RawMessage, error) ) func init() { // mimics what the go-openapi/load does - testLoader = func(path string) (json.RawMessage, error) { + testLoader = func(path string) (stdjson.RawMessage, error) { if swag.YAMLMatcher(path) { return swag.YAMLDoc(path) } @@ -28,7 +29,7 @@ func init() { if err != nil { return nil, err } - return json.RawMessage(data), nil + return stdjson.RawMessage(data), nil } } diff --git a/helpers_test.go b/helpers_test.go index f16a4dd..e90a182 100644 --- a/helpers_test.go +++ b/helpers_test.go @@ -1,7 +1,7 @@ package spec import ( - "encoding/json" + stdjson "encoding/json" "fmt" "regexp" "strings" @@ -14,12 +14,12 @@ import ( var rex = regexp.MustCompile(`"\$ref":\s*"(.*?)"`) -func jsonDoc(path string) (json.RawMessage, error) { +func jsonDoc(path string) (stdjson.RawMessage, error) { data, err := swag.LoadFromFileOrHTTP(path) if err != nil { return nil, err } - return json.RawMessage(data), nil + return stdjson.RawMessage(data), nil } func docAndOpts(t testing.TB, fixturePath string) ([]byte, *ExpandOptions) { diff --git a/info.go b/info.go index 582f0fd..1cf7e67 100644 --- a/info.go +++ b/info.go @@ -15,7 +15,6 @@ package spec import ( - "encoding/json" "strconv" "strings" diff --git a/info_test.go b/info_test.go index a8e3fbe..c98aa2d 100644 --- a/info_test.go +++ b/info_test.go @@ -15,7 +15,6 @@ package spec import ( - "encoding/json" "testing" "github.com/stretchr/testify/assert" @@ -57,9 +56,9 @@ var info = Info{ } func TestIntegrationInfo_Serialize(t *testing.T) { - b, err := json.MarshalIndent(info, "", "\t") + b, err := json.MarshalIndent(info, "", " ") require.NoError(t, err) - assert.Equal(t, infoJSON, string(b)) + assert.JSONEq(t, infoJSON, string(b)) } func TestIntegrationInfo_Deserialize(t *testing.T) { diff --git a/items.go b/items.go index e2afb21..a128b03 100644 --- a/items.go +++ b/items.go @@ -15,7 +15,6 @@ package spec import ( - "encoding/json" "strings" "github.com/go-openapi/jsonpointer" diff --git a/items_test.go b/items_test.go index 4d4e458..d1b34c3 100644 --- a/items_test.go +++ b/items_test.go @@ -15,7 +15,6 @@ package spec import ( - "encoding/json" "testing" "github.com/go-openapi/swag" diff --git a/license.go b/license.go index b42f803..a0a3aa3 100644 --- a/license.go +++ b/license.go @@ -15,8 +15,6 @@ package spec import ( - "encoding/json" - "github.com/go-openapi/swag" ) diff --git a/license_test.go b/license_test.go index 398f0d8..2000338 100644 --- a/license_test.go +++ b/license_test.go @@ -15,7 +15,6 @@ package spec import ( - "encoding/json" "testing" "github.com/stretchr/testify/assert" @@ -36,9 +35,9 @@ func TestIntegrationLicense(t *testing.T) { // const licenseYAML = "name: the name\nurl: the url\n" - b, err := json.MarshalIndent(license, "", "\t") + b, err := json.MarshalIndent(license, "", " ") require.NoError(t, err) - assert.Equal(t, licenseJSON, string(b)) + assert.JSONEq(t, licenseJSON, string(b)) actual := License{} err = json.Unmarshal([]byte(licenseJSON), &actual) diff --git a/operation.go b/operation.go index a69cca8..9789af0 100644 --- a/operation.go +++ b/operation.go @@ -17,7 +17,6 @@ package spec import ( "bytes" "encoding/gob" - "encoding/json" "sort" "github.com/go-openapi/jsonpointer" diff --git a/operation_test.go b/operation_test.go index 495f609..065af2c 100644 --- a/operation_test.go +++ b/operation_test.go @@ -17,7 +17,6 @@ package spec import ( "bytes" "encoding/gob" - "encoding/json" "testing" "github.com/stretchr/testify/assert" diff --git a/parameter.go b/parameter.go index bd4f1cd..f96c22c 100644 --- a/parameter.go +++ b/parameter.go @@ -15,7 +15,6 @@ package spec import ( - "encoding/json" "strings" "github.com/go-openapi/jsonpointer" diff --git a/parameters_test.go b/parameters_test.go index 702d867..86d5925 100644 --- a/parameters_test.go +++ b/parameters_test.go @@ -15,7 +15,6 @@ package spec import ( - "encoding/json" "testing" "github.com/go-openapi/swag" diff --git a/path_item.go b/path_item.go index 68fc8e9..e698c63 100644 --- a/path_item.go +++ b/path_item.go @@ -15,8 +15,6 @@ package spec import ( - "encoding/json" - "github.com/go-openapi/jsonpointer" "github.com/go-openapi/swag" ) diff --git a/path_item_test.go b/path_item_test.go index c3507a0..4c9e0a6 100644 --- a/path_item_test.go +++ b/path_item_test.go @@ -15,7 +15,6 @@ package spec import ( - "encoding/json" "testing" "github.com/stretchr/testify/assert" diff --git a/paths.go b/paths.go index 9dc82a2..ca87b84 100644 --- a/paths.go +++ b/paths.go @@ -15,10 +15,11 @@ package spec import ( - "encoding/json" "fmt" "strings" + stdjson "encoding/json" + "github.com/go-openapi/swag" ) @@ -46,7 +47,7 @@ func (p Paths) JSONLookup(token string) (interface{}, error) { // UnmarshalJSON hydrates this items instance with the data from JSON func (p *Paths) UnmarshalJSON(data []byte) error { - var res map[string]json.RawMessage + var res map[string]stdjson.RawMessage if err := json.Unmarshal(data, &res); err != nil { return err } diff --git a/paths_test.go b/paths_test.go index 4592818..f44f8d2 100644 --- a/paths_test.go +++ b/paths_test.go @@ -15,7 +15,6 @@ package spec import ( - "encoding/json" "testing" "github.com/stretchr/testify/assert" diff --git a/properties.go b/properties.go index 91d2435..ad7fcef 100644 --- a/properties.go +++ b/properties.go @@ -2,7 +2,6 @@ package spec import ( "bytes" - "encoding/json" "reflect" "sort" ) diff --git a/ref.go b/ref.go index b0ef9bd..6e7ceaa 100644 --- a/ref.go +++ b/ref.go @@ -17,7 +17,6 @@ package spec import ( "bytes" "encoding/gob" - "encoding/json" "net/http" "os" "path/filepath" diff --git a/ref_test.go b/ref_test.go index 6f4c0de..7deb3c9 100644 --- a/ref_test.go +++ b/ref_test.go @@ -17,7 +17,6 @@ package spec import ( "bytes" "encoding/gob" - "encoding/json" "testing" "github.com/stretchr/testify/assert" diff --git a/resolver_test.go b/resolver_test.go index b1c977a..a4b0d02 100644 --- a/resolver_test.go +++ b/resolver_test.go @@ -1,7 +1,6 @@ package spec import ( - "encoding/json" "net/http" "net/http/httptest" "os" diff --git a/response.go b/response.go index 0340b60..cac496f 100644 --- a/response.go +++ b/response.go @@ -15,8 +15,6 @@ package spec import ( - "encoding/json" - "github.com/go-openapi/jsonpointer" "github.com/go-openapi/swag" ) diff --git a/response_test.go b/response_test.go index d03720c..f2715ad 100644 --- a/response_test.go +++ b/response_test.go @@ -15,7 +15,6 @@ package spec import ( - "encoding/json" "testing" "github.com/stretchr/testify/assert" diff --git a/responses.go b/responses.go index 16c3076..1d36303 100644 --- a/responses.go +++ b/responses.go @@ -15,7 +15,7 @@ package spec import ( - "encoding/json" + stdjson "encoding/json" "fmt" "reflect" "strconv" @@ -109,7 +109,7 @@ func (r ResponsesProps) MarshalJSON() ([]byte, error) { // UnmarshalJSON unmarshals responses from JSON func (r *ResponsesProps) UnmarshalJSON(data []byte) error { - var res map[string]json.RawMessage + var res map[string]stdjson.RawMessage if err := json.Unmarshal(data, &res); err != nil { return err } diff --git a/responses_test.go b/responses_test.go index fc626bf..a2f8766 100644 --- a/responses_test.go +++ b/responses_test.go @@ -15,7 +15,6 @@ package spec import ( - "encoding/json" "testing" "github.com/stretchr/testify/assert" diff --git a/schema.go b/schema.go index 4e9be85..d3756f6 100644 --- a/schema.go +++ b/schema.go @@ -15,7 +15,6 @@ package spec import ( - "encoding/json" "fmt" "strings" diff --git a/schema_loader.go b/schema_loader.go index 0059b99..20865c3 100644 --- a/schema_loader.go +++ b/schema_loader.go @@ -15,7 +15,7 @@ package spec import ( - "encoding/json" + stdjson "encoding/json" "fmt" "log" "net/url" @@ -33,12 +33,12 @@ import ( // NOTE: if you are using the go-openapi/loads package, it will override // this value with its own default (a loader to retrieve YAML documents as // well as JSON ones). -var PathLoader = func(pth string) (json.RawMessage, error) { +var PathLoader = func(pth string) (stdjson.RawMessage, error) { data, err := swag.LoadFromFileOrHTTP(pth) if err != nil { return nil, err } - return json.RawMessage(data), nil + return stdjson.RawMessage(data), nil } // resolverContext allows to share a context during spec processing. @@ -50,7 +50,7 @@ type resolverContext struct { // concurrent access, unless we chose to implement a parallel spec walking. circulars map[string]bool basePath string - loadDoc func(string) (json.RawMessage, error) + loadDoc func(string) (stdjson.RawMessage, error) rootID string } @@ -58,7 +58,7 @@ func newResolverContext(options *ExpandOptions) *resolverContext { expandOptions := optionsOrDefault(options) // path loader may be overridden by options - var loader func(string) (json.RawMessage, error) + var loader func(string) (stdjson.RawMessage, error) if expandOptions.PathLoader == nil { loader = PathLoader } else { @@ -77,6 +77,7 @@ type schemaLoader struct { options *ExpandOptions cache ResolutionCache context *resolverContext + loadDoc func(string) (stdjson.RawMessage, error) } func (r *schemaLoader) transitiveResolver(basePath string, ref Ref) *schemaLoader { @@ -327,5 +328,9 @@ func defaultSchemaLoader( options: expandOptions, cache: cache, context: context, + loadDoc: func(path string) (stdjson.RawMessage, error) { + debugLog("fetching document at %q", path) + return PathLoader(path) + }, } } diff --git a/schema_loader_test.go b/schema_loader_test.go index 67a1e79..15a191d 100644 --- a/schema_loader_test.go +++ b/schema_loader_test.go @@ -1,7 +1,6 @@ package spec import ( - "encoding/json" "path/filepath" "testing" diff --git a/schema_test.go b/schema_test.go index 038284c..1dae698 100644 --- a/schema_test.go +++ b/schema_test.go @@ -15,7 +15,6 @@ package spec import ( - "encoding/json" "testing" "github.com/go-openapi/swag" diff --git a/security_scheme.go b/security_scheme.go index 9d0bdae..25e045f 100644 --- a/security_scheme.go +++ b/security_scheme.go @@ -15,8 +15,6 @@ package spec import ( - "encoding/json" - "github.com/go-openapi/jsonpointer" "github.com/go-openapi/swag" ) diff --git a/spec.go b/spec.go index 876aa12..ee72f30 100644 --- a/spec.go +++ b/spec.go @@ -14,10 +14,6 @@ package spec -import ( - "encoding/json" -) - //go:generate curl -L --progress -o ./schemas/v2/schema.json http://swagger.io/v2/schema.json //go:generate curl -L --progress -o ./schemas/jsonschema-draft-04.json http://json-schema.org/draft-04/schema //go:generate go-bindata -pkg=spec -prefix=./schemas -ignore=.*\.md ./schemas/... diff --git a/structs_test.go b/structs_test.go index c8e191a..d0cad38 100644 --- a/structs_test.go +++ b/structs_test.go @@ -15,7 +15,6 @@ package spec import ( - "encoding/json" "reflect" "testing" diff --git a/swagger.go b/swagger.go index 1590fd1..d17df08 100644 --- a/swagger.go +++ b/swagger.go @@ -17,7 +17,6 @@ package spec import ( "bytes" "encoding/gob" - "encoding/json" "fmt" "strconv" diff --git a/swagger_test.go b/swagger_test.go index cb288e6..1954da7 100644 --- a/swagger_test.go +++ b/swagger_test.go @@ -15,7 +15,6 @@ package spec import ( - "encoding/json" "testing" "github.com/stretchr/testify/assert" diff --git a/tag.go b/tag.go index faa3d3d..a2af8af 100644 --- a/tag.go +++ b/tag.go @@ -15,8 +15,6 @@ package spec import ( - "encoding/json" - "github.com/go-openapi/jsonpointer" "github.com/go-openapi/swag" ) diff --git a/xml_object_test.go b/xml_object_test.go index 8573e82..de8fa65 100644 --- a/xml_object_test.go +++ b/xml_object_test.go @@ -15,7 +15,6 @@ package spec import ( - "encoding/json" "testing" "github.com/stretchr/testify/assert"