July 2026
go-openapi and go-swagger had a busy July, with roughly 80 load-bearing commits across 17
repositories. Two efforts dominated. The codescan repository β the code scanner behind
swagger generate spec β was extended into a mono-repo and gained a new interactive
genspec-tui, while a security-hardening pass ran across the spec toolchain,
tightening $ref expansion and document loading in spec, swag and go-swagger and
threading a confined loader down through loads, validate and analysis. Alongside
these, three long-stable modules cut their first v1.0.0 releases.
Themes
- Security hardening across the spec toolchain. spec now caps
$refexpansion node count to prevent amplification DoS, stops performing a network request inIsValidURI, accepts an option-aware document loader, and warns that the default$refloader is not sandboxed. swag bounds recursion depth in its YAMLβJSON and ordered-JSON transforms and detects YAML anchor/alias expansion cycles. go-swagger escapes untrusted spec, header, flag, format, enum, default and content-type values in generated code, and adds codegen options to restrict$refresolution. The confined/injectable loader was wired downstream into loads, validate and analysis. - codescan as a mono-repo, plus
genspec-tui. codescan was reorganized into a Go workspace mono-repo and shippedgenspec-tui, an interactive TUI that live-renders a spec from its source. It also addedswagger:omitas an escape hatch for embed conflicts, auto-discovery of discriminator subtypes for a referenced base type, and toolchain-independentTextMarshalerdetection. - New formats and features. strfmt added ISO-4217 currency and ISO-3166 country
formats and an ISO 8601 / RFC 3339
duration-iso8601format. Lazy multipart-form streaming landed as a runtime primitive and was surfaced through go-swagger’s generated servers and a new examples playground. spec gained confinedExpandSchemaWithOptions/ExpandParameterWithOptions/ExpandResponseWithOptions, and swag addedAppendXXXnumber formatting and refactored its JSON-adapter pools and options. - First v1.0.0 releases. jsonpointer, jsonreference and inflect each cut a v1.0.0 β a stability milestone for three of the oldest, lowest-churn modules.
- Portability and release plumbing. Windows fixes landed in swag (rooted/absolute in-root path handling) and codescan (LF golden fixtures on Windows checkouts); go-swagger reinstated Windows ARM64 binary releases; ci-workflows fixed edge cases in the mono-repo release flow.
Repository highlights
| Repository | Latest release | Highlights |
|---|---|---|
| codescan | v0.36.0 | Consolidated into a mono-repo; new interactive genspec-tui; swagger:omit; discriminator-subtype auto-discovery |
| go-swagger | v0.35.3 | Escapes untrusted values in generated code; codegen option to restrict $ref resolution; streaming multipart servers; Windows ARM64 binaries restored |
| spec | v0.22.9 | $ref expansion DoS caps; no network call in IsValidURI; option-aware/confined loaders; Expand*WithOptions APIs |
| swag | v0.28.0 | Bounded recursion in YAMLβJSON transforms; anchor/alias cycle detection; AppendXXX number formatting; adapter pool/options refactor |
| strfmt | v0.27.0 | ISO-4217 currency & ISO-3166 country formats; ISO 8601 duration-iso8601; RFC 4648 base64 fix; format fuzzing |
| runtime | v0.33.0 | Lazy multipart-form streaming; middleware sets http.Request.Pattern to the matched route |
| loads | v0.25.0 | Loader chaining and builder-with-options; confined loader wiring |
| analysis | v0.25.5 | Confined document loader in flatten and schema analysis |
| validate | v0.26.1 | Injectable custom document loader for schema/spec validation; deterministic fixtures |
| jsonpointer | v1.0.0 | First v1.0.0 release |
| jsonreference | v1.0.0 | First v1.0.0 release |
| inflect | v1.0.0 | First v1.0.0 release |
Thanks to our contributors
Thanks to the external contributors who landed changes this month:
- @fpawel β scaffolded the lazy multipart-form streaming feature across runtime, go-swagger and the examples.
- @KT-Doan β made
TextMarshalerdetection independent of the toolchain environment in codescan. - @delthas β set
http.Request.Patternto the matched route in runtime middleware. - @HNO3Miracle β made schema-validation fixtures deterministic in validate.
- @sanmaxdev β updated the client usage examples in go-swagger.
Special thanks for contributions that shaped the work even where the patch itself couldn’t be merged as-is:
- @bernot-dev β for the idea and an excellent parser implementation behind the ISO 8601
durationformat in strfmt. - @hsdfat β for a fast-turnaround enum fix in codescan.
Security advisories this month were responsibly reported by @KrisKennawayDD, @RamiAltai, @weiz-cn, @Gal3m, @EladMeged-Novee, @sondt99 and @abhayclasher β thank you.