Download Latest Version Goa v3.25.3 source code.tar.gz (1.3 MB)
Email in envelope

Get an email when there's a new version of Goa

Home / v3.25.1
Name Modified Size InfoDownloads / Week
Parent folder
Goa v3.25.1 source code.tar.gz 2026-02-16 1.3 MB
Goa v3.25.1 source code.zip 2026-02-16 2.3 MB
README.md 2026-02-16 5.2 kB
Totals: 3 Items   3.7 MB 0

Highlights

  • HTTP route tagging fix (otelhttp): v3.25.1 completes the r.Pattern route tagging work from v3.25.0 so otelhttp (v0.65.0+) reliably records the http.route span attribute and metric route when used as a mux middleware (mux.Use(otelhttp.NewMiddleware(...))). (#3898)
  • Better DSL error messages: validation errors include file:line locations pointing to the offending design declaration, making it much faster to find and fix issues in large Goa designs. (#3895)
  • Mixed unary + SSE results: services can define both a unary Result and a StreamingResult on the same method with distinct types — the generated HTTP handler performs content negotiation based on the Accept header. (#3883)

What changed

HTTP runtime

  • r.Pattern auto-populated (and visible to middlewares): the default muxer captures the original Goa route pattern (before Chi wildcard rewriting) and sets r.Pattern = "METHOD /path" following the Go 1.22+ convention. v3.25.1 ensures this happens early enough that middlewares registered via Use() (including otelhttp.NewMiddleware) can read r.Pattern at span-start time to populate the http.route attribute. (#3897, #3898)

Eval / DSL

  • Validation error locations: Validate()-phase errors now derive file:line from the expression's DSL function pointer using runtime.CallersFrames, robust to inlining. Both DSL-time and validation-time errors benefit. (#3895, #3890)

Codegen

  • Mixed unary + SSE: generated handlers perform Accept-based content negotiation; the generated client exposes a split API (Method for unary, MethodStream for SSE). A non-nil discard stream implementation is passed in unary mode so service code can use the stream parameter without nil guards. (#3883)
  • OneOf in ResultType views: union helper types are now emitted in the views package when referenced by view-projected types, fixing build failures for OneOf inside ResultType. (#3884)
  • Composite client response decoding: unnamed array/map HTTP client response bodies now decode directly into the concrete wire type instead of generating endpoint-scoped wrapper aliases, fixing build failures when multiple endpoints share a structural type. (#3888)
  • WebSocket upgrade error persistence: upgrade failures are now stored on the server stream struct so subsequent Send/Recv calls reliably return the error instead of panicking on a nil connection. (#3885)
  • HTTP client array payload codegen: fixed deduplication of request body builder functions when multiple methods use ArrayOf(...) payloads with different element types. (#3879)

Upgrade notes

This release changes generated code. After upgrading, regenerate and review the diff:

:::bash
go get goa.design/goa/v3@v3.25.1
# then run your normal generation flow (goa gen / go generate)

OpenTelemetry route tagging

  • Recommended: register otelhttp as a mux middleware so it can read r.Pattern at span-start time:

go mux := goahttp.NewMuxer() mux.Use(otelhttp.NewMiddleware("service"))

  • If you wrap the mux externally with otelhttp.NewHandler(mux, ...), otelhttp starts the span before it calls into the mux, so r.Pattern is not available at span-start. In that setup, use the otel plugin (it sets http.route directly on the active span inside each generated handler).

Full changelog

  • #3898 http: set r.Pattern in ServeHTTP before middleware dispatch
  • #3879 fix: http client codegen for multiple array-type payloads
  • #3883 codegen: support mixed unary + SSE results
  • #3884 codegen: generate OneOf unions in views package
  • #3885 http/codegen: persist websocket upgrade errors
  • #3888 http/codegen: decode composite client responses without wrappers
  • #3890 eval: report validation error locations
  • #3895 eval: report validation error locations (refinement)
  • #3897 http: set r.Pattern on dispatched requests for automatic route tagging

Compare: https://github.com/goadesign/goa/compare/v3.25.0...v3.25.1


Thank you to @abocim for contributing #3879!

Source: README.md, updated 2026-02-16