Skip to content

v3.37.0

Latest

Choose a tag to compare

@raphael raphael released this 04 Dec 16:56
4e55f2f

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.mod files (along with the matching v3.37.0 releases of goa.design/examples and goa.design/plugins) now declare go 1.26.0 with no toolchain directive. 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 run govulncheck to track standard-library fixes.
  • Generated HTTP and JSON-RPC client BasePath (#4097): Generated Client structs now expose an exported BasePath string 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"
    NewClient is unchanged, an empty BasePath produces the same URLs as before, and path parameters keep their own escaping semantics.
  • OpenAPI 3 WebSocket StreamingPayload schema (#4094): OpenAPI 3 documents now emit the x-goa-streaming-payload extension on WebSocket operations that declare a StreamingPayload, making the client-to-server message schema discoverable without altering existing component schemas.
  • Design Example unknown-field validation (#4100): Authored Example maps on object types and composite shapes (Type, ResultType including View blocks, CollectionOf, Error, payloads, results, HTTP Body, and gRPC Message blocks) 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 strconv when Meta("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.0 and goa.design/goa/v3/cmd/goa@v3.37.0 together (and goa.design/plugins/v3@v3.37.0 if used), then run goa gen.
  • If goa gen reports an unknown key in an Example(...) 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_path collides with the new Client.BasePath field (same as RestoreResponseBody).
  • 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.