diff --git a/arazzo/arazzo_order_test.go b/arazzo/arazzo_order_test.go index fcebe7d6..2e9cfffc 100644 --- a/arazzo/arazzo_order_test.go +++ b/arazzo/arazzo_order_test.go @@ -10,7 +10,7 @@ import ( "github.com/speakeasy-api/openapi/expression" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v3" ) func TestArazzo_ArrayOrdering_ReorderWorkflows_Success(t *testing.T) { diff --git a/arazzo/arazzo_test.go b/arazzo/arazzo_test.go index 506c27fe..2f0f1b52 100644 --- a/arazzo/arazzo_test.go +++ b/arazzo/arazzo_test.go @@ -25,7 +25,7 @@ import ( "github.com/speakeasy-api/openapi/yml" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v3" ) // TODO make it possible to choose json or yaml output diff --git a/arazzo/core/criterion.go b/arazzo/core/criterion.go index 50b3c9ef..7903bc6b 100644 --- a/arazzo/core/criterion.go +++ b/arazzo/core/criterion.go @@ -11,7 +11,7 @@ import ( "github.com/speakeasy-api/openapi/marshaller" "github.com/speakeasy-api/openapi/validation" "github.com/speakeasy-api/openapi/yml" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v3" ) type CriterionExpressionType struct { diff --git a/arazzo/core/criterion_syncchanges_test.go b/arazzo/core/criterion_syncchanges_test.go index 7c02ef96..5ba88eb8 100644 --- a/arazzo/core/criterion_syncchanges_test.go +++ b/arazzo/core/criterion_syncchanges_test.go @@ -6,7 +6,7 @@ import ( "github.com/speakeasy-api/openapi/pointer" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v3" ) func TestCriterionTypeUnion_SyncChanges_WithStringType_Success(t *testing.T) { diff --git a/arazzo/core/criterion_test.go b/arazzo/core/criterion_test.go index fb35a1d5..b159ea40 100644 --- a/arazzo/core/criterion_test.go +++ b/arazzo/core/criterion_test.go @@ -7,7 +7,7 @@ import ( "github.com/speakeasy-api/openapi/marshaller" "github.com/speakeasy-api/openapi/pointer" "github.com/stretchr/testify/require" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v3" ) func createCriterionWithRootNode(c Criterion, rootNode *yaml.Node) Criterion { diff --git a/arazzo/core/reusable.go b/arazzo/core/reusable.go index c9022a16..db91ecdb 100644 --- a/arazzo/core/reusable.go +++ b/arazzo/core/reusable.go @@ -11,7 +11,7 @@ import ( "github.com/speakeasy-api/openapi/validation" values "github.com/speakeasy-api/openapi/values/core" "github.com/speakeasy-api/openapi/yml" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v3" ) type Reusable[T marshaller.CoreModeler] struct { diff --git a/arazzo/core/reusable_test.go b/arazzo/core/reusable_test.go index 96aeea43..bdebba07 100644 --- a/arazzo/core/reusable_test.go +++ b/arazzo/core/reusable_test.go @@ -5,7 +5,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v3" ) func TestReusable_Unmarshal_WithReference_Success(t *testing.T) { diff --git a/arazzo/criterion/condition.go b/arazzo/criterion/condition.go index 1289a91c..137b709d 100644 --- a/arazzo/criterion/condition.go +++ b/arazzo/criterion/condition.go @@ -7,7 +7,7 @@ import ( "github.com/speakeasy-api/openapi/expression" "github.com/speakeasy-api/openapi/validation" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v3" ) // Operator represents the operator used to compare the value of a criterion. diff --git a/arazzo/requestbody_test.go b/arazzo/requestbody_test.go index 8f8cbe7b..1f18ce89 100644 --- a/arazzo/requestbody_test.go +++ b/arazzo/requestbody_test.go @@ -8,7 +8,7 @@ import ( "github.com/speakeasy-api/openapi/marshaller" "github.com/speakeasy-api/openapi/pointer" "github.com/stretchr/testify/assert" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v3" ) func TestRequestBody_Validate_JSONPathInPayload_Success(t *testing.T) { diff --git a/arazzo/reusable.go b/arazzo/reusable.go index d7a2c0a0..78c804ec 100644 --- a/arazzo/reusable.go +++ b/arazzo/reusable.go @@ -15,7 +15,7 @@ import ( "github.com/speakeasy-api/openapi/sequencedmap" "github.com/speakeasy-api/openapi/validation" "github.com/speakeasy-api/openapi/values" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v3" ) type ( diff --git a/arazzo/successaction.go b/arazzo/successaction.go index 8fc3e5e0..70ed3cb5 100644 --- a/arazzo/successaction.go +++ b/arazzo/successaction.go @@ -15,7 +15,7 @@ import ( "github.com/speakeasy-api/openapi/pointer" "github.com/speakeasy-api/openapi/validation" walkpkg "github.com/speakeasy-api/openapi/walk" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v3" ) // SuccessActionType represents the type of action to take on success. diff --git a/cmd/openapi/commands/openapi/bootstrap.go b/cmd/openapi/commands/openapi/bootstrap.go index 6ab6313a..112caa38 100644 --- a/cmd/openapi/commands/openapi/bootstrap.go +++ b/cmd/openapi/commands/openapi/bootstrap.go @@ -8,7 +8,7 @@ import ( "github.com/speakeasy-api/openapi/openapi" "github.com/speakeasy-api/openapi/yml" "github.com/spf13/cobra" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v3" ) var bootstrapCmd = &cobra.Command{ diff --git a/cmd/openapi/commands/overlay/apply.go b/cmd/openapi/commands/overlay/apply.go index 342c7167..0464da1a 100644 --- a/cmd/openapi/commands/overlay/apply.go +++ b/cmd/openapi/commands/overlay/apply.go @@ -8,7 +8,7 @@ import ( overlayPkg "github.com/speakeasy-api/openapi/overlay" "github.com/speakeasy-api/openapi/overlay/loader" "github.com/spf13/cobra" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v3" ) var ( diff --git a/cmd/openapi/commands/overlay/compare.go b/cmd/openapi/commands/overlay/compare.go index 630bc5c4..0ed303b9 100644 --- a/cmd/openapi/commands/overlay/compare.go +++ b/cmd/openapi/commands/overlay/compare.go @@ -8,7 +8,7 @@ import ( overlayPkg "github.com/speakeasy-api/openapi/overlay" "github.com/speakeasy-api/openapi/overlay/loader" "github.com/spf13/cobra" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v3" ) var ( diff --git a/cmd/openapi/go.mod b/cmd/openapi/go.mod index b862aa5a..7c5eb7a4 100644 --- a/cmd/openapi/go.mod +++ b/cmd/openapi/go.mod @@ -10,7 +10,7 @@ require ( github.com/speakeasy-api/openapi/openapi/linter/customrules v0.0.0-20260408022107-7a9aee7c092c github.com/spf13/cobra v1.10.1 github.com/stretchr/testify v1.11.1 - gopkg.in/yaml.v3 v3.0.1 + go.yaml.in/yaml/v3 v3.0.4 ) require ( @@ -46,4 +46,5 @@ require ( golang.org/x/sync v0.20.0 // indirect golang.org/x/sys v0.36.0 // indirect golang.org/x/text v0.35.0 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/cmd/openapi/go.sum b/cmd/openapi/go.sum index cc340e60..9d251e4b 100644 --- a/cmd/openapi/go.sum +++ b/cmd/openapi/go.sum @@ -101,6 +101,8 @@ github.com/vmware-labs/yaml-jsonpath v0.3.2 h1:/5QKeCBGdsInyDCyVNLbXyilb61MXGi9N github.com/vmware-labs/yaml-jsonpath v0.3.2/go.mod h1:U6whw1z03QyqgWdgXxvVnQ90zN1BWz5V+51Ewf8k+rQ= github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e h1:JVG44RsyaB9T2KIHavMF/ppJZNG9ZpyihvCd0w101no= github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e/go.mod h1:RbqR21r5mrJuqunuUZ/Dhy/avygyECGrLceyNeo4LiM= +go.yaml.in/yaml/v3 v3.0.4 h1:tfq32ie2Jv2UxXFdLJdh3jXuOzWiL1fo0bu/FbuKpbc= +go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg= golang.org/x/exp v0.0.0-20220909182711-5c715a9e8561 h1:MDc5xs78ZrZr3HMQugiXOAkSZtfTpbJLDr/lwfgO53E= golang.org/x/exp v0.0.0-20220909182711-5c715a9e8561/go.mod h1:cyybsKvd6eL0RnXn6p/Grxp8F5bW7iYuBgsNCOHpMYE= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= diff --git a/expression/core/value.go b/expression/core/value.go index 69effc25..5450a99b 100644 --- a/expression/core/value.go +++ b/expression/core/value.go @@ -1,5 +1,5 @@ package core -import "gopkg.in/yaml.v3" +import "go.yaml.in/yaml/v3" type ValueOrExpression = *yaml.Node diff --git a/expression/value.go b/expression/value.go index b549b637..47c74501 100644 --- a/expression/value.go +++ b/expression/value.go @@ -1,7 +1,7 @@ package expression import ( - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v3" ) // ValueOrExpression represents a raw value or expression in the Arazzo document. diff --git a/expression/value_test.go b/expression/value_test.go index bf125345..81183db0 100644 --- a/expression/value_test.go +++ b/expression/value_test.go @@ -6,7 +6,7 @@ import ( "github.com/speakeasy-api/openapi/expression" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v3" ) func TestGetValueOrExpressionValue_Success(t *testing.T) { diff --git a/extensions/core/extensions.go b/extensions/core/extensions.go index 333c4348..ce1f035b 100644 --- a/extensions/core/extensions.go +++ b/extensions/core/extensions.go @@ -5,7 +5,7 @@ import ( "github.com/speakeasy-api/openapi/marshaller" "github.com/speakeasy-api/openapi/sequencedmap" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v3" ) type ( diff --git a/extensions/core/extensions_test.go b/extensions/core/extensions_test.go index f2156518..85ace23d 100644 --- a/extensions/core/extensions_test.go +++ b/extensions/core/extensions_test.go @@ -11,7 +11,7 @@ import ( "github.com/speakeasy-api/openapi/sequencedmap" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v3" ) type TestCoreModel struct { diff --git a/extensions/extensions.go b/extensions/extensions.go index c527701c..5564734b 100644 --- a/extensions/extensions.go +++ b/extensions/extensions.go @@ -10,7 +10,7 @@ import ( "github.com/speakeasy-api/openapi/marshaller" "github.com/speakeasy-api/openapi/sequencedmap" "github.com/speakeasy-api/openapi/yml" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v3" ) const ( diff --git a/extensions/extensions_isequal_test.go b/extensions/extensions_isequal_test.go index a8852dda..109d0f88 100644 --- a/extensions/extensions_isequal_test.go +++ b/extensions/extensions_isequal_test.go @@ -4,7 +4,7 @@ import ( "testing" "github.com/stretchr/testify/assert" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v3" ) func TestExtensions_IsEqual_Success(t *testing.T) { diff --git a/extensions/extensions_test.go b/extensions/extensions_test.go index 88c1e0ec..fd6cc55a 100644 --- a/extensions/extensions_test.go +++ b/extensions/extensions_test.go @@ -13,7 +13,7 @@ import ( "github.com/speakeasy-api/openapi/sequencedmap" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v3" ) type ModelWithExtensions struct { diff --git a/go.mod b/go.mod index 3357473c..ece0afd5 100644 --- a/go.mod +++ b/go.mod @@ -7,9 +7,9 @@ require ( github.com/speakeasy-api/jsonpath v0.6.3 github.com/stretchr/testify v1.11.1 github.com/vmware-labs/yaml-jsonpath v0.3.2 + go.yaml.in/yaml/v3 v3.0.4 golang.org/x/sync v0.20.0 golang.org/x/text v0.35.0 - gopkg.in/yaml.v3 v3.0.1 ) require ( @@ -21,4 +21,5 @@ require ( golang.org/x/net v0.42.0 // indirect golang.org/x/sys v0.36.0 // indirect gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/go.sum b/go.sum index 68feff6e..2c527899 100644 --- a/go.sum +++ b/go.sum @@ -44,6 +44,8 @@ github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= github.com/vmware-labs/yaml-jsonpath v0.3.2 h1:/5QKeCBGdsInyDCyVNLbXyilb61MXGi9NP674f9Hobk= github.com/vmware-labs/yaml-jsonpath v0.3.2/go.mod h1:U6whw1z03QyqgWdgXxvVnQ90zN1BWz5V+51Ewf8k+rQ= +go.yaml.in/yaml/v3 v3.0.4 h1:tfq32ie2Jv2UxXFdLJdh3jXuOzWiL1fo0bu/FbuKpbc= +go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.42.0 h1:jzkYrhi3YQWD6MLBJcsklgQsoAcw89EcZbJw8Z614hs= golang.org/x/net v0.42.0/go.mod h1:FF1RA5d3u7nAYA4z2TkclSCKh68eSXtiFwcWQpPXdt8= diff --git a/hashing/hashing.go b/hashing/hashing.go index ae017929..10bff796 100644 --- a/hashing/hashing.go +++ b/hashing/hashing.go @@ -9,7 +9,7 @@ import ( "strings" "github.com/speakeasy-api/openapi/internal/interfaces" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v3" ) func Hash(v any) string { diff --git a/hashing/hashing_test.go b/hashing/hashing_test.go index e18bae7d..de20fdb3 100644 --- a/hashing/hashing_test.go +++ b/hashing/hashing_test.go @@ -14,7 +14,7 @@ import ( "github.com/speakeasy-api/openapi/yml" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v3" ) type testEnum string diff --git a/internal/interfaces/interfaces.go b/internal/interfaces/interfaces.go index e7494d79..2f09829f 100644 --- a/internal/interfaces/interfaces.go +++ b/internal/interfaces/interfaces.go @@ -6,7 +6,7 @@ import ( "reflect" "github.com/speakeasy-api/openapi/validation" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v3" ) type Validator[T any] interface { diff --git a/internal/interfaces/interfaces_test.go b/internal/interfaces/interfaces_test.go index 0dc1a45a..66716ae4 100644 --- a/internal/interfaces/interfaces_test.go +++ b/internal/interfaces/interfaces_test.go @@ -8,7 +8,7 @@ import ( "github.com/speakeasy-api/openapi/validation" "github.com/stretchr/testify/assert" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v3" ) // Test implementations for Model interface diff --git a/internal/testutils/utils.go b/internal/testutils/utils.go index c4c40007..685b3bae 100644 --- a/internal/testutils/utils.go +++ b/internal/testutils/utils.go @@ -15,7 +15,7 @@ import ( "github.com/speakeasy-api/openapi/yml" "github.com/stretchr/testify/assert" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v3" ) // TODO use these more in tests diff --git a/internal/testutils/utils_test.go b/internal/testutils/utils_test.go index e4f7ba06..c12a2b2b 100644 --- a/internal/testutils/utils_test.go +++ b/internal/testutils/utils_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/stretchr/testify/assert" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v3" ) func TestCreateStringYamlNode_Success(t *testing.T) { diff --git a/json/json.go b/json/json.go index 87f14e29..3996e6a6 100644 --- a/json/json.go +++ b/json/json.go @@ -9,7 +9,7 @@ import ( "strings" "github.com/speakeasy-api/openapi/yml" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v3" ) // YAMLToJSON converts a YAML node to JSON using a custom JSON writer that preserves formatting. diff --git a/json/json_test.go b/json/json_test.go index ab2f868a..a5fc1d8f 100644 --- a/json/json_test.go +++ b/json/json_test.go @@ -7,7 +7,7 @@ import ( "github.com/speakeasy-api/openapi/json" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v3" ) func TestYAMLToJSON_Success(t *testing.T) { diff --git a/jsonpointer/jsonpointer.go b/jsonpointer/jsonpointer.go index 042ee0bb..870cde1b 100644 --- a/jsonpointer/jsonpointer.go +++ b/jsonpointer/jsonpointer.go @@ -9,7 +9,7 @@ import ( "github.com/speakeasy-api/openapi/errors" "github.com/speakeasy-api/openapi/internal/interfaces" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v3" ) const ( diff --git a/jsonpointer/models_yaml_fallback_test.go b/jsonpointer/models_yaml_fallback_test.go index 5f175134..af876409 100644 --- a/jsonpointer/models_yaml_fallback_test.go +++ b/jsonpointer/models_yaml_fallback_test.go @@ -7,7 +7,7 @@ import ( "github.com/speakeasy-api/openapi/marshaller" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v3" ) // TestModel represents a simple model for testing YAML fallback diff --git a/jsonpointer/yamlnode.go b/jsonpointer/yamlnode.go index 541294fe..997dd4c1 100644 --- a/jsonpointer/yamlnode.go +++ b/jsonpointer/yamlnode.go @@ -4,7 +4,7 @@ import ( "fmt" "strconv" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v3" ) func getYamlNodeTarget(node *yaml.Node, currentPart navigationPart, stack []navigationPart, currentPath string, o *options) (any, []navigationPart, error) { diff --git a/jsonpointer/yamlnode_test.go b/jsonpointer/yamlnode_test.go index b94cc502..315f7371 100644 --- a/jsonpointer/yamlnode_test.go +++ b/jsonpointer/yamlnode_test.go @@ -5,7 +5,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v3" ) func TestGetTarget_YamlNode_Success(t *testing.T) { diff --git a/jsonschema/oas3/core/jsonschema_test.go b/jsonschema/oas3/core/jsonschema_test.go index 297fe11f..78dd94dc 100644 --- a/jsonschema/oas3/core/jsonschema_test.go +++ b/jsonschema/oas3/core/jsonschema_test.go @@ -6,7 +6,7 @@ import ( "github.com/speakeasy-api/openapi/marshaller" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v3" ) func TestJSONSchema_Unmarshal_BooleanValue_Success(t *testing.T) { diff --git a/jsonschema/oas3/core/xml_test.go b/jsonschema/oas3/core/xml_test.go index 493a8b86..ee462ff7 100644 --- a/jsonschema/oas3/core/xml_test.go +++ b/jsonschema/oas3/core/xml_test.go @@ -6,7 +6,7 @@ import ( "github.com/speakeasy-api/openapi/marshaller" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v3" ) func parseYAML(t *testing.T, yml string) *yaml.Node { diff --git a/jsonschema/oas3/resolution.go b/jsonschema/oas3/resolution.go index d4b5874f..9a451996 100644 --- a/jsonschema/oas3/resolution.go +++ b/jsonschema/oas3/resolution.go @@ -9,7 +9,7 @@ import ( "github.com/speakeasy-api/openapi/internal/utils" "github.com/speakeasy-api/openapi/marshaller" "github.com/speakeasy-api/openapi/references" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v3" ) // ResolveOptions represent the options available when resolving a JSON Schema reference. diff --git a/jsonschema/oas3/resolution_defs.go b/jsonschema/oas3/resolution_defs.go index 97b09daf..4d7dd86f 100644 --- a/jsonschema/oas3/resolution_defs.go +++ b/jsonschema/oas3/resolution_defs.go @@ -8,7 +8,7 @@ import ( "github.com/speakeasy-api/openapi/internal/utils" "github.com/speakeasy-api/openapi/jsonpointer" "github.com/speakeasy-api/openapi/references" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v3" ) // GetRootNoder is an interface for objects that can return a YAML root node. diff --git a/jsonschema/oas3/resolution_defs_test.go b/jsonschema/oas3/resolution_defs_test.go index e6ff438a..c3a47866 100644 --- a/jsonschema/oas3/resolution_defs_test.go +++ b/jsonschema/oas3/resolution_defs_test.go @@ -7,7 +7,7 @@ import ( "github.com/speakeasy-api/openapi/references" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v3" ) func TestTryResolveLocalDefs_NilAndBooleanSchema(t *testing.T) { diff --git a/jsonschema/oas3/resolution_external.go b/jsonschema/oas3/resolution_external.go index a97d1896..3dc116fb 100644 --- a/jsonschema/oas3/resolution_external.go +++ b/jsonschema/oas3/resolution_external.go @@ -9,7 +9,7 @@ import ( "github.com/speakeasy-api/openapi/jsonpointer" "github.com/speakeasy-api/openapi/marshaller" "github.com/speakeasy-api/openapi/references" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v3" ) // resolveExternalAnchorReference handles resolution of anchor references (e.g., "file.json#anchor") diff --git a/jsonschema/oas3/resolution_external_test.go b/jsonschema/oas3/resolution_external_test.go index ead1e742..fc94d7a3 100644 --- a/jsonschema/oas3/resolution_external_test.go +++ b/jsonschema/oas3/resolution_external_test.go @@ -10,7 +10,7 @@ import ( "github.com/speakeasy-api/openapi/marshaller" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v3" ) func TestResolveExternalAnchorReference_Success(t *testing.T) { diff --git a/jsonschema/oas3/resolution_test.go b/jsonschema/oas3/resolution_test.go index 5100bb26..dd8387fc 100644 --- a/jsonschema/oas3/resolution_test.go +++ b/jsonschema/oas3/resolution_test.go @@ -18,7 +18,7 @@ import ( "github.com/speakeasy-api/openapi/references" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v3" ) // MockResolutionTarget implements references.ResolutionTarget for testing diff --git a/jsonschema/oas3/schema_getters_test.go b/jsonschema/oas3/schema_getters_test.go index d7af313e..4a210445 100644 --- a/jsonschema/oas3/schema_getters_test.go +++ b/jsonschema/oas3/schema_getters_test.go @@ -10,7 +10,7 @@ import ( "github.com/speakeasy-api/openapi/sequencedmap" "github.com/speakeasy-api/openapi/values" "github.com/stretchr/testify/assert" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v3" ) func TestSchema_GetExclusiveMaximum_Success(t *testing.T) { diff --git a/jsonschema/oas3/schema_isequal_test.go b/jsonschema/oas3/schema_isequal_test.go index 5966a8cc..dd28c301 100644 --- a/jsonschema/oas3/schema_isequal_test.go +++ b/jsonschema/oas3/schema_isequal_test.go @@ -9,7 +9,7 @@ import ( "github.com/speakeasy-api/openapi/sequencedmap" "github.com/speakeasy-api/openapi/values" "github.com/stretchr/testify/assert" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v3" ) func TestSchema_IsEqual_Success(t *testing.T) { diff --git a/jsonschema/oas3/tests/go.mod b/jsonschema/oas3/tests/go.mod index 7fcaef6e..ea2a8d69 100644 --- a/jsonschema/oas3/tests/go.mod +++ b/jsonschema/oas3/tests/go.mod @@ -61,6 +61,7 @@ require ( go.opentelemetry.io/otel/metric v1.41.0 // indirect go.opentelemetry.io/otel/trace v1.41.0 // indirect go.opentelemetry.io/proto/otlp v1.7.1 // indirect + go.yaml.in/yaml/v3 v3.0.4 // indirect golang.org/x/crypto v0.48.0 // indirect golang.org/x/sync v0.20.0 // indirect golang.org/x/sys v0.41.0 // indirect diff --git a/jsonschema/oas3/tests/go.sum b/jsonschema/oas3/tests/go.sum index a682602f..ff0a8f84 100644 --- a/jsonschema/oas3/tests/go.sum +++ b/jsonschema/oas3/tests/go.sum @@ -137,6 +137,8 @@ go.opentelemetry.io/otel/trace v1.41.0 h1:Vbk2co6bhj8L59ZJ6/xFTskY+tGAbOnCtQGVVa go.opentelemetry.io/otel/trace v1.41.0/go.mod h1:U1NU4ULCoxeDKc09yCWdWe+3QoyweJcISEVa1RBzOis= go.opentelemetry.io/proto/otlp v1.7.1 h1:gTOMpGDb0WTBOP8JaO72iL3auEZhVmAQg4ipjOVAtj4= go.opentelemetry.io/proto/otlp v1.7.1/go.mod h1:b2rVh6rfI/s2pHWNlB7ILJcRALpcNDzKhACevjI+ZnE= +go.yaml.in/yaml/v3 v3.0.4 h1:tfq32ie2Jv2UxXFdLJdh3jXuOzWiL1fo0bu/FbuKpbc= +go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg= golang.org/x/crypto v0.48.0 h1:/VRzVqiRSggnhY7gNRxPauEQ5Drw9haKdM0jqfcCFts= golang.org/x/crypto v0.48.0/go.mod h1:r0kV5h3qnFPlQnBSrULhlsRfryS2pmewsg+XfMgkVos= golang.org/x/net v0.49.0 h1:eeHFmOGUTtaaPSGNmjBKpbng9MulQsJURQUAfUwY++o= diff --git a/jsonschema/oas3/validation.go b/jsonschema/oas3/validation.go index 07716155..893c8793 100644 --- a/jsonschema/oas3/validation.go +++ b/jsonschema/oas3/validation.go @@ -17,9 +17,9 @@ import ( "github.com/speakeasy-api/openapi/jsonschema/oas3/core" "github.com/speakeasy-api/openapi/marshaller" "github.com/speakeasy-api/openapi/validation" + "go.yaml.in/yaml/v3" "golang.org/x/text/language" "golang.org/x/text/message" - "gopkg.in/yaml.v3" ) // custom file to cover for missing openapi 3.0 json schema diff --git a/linter/config.go b/linter/config.go index 97d199e7..22b4a543 100644 --- a/linter/config.go +++ b/linter/config.go @@ -9,7 +9,7 @@ import ( "github.com/speakeasy-api/openapi/references" "github.com/speakeasy-api/openapi/validation" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v3" ) // Config represents the linter configuration diff --git a/linter/config_loader.go b/linter/config_loader.go index 0400cdf1..d2743081 100644 --- a/linter/config_loader.go +++ b/linter/config_loader.go @@ -5,7 +5,7 @@ import ( "io" "os" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v3" ) // LoadConfig loads lint configuration from a YAML reader. diff --git a/linter/fix/engine.go b/linter/fix/engine.go index c0cb5025..e4610430 100644 --- a/linter/fix/engine.go +++ b/linter/fix/engine.go @@ -7,7 +7,7 @@ import ( "github.com/speakeasy-api/openapi/openapi" "github.com/speakeasy-api/openapi/validation" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v3" ) // Mode controls how fixes are applied. diff --git a/linter/fix/engine_test.go b/linter/fix/engine_test.go index 1606c669..17181a3e 100644 --- a/linter/fix/engine_test.go +++ b/linter/fix/engine_test.go @@ -9,7 +9,7 @@ import ( "github.com/speakeasy-api/openapi/validation" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v3" ) // mockFix is a non-interactive fix for testing. diff --git a/linter/fix/terminal_prompter_test.go b/linter/fix/terminal_prompter_test.go index 3c8e0232..b9bc1be5 100644 --- a/linter/fix/terminal_prompter_test.go +++ b/linter/fix/terminal_prompter_test.go @@ -11,7 +11,7 @@ import ( "github.com/speakeasy-api/openapi/validation" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v3" ) func TestTerminalPrompter_Choice_Success(t *testing.T) { diff --git a/linter/format/format_test.go b/linter/format/format_test.go index ed42e411..8c7be52e 100644 --- a/linter/format/format_test.go +++ b/linter/format/format_test.go @@ -10,7 +10,7 @@ import ( "github.com/speakeasy-api/openapi/validation" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v3" ) // testFix is a minimal validation.Fix for testing formatter output. diff --git a/marshaller/coremodel.go b/marshaller/coremodel.go index 75f80c9f..5b341147 100644 --- a/marshaller/coremodel.go +++ b/marshaller/coremodel.go @@ -11,7 +11,7 @@ import ( "github.com/speakeasy-api/openapi/json" "github.com/speakeasy-api/openapi/validation" "github.com/speakeasy-api/openapi/yml" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v3" ) type CoreModeler interface { diff --git a/marshaller/coremodel_getters_test.go b/marshaller/coremodel_getters_test.go index db1c035b..d7afba65 100644 --- a/marshaller/coremodel_getters_test.go +++ b/marshaller/coremodel_getters_test.go @@ -5,7 +5,7 @@ import ( "github.com/speakeasy-api/openapi/marshaller" "github.com/stretchr/testify/assert" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v3" ) func TestCoreModel_GetRootNodeLine_Success(t *testing.T) { diff --git a/marshaller/coremodel_jsonpath_test.go b/marshaller/coremodel_jsonpath_test.go index 5e4903ea..1296468a 100644 --- a/marshaller/coremodel_jsonpath_test.go +++ b/marshaller/coremodel_jsonpath_test.go @@ -7,7 +7,7 @@ import ( "github.com/speakeasy-api/openapi/marshaller" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v3" ) func TestCoreModel_GetJSONPath_Success(t *testing.T) { diff --git a/marshaller/coremodel_jsonpointer_test.go b/marshaller/coremodel_jsonpointer_test.go index f4d34bfa..85310e3f 100644 --- a/marshaller/coremodel_jsonpointer_test.go +++ b/marshaller/coremodel_jsonpointer_test.go @@ -9,7 +9,7 @@ import ( "github.com/speakeasy-api/openapi/marshaller" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v3" ) func TestCoreModel_GetJSONPointer_Success(t *testing.T) { diff --git a/marshaller/extensions.go b/marshaller/extensions.go index 4f62ed60..670e044d 100644 --- a/marshaller/extensions.go +++ b/marshaller/extensions.go @@ -9,7 +9,7 @@ import ( "unsafe" "github.com/speakeasy-api/openapi/yml" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v3" ) type Extension = *yaml.Node diff --git a/marshaller/factory.go b/marshaller/factory.go index d9713980..2a682d49 100644 --- a/marshaller/factory.go +++ b/marshaller/factory.go @@ -7,7 +7,7 @@ import ( "sync" "github.com/speakeasy-api/openapi/sequencedmap" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v3" ) // TypeFactory represents a function that creates a new instance of a specific type diff --git a/marshaller/marshal.go b/marshaller/marshal.go index 8924231a..6bde7118 100644 --- a/marshaller/marshal.go +++ b/marshaller/marshal.go @@ -6,7 +6,7 @@ import ( "io" "github.com/speakeasy-api/openapi/yml" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v3" ) // Marshallable represents a high-level model that can be marshaled diff --git a/marshaller/model.go b/marshaller/model.go index ec7feae7..4d382cb8 100644 --- a/marshaller/model.go +++ b/marshaller/model.go @@ -4,7 +4,7 @@ import ( "reflect" "sync" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v3" ) // CoreAccessor provides type-safe access to the core field in models diff --git a/marshaller/model_test.go b/marshaller/model_test.go index 1e1822c1..b08556a9 100644 --- a/marshaller/model_test.go +++ b/marshaller/model_test.go @@ -6,7 +6,7 @@ import ( "github.com/speakeasy-api/openapi/marshaller" "github.com/speakeasy-api/openapi/marshaller/tests/core" "github.com/stretchr/testify/assert" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v3" ) // TestModel_GetPropertyNode_Success tests the GetPropertyNode method with valid inputs diff --git a/marshaller/node.go b/marshaller/node.go index f6190795..32b72caa 100644 --- a/marshaller/node.go +++ b/marshaller/node.go @@ -5,7 +5,7 @@ import ( "reflect" "github.com/speakeasy-api/openapi/yml" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v3" ) type NodeMutator interface { diff --git a/marshaller/node_test.go b/marshaller/node_test.go index d0085b03..4faa6ec9 100644 --- a/marshaller/node_test.go +++ b/marshaller/node_test.go @@ -5,7 +5,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v3" ) type testCase[T any] struct { diff --git a/marshaller/nodecollector.go b/marshaller/nodecollector.go index 39d1b5e2..c44efc71 100644 --- a/marshaller/nodecollector.go +++ b/marshaller/nodecollector.go @@ -3,7 +3,7 @@ package marshaller import ( "reflect" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v3" ) // NodeCollector provides utilities for collecting yaml.Node pointers from core models. diff --git a/marshaller/nodecollector_test.go b/marshaller/nodecollector_test.go index edc24445..97910d6a 100644 --- a/marshaller/nodecollector_test.go +++ b/marshaller/nodecollector_test.go @@ -6,7 +6,7 @@ import ( "github.com/speakeasy-api/openapi/marshaller" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v3" ) // Test models to verify CollectLeafNodes behavior diff --git a/marshaller/populator.go b/marshaller/populator.go index d5b75eb5..15ca1b8b 100644 --- a/marshaller/populator.go +++ b/marshaller/populator.go @@ -5,7 +5,7 @@ import ( "reflect" "github.com/speakeasy-api/openapi/internal/interfaces" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v3" ) // Pre-computed reflection types for performance diff --git a/marshaller/populator_unmarshalextensionmodel_test.go b/marshaller/populator_unmarshalextensionmodel_test.go index 6f3e422b..7928901b 100644 --- a/marshaller/populator_unmarshalextensionmodel_test.go +++ b/marshaller/populator_unmarshalextensionmodel_test.go @@ -11,7 +11,7 @@ import ( "github.com/speakeasy-api/openapi/sequencedmap" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v3" ) func init() { diff --git a/marshaller/sequencedmap.go b/marshaller/sequencedmap.go index 7ca7e248..0f32ac78 100644 --- a/marshaller/sequencedmap.go +++ b/marshaller/sequencedmap.go @@ -12,8 +12,8 @@ import ( "github.com/speakeasy-api/openapi/internal/utils" "github.com/speakeasy-api/openapi/validation" "github.com/speakeasy-api/openapi/yml" + "go.yaml.in/yaml/v3" "golang.org/x/sync/errgroup" - "gopkg.in/yaml.v3" ) // MapGetter interface for syncing operations diff --git a/marshaller/sequencedmap_test.go b/marshaller/sequencedmap_test.go index e4aa0767..672b3c04 100644 --- a/marshaller/sequencedmap_test.go +++ b/marshaller/sequencedmap_test.go @@ -8,7 +8,7 @@ import ( "github.com/speakeasy-api/openapi/sequencedmap" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v3" ) // SequencedMap test case for successful operations diff --git a/marshaller/syncer.go b/marshaller/syncer.go index ea529340..f3392076 100644 --- a/marshaller/syncer.go +++ b/marshaller/syncer.go @@ -7,7 +7,7 @@ import ( "github.com/speakeasy-api/openapi/internal/interfaces" "github.com/speakeasy-api/openapi/yml" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v3" ) type Syncer interface { diff --git a/marshaller/syncing_test.go b/marshaller/syncing_test.go index 3ea0d242..26fa3422 100644 --- a/marshaller/syncing_test.go +++ b/marshaller/syncing_test.go @@ -12,7 +12,7 @@ import ( "github.com/speakeasy-api/openapi/sequencedmap" "github.com/speakeasy-api/openapi/values" "github.com/stretchr/testify/require" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v3" ) func TestSync_PrimitiveTypes_Success(t *testing.T) { diff --git a/marshaller/tests/core/models.go b/marshaller/tests/core/models.go index a624300e..2931b3a4 100644 --- a/marshaller/tests/core/models.go +++ b/marshaller/tests/core/models.go @@ -8,7 +8,7 @@ import ( "github.com/speakeasy-api/openapi/marshaller" "github.com/speakeasy-api/openapi/sequencedmap" valuescore "github.com/speakeasy-api/openapi/values/core" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v3" ) // TestPrimitiveModel covers all primitive marshaller.Node field types diff --git a/marshaller/tests/models.go b/marshaller/tests/models.go index 4c699211..35bda40a 100644 --- a/marshaller/tests/models.go +++ b/marshaller/tests/models.go @@ -7,7 +7,7 @@ import ( "github.com/speakeasy-api/openapi/sequencedmap" "github.com/speakeasy-api/openapi/values" valuescore "github.com/speakeasy-api/openapi/values/core" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v3" ) // High-level model counterparts for population testing using marshaller.Model diff --git a/marshaller/unmarshaller.go b/marshaller/unmarshaller.go index b0f6ffef..e1e04d9e 100644 --- a/marshaller/unmarshaller.go +++ b/marshaller/unmarshaller.go @@ -12,8 +12,8 @@ import ( "github.com/speakeasy-api/openapi/internal/interfaces" "github.com/speakeasy-api/openapi/validation" "github.com/speakeasy-api/openapi/yml" + "go.yaml.in/yaml/v3" "golang.org/x/sync/errgroup" - "gopkg.in/yaml.v3" ) // Pre-computed reflection types for performance (reusing from populator.go where possible) diff --git a/marshaller/unmarshalling_test.go b/marshaller/unmarshalling_test.go index 021df20a..09c574f7 100644 --- a/marshaller/unmarshalling_test.go +++ b/marshaller/unmarshalling_test.go @@ -10,7 +10,7 @@ import ( "github.com/speakeasy-api/openapi/validation" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v3" ) func TestUnmarshal_PrimitiveTypes_Success(t *testing.T) { diff --git a/openapi/bootstrap_test.go b/openapi/bootstrap_test.go index 8c1309f2..4e9ed7ae 100644 --- a/openapi/bootstrap_test.go +++ b/openapi/bootstrap_test.go @@ -9,7 +9,7 @@ import ( "github.com/speakeasy-api/openapi/yml" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v3" ) func TestBootstrap_Success(t *testing.T) { diff --git a/openapi/core/callbacks.go b/openapi/core/callbacks.go index 38c8df6c..41928d7c 100644 --- a/openapi/core/callbacks.go +++ b/openapi/core/callbacks.go @@ -4,7 +4,7 @@ import ( "github.com/speakeasy-api/openapi/extensions/core" "github.com/speakeasy-api/openapi/marshaller" "github.com/speakeasy-api/openapi/sequencedmap" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v3" ) type Callback struct { diff --git a/openapi/core/callbacks_test.go b/openapi/core/callbacks_test.go index 0a3795a5..b2754986 100644 --- a/openapi/core/callbacks_test.go +++ b/openapi/core/callbacks_test.go @@ -6,7 +6,7 @@ import ( "github.com/speakeasy-api/openapi/marshaller" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v3" ) func TestNewCallback_Success(t *testing.T) { diff --git a/openapi/core/paths.go b/openapi/core/paths.go index 2a31581c..7329fb18 100644 --- a/openapi/core/paths.go +++ b/openapi/core/paths.go @@ -4,7 +4,7 @@ import ( "github.com/speakeasy-api/openapi/extensions/core" "github.com/speakeasy-api/openapi/marshaller" "github.com/speakeasy-api/openapi/sequencedmap" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v3" ) type Paths struct { diff --git a/openapi/core/paths_test.go b/openapi/core/paths_test.go index fca396be..1898ec23 100644 --- a/openapi/core/paths_test.go +++ b/openapi/core/paths_test.go @@ -6,7 +6,7 @@ import ( "github.com/speakeasy-api/openapi/marshaller" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v3" ) func TestNewPaths_Success(t *testing.T) { diff --git a/openapi/core/reference.go b/openapi/core/reference.go index ee5d2882..ca52f13e 100644 --- a/openapi/core/reference.go +++ b/openapi/core/reference.go @@ -10,7 +10,7 @@ import ( "github.com/speakeasy-api/openapi/marshaller" "github.com/speakeasy-api/openapi/validation" "github.com/speakeasy-api/openapi/yml" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v3" ) type Reference[T marshaller.CoreModeler] struct { diff --git a/openapi/core/reference_test.go b/openapi/core/reference_test.go index 99db6947..751dbfd3 100644 --- a/openapi/core/reference_test.go +++ b/openapi/core/reference_test.go @@ -7,7 +7,7 @@ import ( "github.com/speakeasy-api/openapi/pointer" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v3" ) func TestReference_Unmarshal_Success(t *testing.T) { diff --git a/openapi/core/responses.go b/openapi/core/responses.go index e9e9e423..3d535018 100644 --- a/openapi/core/responses.go +++ b/openapi/core/responses.go @@ -4,7 +4,7 @@ import ( "github.com/speakeasy-api/openapi/extensions/core" "github.com/speakeasy-api/openapi/marshaller" "github.com/speakeasy-api/openapi/sequencedmap" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v3" ) type Responses struct { diff --git a/openapi/core/responses_test.go b/openapi/core/responses_test.go index 292753be..fff18cc9 100644 --- a/openapi/core/responses_test.go +++ b/openapi/core/responses_test.go @@ -6,7 +6,7 @@ import ( "github.com/speakeasy-api/openapi/marshaller" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v3" ) func TestNewResponses_Success(t *testing.T) { diff --git a/openapi/core/security.go b/openapi/core/security.go index ec204904..449e959b 100644 --- a/openapi/core/security.go +++ b/openapi/core/security.go @@ -4,7 +4,7 @@ import ( "github.com/speakeasy-api/openapi/extensions/core" "github.com/speakeasy-api/openapi/marshaller" "github.com/speakeasy-api/openapi/sequencedmap" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v3" ) type SecurityScheme struct { diff --git a/openapi/core/security_test.go b/openapi/core/security_test.go index 6e962931..b340439a 100644 --- a/openapi/core/security_test.go +++ b/openapi/core/security_test.go @@ -6,7 +6,7 @@ import ( "github.com/speakeasy-api/openapi/marshaller" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v3" ) func TestNewSecurityRequirement_Success(t *testing.T) { diff --git a/openapi/index.go b/openapi/index.go index f9618e28..b56a9e25 100644 --- a/openapi/index.go +++ b/openapi/index.go @@ -13,7 +13,7 @@ import ( "github.com/speakeasy-api/openapi/pointer" "github.com/speakeasy-api/openapi/references" "github.com/speakeasy-api/openapi/validation" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v3" ) // CircularClassification represents the classification of a circular reference. diff --git a/openapi/index_node_operation_test.go b/openapi/index_node_operation_test.go index 475a0c6d..9de07738 100644 --- a/openapi/index_node_operation_test.go +++ b/openapi/index_node_operation_test.go @@ -8,7 +8,7 @@ import ( "github.com/speakeasy-api/openapi/references" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v3" ) func TestBuildIndex_NodeToOperations_WithOption_Success(t *testing.T) { diff --git a/openapi/linter/converter/generate.go b/openapi/linter/converter/generate.go index c8852bf9..85d7ce14 100644 --- a/openapi/linter/converter/generate.go +++ b/openapi/linter/converter/generate.go @@ -9,7 +9,7 @@ import ( "github.com/speakeasy-api/openapi/linter" "github.com/speakeasy-api/openapi/validation" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v3" ) // GenerateOptions configures the output generation. diff --git a/openapi/linter/converter/generate_test.go b/openapi/linter/converter/generate_test.go index cbbb9670..65a8859c 100644 --- a/openapi/linter/converter/generate_test.go +++ b/openapi/linter/converter/generate_test.go @@ -10,7 +10,7 @@ import ( "github.com/speakeasy-api/openapi/validation" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v3" ) func TestGenerate_SpectralBasic(t *testing.T) { diff --git a/openapi/linter/converter/parse.go b/openapi/linter/converter/parse.go index 778e1e53..21873b83 100644 --- a/openapi/linter/converter/parse.go +++ b/openapi/linter/converter/parse.go @@ -7,7 +7,7 @@ import ( "sort" "strconv" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v3" ) // Parse reads a Spectral, Vacuum, or Legacy Speakeasy config and returns diff --git a/openapi/linter/converter/tests/go.mod b/openapi/linter/converter/tests/go.mod index 7fed62f8..e8d850d8 100644 --- a/openapi/linter/converter/tests/go.mod +++ b/openapi/linter/converter/tests/go.mod @@ -22,6 +22,7 @@ require ( github.com/google/pprof v0.0.0-20230207041349-798e818bf904 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect github.com/santhosh-tekuri/jsonschema/v6 v6.0.2 // indirect + go.yaml.in/yaml/v3 v3.0.4 // indirect golang.org/x/sync v0.20.0 // indirect golang.org/x/sys v0.36.0 // indirect golang.org/x/text v0.35.0 // indirect diff --git a/openapi/linter/converter/tests/go.sum b/openapi/linter/converter/tests/go.sum index 7368a7ad..08f99ffb 100644 --- a/openapi/linter/converter/tests/go.sum +++ b/openapi/linter/converter/tests/go.sum @@ -26,6 +26,8 @@ github.com/speakeasy-api/jsonpath v0.6.3 h1:c+QPwzAOdrWvzycuc9HFsIZcxKIaWcNpC+xh github.com/speakeasy-api/jsonpath v0.6.3/go.mod h1:2cXloNuQ+RSXi5HTRaeBh7JEmjRXTiaKpFTdZiL7URI= github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U= github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= +go.yaml.in/yaml/v3 v3.0.4 h1:tfq32ie2Jv2UxXFdLJdh3jXuOzWiL1fo0bu/FbuKpbc= +go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg= golang.org/x/sync v0.20.0 h1:e0PTpb7pjO8GAtTs2dQ6jYa5BWYlMuX047Dco/pItO4= golang.org/x/sync v0.20.0/go.mod h1:9xrNwdLfx4jkKbNva9FpL6vEN7evnE43NNNJQ2LF3+0= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= diff --git a/openapi/linter/customrules/go.mod b/openapi/linter/customrules/go.mod index 6bba8300..b0a4247a 100644 --- a/openapi/linter/customrules/go.mod +++ b/openapi/linter/customrules/go.mod @@ -10,7 +10,7 @@ require ( github.com/go-sourcemap/sourcemap v2.1.4+incompatible github.com/speakeasy-api/openapi v1.22.1-0.20260408022107-7a9aee7c092c github.com/stretchr/testify v1.11.1 - gopkg.in/yaml.v3 v3.0.1 + go.yaml.in/yaml/v3 v3.0.4 ) require ( @@ -23,4 +23,5 @@ require ( golang.org/x/sync v0.20.0 // indirect golang.org/x/sys v0.36.0 // indirect golang.org/x/text v0.35.0 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/openapi/linter/customrules/go.sum b/openapi/linter/customrules/go.sum index 0dc15461..e9b2447b 100644 --- a/openapi/linter/customrules/go.sum +++ b/openapi/linter/customrules/go.sum @@ -27,6 +27,8 @@ github.com/speakeasy-api/jsonpath v0.6.3 h1:c+QPwzAOdrWvzycuc9HFsIZcxKIaWcNpC+xh github.com/speakeasy-api/jsonpath v0.6.3/go.mod h1:2cXloNuQ+RSXi5HTRaeBh7JEmjRXTiaKpFTdZiL7URI= github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U= github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= +go.yaml.in/yaml/v3 v3.0.4 h1:tfq32ie2Jv2UxXFdLJdh3jXuOzWiL1fo0bu/FbuKpbc= +go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg= golang.org/x/sync v0.20.0 h1:e0PTpb7pjO8GAtTs2dQ6jYa5BWYlMuX047Dco/pItO4= golang.org/x/sync v0.20.0/go.mod h1:9xrNwdLfx4jkKbNva9FpL6vEN7evnE43NNNJQ2LF3+0= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= diff --git a/openapi/linter/customrules/runtime.go b/openapi/linter/customrules/runtime.go index 6b906b81..986ac44c 100644 --- a/openapi/linter/customrules/runtime.go +++ b/openapi/linter/customrules/runtime.go @@ -7,7 +7,7 @@ import ( "github.com/dop251/goja" "github.com/speakeasy-api/openapi/validation" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v3" ) // Runtime wraps a goja JavaScript runtime with custom rule support. diff --git a/openapi/linter/linter_test.go b/openapi/linter/linter_test.go index 0f383326..9dab262c 100644 --- a/openapi/linter/linter_test.go +++ b/openapi/linter/linter_test.go @@ -20,7 +20,7 @@ import ( "github.com/speakeasy-api/openapi/validation" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v3" ) type mockVirtualFS struct { diff --git a/openapi/linter/rules/description_duplication.go b/openapi/linter/rules/description_duplication.go index a4725404..86bc2b80 100644 --- a/openapi/linter/rules/description_duplication.go +++ b/openapi/linter/rules/description_duplication.go @@ -8,7 +8,7 @@ import ( "github.com/speakeasy-api/openapi/openapi" "github.com/speakeasy-api/openapi/validation" "github.com/speakeasy-api/openapi/yml" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v3" ) const RuleStyleDescriptionDuplication = "style-description-duplication" diff --git a/openapi/linter/rules/duplicated_entry_in_enum.go b/openapi/linter/rules/duplicated_entry_in_enum.go index 5cf94507..a4b2e16f 100644 --- a/openapi/linter/rules/duplicated_entry_in_enum.go +++ b/openapi/linter/rules/duplicated_entry_in_enum.go @@ -7,7 +7,7 @@ import ( "github.com/speakeasy-api/openapi/linter" "github.com/speakeasy-api/openapi/openapi" "github.com/speakeasy-api/openapi/validation" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v3" ) const RuleSemanticDuplicatedEnum = "semantic-duplicated-enum" diff --git a/openapi/linter/rules/fix_helpers.go b/openapi/linter/rules/fix_helpers.go index 31815bb8..bf4cc43d 100644 --- a/openapi/linter/rules/fix_helpers.go +++ b/openapi/linter/rules/fix_helpers.go @@ -9,7 +9,7 @@ import ( "github.com/speakeasy-api/openapi/pointer" "github.com/speakeasy-api/openapi/validation" "github.com/speakeasy-api/openapi/yml" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v3" ) // addErrorResponseFix adds a skeleton error response to an operation's responses node. diff --git a/openapi/linter/rules/fix_helpers_test.go b/openapi/linter/rules/fix_helpers_test.go index 674eab75..f1396f19 100644 --- a/openapi/linter/rules/fix_helpers_test.go +++ b/openapi/linter/rules/fix_helpers_test.go @@ -8,7 +8,7 @@ import ( "github.com/speakeasy-api/openapi/yml" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v3" ) // ============================================================ diff --git a/openapi/linter/rules/fix_integration_test.go b/openapi/linter/rules/fix_integration_test.go index 9bf7a844..8052946b 100644 --- a/openapi/linter/rules/fix_integration_test.go +++ b/openapi/linter/rules/fix_integration_test.go @@ -12,7 +12,7 @@ import ( "github.com/speakeasy-api/openapi/validation" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v3" ) // These integration tests verify that fixes actually resolve the violations diff --git a/openapi/linter/rules/host_trailing_slash.go b/openapi/linter/rules/host_trailing_slash.go index aa3126aa..a2cf3e14 100644 --- a/openapi/linter/rules/host_trailing_slash.go +++ b/openapi/linter/rules/host_trailing_slash.go @@ -8,7 +8,7 @@ import ( "github.com/speakeasy-api/openapi/linter" "github.com/speakeasy-api/openapi/openapi" "github.com/speakeasy-api/openapi/validation" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v3" ) const RuleStyleOAS3HostTrailingSlash = "style-oas3-host-trailing-slash" diff --git a/openapi/linter/rules/markdown_descriptions.go b/openapi/linter/rules/markdown_descriptions.go index b38160d4..71fbcb0c 100644 --- a/openapi/linter/rules/markdown_descriptions.go +++ b/openapi/linter/rules/markdown_descriptions.go @@ -1,7 +1,7 @@ package rules import ( - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v3" ) // GetFieldValueNode gets the YAML value node for a specific field from any object with a GetCore() method. diff --git a/openapi/linter/rules/oas3_no_nullable.go b/openapi/linter/rules/oas3_no_nullable.go index ec7cb719..338a2fa0 100644 --- a/openapi/linter/rules/oas3_no_nullable.go +++ b/openapi/linter/rules/oas3_no_nullable.go @@ -8,7 +8,7 @@ import ( "github.com/speakeasy-api/openapi/openapi" "github.com/speakeasy-api/openapi/validation" "github.com/speakeasy-api/openapi/yml" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v3" ) const RuleOAS3NoNullable = "oas3-no-nullable" diff --git a/openapi/linter/rules/oas_schema_check.go b/openapi/linter/rules/oas_schema_check.go index ecb5ae70..3869b034 100644 --- a/openapi/linter/rules/oas_schema_check.go +++ b/openapi/linter/rules/oas_schema_check.go @@ -11,7 +11,7 @@ import ( "github.com/speakeasy-api/openapi/linter" "github.com/speakeasy-api/openapi/openapi" "github.com/speakeasy-api/openapi/validation" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v3" ) const RuleOasSchemaCheck = "oas-schema-check" diff --git a/openapi/linter/rules/operation_success_response.go b/openapi/linter/rules/operation_success_response.go index 4a73ce74..baf35a3f 100644 --- a/openapi/linter/rules/operation_success_response.go +++ b/openapi/linter/rules/operation_success_response.go @@ -9,7 +9,7 @@ import ( "github.com/speakeasy-api/openapi/linter" "github.com/speakeasy-api/openapi/openapi" "github.com/speakeasy-api/openapi/validation" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v3" ) const RuleStyleOperationSuccessResponse = "style-operation-success-response" diff --git a/openapi/linter/rules/owasp_jwt_best_practices.go b/openapi/linter/rules/owasp_jwt_best_practices.go index 5a65a5cb..089f2518 100644 --- a/openapi/linter/rules/owasp_jwt_best_practices.go +++ b/openapi/linter/rules/owasp_jwt_best_practices.go @@ -9,7 +9,7 @@ import ( "github.com/speakeasy-api/openapi/openapi" "github.com/speakeasy-api/openapi/validation" "github.com/speakeasy-api/openapi/yml" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v3" ) const RuleOwaspJWTBestPractices = "owasp-jwt-best-practices" diff --git a/openapi/linter/rules/owasp_no_additional_properties.go b/openapi/linter/rules/owasp_no_additional_properties.go index f7c35fe1..bd7ec77e 100644 --- a/openapi/linter/rules/owasp_no_additional_properties.go +++ b/openapi/linter/rules/owasp_no_additional_properties.go @@ -8,7 +8,7 @@ import ( "github.com/speakeasy-api/openapi/openapi" "github.com/speakeasy-api/openapi/validation" "github.com/speakeasy-api/openapi/yml" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v3" ) const RuleOwaspNoAdditionalProperties = "owasp-no-additional-properties" diff --git a/openapi/linter/rules/owasp_security_hosts_https_oas3.go b/openapi/linter/rules/owasp_security_hosts_https_oas3.go index 365df6ae..f68802bd 100644 --- a/openapi/linter/rules/owasp_security_hosts_https_oas3.go +++ b/openapi/linter/rules/owasp_security_hosts_https_oas3.go @@ -9,7 +9,7 @@ import ( "github.com/speakeasy-api/openapi/openapi" "github.com/speakeasy-api/openapi/validation" "github.com/speakeasy-api/openapi/yml" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v3" ) const RuleOwaspSecurityHostsHttpsOAS3 = "owasp-security-hosts-https-oas3" diff --git a/openapi/linter/rules/path_trailing_slash.go b/openapi/linter/rules/path_trailing_slash.go index e758ef27..e42fbfea 100644 --- a/openapi/linter/rules/path_trailing_slash.go +++ b/openapi/linter/rules/path_trailing_slash.go @@ -8,7 +8,7 @@ import ( "github.com/speakeasy-api/openapi/linter" "github.com/speakeasy-api/openapi/openapi" "github.com/speakeasy-api/openapi/validation" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v3" ) const RuleStylePathTrailingSlash = "style-path-trailing-slash" diff --git a/openapi/linter/rules/rule_fixes_test.go b/openapi/linter/rules/rule_fixes_test.go index 92fd988e..27321358 100644 --- a/openapi/linter/rules/rule_fixes_test.go +++ b/openapi/linter/rules/rule_fixes_test.go @@ -9,7 +9,7 @@ import ( "github.com/speakeasy-api/openapi/yml" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v3" ) // ============================================================ diff --git a/openapi/linter/rules/tags_alphabetical.go b/openapi/linter/rules/tags_alphabetical.go index ac525435..cd9e1d11 100644 --- a/openapi/linter/rules/tags_alphabetical.go +++ b/openapi/linter/rules/tags_alphabetical.go @@ -10,7 +10,7 @@ import ( "github.com/speakeasy-api/openapi/openapi" "github.com/speakeasy-api/openapi/validation" "github.com/speakeasy-api/openapi/yml" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v3" ) const RuleStyleTagsAlphabetical = "style-tags-alphabetical" diff --git a/openapi/linter/rules/typed_enum.go b/openapi/linter/rules/typed_enum.go index 75147cb8..ef4ab1bd 100644 --- a/openapi/linter/rules/typed_enum.go +++ b/openapi/linter/rules/typed_enum.go @@ -10,7 +10,7 @@ import ( "github.com/speakeasy-api/openapi/linter" "github.com/speakeasy-api/openapi/openapi" "github.com/speakeasy-api/openapi/validation" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v3" ) const RuleSemanticTypedEnum = "semantic-typed-enum" diff --git a/openapi/linter/rules/unused_components.go b/openapi/linter/rules/unused_components.go index 020cfc58..3ccc61e5 100644 --- a/openapi/linter/rules/unused_components.go +++ b/openapi/linter/rules/unused_components.go @@ -10,7 +10,7 @@ import ( "github.com/speakeasy-api/openapi/openapi" "github.com/speakeasy-api/openapi/references" "github.com/speakeasy-api/openapi/validation" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v3" ) const RuleSemanticUnusedComponent = "semantic-unused-component" diff --git a/openapi/localize.go b/openapi/localize.go index 25757109..274f67c2 100644 --- a/openapi/localize.go +++ b/openapi/localize.go @@ -14,7 +14,7 @@ import ( "github.com/speakeasy-api/openapi/references" "github.com/speakeasy-api/openapi/sequencedmap" "github.com/speakeasy-api/openapi/system" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v3" ) // LocalizeNamingStrategy defines how external reference files should be named when localized. diff --git a/openapi/openapi.go b/openapi/openapi.go index bfcf2efa..3101f37e 100644 --- a/openapi/openapi.go +++ b/openapi/openapi.go @@ -15,7 +15,7 @@ import ( "github.com/speakeasy-api/openapi/pointer" "github.com/speakeasy-api/openapi/sequencedmap" "github.com/speakeasy-api/openapi/validation" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v3" ) // Version is the version of the OpenAPI Specification that this package conforms to. diff --git a/openapi/reference.go b/openapi/reference.go index 4c307762..1a3bfed9 100644 --- a/openapi/reference.go +++ b/openapi/reference.go @@ -14,7 +14,7 @@ import ( "github.com/speakeasy-api/openapi/pointer" "github.com/speakeasy-api/openapi/references" "github.com/speakeasy-api/openapi/validation" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v3" ) type ( diff --git a/openapi/sanitize.go b/openapi/sanitize.go index 6308e67c..4423e2e4 100644 --- a/openapi/sanitize.go +++ b/openapi/sanitize.go @@ -11,7 +11,7 @@ import ( "github.com/speakeasy-api/openapi/extensions" "github.com/speakeasy-api/openapi/jsonschema/oas3" "github.com/speakeasy-api/openapi/marshaller" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v3" ) // ExtensionFilter specifies patterns for filtering extensions using allowed and denied lists. diff --git a/openapi/upgrade.go b/openapi/upgrade.go index ec056ac0..cc7957f1 100644 --- a/openapi/upgrade.go +++ b/openapi/upgrade.go @@ -10,7 +10,7 @@ import ( "github.com/speakeasy-api/openapi/jsonschema/oas3" "github.com/speakeasy-api/openapi/marshaller" "github.com/speakeasy-api/openapi/sequencedmap" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v3" ) type UpgradeOptions struct { diff --git a/openapi/upgrade_test.go b/openapi/upgrade_test.go index 29b63f4f..92727b15 100644 --- a/openapi/upgrade_test.go +++ b/openapi/upgrade_test.go @@ -12,7 +12,7 @@ import ( "github.com/speakeasy-api/openapi/openapi" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v3" ) func TestUpgrade_Success(t *testing.T) { diff --git a/oq/format.go b/oq/format.go index a3d24ac1..2bf15bea 100644 --- a/oq/format.go +++ b/oq/format.go @@ -7,7 +7,7 @@ import ( "github.com/speakeasy-api/openapi/graph" "github.com/speakeasy-api/openapi/oq/expr" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v3" ) // FormatTable formats a result as a simple table string. diff --git a/overlay/README.md b/overlay/README.md index 6a005f32..bcebc83b 100644 --- a/overlay/README.md +++ b/overlay/README.md @@ -30,7 +30,7 @@ - **Remove, Update, and Copy Actions**: Support for remove actions (pruning nodes), update actions (merging values), and copy actions (duplicating or moving nodes) - **Flexible Input/Output**: Works with both YAML and JSON formats - **Batch Operations**: Apply multiple modifications to large numbers of nodes in a single operation -- **YAML v1.2 Support**: Uses [gopkg.in/yaml.v3](https://pkg.go.dev/gopkg.in/yaml.v3) for YAML v1.2 parsing (superset of JSON) +- **YAML v1.2 Support**: Uses [go.yaml.in/yaml/v3](https://pkg.go.dev/go.yaml.in/yaml/v3) for YAML v1.2 parsing (superset of JSON) ## About OpenAPI Overlays diff --git a/overlay/apply.go b/overlay/apply.go index acaa8cc4..115ee3c0 100644 --- a/overlay/apply.go +++ b/overlay/apply.go @@ -6,7 +6,7 @@ import ( "github.com/speakeasy-api/jsonpath/pkg/jsonpath/config" "github.com/speakeasy-api/jsonpath/pkg/jsonpath/token" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v3" ) // ApplyTo will take an overlay and apply its changes to the given YAML diff --git a/overlay/apply_test.go b/overlay/apply_test.go index 88199973..532c1946 100644 --- a/overlay/apply_test.go +++ b/overlay/apply_test.go @@ -11,7 +11,7 @@ import ( "github.com/speakeasy-api/openapi/overlay/loader" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v3" ) // NodeMatchesFile is a test that marshals the YAML file from the given node, diff --git a/overlay/compare.go b/overlay/compare.go index 06360a49..23c67939 100644 --- a/overlay/compare.go +++ b/overlay/compare.go @@ -6,7 +6,7 @@ import ( "log" "strings" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v3" ) // Compare compares input specifications from two files and returns an overlay diff --git a/overlay/compare_test.go b/overlay/compare_test.go index 10ec184f..6a00b891 100644 --- a/overlay/compare_test.go +++ b/overlay/compare_test.go @@ -7,7 +7,7 @@ import ( "github.com/speakeasy-api/openapi/overlay/loader" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v3" ) func TestCompare(t *testing.T) { diff --git a/overlay/format_test.go b/overlay/format_test.go index 0701b7f4..2a251f3b 100644 --- a/overlay/format_test.go +++ b/overlay/format_test.go @@ -9,7 +9,7 @@ import ( "github.com/speakeasy-api/openapi/overlay" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v3" ) func TestOverlay_Format_Success(t *testing.T) { diff --git a/overlay/jsonpath.go b/overlay/jsonpath.go index 2ccc3c73..21a0cf33 100644 --- a/overlay/jsonpath.go +++ b/overlay/jsonpath.go @@ -7,7 +7,7 @@ import ( "github.com/speakeasy-api/jsonpath/pkg/jsonpath/config" "github.com/speakeasy-api/openapi/internal/version" "github.com/vmware-labs/yaml-jsonpath/pkg/yamlpath" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v3" ) // Queryable is an interface for querying YAML nodes using JSONPath expressions. diff --git a/overlay/loader/spec.go b/overlay/loader/spec.go index 95401ddd..32a9a795 100644 --- a/overlay/loader/spec.go +++ b/overlay/loader/spec.go @@ -11,7 +11,7 @@ import ( "strings" "github.com/speakeasy-api/openapi/overlay" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v3" ) // GetOverlayExtendsPath returns the path to file if the extends URL is a file diff --git a/overlay/loader/spec_test.go b/overlay/loader/spec_test.go index 1a6b70b9..d677c156 100644 --- a/overlay/loader/spec_test.go +++ b/overlay/loader/spec_test.go @@ -10,7 +10,7 @@ import ( "github.com/speakeasy-api/openapi/overlay" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v3" ) // pathToFileURL converts a file path to a proper file:// URL diff --git a/overlay/overlay_examples_test.go b/overlay/overlay_examples_test.go index 0f3eb5f0..7d24cc00 100644 --- a/overlay/overlay_examples_test.go +++ b/overlay/overlay_examples_test.go @@ -7,7 +7,7 @@ import ( "github.com/speakeasy-api/openapi/overlay" "github.com/speakeasy-api/openapi/overlay/loader" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v3" ) // Example_applying demonstrates how to apply an overlay to an OpenAPI document. diff --git a/overlay/parents.go b/overlay/parents.go index a2b4942c..65d269bf 100644 --- a/overlay/parents.go +++ b/overlay/parents.go @@ -1,6 +1,6 @@ package overlay -import "gopkg.in/yaml.v3" +import "go.yaml.in/yaml/v3" type parentIndex map[*yaml.Node]*yaml.Node diff --git a/overlay/parse.go b/overlay/parse.go index e3fb93c1..679ff35d 100644 --- a/overlay/parse.go +++ b/overlay/parse.go @@ -6,7 +6,7 @@ import ( "os" "path/filepath" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v3" ) // ParseReader parses an overlay from the given reader. diff --git a/overlay/schema.go b/overlay/schema.go index 1d00e7fb..d4957450 100644 --- a/overlay/schema.go +++ b/overlay/schema.go @@ -4,7 +4,7 @@ import ( "bytes" "github.com/speakeasy-api/openapi/internal/version" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v3" ) // Version constants for the Overlay specification diff --git a/overlay/upgrade_test.go b/overlay/upgrade_test.go index a335a44c..7b87a053 100644 --- a/overlay/upgrade_test.go +++ b/overlay/upgrade_test.go @@ -6,7 +6,7 @@ import ( "github.com/speakeasy-api/openapi/overlay" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v3" ) func TestUpgrade_Success(t *testing.T) { diff --git a/overlay/utils.go b/overlay/utils.go index 38439706..8923e7be 100644 --- a/overlay/utils.go +++ b/overlay/utils.go @@ -3,7 +3,7 @@ package overlay import ( "fmt" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v3" ) func NewTargetSelector(path, method string) string { diff --git a/overlay/utils_test.go b/overlay/utils_test.go index 8c96a0ab..b1270a94 100644 --- a/overlay/utils_test.go +++ b/overlay/utils_test.go @@ -5,7 +5,7 @@ import ( "github.com/speakeasy-api/openapi/overlay" "github.com/stretchr/testify/assert" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v3" ) func TestNewTargetSelector_Success(t *testing.T) { diff --git a/overlay/validate_test.go b/overlay/validate_test.go index d68dc571..e98ff03c 100644 --- a/overlay/validate_test.go +++ b/overlay/validate_test.go @@ -6,7 +6,7 @@ import ( "github.com/speakeasy-api/openapi/overlay" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v3" ) func TestOverlay_Validate(t *testing.T) { diff --git a/references/resolution.go b/references/resolution.go index c310840f..d863f218 100644 --- a/references/resolution.go +++ b/references/resolution.go @@ -12,7 +12,7 @@ import ( "github.com/speakeasy-api/openapi/internal/utils" "github.com/speakeasy-api/openapi/jsonpointer" "github.com/speakeasy-api/openapi/system" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v3" ) type ResolutionTarget interface { diff --git a/references/resolution_test.go b/references/resolution_test.go index afa8bd48..60ec4071 100644 --- a/references/resolution_test.go +++ b/references/resolution_test.go @@ -16,7 +16,7 @@ import ( "github.com/speakeasy-api/openapi/marshaller/tests" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v3" ) // MockResolutionTarget implements ResolutionTarget for testing diff --git a/sequencedmap/map.go b/sequencedmap/map.go index 8c5f2c49..e62639c6 100644 --- a/sequencedmap/map.go +++ b/sequencedmap/map.go @@ -15,7 +15,7 @@ import ( "github.com/speakeasy-api/openapi/internal/interfaces" "github.com/speakeasy-api/openapi/internal/utils" "github.com/speakeasy-api/openapi/yml" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v3" ) // OrderType represents the different ways to order iteration through the map diff --git a/sequencedmap/map_advanced_test.go b/sequencedmap/map_advanced_test.go index 011d6a9e..a9205b65 100644 --- a/sequencedmap/map_advanced_test.go +++ b/sequencedmap/map_advanced_test.go @@ -5,7 +5,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v3" ) func TestMap_NavigateWithKey_Success(t *testing.T) { diff --git a/sequencedmap/yaml_unmarshal_test.go b/sequencedmap/yaml_unmarshal_test.go index f5ec1fbd..fca46786 100644 --- a/sequencedmap/yaml_unmarshal_test.go +++ b/sequencedmap/yaml_unmarshal_test.go @@ -6,7 +6,7 @@ import ( "github.com/speakeasy-api/openapi/sequencedmap" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v3" ) func TestSequencedMap_Standard_Yaml_Unmarshal(t *testing.T) { diff --git a/swagger/core/paths.go b/swagger/core/paths.go index c05967f5..08b01337 100644 --- a/swagger/core/paths.go +++ b/swagger/core/paths.go @@ -4,7 +4,7 @@ import ( "github.com/speakeasy-api/openapi/extensions/core" "github.com/speakeasy-api/openapi/marshaller" "github.com/speakeasy-api/openapi/sequencedmap" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v3" ) // Paths holds the relative paths to the individual endpoints. diff --git a/swagger/core/paths_test.go b/swagger/core/paths_test.go index 0a4a3709..b37a9662 100644 --- a/swagger/core/paths_test.go +++ b/swagger/core/paths_test.go @@ -6,7 +6,7 @@ import ( "github.com/speakeasy-api/openapi/marshaller" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v3" ) func parseYAML(t *testing.T, yml string) *yaml.Node { diff --git a/swagger/core/reference.go b/swagger/core/reference.go index 32efa31b..044087f2 100644 --- a/swagger/core/reference.go +++ b/swagger/core/reference.go @@ -10,7 +10,7 @@ import ( "github.com/speakeasy-api/openapi/marshaller" "github.com/speakeasy-api/openapi/validation" "github.com/speakeasy-api/openapi/yml" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v3" ) // Reference represents either a reference to a component or an inline object. diff --git a/swagger/core/reference_test.go b/swagger/core/reference_test.go index 58865efc..fe71408a 100644 --- a/swagger/core/reference_test.go +++ b/swagger/core/reference_test.go @@ -6,7 +6,7 @@ import ( "github.com/speakeasy-api/openapi/marshaller" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v3" ) func TestReference_Unmarshal_Success(t *testing.T) { diff --git a/swagger/core/response.go b/swagger/core/response.go index a3210121..0d258b04 100644 --- a/swagger/core/response.go +++ b/swagger/core/response.go @@ -6,7 +6,7 @@ import ( "github.com/speakeasy-api/openapi/marshaller" "github.com/speakeasy-api/openapi/sequencedmap" values "github.com/speakeasy-api/openapi/values/core" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v3" ) // Responses is a container for the expected responses of an operation. diff --git a/swagger/core/response_test.go b/swagger/core/response_test.go index 5b3cb88e..08fe6569 100644 --- a/swagger/core/response_test.go +++ b/swagger/core/response_test.go @@ -6,7 +6,7 @@ import ( "github.com/speakeasy-api/openapi/marshaller" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v3" ) func TestNewResponses_Success(t *testing.T) { diff --git a/swagger/roundtrip_test.go b/swagger/roundtrip_test.go index f7cbc4f4..232a2a79 100644 --- a/swagger/roundtrip_test.go +++ b/swagger/roundtrip_test.go @@ -13,7 +13,7 @@ import ( "github.com/speakeasy-api/openapi/yml" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v3" ) type roundTripTest struct { diff --git a/validation/errors.go b/validation/errors.go index a37100aa..4f6d8eaa 100644 --- a/validation/errors.go +++ b/validation/errors.go @@ -3,7 +3,7 @@ package validation import ( "fmt" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v3" ) type Severity string diff --git a/validation/fix.go b/validation/fix.go index 0364e3d7..bd272af8 100644 --- a/validation/fix.go +++ b/validation/fix.go @@ -1,6 +1,6 @@ package validation -import "gopkg.in/yaml.v3" +import "go.yaml.in/yaml/v3" // PromptType describes what kind of user input a fix needs. type PromptType int diff --git a/validation/utils_test.go b/validation/utils_test.go index 71fc92e2..6bc668c6 100644 --- a/validation/utils_test.go +++ b/validation/utils_test.go @@ -6,7 +6,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v3" ) // Test SortValidationErrors function diff --git a/validation/validation_test.go b/validation/validation_test.go index d53c2ed9..a2a1d176 100644 --- a/validation/validation_test.go +++ b/validation/validation_test.go @@ -6,7 +6,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v3" ) // Test the Error type methods diff --git a/values/core/eithervalue.go b/values/core/eithervalue.go index b280f0e7..a11b3cb2 100644 --- a/values/core/eithervalue.go +++ b/values/core/eithervalue.go @@ -10,7 +10,7 @@ import ( "github.com/speakeasy-api/openapi/internal/interfaces" "github.com/speakeasy-api/openapi/marshaller" "github.com/speakeasy-api/openapi/validation" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v3" ) type EitherValue[L any, R any] struct { diff --git a/values/core/eithervalue_test.go b/values/core/eithervalue_test.go index 6270c21d..eb05d5d2 100644 --- a/values/core/eithervalue_test.go +++ b/values/core/eithervalue_test.go @@ -11,7 +11,7 @@ import ( "github.com/speakeasy-api/openapi/validation" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v3" ) type TestEitherValue[L any, R any] struct { diff --git a/values/core/value.go b/values/core/value.go index 027e7ed5..c3c35a67 100644 --- a/values/core/value.go +++ b/values/core/value.go @@ -1,6 +1,6 @@ package core -import "gopkg.in/yaml.v3" +import "go.yaml.in/yaml/v3" // Value represents a raw value in an OpenAPI or Arazzo document. type Value = *yaml.Node diff --git a/values/value.go b/values/value.go index a255214c..4beb8c4b 100644 --- a/values/value.go +++ b/values/value.go @@ -1,6 +1,6 @@ package values -import "gopkg.in/yaml.v3" +import "go.yaml.in/yaml/v3" // Value represents a raw value in an OpenAPI or Arazzo document. type Value = *yaml.Node diff --git a/yml/config.go b/yml/config.go index 0bb9aede..d15ada27 100644 --- a/yml/config.go +++ b/yml/config.go @@ -5,7 +5,7 @@ import ( "context" "strconv" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v3" ) type contextKey string diff --git a/yml/config_test.go b/yml/config_test.go index 92d9ea24..096916ea 100644 --- a/yml/config_test.go +++ b/yml/config_test.go @@ -7,7 +7,7 @@ import ( "github.com/speakeasy-api/openapi/yml" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v3" ) func TestContextKey_String_Success(t *testing.T) { diff --git a/yml/nodekind.go b/yml/nodekind.go index a90996f7..c58a9473 100644 --- a/yml/nodekind.go +++ b/yml/nodekind.go @@ -1,6 +1,6 @@ package yml -import "gopkg.in/yaml.v3" +import "go.yaml.in/yaml/v3" // NodeKindToString returns a human-readable string representation of a yaml.Kind. // This helper function is useful for creating more user-friendly error messages diff --git a/yml/nodekind_test.go b/yml/nodekind_test.go index 9163a198..363dad2c 100644 --- a/yml/nodekind_test.go +++ b/yml/nodekind_test.go @@ -5,7 +5,7 @@ import ( "github.com/speakeasy-api/openapi/yml" "github.com/stretchr/testify/assert" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v3" ) func TestNodeKindToString(t *testing.T) { diff --git a/yml/walk.go b/yml/walk.go index 46bd0065..6350ab20 100644 --- a/yml/walk.go +++ b/yml/walk.go @@ -4,7 +4,7 @@ import ( "context" "github.com/speakeasy-api/openapi/errors" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v3" ) const ( diff --git a/yml/walk_test.go b/yml/walk_test.go index aa13115f..f6fa2a62 100644 --- a/yml/walk_test.go +++ b/yml/walk_test.go @@ -8,7 +8,7 @@ import ( "github.com/speakeasy-api/openapi/yml" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v3" ) func TestWalk_Success(t *testing.T) { diff --git a/yml/yml.go b/yml/yml.go index 46d3362b..5af0162c 100644 --- a/yml/yml.go +++ b/yml/yml.go @@ -5,7 +5,7 @@ import ( "reflect" "strconv" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v3" ) func CreateOrUpdateKeyNode(ctx context.Context, key string, keyNode *yaml.Node) *yaml.Node { diff --git a/yml/yml_test.go b/yml/yml_test.go index 3a7318ee..d810c673 100644 --- a/yml/yml_test.go +++ b/yml/yml_test.go @@ -7,7 +7,7 @@ import ( "github.com/speakeasy-api/openapi/yml" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v3" ) func TestCreateOrUpdateKeyNode_Success(t *testing.T) {