Releases: goadesign/goa
v3.22.6
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
v3.22.3
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
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:
- HTTP: fix SSE Last-Event-ID behavior in generated handlers (PR #3796 (#3796)).
- JSON‑RPC: consistent request ID handling and improved client streaming result flow (PR #3777 (#3777), PR #3774 (#3774)).
- gRPC: better OneOf handling and Any validation/mapping (PR #3789 (#3789), PR #3791 (#3791), PR #3790 (https://github.com/goadesign/
goa/pull/3790)).
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
- JSON‑RPC
- gRPC
Documentation and Misc
- README badge updates and cleanup (PR #3769 (#3769), PR #3770 (#3770)).
- Add .cursorrules for a better editor experience (PR #3768 (#3768)).
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
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/-jwhen both HTTP and JSON‑RPC are available). - New
jsonrpcpackage: request/response types, error codes, helpers
(MakeSuccessResponse,MakeErrorResponse,MakeNotification,
IDToString) and aStreamConfigwithWith*options to tune WebSocket
behavior (timeouts, buffers, retries, compression, ping). - Comprehensive docs and integration tests to help you hit the ground
running (PR #3734).
- Full code generation for servers and clients; batch requests and
Improvements
- Conversion functions are now generated per target package. If your user types
includeMeta("struct:pkg:path", "..."), their conversions land in the
correctconvert.gonext to those types. This fixes cross‑package builds and
smooths Windows paths (PR #3748,
fixes Issue #3745). - Validation
- Fix
OneOfvalidation in view types when a union arm uses a format (e.g.
FormatDateTime). Prevents incorrect pointer assumptions and the resulting
compile errors (PR #3749).
- Fix
- HTTP decoding
- Harden query parsing: malformed nested brackets no longer panic and now
surface a clear error: “invalid query string: malformed brackets”
(PR #3746).
- Harden query parsing: malformed nested brackets no longer panic and now
- 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). SnakeCasealso replaces “/” with “_” to produce safer identifiers
(PR #3760).
- Default array handling: only cast defaults when the element type is an
- Testing utilities
- Golden diffs now use
testifyfor cleaner output. Use-update(or-u)
to refresh goldens. Legacy diff flags are removed;CompareOrUpdateGolden
remains for easy migration. Auto‑formatting of.goand.jsongoldens
is built‑in (PR #3766).
- Golden diffs now use
- 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).
- Broad internal cleanups (
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
jsonrpcAPIs. - Go 1.24 required.
- Conversion funcs emitted per target package (fixes multi‑pkg).
OneOfview validation fix; safer query bracket parsing.- Golden diffs simplified; use
-updateto refresh.
- JSON‑RPC 2.0 transport + CLI flag; new
v3.21.5
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)
Fixed multiple issues in HTTP code generation:
- Properly generate error handler function parameter with validation attributes
- Fixed missing generation of
errhandlerfunction 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: truewith 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)
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
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 generatedAutherinterface 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
- @disintegrator made their first contribution in #3690
Full Changelog: v3.21.0...v3.21.1
v3.21.0
New Features
This release adds native support for Server-Sent Events to Goa.
- Read the initial proposal
- Run the monitor example
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
staticcheckrules - Better design error message in case of invalid use of the
PayloadDSL function
Bug Fixes
- Fixes in how newlines are generated (added missing newlines and removed extra newlines)
- The HTTP code generated for
SkipResponseBodyEncodeDecodedoes 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
- Fix warning QF1004 of staticcheck by @mamo3gr in #3684
- Properly propagate alias types user examples by @raphael in #3685
- Use eval.InvalidArgError() to dsl.Payload() by @tchssk in #3689
- Always end template files in a newline by @MichaelUrman in #3687
- Update linter configuration and fix linting issues by @raphael in #3694
- Do not write HTTP headers with SkipResponseBodyEncodeDecode by @raphael in #3695
- SSE Support by @raphael in #3697
New Contributors
Full Changelog: v3.20.1...v3.21.0
v3.20.1
What's Changed
- Make tests independent of Goa version by @raphael in #3657
- Use eval.InvalidArgError() to dsl.Body() more by @tchssk in #3658
- Refresh README by @raphael in #3659
- Properly consider bases when validating interceptors by @raphael in #3666
- Properly handle interceptor types in custom packages by @raphael in #3667
- Properly handle root files rename by @raphael in #3674
- Add missing codegen tool import by @raphael in #3682
- Validate example compatibility after DSL evaluation by @raphael in #3683
Full Changelog: v3.20.0...v3.20.1
v3.20.0
What's Changed
- Use doc.IsPredeclared() and token.IsKeyword() for codegen.fixReservedGo() by @tchssk in #3599
- Fix conversion methods to use correct external type by @tchssk in #3607
- Remove bases from attributes once they are finalized. by @raphael in #3608
- Introducing Goa Guru on Gurubase.io by @kursataktas in #3612
- chore: update speakeasy sponsor graphic by @chailandau in #3628
- Use eval.InvalidArgError() to dsl.OneOf() by @tchssk in #3624
- Use eval.InvalidArgError() to dsl.MapParams() by @tchssk in #3634
- Initial interceptors implementation by @raphael in #3616
- Use InvalidArgError() to dsl.Type() more by @tchssk in #3635
- Allow setting protoc command via Meta by @duckbrain in #3633
- OpenAPIv3: Generate different schemas for types with different validation rules by @raphael in #3642
- Add openapi:additionalProperties Meta by @tchssk in #3644
- Fix issues reported by DeepSource by @raphael in #3646
- Address lint issues reported by DeepSource by @raphael in #3647
- Streaming Interceptors by @douglaswth in #3641
- Fix generation of unused validation functions by @raphael in #3652
- Fix a few streaming interceptor bugs by @douglaswth in #3655
- Fix client gRPC endpoint generation to appease Go 1.24 test by @douglaswth in #3656
New Contributors
- @kursataktas made their first contribution in #3612
- @chailandau made their first contribution in #3628
Full Changelog: v3.19.1...v3.20.0