diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index d51d882..07a0c67 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -27,20 +27,20 @@ jobs: - name: golangci-lint uses: golangci/golangci-lint-action@v8 with: - version: v2.8 + version: v2.12 build: name: Build runs-on: ubuntu-latest steps: + - name: Checkout code + uses: actions/checkout@v3 + - name: Set up Go 1.x uses: actions/setup-go@v3 with: - go-version: 1.25 + go-version-file: go.mod id: go - - name: Checkout code - uses: actions/checkout@v3 - - name: Get dependencies run: | go get -v -t -d ./... diff --git a/cache/cache.go b/cache/cache.go index ef09fdb..6130711 100644 --- a/cache/cache.go +++ b/cache/cache.go @@ -4,9 +4,9 @@ package cache import ( + "github.com/pb33f/go-yaml" "github.com/pb33f/libopenapi/datamodel/high/base" "github.com/santhosh-tekuri/jsonschema/v6" - "go.yaml.in/yaml/v4" ) // SchemaCacheEntry holds a compiled schema and its intermediate representations. diff --git a/content/content.go b/content/content.go index e657f48..ad45939 100644 --- a/content/content.go +++ b/content/content.go @@ -27,8 +27,8 @@ import ( "strings" "time" + "github.com/pb33f/go-yaml" "github.com/pb33f/libopenapi/datamodel/high/base" - "go.yaml.in/yaml/v4" v3 "github.com/pb33f/libopenapi/datamodel/high/v3" ) diff --git a/errors/parameter_errors_test.go b/errors/parameter_errors_test.go index 0e9e83c..738cb56 100644 --- a/errors/parameter_errors_test.go +++ b/errors/parameter_errors_test.go @@ -7,11 +7,11 @@ import ( "context" "testing" + "github.com/pb33f/go-yaml" "github.com/pb33f/libopenapi/datamodel/high/base" "github.com/pb33f/libopenapi/datamodel/low" "github.com/pb33f/libopenapi/orderedmap" "github.com/pb33f/testify/require" - "go.yaml.in/yaml/v4" v3 "github.com/pb33f/libopenapi/datamodel/high/v3" lowbase "github.com/pb33f/libopenapi/datamodel/low/base" diff --git a/errors/request_errors_test.go b/errors/request_errors_test.go index cc41d72..1e12793 100644 --- a/errors/request_errors_test.go +++ b/errors/request_errors_test.go @@ -7,10 +7,10 @@ import ( "net/http" "testing" + "github.com/pb33f/go-yaml" "github.com/pb33f/libopenapi/datamodel/low" "github.com/pb33f/libopenapi/orderedmap" "github.com/pb33f/testify/require" - "go.yaml.in/yaml/v4" v3 "github.com/pb33f/libopenapi/datamodel/high/v3" lowv3 "github.com/pb33f/libopenapi/datamodel/low/v3" diff --git a/errors/response_errors_test.go b/errors/response_errors_test.go index 1cd4b1c..7ba2cde 100644 --- a/errors/response_errors_test.go +++ b/errors/response_errors_test.go @@ -7,10 +7,10 @@ import ( "net/http" "testing" + "github.com/pb33f/go-yaml" "github.com/pb33f/libopenapi/datamodel/low" "github.com/pb33f/libopenapi/orderedmap" "github.com/pb33f/testify/require" - "go.yaml.in/yaml/v4" v3 "github.com/pb33f/libopenapi/datamodel/high/v3" lowv3 "github.com/pb33f/libopenapi/datamodel/low/v3" diff --git a/errors/spec_line_col.go b/errors/spec_line_col.go index 0c679ee..824c1c3 100644 --- a/errors/spec_line_col.go +++ b/errors/spec_line_col.go @@ -4,7 +4,7 @@ package errors import ( - "go.yaml.in/yaml/v4" + "github.com/pb33f/go-yaml" v3 "github.com/pb33f/libopenapi/datamodel/high/v3" diff --git a/go.mod b/go.mod index 95b8805..0ecb8f7 100644 --- a/go.mod +++ b/go.mod @@ -1,17 +1,17 @@ module github.com/pb33f/libopenapi-validator -go 1.25.7 +go 1.26.0 require ( github.com/basgys/goxml2json v1.1.1-0.20231018121955-e66ee54ceaad github.com/dlclark/regexp2 v1.12.0 github.com/go-openapi/jsonpointer v0.23.2 github.com/goccy/go-yaml v1.19.2 - github.com/pb33f/jsonpath v0.8.2 - github.com/pb33f/libopenapi v0.38.6 - github.com/pb33f/testify v0.1.0 + github.com/pb33f/go-yaml v0.1.0 + github.com/pb33f/jsonpath v0.8.4 + github.com/pb33f/libopenapi v0.41.1 + github.com/pb33f/testify v0.1.1 github.com/santhosh-tekuri/jsonschema/v6 v6.0.2 - go.yaml.in/yaml/v4 v4.0.0-rc.6 golang.org/x/text v0.38.0 ) @@ -19,7 +19,7 @@ require ( github.com/bahlo/generic-list-go v0.2.0 // indirect github.com/buger/jsonparser v1.1.2 // indirect github.com/go-openapi/swag/jsonname v0.26.1 // indirect - github.com/pb33f/ordered-map/v2 v2.3.1 // indirect + github.com/pb33f/ordered-map/v2 v2.3.2 // indirect golang.org/x/net v0.50.0 // indirect - golang.org/x/sync v0.21.0 // indirect + golang.org/x/sync v0.23.0 // indirect ) diff --git a/go.sum b/go.sum index 2b88717..03722d2 100644 --- a/go.sum +++ b/go.sum @@ -19,14 +19,16 @@ github.com/go-openapi/testify/v2 v2.6.0 h1:5PKH2HE7YJ/LuRPQGvSxBRlFXNQhSetBLlGAg github.com/go-openapi/testify/v2 v2.6.0/go.mod h1:SgsVHtfooshd0tublTtJ50FPKhujf47YRqauXXOUxfw= github.com/goccy/go-yaml v1.19.2 h1:PmFC1S6h8ljIz6gMRBopkjP1TVT7xuwrButHID66PoM= github.com/goccy/go-yaml v1.19.2/go.mod h1:XBurs7gK8ATbW4ZPGKgcbrY1Br56PdM69F7LkFRi1kA= -github.com/pb33f/jsonpath v0.8.2 h1:Ou4C7zjYClBm97dfZjDCjdZGusJoynv/vrtiEKNfj2Y= -github.com/pb33f/jsonpath v0.8.2/go.mod h1:zBV5LJW4OQOPatmQE2QdKpGQJvhDTlE5IEj6ASaRNTo= -github.com/pb33f/libopenapi v0.38.6 h1:rnLshOSCSLx3JmN/MnftyYcdN1FfaeRkbaBE/ZHdIXg= -github.com/pb33f/libopenapi v0.38.6/go.mod h1:8yHl64vr+ICrnzSgiwJmZ54heRqCqrhI/JL1ge+CPIY= -github.com/pb33f/ordered-map/v2 v2.3.1 h1:5319HDO0aw4DA4gzi+zv4FXU9UlSs3xGZ40wcP1nBjY= -github.com/pb33f/ordered-map/v2 v2.3.1/go.mod h1:qxFQgd0PkVUtOMCkTapqotNgzRhMPL7VvaHKbd1HnmQ= -github.com/pb33f/testify v0.1.0 h1:g48/HDU/jn2COspS4nM0scptxiKTJ4DnbX/4ehK6IZ8= -github.com/pb33f/testify v0.1.0/go.mod h1:nq283P/jJ8hXMmdhAqfj7BJIz0y+6IOHj9q0044rKt4= +github.com/pb33f/go-yaml v0.1.0 h1:zZ6Gg+ATbumXlXZNLMHIe7+zTkVqe20lx+TSYRrXEuY= +github.com/pb33f/go-yaml v0.1.0/go.mod h1:QvWdkHP5VjFYAeHMQUkaPQqREaQnBNOXmWzAjNrnSdo= +github.com/pb33f/jsonpath v0.8.4 h1:Yx7fxsKl8scgERL22WhKDs2c6gYNNUonPSWEG8Y194s= +github.com/pb33f/jsonpath v0.8.4/go.mod h1:eO6mgdhw5RgzCxm/bXTi75VUs0/cCYJzdGjMCCUEI6M= +github.com/pb33f/libopenapi v0.41.1 h1:k2TzRNoFWdwtgZK8LpmqIHIPxD/6nExHkmB7QZXBets= +github.com/pb33f/libopenapi v0.41.1/go.mod h1:okMH18Y4oyUXUSCr84u+hHe7t/gWDwoHv/f3CEls4SQ= +github.com/pb33f/ordered-map/v2 v2.3.2 h1:wDyaZ2Pv9QLh64X4utCeD5Zoi9nIv2aW3lwv172O5PQ= +github.com/pb33f/ordered-map/v2 v2.3.2/go.mod h1:1OhFrXu3OYw3kM+FXF+Ug3ugmmZ9LE8z0JfQMLvtV0w= +github.com/pb33f/testify v0.1.1 h1:mnHe7uxKt8dyNYEGUspow72VjD264DB5rOJq4bz5tJw= +github.com/pb33f/testify v0.1.1/go.mod h1:keghMqOLECF1ENzESnfM+cwPcKN5uhTOpvbtjgL6aZg= 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/santhosh-tekuri/jsonschema/v6 v6.0.2 h1:KRzFb2m7YtdldCEkzs6KqmJw4nqEVZGK7IN2kJkjTuQ= @@ -36,8 +38,6 @@ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U= github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= -go.yaml.in/yaml/v4 v4.0.0-rc.6 h1:1h7H1ohdUh93/FyE4YaDa1Zh64K6VVbjF4K6WUxMtH4= -go.yaml.in/yaml/v4 v4.0.0-rc.6/go.mod h1:aZqd9kCMsGL7AuUv/m/PvWLdg5sjJsZ4oHDEnfPPfY0= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.11.0/go.mod h1:xgJhtzW8F9jGdVFWZESrid1U1bjeNy4zgy5cRr/CIio= @@ -54,8 +54,8 @@ golang.org/x/net v0.50.0/go.mod h1:UgoSli3F/pBgdJBHCTc+tp3gmrU4XswgGRgtnwWTfyM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.21.0 h1:HLII4xRRTtCRkxYp4HNFF0Js/Og6q2i++KXbg0gHCwM= -golang.org/x/sync v0.21.0/go.mod h1:9xrNwdLfx4jkKbNva9FpL6vEN7evnE43NNNJQ2LF3+0= +golang.org/x/sync v0.23.0 h1:KameEIfc1IkluZyXWLn39Wd4tURc6GbCiISGiZm2bQk= +golang.org/x/sync v0.23.0/go.mod h1:sUUOizhqBxiL6pEWpqNLUiaJn1ShEbZ6BBqskPbjZm0= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= diff --git a/kin_parity_test.go b/kin_parity_test.go index c4b2a10..0faed44 100644 --- a/kin_parity_test.go +++ b/kin_parity_test.go @@ -14,11 +14,11 @@ import ( "sync/atomic" "testing" + "github.com/pb33f/go-yaml" "github.com/pb33f/libopenapi" "github.com/pb33f/libopenapi/datamodel/high/base" "github.com/pb33f/testify/assert" "github.com/pb33f/testify/require" - "go.yaml.in/yaml/v4" v3 "github.com/pb33f/libopenapi/datamodel/high/v3" diff --git a/request_defaults.go b/request_defaults.go index 6e9979e..6d72679 100644 --- a/request_defaults.go +++ b/request_defaults.go @@ -11,8 +11,8 @@ import ( "net/url" "strings" + "github.com/pb33f/go-yaml" "github.com/pb33f/libopenapi/datamodel/high/base" - "go.yaml.in/yaml/v4" v3 "github.com/pb33f/libopenapi/datamodel/high/v3" diff --git a/requests/validate_request.go b/requests/validate_request.go index e760f85..6f4954f 100644 --- a/requests/validate_request.go +++ b/requests/validate_request.go @@ -12,9 +12,9 @@ import ( "regexp" "strconv" + "github.com/pb33f/go-yaml" "github.com/pb33f/libopenapi/datamodel/high/base" "github.com/santhosh-tekuri/jsonschema/v6" - "go.yaml.in/yaml/v4" "golang.org/x/text/language" "golang.org/x/text/message" diff --git a/responses/validate_response.go b/responses/validate_response.go index e307b86..66013b6 100644 --- a/responses/validate_response.go +++ b/responses/validate_response.go @@ -14,9 +14,9 @@ import ( "regexp" "strconv" + "github.com/pb33f/go-yaml" "github.com/pb33f/libopenapi/datamodel/high/base" "github.com/santhosh-tekuri/jsonschema/v6" - "go.yaml.in/yaml/v4" "golang.org/x/text/language" "golang.org/x/text/message" diff --git a/schema_validation/directional_schema.go b/schema_validation/directional_schema.go index 1260516..52ea352 100644 --- a/schema_validation/directional_schema.go +++ b/schema_validation/directional_schema.go @@ -8,9 +8,9 @@ import ( "fmt" "math" + "github.com/pb33f/go-yaml" "github.com/pb33f/libopenapi/datamodel/high/base" "github.com/pb33f/libopenapi/utils" - "go.yaml.in/yaml/v4" ) // SchemaValidationPurpose identifies the context in which a schema is compiled. diff --git a/schema_validation/directional_schema_test.go b/schema_validation/directional_schema_test.go index 5b5ad6a..52b950b 100644 --- a/schema_validation/directional_schema_test.go +++ b/schema_validation/directional_schema_test.go @@ -9,11 +9,11 @@ import ( "strings" "testing" + "github.com/pb33f/go-yaml" "github.com/pb33f/libopenapi" "github.com/pb33f/libopenapi/datamodel/high/base" "github.com/pb33f/testify/assert" "github.com/pb33f/testify/require" - "go.yaml.in/yaml/v4" ) func TestRenderSchemaForValidation_DirectionalRequiredProperties(t *testing.T) { diff --git a/schema_validation/locate_schema_property.go b/schema_validation/locate_schema_property.go index 9d70bd1..674c595 100644 --- a/schema_validation/locate_schema_property.go +++ b/schema_validation/locate_schema_property.go @@ -7,10 +7,10 @@ import ( "net/url" "strings" + "github.com/pb33f/go-yaml" "github.com/pb33f/jsonpath/pkg/jsonpath" "github.com/pb33f/jsonpath/pkg/jsonpath/config" "github.com/pb33f/libopenapi/utils" - "go.yaml.in/yaml/v4" ) // LocateSchemaPropertyNodeByJSONPath will locate a schema property node by a JSONPath. It converts something like diff --git a/schema_validation/locate_schema_property_test.go b/schema_validation/locate_schema_property_test.go index 3e3e1fb..c15ec3b 100644 --- a/schema_validation/locate_schema_property_test.go +++ b/schema_validation/locate_schema_property_test.go @@ -6,9 +6,9 @@ package schema_validation import ( "testing" + "github.com/pb33f/go-yaml" "github.com/pb33f/testify/assert" "github.com/pb33f/testify/require" - "go.yaml.in/yaml/v4" ) func TestLocateSchemaPropertyNodeByJSONPath_BadNode(t *testing.T) { diff --git a/schema_validation/property_locator.go b/schema_validation/property_locator.go index dce4377..539a444 100644 --- a/schema_validation/property_locator.go +++ b/schema_validation/property_locator.go @@ -7,8 +7,8 @@ import ( "regexp" "strings" + "github.com/pb33f/go-yaml" "github.com/santhosh-tekuri/jsonschema/v6" - "go.yaml.in/yaml/v4" liberrors "github.com/pb33f/libopenapi-validator/errors" "github.com/pb33f/libopenapi-validator/helpers" diff --git a/schema_validation/property_locator_test.go b/schema_validation/property_locator_test.go index d7aa2df..6bc52df 100644 --- a/schema_validation/property_locator_test.go +++ b/schema_validation/property_locator_test.go @@ -6,9 +6,9 @@ package schema_validation import ( "testing" + "github.com/pb33f/go-yaml" "github.com/pb33f/libopenapi" "github.com/pb33f/testify/assert" - "go.yaml.in/yaml/v4" ) func TestExtractPropertyNameFromError_InvalidPropertyName(t *testing.T) { diff --git a/schema_validation/schema_resources.go b/schema_validation/schema_resources.go index c881b7f..e2ad918 100644 --- a/schema_validation/schema_resources.go +++ b/schema_validation/schema_resources.go @@ -10,11 +10,12 @@ import ( "strconv" "strings" + "github.com/pb33f/go-yaml" "github.com/pb33f/libopenapi/datamodel/high/base" + lowbase "github.com/pb33f/libopenapi/datamodel/low/base" "github.com/pb33f/libopenapi/index" "github.com/pb33f/libopenapi/utils" "github.com/santhosh-tekuri/jsonschema/v6" - "go.yaml.in/yaml/v4" "github.com/pb33f/libopenapi-validator/cache" "github.com/pb33f/libopenapi-validator/config" @@ -298,7 +299,7 @@ func buildSchemaDocumentResources( return nil, nil } - schemaPointer, ok := jsonPointerForNode(schemaIndex.GetRootNode(), schema.GoLow().GetRootNode()) + schemaIndex, schemaPointer, ok := schemaRootLocation(schema.GoLow()) if !ok { return nil, fmt.Errorf("schema node was not found in its root document") } @@ -665,6 +666,26 @@ func pruneDirectionalRequiredEverywhere(node *yaml.Node, purpose SchemaValidatio } } +// schemaRootLocation returns the index whose document holds the schema's root node, and the node's JSON pointer +// in that document. A schema built from a $ref reports the index of the file its content came from (libopenapi +// v0.39 and later), while its root node stays the authored $ref node, in the file of its parent proxy. +func schemaRootLocation(lowSchema *lowbase.Schema) (*index.SpecIndex, string, bool) { + rootNode := lowSchema.GetRootNode() + candidates := []*index.SpecIndex{lowSchema.GetIndex()} + if lowSchema.ParentProxy != nil { + candidates = append(candidates, lowSchema.ParentProxy.GetIndex()) + } + for _, idx := range candidates { + if idx == nil { + continue + } + if pointer, ok := jsonPointerForNode(idx.GetRootNode(), rootNode); ok { + return idx, pointer, true + } + } + return nil, "", false +} + // jsonPointerForNode returns the RFC 6901 pointer to targetNode relative to rootNode. func jsonPointerForNode(rootNode, targetNode *yaml.Node) (string, bool) { if rootNode == nil || targetNode == nil { diff --git a/schema_validation/schema_resources_test.go b/schema_validation/schema_resources_test.go index 5ab1a63..f228bd1 100644 --- a/schema_validation/schema_resources_test.go +++ b/schema_validation/schema_resources_test.go @@ -4,18 +4,19 @@ package schema_validation import ( + "context" "os" "path/filepath" "strings" "testing" + "github.com/pb33f/go-yaml" "github.com/pb33f/libopenapi" "github.com/pb33f/libopenapi/datamodel" "github.com/pb33f/libopenapi/datamodel/high/base" "github.com/pb33f/libopenapi/index" "github.com/pb33f/testify/assert" "github.com/pb33f/testify/require" - "go.yaml.in/yaml/v4" lowbase "github.com/pb33f/libopenapi/datamodel/low/base" @@ -1307,3 +1308,35 @@ components: "name": "Desk", })) } + +func TestSchemaRootLocation(t *testing.T) { + doc, err := libopenapi.NewDocument([]byte(`openapi: 3.1.0 +info: + title: Test + version: 1.0.0 +components: + schemas: + Pet: + type: object`)) + require.NoError(t, err) + model, errs := doc.BuildV3Model() + require.Empty(t, errs) + + // a schema whose root node is in its own index's document. + pet := model.Model.Components.Schemas.GetOrZero("Pet").Schema().GoLow() + idx, pointer, ok := schemaRootLocation(pet) + require.True(t, ok) + assert.Same(t, pet.GetIndex(), idx) + assert.Equal(t, "/components/schemas/Pet", pointer) + + // a root node in no candidate document, with a parent proxy that has no index. + var detached yaml.Node + require.NoError(t, yaml.Unmarshal([]byte("type: string"), &detached)) + orphan := new(lowbase.Schema) + require.NoError(t, orphan.Build(context.Background(), detached.Content[0], pet.GetIndex())) + orphan.ParentProxy = new(lowbase.SchemaProxy) + idx, pointer, ok = schemaRootLocation(orphan) + assert.False(t, ok) + assert.Nil(t, idx) + assert.Empty(t, pointer) +} diff --git a/schema_validation/validate_document.go b/schema_validation/validate_document.go index 02f838d..4db2fca 100644 --- a/schema_validation/validate_document.go +++ b/schema_validation/validate_document.go @@ -11,9 +11,9 @@ import ( "strconv" "strings" + "github.com/pb33f/go-yaml" "github.com/pb33f/libopenapi" "github.com/santhosh-tekuri/jsonschema/v6" - "go.yaml.in/yaml/v4" "golang.org/x/text/language" "golang.org/x/text/message" diff --git a/schema_validation/validate_document_test.go b/schema_validation/validate_document_test.go index 662d110..c5b10ad 100644 --- a/schema_validation/validate_document_test.go +++ b/schema_validation/validate_document_test.go @@ -8,10 +8,10 @@ import ( "os" "testing" + "github.com/pb33f/go-yaml" "github.com/pb33f/libopenapi" "github.com/pb33f/libopenapi/datamodel" "github.com/pb33f/testify/assert" - "go.yaml.in/yaml/v4" "github.com/pb33f/libopenapi-validator/config" liberrors "github.com/pb33f/libopenapi-validator/errors" diff --git a/schema_validation/validate_schema.go b/schema_validation/validate_schema.go index 425eb59..79274e6 100644 --- a/schema_validation/validate_schema.go +++ b/schema_validation/validate_schema.go @@ -14,9 +14,9 @@ import ( "regexp" "strconv" + "github.com/pb33f/go-yaml" "github.com/pb33f/libopenapi/datamodel/high/base" "github.com/santhosh-tekuri/jsonschema/v6" - "go.yaml.in/yaml/v4" "golang.org/x/text/language" "golang.org/x/text/message" diff --git a/schema_validation/validate_schema_extract_errors_test.go b/schema_validation/validate_schema_extract_errors_test.go index 2572931..8885ec7 100644 --- a/schema_validation/validate_schema_extract_errors_test.go +++ b/schema_validation/validate_schema_extract_errors_test.go @@ -6,10 +6,10 @@ package schema_validation import ( "testing" + "github.com/pb33f/go-yaml" "github.com/pb33f/testify/assert" "github.com/pb33f/testify/require" "github.com/santhosh-tekuri/jsonschema/v6" - "go.yaml.in/yaml/v4" "golang.org/x/text/message" ) diff --git a/schema_validation/validate_schema_test.go b/schema_validation/validate_schema_test.go index afd5d55..7f4be9c 100644 --- a/schema_validation/validate_schema_test.go +++ b/schema_validation/validate_schema_test.go @@ -7,11 +7,11 @@ import ( "encoding/json" "testing" + "github.com/pb33f/go-yaml" "github.com/pb33f/libopenapi" "github.com/pb33f/libopenapi-validator/cache" "github.com/pb33f/libopenapi-validator/config" "github.com/pb33f/testify/assert" - "go.yaml.in/yaml/v4" ) func TestLocateSchemaPropertyNodeByJSONPath(t *testing.T) {