Repository navigation
Goa v3.37.0 lowers Goa's minimum Go module directive back to Go 1.26.0, adds first-class base-path support to generated HTTP and JSON-RPC clients, exposes WebSocket streaming payload schemas in OpenAPI 3, catches unknown fields in design Example maps during evaluation, and fixes two gRPC generation regressions.
Highlights
- Go 1.26.0 module minimum (#4092): Goa's root and nested JSON-RPC
go.modfiles (along with the matchingv3.37.0releases ofgoa.design/examplesandgoa.design/plugins) now declarego 1.26.0with notoolchaindirective. Teams running a patched Go 1.26 toolchain can upgrade without being pulled to a patch-level Go 1.27 directive. Build with the latest patch release of your Go version (CI tests Go 1.26.11 and Go 1.27.4) and rungovulncheckto track standard-library fixes. - Generated HTTP and JSON-RPC client
BasePath(#4097): GeneratedClientstructs now expose an exportedBasePathstring field so callers targeting a deployment-specific prefix no longer need to model the prefix as a path parameter:c := client.NewClient(scheme, host, doer, enc, dec, false) c.BasePath = "/api/v1"
NewClientis unchanged, an emptyBasePathproduces the same URLs as before, and path parameters keep their own escaping semantics. - OpenAPI 3 WebSocket
StreamingPayloadschema (#4094): OpenAPI 3 documents now emit thex-goa-streaming-payloadextension on WebSocket operations that declare aStreamingPayload, making the client-to-server message schema discoverable without altering existing component schemas. - Design
Exampleunknown-field validation (#4100): AuthoredExamplemaps on object types and composite shapes (Type,ResultTypeincludingViewblocks,CollectionOf,Error, payloads, results, HTTPBody, and gRPCMessageblocks) now fail design evaluation when they contain unknown keys or wire names instead of silently emitting empty examples.
Fixes
- External protobuf message scalar field presence (#4096): Restores the v3.30.0 scalar field layout for external protobuf messages mapped with
struct:field:proto(required fields map to plain scalars; optional scalars, including those with defaults, keep pointer presence). Protobuf generation skips validators for external messages and reports a design error if a mapped field or its type requires a generated validation check. - Legacy gRPC stream metadata imports (#4099): Generated gRPC server codecs now import
strconvwhenMeta("grpc:stream:compat", "v1")parses Boolean or numeric values from legacy request metadata, and limit legacy stream metadata decoding to endpoints that actually use a stream envelope.
Upgrade Notes
- Install
goa.design/goa/v3@v3.37.0andgoa.design/goa/v3/cmd/goa@v3.37.0together (andgoa.design/plugins/v3@v3.37.0if used), then rungoa gen. - If
goa genreports an unknown key in anExample(...)map or an unsupported validation rule on an externally mapped protobuf message (struct:field:proto), update the design and regenerate. - A service method named
base_pathcollides with the newClient.BasePathfield (same asRestoreResponseBody). - No coordinated client/server deployment or stored-data migration is required. Roll back by restoring the previous module version and generated tree.
- See the upgrade guide for full details.
Contributors
Thank you to @neha-viswanathan, @raphael, @rdimitrov, and @tchssk for contributing to this release.