fix: replace gopkg.in/yaml.v3 with go.yaml.in/yaml/v3
Problem
gopkg.in/yaml.v3 is unmaintained and flagged by security scanners (kubernetes-sigs/yaml#117). It is no longer receiving updates.
Fix
Replace all usages across the codebase with go.yaml.in/yaml/v3, the canonical successor package maintained by the same upstream authors.
- All Go import paths updated via batch find+replace
go.modupdated togo.yaml.in/yaml/v3 v3.0.4
The API is identical — no code logic changes, import path only.
Closes #201
Dependency migration follow-up discovered while addressing review feedback:
- Direct cleanup is pushed in
a985f2b: root,cmd/openapi,openapi/linter/customrules,jsonschema/oas3/tests, andopenapi/linter/converter/testswere tidied withgo.yaml.in/yaml/v3 v3.0.4;overlay/README.mdwas also updated. - External contributor diff review found no suspicious or unrelated code changes; the original PR diff is mechanical import-path replacement plus root module metadata.
Remaining blockers to track before this migration can fully pass builds/tests:
-
github.com/speakeasy-api/jsonpathstill exposesgopkg.in/yaml.v3in its public API.- Latest release:
v0.6.3. - Checked
@mainpseudo-versionv0.6.4-0.20260215213553-5923067bd0c5; it still importsgopkg.in/yaml.v3. - This causes type mismatches in
overlay/jsonpath.goandmarshaller/coremodel_jsonpath_test.gobecause Go treats*go.yaml.in/yaml/v3.Nodeand*gopkg.in/yaml.v3.Nodeas distinct types.
- Latest release:
-
github.com/vmware-labs/yaml-jsonpath v0.3.2also exposesgopkg.in/yaml.v3nodes fromPath.Find, causing the same mismatch inoverlay/jsonpath.go. -
gopkg.in/yaml.v3still appears indirectly in module graphs because transitive dependencies still require it (github.com/speakeasy-api/jsonpath,github.com/vmware-labs/yaml-jsonpath, plus test/tool dependency trees such astestify,cobra, andtestcontainers). Manually deleting those indirect entries is not stable;go mod tidyrestores them.
Validation notes:
- Passing locally:
go mod verifyin all affected modules;go test ./...inopenapi/linter/customrules,jsonschema/oas3/tests, andopenapi/linter/converter/tests. - Failing locally due to dependency API blockers above: root
go test ./...andcmd/openapigo test ./.... mise cipasses fmt + mod-check locally, then cannot complete becausegolangci-lintis not installed and the lint script hits BSD grep incompatibility (grep -P).