Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Releases: goadesign/goa

v3.22.6

19 Oct 04:19
a7ed238

Choose a tag to compare

New Features

  • http/codegen(sse): format SSE data using response body types with primitive-friendly encoding (#3821)

Bug Fixes

  • expr/interceptor: fix attribute validation to consider inherited attributes from Extend (#3822)
  • http/codegen: add GetBody to requests with JSON encoder to fix HTTP/2 retry errors (#3737)
  • http/openapi/v3: normalize file server wildcards and add parameter schema for wildcard paths (#3816)
  • codegen/cli: escape CLI examples to avoid raw backticks and fmt formatting artifacts (#3815)

Thank you!

Thanks to @duckbrain and @raphael for the contributions!

v3.22.5

04 Oct 17:09
fe2f0fa

Choose a tag to compare

This release includes a few new features and bug fixes.

New Features

  • grpc: add support for Any type mapping to google.protobuf.Any (#3812)
  • grpc: enhance error handling with detailed history in ErrorResponse (#3810)

Bug Fixes

  • http/codegen: fix SSE client unused locals and struct decode (#3813)
  • codegen(service): add SendWithContext and RecvWithContext methods to streaming interfaces (#3811)

v3.22.3

21 Sep 06:24
f1ba1d6

Choose a tag to compare

What's Changed

  • codegen(service,jsonrpc): dedupe SSE event markers and JSON-RPC SSE switch cases for shared result types; add tests by @raphael in #3805
  • gRPC: Avoid synthetic wrappers for user-type OneOfs; add regression test by @raphael in #3808
  • chore: redirect CLAUDE.md to AGENTS.md by @raphael in #3809

Full Changelog: v3.22.2...v3.22.3

v3.22.2

13 Sep 23:12
496c70e

Choose a tag to compare

Goa v3.22.2 Release Notes

Highlights

  • Prevent invalid code when different declared types share the same TypeName. Goa now validates duplicate TypeNames across declared ResultTypes and UserTypes (generated collections are ignored), failing fast with
    a clear error instead of generating conflicting code (Fixes Issue #3799 (#3799), PR #3801 (#3801)).
  • Robustness across transports:

Compatibility

  • Requires Go 1.24+ (unchanged).
  • No breaking changes expected. Code generators now reserve a few identifiers to avoid collisions (e.g., “websocket” and service package names) in generated code; this does not affect user code unless those exact
    names were causing conflicts (PR #3778 (#3778), PR #3779 (#3779), PR #3776 (#3776)).

New Features

  • API-level gRPC error responses initialization for improved consistency in error handling (PR #3781 (#3781)).

Improvements

  • Code generation
    • Validate duplicate TypeNames across declared user/result types; ignore generated collections (PR #3801 (#3801)).
    • Merge generator output by file path; add union+merge tests (PR #3795 (#3795)).
    • Fix nested OneOf view transformation so outer variables aren’t clobbered (PR #3793 (#3793)).
    • Fix OneOf alias handling with wrapper types (PR #3787 (#3787)).
  • HTTP
    • SSE Last-Event-ID handling fixed in generated handlers (PR #3796 (#3796)).
    • Reserve “websocket” and service package names to avoid collisions (PR #3778 (#3778), PR #3776 (#3776)).
    • Use http.ResponseController for flushing instead of custom Flusher interfaces (PR #3773 (#3773)).
  • JSON‑RPC
    • Fix client streaming result handling (PR #3774 (#3774)).
    • Ensure request ID consistency (PR #3777 (#3777)).
  • gRPC
    • Improve OneOf handling and type mapping (PR #3789 (#3789)).
    • Validate Any inside unions/arrays/maps (PR #3791 (#3791)).
    • Clean up Any protobuf mapping logic (PR #3790 (#3790)).

Documentation and Misc

Dependency Updates

  • github.com/stretchr/testify → v1.11.0 (PR #3783 (#3783)).
  • github.com/getkin/kin-openapi → v0.133.0 (PR #3782 (#3782)).
  • google.golang.org/grpc → v1.75.0 (PR #3785 (#3785)).
  • CI: actions/checkout v4 → v5 (PR #3786 (#3786)).

Thanks

v3.22.1

13 Aug 06:16
4437cc3

Choose a tag to compare

Goa v3.22.1 Release Notes

Highlights

  • JSON‑RPC 2.0 transport joins HTTP and gRPC as a first‑class option. Generate
    servers, clients, CLI, streaming (WebSocket, SSE), batch requests, and
    notifications from the same design. This makes Goa a great fit for RPC‑style
    APIs across protocols without duplicating effort
    (PR #3734).
  • Toolchain updated to Go 1.24 (toolchain go1.24.4) with refreshed
    dependencies for better performance, diagnostics, and editor support
    (PR #3765).

Compatibility

  • Requires Go 1.24+. Please update your Go toolchain before upgrading
    (PR #3765).
  • Generated example CLI: UsageCommands() now returns []string (previously a
    single string). Help text and behavior are unchanged; only the return type
    matters if you consume it programmatically
    (PR #3734).

New Features

  • JSON‑RPC 2.0 (now first‑class alongside HTTP and gRPC)
    • Full code generation for servers and clients; batch requests and
      notifications; streaming via WebSocket and SSE; CLI integration
      (-jsonrpc/-j when both HTTP and JSON‑RPC are available).
    • New jsonrpc package: request/response types, error codes, helpers
      (MakeSuccessResponse, MakeErrorResponse, MakeNotification,
      IDToString) and a StreamConfig with With* options to tune WebSocket
      behavior (timeouts, buffers, retries, compression, ping).
    • Comprehensive docs and integration tests to help you hit the ground
      running (PR #3734).

Improvements

  • Conversion functions are now generated per target package. If your user types
    include Meta("struct:pkg:path", "..."), their conversions land in the
    correct convert.go next to those types. This fixes cross‑package builds and
    smooths Windows paths (PR #3748,
    fixes Issue #3745).
  • Validation
    • Fix OneOf validation in view types when a union arm uses a format (e.g.
      FormatDateTime). Prevents incorrect pointer assumptions and the resulting
      compile errors (PR #3749).
  • HTTP decoding
    • Harden query parsing: malformed nested brackets no longer panic and now
      surface a clear error: “invalid query string: malformed brackets”
      (PR #3746).
  • Codegen robustness and clarity
    • Default array handling: only cast defaults when the element type is an
      alias; supports []any, []string, numeric/bool slices, and
      expr.ArrayVal; avoids reflection for simpler, faster code
      (PR #3760).
    • Correct package qualification for inline structs referencing user types.
      This stabilizes builds in mixed package layouts and the JSON‑RPC IT
      harness (PR #3762).
    • SnakeCase also replaces “/” with “_” to produce safer identifiers
      (PR #3760).
  • Testing utilities
    • Golden diffs now use testify for cleaner output. Use -update (or -u)
      to refresh goldens. Legacy diff flags are removed; CompareOrUpdateGolden
      remains for easy migration. Auto‑formatting of .go and .json goldens
      is built‑in (PR #3766).
  • Modernization sweep
    • Broad internal cleanups (maps.Copy, slices.Contains, http.NoBody,
      fewer builtin shadowing issues, consistent file perms) improve code health
      across the board (PR #3750).

Documentation and Misc

  • Expanded JSON‑RPC documentation with practical examples so you can adopt it
    confidently (PR #3734).
  • Minor typo fixes and sponsor card update
    (PR #3756,
    PR #3752).

Dependency Updates

  • Go 1.24 toolchain; gRPC 1.74.2; x/tools 0.36.0; x/text up to 0.28.0; newer
    protobuf, x/net, x/sys, and related modules
    (PR #3765,
    PR #3751,
    PR #3739,
    PR #3740).

Thanks

Huge thanks to everyone who contributed to this release:

Full changelog: v3.21.5...v3.22.1

  • Key user‑facing changes:
    • JSON‑RPC 2.0 transport + CLI flag; new jsonrpc APIs.
    • Go 1.24 required.
    • Conversion funcs emitted per target package (fixes multi‑pkg).
    • OneOf view validation fix; safer query bracket parsing.
    • Golden diffs simplified; use -update to refresh.

v3.21.5

21 Jul 01:24
f708c97

Choose a tag to compare

Goa v3.21.5 Release Notes

Major Architectural Improvements

Eliminated Global Dependencies in Code Generation (#3721)

by @raphael

The code generation architecture has been significantly refactored to remove global state dependencies, improving maintainability and testability:

  • Non-global root expressions: Code generation now passes root expressions as parameters instead of relying on global variables
  • Restructured ServicesData: Eliminated confusing nested ServicesData structures, creating clear separation between service and transport layer data
  • Streamlined file generation: Improved naming conventions and modularity throughout the codebase
  • Maintains full backward compatibility - no changes required for existing applications

Bug Fixes

gRPC Streaming Error Handling (#3731)

by @raphael

Fixed a critical issue where gRPC streaming Recv() methods were not properly decoding custom error types:

  • Streaming methods now decode errors consistently with unary methods
  • Clients can now properly handle custom service errors defined in the DSL
  • Applies to all streaming patterns: server, client, and bidirectional
  • Fixes issue #3320

Example Generation for UserTypes (#3730)

by @raphael

Corrected example generation for UserTypes to respect validation rules and custom examples:

  • UserTypes with format validation (e.g., FormatURI) now generate format-appropriate examples
  • Custom examples defined on UserTypes are now properly used
  • Fixes issue #3716

HTTP Error Handler Code Generation (#3741)

by @nitinmohan87

Fixed multiple issues in HTTP code generation:

  • Properly generate error handler function parameter with validation attributes
  • Fixed missing generation of errhandler function in HTTP handlers (since it's optional)
  • Improved overall error handling code generation

Type Handling Improvements

  • Primitive alias types (#3742) by @raphael: Fixed casting to use underlying types instead of service types (e.g., string instead of UUID) in request building logic
  • Import generation (#3744) by @raphael: Added missing import statement generation in certain edge cases
  • Example compilation (#3743) by @raphael: Fixed various issues discovered while building the framework examples

OpenAPI Specification Enhancements

Improved MapOf Schema Generation (#3732)

by @fzyukio

Enhanced OpenAPI 3.0 schema generation for MapOf types:

  • All map values now have fully-typed schemas regardless of key type
  • Replaced ambiguous additionalProperties: true with proper type references
  • Improves compatibility with OpenAPI code generators like oapi-codegen
  • Maps with non-string keys now generate correct schemas (since OpenAPI only supports string keys)

Code Quality Improvements

Modern Error Handling (#3736)

by @tchssk

Updated generated code to use Go's modern error handling patterns:

  • Templates now use errors.Is() for error comparisons
  • Improves compatibility with wrapped errors
  • Related to issue #3541

Defensive Programming (#3727)

by @nitinmohan87

Added safety checks for nil interceptors:

  • Endpoints are now only wrapped with interceptors when they are actually provided
  • Prevents potential nil pointer dereferences

New Contributors

Full Changelog: v3.21.1...v3.21.5

v3.21.1

23 May 01:11
cee0800

Choose a tag to compare

What's Changed

  • Update Speakeasy sponsor URL by @ndimares in #3707
    This update refreshes the sponsor URL for Speakeasy, ensuring that links to this Goa framework sponsor point to the correct location.

  • Fix duplicate security schemes in generated code by @disintegrator in #3690
    This fix resolves a code generation bug that occurred when API designs used multiple security schemes of the same type. Previously, this would cause the generated Auther interface and endpoint initialization methods to contain duplicate code, breaking the build. Now, security schemes are properly deduplicated by type during code generation.

  • Clean up CI to match Go 1.23+ requirement by @tchssk in #3711
    This change removes CI builds for older Go versions that are no longer supported. Since Goa already requires Go 1.23 or newer, this update ensures the continuous integration pipeline only tests against supported Go versions, streamlining the build process.

  • Fix streaming support for aliased array types by @raphael in #3712
    This bug fix addresses an issue with streaming endpoints that use aliased array types, particularly when those types are defined with custom package paths. The fix ensures that streaming functionality works correctly with these type definitions.

New Contributors

Full Changelog: v3.21.0...v3.21.1

v3.21.0

05 May 00:34
14cebf3

Choose a tag to compare

New Features

This release adds native support for Server-Sent Events to Goa.

Additionally this release changes how Goa generated OpenAPI specification examples for aliased primitive types.
Previously each attribute using such types would have to redefine examples. Goa now uses the type example
by default for all attributes of that type.

Minor Improvements

  • Goa generated code now satisfies the latest staticcheck rules
  • Better design error message in case of invalid use of the Payload DSL function

Bug Fixes

  • Fixes in how newlines are generated (added missing newlines and removed extra newlines)
  • The HTTP code generated for SkipResponseBodyEncodeDecode does not explicitly write a HTTP status
    code anymore. The behavior should be backwards compatible (the Go stdlib package will generate
    a 200 OK status if none was written) but makes it possible for user code to write any appropriate
    status code.

What's Changed

New Contributors

Full Changelog: v3.20.1...v3.21.0

v3.20.1

26 Mar 21:02
c1976d3

Choose a tag to compare

What's Changed

Full Changelog: v3.20.0...v3.20.1

v3.20.0

22 Feb 00:32
a50bd56

Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v3.19.1...v3.20.0