Skip to content

Goa v3.31.0-preview.3

Pre-release
Pre-release

Choose a tag to compare

@raphael raphael released this 31 Aug 05:37
· 1 commit to v3 since this release
5a43414

This preview fixes generated HTTP clients for result views selected at runtime.

A server may return a smaller view, such as tiny, that intentionally omits fields required by the complete result. Earlier previews decoded that response with the complete body type. Valid responses could fail validation, and a WebSocket client could panic when a selected view omitted a required nested object.

Preview.3 generates one exact client body, validator, and conversion for each selectable view. This applies to ordinary HTTP responses and server-streaming WebSocket results. Missing view metadata selects default; unknown views and invalid selected-view bodies return precise validation errors. Mixed methods keep the ordinary HTTP result and later SSE events on their correct, separate decode paths.

Use preview.3 instead of preview.2 for further testing:

go get goa.design/goa/v3@v3.31.0-preview.3
go install goa.design/goa/v3/cmd/goa@v3.31.0-preview.3

Regenerate the complete gen tree after updating. Service client method signatures and HTTP wire formats are unchanged. Code that directly calls generated transport constructors for a dynamic viewed result may need to use the new view-specific constructor name, such as NewShowResultTinyOK.

The broader preview migration guide remains in UPGRADING.md. Please report preview-wide feedback on PR #3971.