v1.51.5
π Circular Ref Fix & MCP Server Improvements
This patch release fixes two parser bugs that affected resolve_refs behavior β circular references are now handled correctly and memory usage drops dramatically for large specs β alongside MCP server UX improvements.
Circular Reference Resolution (Fixes #326)
Previously, detecting any circular $ref in a document caused the parser to discard all resolution work and fall back to the original unresolved bytes. Now, non-circular $refs are resolved normally even when circular refs exist in the same document. Only the truly circular nodes remain as $ref pointers.
# Before: ANY circular ref β entire document stays unresolved
# After: only circular $ref nodes stay as pointers; everything else is inlinedMemory Blowup Elimination
The resolve_refs code path previously used a marshal/unmarshal roundtrip that inflated peak memory (e.g., GitHub API spec: 11.6 MB input β 108 MB intermediate allocation). The new decodeFromMap approach decodes resolved map[string]any data directly to typed OAS structs, eliminating the intermediate []byte allocation entirely.
MCP Server Improvements
- Detail mode limit (25): Walk tools in
detail=truemode now default to 25 results instead of 100, keeping output manageable for LLM context windows - Parameter filter auto-resolution:
walk_parametersautomatically resolves$refparameters when filtering byinornameβ no need to setresolve_refs=truemanually - Join strategy names fixed: The
jointool now correctly documentsaccept-left/accept-right(hyphenated) instead ofaccept_left/accept_right, eliminating first-attempt errors from LLM agents - Known behaviors documented: Filter edge cases, cross-tool limitations, and detail defaults now documented in MCP server docs
π User Impact
- No breaking changes to the public Go API
resolve_refsbehavior change is a bug fix β documents that previously lost all resolution now correctly resolve non-circular refs- MCP server changes are backward compatible (detail limit is a default, not a hard cap)
π Quality Metrics
- β All tests passing (8,200+ unit tests)
- β
Zero vulnerabilities (
govulncheckclean) - β All 10 benchmark suites passing with no regressions
- β Documentation verified accurate
What's Changed
Other Changes
- feat(mcp): detail limit, param auto-resolve, and known behavior docs by @erraggy in #327
- fix(parser): resolve circular refs and eliminate resolve_refs memory blowup by @erraggy in #329
- fix(mcp): use correct hyphenated collision strategy names in join tool by @erraggy in #330
- chore: prepare v1.51.5 release by @erraggy in #331
Full Changelog: v1.51.4...v1.51.5