Skip to content

chore(deps): support libopenapi v0.41.1 - #325

Closed
mcstepp wants to merge 1 commit into
pb33f:mainfrom
mcstepp:chore/support-libopenapi-0.41.1
Closed

mcstepp wants to merge 1 commit into
pb33f:mainfrom
mcstepp:chore/support-libopenapi-0.41.1

Conversation

@mcstepp

@mcstepp mcstepp commented Sep 28, 2026

Copy link
Copy Markdown

Summary

Updates libopenapi from v0.38.6 to v0.41.1.

Changes

  • YAML import swap: libopenapi v0.41.1 now uses github.com/pb33f/go-yaml instead of go.yaml.in/yaml/v4, and mixing the two causes type errors. This PR updates every import to the new package. The package name is still yaml, so no other code changed.
  • Schemas that $ref another file: in v0.41.1, a component schema that is just a $ref to another file reports that file's index from GoLow().GetIndex(). Its root node is still the $ref node in the file that contains it. buildSchemaDocumentResources was searching the wrong file and failing with schema node was not found in its root document. The new locateSchemaRootNodeIndex checks the schema's own index first, then the other loaded files, to find the one that contains the node. This restores the v0.38.6 behavior.
  • Go 1.26: libopenapi v0.41.1 declares go 1.26.0, so go.mod now does too. CI now runs the build job on Go 1.26 and golangci-lint v2.12, because v2.8 won't lint a module that targets a newer Go version.

⚠️ Breaking

Anyone using this module now needs Go 1.26 or later, because libopenapi v0.41.1 requires it.

Testing

  • go build ./..., go vet ./... and go test -race ./... pass
  • golangci-lint v2.12.2 reports 0 issues
  • New test covers the case where the node isn't found in the schema's index and no other files are loaded
  • schema_validation coverage unchanged: 99.4%

@codecov

codecov Bot commented Sep 28, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.27%. Comparing base (f309f59) to head (141bc89).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #325   +/-   ##
=======================================
  Coverage   98.27%   98.27%           
=======================================
  Files          75       75           
  Lines        9192     9205   +13     
=======================================
+ Hits         9033     9046   +13     
  Misses        132      132           
  Partials       27       27           
Flag Coverage Δ
unittests 98.27% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@mcstepp

mcstepp commented Sep 28, 2026

Copy link
Copy Markdown
Author

Sorry! Didn't see your PR #324

I'll close mine

@mcstepp mcstepp closed this Sep 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant