1515package spec
1616
1717import (
18- "encoding/json"
1918 "io/ioutil"
2019 "log"
2120 "net/http"
@@ -27,6 +26,8 @@ import (
2726 "strings"
2827 "testing"
2928
29+ stdjson "encoding/json"
30+
3031 "github.com/go-openapi/jsonpointer"
3132 "github.com/go-openapi/swag"
3233 "github.com/stretchr/testify/assert"
@@ -39,12 +40,12 @@ var (
3940 rex = regexp .MustCompile (`"\$ref":\s*"(.+)"` )
4041)
4142
42- func jsonDoc (path string ) (json .RawMessage , error ) {
43+ func jsonDoc (path string ) (stdjson .RawMessage , error ) {
4344 data , err := swag .LoadFromFileOrHTTP (path )
4445 if err != nil {
4546 return nil , err
4647 }
47- return json .RawMessage (data ), nil
48+ return stdjson .RawMessage (data ), nil
4849}
4950
5051// tests that paths are normalized correctly
@@ -1030,8 +1031,9 @@ func TestSchemaExpansion(t *testing.T) {
10301031}
10311032
10321033func TestDefaultResolutionCache (t * testing.T ) {
1033-
10341034 cache := initResolutionCache ()
1035+ jsonSchema := MustLoadJSONSchemaDraft04 ()
1036+ swaggerSchema := MustLoadSwagger20Schema ()
10351037
10361038 sch , ok := cache .Get ("not there" )
10371039 assert .False (t , ok )
@@ -1760,7 +1762,7 @@ func TestResolveExtraItem(t *testing.T) {
17601762}
17611763
17621764// PetStoreJSONMessage json raw message for Petstore20
1763- var PetStoreJSONMessage = json .RawMessage ([]byte (PetStore20 ))
1765+ var PetStoreJSONMessage = stdjson .RawMessage ([]byte (PetStore20 ))
17641766
17651767// PetStore20 json doc for swagger 2.0 pet store
17661768const PetStore20 = `{
0 commit comments