From ea86859dfe4de7fc5d2afb3b89c76b124f85d176 Mon Sep 17 00:00:00 2001 From: "Raphael (manual office deploy after cloud-state fix)" Date: Sun, 23 Aug 2026 20:40:56 -0700 Subject: [PATCH 01/28] chore: regenerate examples with upcoming Goa contracts --- basic/gen/calc/service.go | 4 +- basic/gen/grpc/calc/client/cli.go | 2 +- basic/gen/grpc/calc/client/types.go | 7 +- .../gen/grpc/calc/pb/goagen_basic_calc.pb.go | 4 +- .../grpc/calc/pb/goagen_basic_calc_grpc.pb.go | 2 +- basic/gen/grpc/calc/server/types.go | 6 +- basic/gen/grpc/cli/calc/cli.go | 4 +- basic/gen/http/calc/client/encode_decode.go | 22 +- basic/gen/http/calc/server/server.go | 8 +- basic/gen/http/cli/calc/cli.go | 4 +- basic/gen/http/openapi3.2.json | 2 +- basic/gen/http/openapi3.2.yaml | 13 +- basic/gen/http/openapi3.json | 2 +- basic/gen/http/openapi3.yaml | 13 +- cellar/gen/grpc/cli/cellar/cli.go | 12 +- .../grpc/sommelier/client/encode_decode.go | 8 +- cellar/gen/grpc/sommelier/client/types.go | 35 +- .../pb/goagen_cellar_sommelier.pb.go | 4 +- .../pb/goagen_cellar_sommelier_grpc.pb.go | 2 +- .../grpc/sommelier/server/encode_decode.go | 2 +- cellar/gen/grpc/sommelier/server/types.go | 33 +- cellar/gen/grpc/storage/client/cli.go | 22 +- .../gen/grpc/storage/client/encode_decode.go | 19 +- cellar/gen/grpc/storage/client/types.go | 182 ++++-- .../storage/pb/goagen_cellar_storage.pb.go | 4 +- .../pb/goagen_cellar_storage_grpc.pb.go | 2 +- .../gen/grpc/storage/server/encode_decode.go | 12 +- cellar/gen/grpc/storage/server/types.go | 212 ++++--- cellar/gen/http/cli/cellar/cli.go | 14 +- cellar/gen/http/openapi.json | 2 +- cellar/gen/http/openapi.yaml | 197 +++--- cellar/gen/http/openapi3.2.json | 2 +- cellar/gen/http/openapi3.2.yaml | 387 +++++------- cellar/gen/http/openapi3.json | 2 +- cellar/gen/http/openapi3.yaml | 389 +++++------- .../http/sommelier/client/encode_decode.go | 31 +- cellar/gen/http/sommelier/client/types.go | 49 +- .../http/sommelier/server/encode_decode.go | 9 +- cellar/gen/http/storage/client/cli.go | 22 +- .../gen/http/storage/client/encode_decode.go | 167 +++-- cellar/gen/http/storage/client/types.go | 113 +++- .../gen/http/storage/server/encode_decode.go | 107 ++-- cellar/gen/http/storage/server/server.go | 4 +- cellar/gen/http/storage/server/types.go | 151 ++++- cellar/gen/http/swagger/server/server.go | 8 +- cellar/gen/sommelier/endpoints.go | 4 + cellar/gen/sommelier/service.go | 2 +- cellar/gen/sommelier/views/view.go | 14 +- cellar/gen/storage/endpoints.go | 7 + cellar/gen/storage/service.go | 4 +- cellar/gen/storage/views/view.go | 14 +- cellar/multipart.go | 13 +- concerts/gen/http/concerts/client/cli.go | 6 - .../gen/http/concerts/client/encode_decode.go | 114 +++- concerts/gen/http/concerts/client/types.go | 85 ++- concerts/gen/http/concerts/server/server.go | 8 +- concerts/gen/http/concerts/server/types.go | 12 - concerts/gen/http/openapi.json | 2 +- concerts/gen/http/openapi.yaml | 100 ++- concerts/gen/http/openapi3.2.json | 2 +- concerts/gen/http/openapi3.2.yaml | 55 +- concerts/gen/http/openapi3.json | 2 +- concerts/gen/http/openapi3.yaml | 55 +- concerts/openapi.go | 2 +- cookies/gen/http/cli/session/cli.go | 6 +- cookies/gen/http/openapi.json | 2 +- cookies/gen/http/openapi.yaml | 12 +- cookies/gen/http/openapi3.2.json | 2 +- cookies/gen/http/openapi3.2.yaml | 22 +- cookies/gen/http/openapi3.json | 2 +- cookies/gen/http/openapi3.yaml | 22 +- cookies/gen/http/session/client/cli.go | 2 +- .../gen/http/session/client/encode_decode.go | 43 +- cookies/gen/http/session/client/types.go | 4 +- cookies/gen/http/session/server/types.go | 2 +- cookies/gen/session/service.go | 4 +- encodings/cbor/gen/concat/service.go | 4 +- encodings/cbor/gen/http/cli/concat/cli.go | 9 +- .../gen/http/concat/client/encode_decode.go | 22 +- encodings/cbor/gen/http/openapi3.2.json | 2 +- encodings/cbor/gen/http/openapi3.2.yaml | 12 +- encodings/cbor/gen/http/openapi3.json | 2 +- encodings/cbor/gen/http/openapi3.yaml | 12 +- encodings/text/gen/http/cli/text/cli.go | 10 +- encodings/text/gen/http/openapi3.2.json | 2 +- encodings/text/gen/http/openapi3.2.yaml | 104 ++- encodings/text/gen/http/openapi3.json | 2 +- encodings/text/gen/http/openapi3.yaml | 104 ++- .../gen/http/text/client/encode_decode.go | 85 ++- encodings/text/gen/http/text/server/server.go | 8 +- encodings/text/gen/text/service.go | 4 +- error/gen/grpc/calc/client/cli.go | 2 +- error/gen/grpc/calc/client/types.go | 10 +- .../gen/grpc/calc/pb/goagen_error_calc.pb.go | 4 +- .../grpc/calc/pb/goagen_error_calc_grpc.pb.go | 2 +- error/gen/grpc/calc/server/types.go | 10 +- error/gen/grpc/cli/calc/cli.go | 4 +- error/gen/http/calc/client/cli.go | 2 +- error/gen/http/calc/client/encode_decode.go | 22 +- error/gen/http/calc/client/types.go | 4 +- error/gen/http/cli/calc/cli.go | 4 +- error/gen/http/openapi.json | 2 +- error/gen/http/openapi.yaml | 38 +- error/gen/http/openapi3.2.json | 2 +- error/gen/http/openapi3.2.yaml | 47 +- error/gen/http/openapi3.json | 2 +- error/gen/http/openapi3.yaml | 47 +- files/gen/http/openapi/server/server.go | 8 +- httpstatus/gen/goa.json | 3 + httpstatus/gen/hello/client.go | 14 +- httpstatus/gen/hello/endpoints.go | 20 +- httpstatus/gen/hello/service.go | 4 +- httpstatus/gen/hello/views/view.go | 6 +- httpstatus/gen/http/cli/hello/cli.go | 51 +- httpstatus/gen/http/hello/client/cli.go | 8 +- httpstatus/gen/http/hello/client/client.go | 21 +- .../gen/http/hello/client/encode_decode.go | 46 +- httpstatus/gen/http/hello/client/paths.go | 6 +- httpstatus/gen/http/hello/client/types.go | 16 +- .../gen/http/hello/server/encode_decode.go | 20 +- httpstatus/gen/http/hello/server/paths.go | 6 +- httpstatus/gen/http/hello/server/server.go | 38 +- httpstatus/gen/http/hello/server/types.go | 2 +- httpstatus/gen/http/openapi.json | 2 +- httpstatus/gen/http/openapi.yaml | 38 +- httpstatus/gen/http/openapi3.2.json | 1 + httpstatus/gen/http/openapi3.2.yaml | 66 ++ httpstatus/gen/http/openapi3.json | 2 +- httpstatus/gen/http/openapi3.yaml | 14 +- httpstatus/hello.go | 2 +- interceptors/gen/grpc/cli/interceptors/cli.go | 4 +- .../gen/grpc/interceptors/client/cli.go | 2 +- .../gen/grpc/interceptors/client/types.go | 7 +- .../pb/goagen_interceptors_interceptors.pb.go | 4 +- ...oagen_interceptors_interceptors_grpc.pb.go | 2 +- .../gen/grpc/interceptors/server/types.go | 8 +- interceptors/gen/http/cli/interceptors/cli.go | 8 +- .../gen/http/interceptors/client/cli.go | 4 +- .../http/interceptors/client/encode_decode.go | 64 +- .../gen/http/interceptors/client/types.go | 4 +- interceptors/gen/http/openapi.json | 2 +- interceptors/gen/http/openapi.yaml | 152 +++-- interceptors/gen/http/openapi3.2.json | 2 +- interceptors/gen/http/openapi3.2.yaml | 210 +++--- interceptors/gen/http/openapi3.json | 2 +- interceptors/gen/http/openapi3.yaml | 232 +++---- .../gen/interceptors/client_interceptors.go | 227 +++++-- .../gen/interceptors/interceptor_wrappers.go | 174 ++--- .../gen/interceptors/service_interceptors.go | 597 ++++++++++++------ .../interceptors/interceptors_client.go | 6 +- .../interceptors/interceptors_server.go | 12 +- multipart/gen/http/cli/resume/cli.go | 2 +- multipart/gen/http/openapi.json | 2 +- multipart/gen/http/openapi.yaml | 206 +++--- multipart/gen/http/openapi3.2.json | 2 +- multipart/gen/http/openapi3.2.yaml | 588 ++++++++--------- multipart/gen/http/openapi3.json | 2 +- multipart/gen/http/openapi3.yaml | 588 ++++++++--------- multipart/gen/http/resume/client/cli.go | 2 +- .../gen/http/resume/client/encode_decode.go | 71 ++- multipart/gen/http/resume/client/types.go | 38 +- .../gen/http/resume/server/encode_decode.go | 44 +- multipart/gen/http/resume/server/server.go | 2 +- multipart/gen/http/resume/server/types.go | 62 +- multipart/gen/resume/endpoints.go | 4 + multipart/gen/resume/views/view.go | 4 +- multipart/multipart.go | 7 +- retry/gen/grpc/cli/retry/cli.go | 4 +- retry/gen/grpc/retry/client/cli.go | 2 +- retry/gen/grpc/retry/client/types.go | 8 +- .../grpc/retry/pb/goagen_retry_retry.pb.go | 4 +- .../retry/pb/goagen_retry_retry_grpc.pb.go | 2 +- retry/gen/grpc/retry/server/types.go | 8 +- retry/gen/http/cli/retry/cli.go | 4 +- retry/gen/http/openapi.json | 2 +- retry/gen/http/openapi.yaml | 24 +- retry/gen/http/openapi3.2.json | 2 +- retry/gen/http/openapi3.2.yaml | 27 +- retry/gen/http/openapi3.json | 2 +- retry/gen/http/openapi3.yaml | 27 +- retry/gen/http/retry/client/encode_decode.go | 22 +- retry/gen/http/retry/client/types.go | 4 +- .../api_key_service/client/encode_decode.go | 43 +- .../hierarchy/gen/http/cli/hierarchy/cli.go | 10 +- .../default_service/client/encode_decode.go | 22 +- .../multiauth/gen/grpc/cli/multi_auth/cli.go | 4 +- .../gen/grpc/secured_service/client/cli.go | 2 +- .../secured_service/client/encode_decode.go | 18 +- .../gen/grpc/secured_service/client/types.go | 33 +- .../pb/goagen_multiauth_secured_service.pb.go | 4 +- ...oagen_multiauth_secured_service_grpc.pb.go | 2 +- .../gen/grpc/secured_service/server/types.go | 42 +- .../multiauth/gen/http/cli/multi_auth/cli.go | 4 +- security/multiauth/gen/http/openapi.json | 2 +- security/multiauth/gen/http/openapi.yaml | 14 +- security/multiauth/gen/http/openapi3.2.json | 2 +- security/multiauth/gen/http/openapi3.2.yaml | 32 +- security/multiauth/gen/http/openapi3.json | 2 +- security/multiauth/gen/http/openapi3.yaml | 44 +- .../secured_service/client/encode_decode.go | 89 ++- sse/README.md | 4 +- sse/gen/http/monitor/client/client.go | 8 +- sse/gen/http/monitor/client/encode_decode.go | 22 +- sse/gen/http/monitor/client/sse.go | 12 +- sse/gen/http/monitor/server/server.go | 15 +- sse/gen/http/monitor/server/sse.go | 72 +-- sse/gen/http/openapi.json | 2 +- sse/gen/http/openapi.yaml | 4 +- sse/gen/http/openapi3.2.json | 2 +- sse/gen/http/openapi3.2.yaml | 4 +- sse/gen/http/openapi3.json | 2 +- sse/gen/http/openapi3.yaml | 6 +- sse/gen/monitor/service.go | 4 +- streaming/chatter.go | 18 +- streaming/chattercli.go | 4 - streaming/design/design.go | 4 +- streaming/gen/chatter/service.go | 4 +- streaming/gen/chatter/views/view.go | 4 +- streaming/gen/grpc/chatter/client/cli.go | 8 + streaming/gen/grpc/chatter/client/client.go | 27 +- .../gen/grpc/chatter/client/encode_decode.go | 38 +- streaming/gen/grpc/chatter/client/types.go | 53 +- .../chatter/pb/goagen_streaming_chatter.pb.go | 4 +- .../pb/goagen_streaming_chatter_grpc.pb.go | 2 +- .../gen/grpc/chatter/server/encode_decode.go | 18 +- streaming/gen/grpc/chatter/server/server.go | 34 +- streaming/gen/grpc/chatter/server/types.go | 92 +-- streaming/gen/grpc/cli/chatter/cli.go | 10 +- streaming/gen/http/chatter/client/cli.go | 8 + .../gen/http/chatter/client/encode_decode.go | 127 ++-- streaming/gen/http/chatter/client/types.go | 3 +- .../gen/http/chatter/server/encode_decode.go | 5 + .../gen/http/chatter/server/websocket.go | 35 +- streaming/gen/http/cli/chatter/cli.go | 10 +- streaming/gen/http/openapi.json | 2 +- streaming/gen/http/openapi.yaml | 82 +-- streaming/gen/http/openapi3.2.json | 2 +- streaming/gen/http/openapi3.2.yaml | 127 ++-- streaming/gen/http/openapi3.json | 2 +- streaming/gen/http/openapi3.yaml | 147 +++-- tracing/cmd/calc/http.go | 8 +- tus/gen/http/cli/upload/cli.go | 10 +- tus/gen/http/openapi.json | 2 +- tus/gen/http/openapi.yaml | 66 +- tus/gen/http/openapi3.2.json | 2 +- tus/gen/http/openapi3.2.yaml | 128 ++-- tus/gen/http/openapi3.json | 2 +- tus/gen/http/openapi3.yaml | 128 ++-- tus/gen/http/tus/client/cli.go | 10 +- tus/gen/http/tus/client/encode_decode.go | 111 +++- .../gen/http/cli/upload_download/cli.go | 2 +- upload_download/gen/http/openapi.json | 2 +- upload_download/gen/http/openapi.yaml | 74 ++- upload_download/gen/http/openapi3.2.json | 2 +- upload_download/gen/http/openapi3.2.yaml | 38 +- upload_download/gen/http/openapi3.json | 2 +- upload_download/gen/http/openapi3.yaml | 38 +- .../gen/http/updown/client/client.go | 5 +- .../gen/http/updown/client/encode_decode.go | 42 +- .../gen/http/updown/client/types.go | 10 +- 260 files changed, 5375 insertions(+), 4090 deletions(-) create mode 100644 httpstatus/gen/goa.json create mode 100644 httpstatus/gen/http/openapi3.2.json create mode 100644 httpstatus/gen/http/openapi3.2.yaml diff --git a/basic/gen/calc/service.go b/basic/gen/calc/service.go index af84a42cd..8727cef45 100644 --- a/basic/gen/calc/service.go +++ b/basic/gen/calc/service.go @@ -7,9 +7,7 @@ package calc -import ( - "context" -) +import "context" // The calc service performs operations on numbers type Service interface { diff --git a/basic/gen/grpc/calc/client/cli.go b/basic/gen/grpc/calc/client/cli.go index 0ccdafb9b..1cbfdcf8a 100644 --- a/basic/gen/grpc/calc/client/cli.go +++ b/basic/gen/grpc/calc/client/cli.go @@ -24,7 +24,7 @@ func BuildMultiplyPayload(calcMultiplyMessage string) (*calc.MultiplyPayload, er if calcMultiplyMessage != "" { err = json.Unmarshal([]byte(calcMultiplyMessage), &message) if err != nil { - return nil, fmt.Errorf("invalid JSON for message, \nerror: %s, \nexample of valid JSON:\n%s", err, "'{\n \"a\": 7452483468033160813,\n \"b\": 6772490184910890684\n }'") + return nil, fmt.Errorf("invalid JSON for message, \nerror: %s, \nexample of valid JSON:\n%s", err, "'{\n \"a\": 7630570414871587529,\n \"b\": 2968728213815611862\n }'") } } } diff --git a/basic/gen/grpc/calc/client/types.go b/basic/gen/grpc/calc/client/types.go index 891765032..079e02838 100644 --- a/basic/gen/grpc/calc/client/types.go +++ b/basic/gen/grpc/calc/client/types.go @@ -12,8 +12,8 @@ import ( calcpb "goa.design/examples/basic/gen/grpc/calc/pb" ) -// NewProtoMultiplyRequest builds the gRPC request type from the payload of the -// "multiply" endpoint of the "calc" service. +// NewProtoMultiplyRequest builds *calcpb.MultiplyRequest from +// *calc.MultiplyPayload. func NewProtoMultiplyRequest(payload *calc.MultiplyPayload) *calcpb.MultiplyRequest { message := &calcpb.MultiplyRequest{ A: int32(payload.A), @@ -22,8 +22,7 @@ func NewProtoMultiplyRequest(payload *calc.MultiplyPayload) *calcpb.MultiplyRequ return message } -// NewMultiplyResult builds the result type of the "multiply" endpoint of the -// "calc" service from the gRPC response type. +// NewMultiplyResult builds int from *calcpb.MultiplyResponse. func NewMultiplyResult(message *calcpb.MultiplyResponse) int { result := int(message.Field) return result diff --git a/basic/gen/grpc/calc/pb/goagen_basic_calc.pb.go b/basic/gen/grpc/calc/pb/goagen_basic_calc.pb.go index 26e3ac59f..bb3e0290e 100644 --- a/basic/gen/grpc/calc/pb/goagen_basic_calc.pb.go +++ b/basic/gen/grpc/calc/pb/goagen_basic_calc.pb.go @@ -7,8 +7,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.36.11 -// protoc v7.34.1 +// protoc-gen-go v1.36.12 +// protoc v7.36.0 // source: goagen_basic_calc.proto package calcpb diff --git a/basic/gen/grpc/calc/pb/goagen_basic_calc_grpc.pb.go b/basic/gen/grpc/calc/pb/goagen_basic_calc_grpc.pb.go index e56b61643..4564326e0 100644 --- a/basic/gen/grpc/calc/pb/goagen_basic_calc_grpc.pb.go +++ b/basic/gen/grpc/calc/pb/goagen_basic_calc_grpc.pb.go @@ -8,7 +8,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.6.2 -// - protoc v7.34.1 +// - protoc v7.36.0 // source: goagen_basic_calc.proto package calcpb diff --git a/basic/gen/grpc/calc/server/types.go b/basic/gen/grpc/calc/server/types.go index b5a6cdfd9..4ff1c9655 100644 --- a/basic/gen/grpc/calc/server/types.go +++ b/basic/gen/grpc/calc/server/types.go @@ -12,8 +12,7 @@ import ( calcpb "goa.design/examples/basic/gen/grpc/calc/pb" ) -// NewMultiplyPayload builds the payload of the "multiply" endpoint of the -// "calc" service from the gRPC request type. +// NewMultiplyPayload builds *calc.MultiplyPayload from *calcpb.MultiplyRequest. func NewMultiplyPayload(message *calcpb.MultiplyRequest) *calc.MultiplyPayload { v := &calc.MultiplyPayload{ A: int(message.A), @@ -22,8 +21,7 @@ func NewMultiplyPayload(message *calcpb.MultiplyRequest) *calc.MultiplyPayload { return v } -// NewProtoMultiplyResponse builds the gRPC response type from the result of -// the "multiply" endpoint of the "calc" service. +// NewProtoMultiplyResponse builds *calcpb.MultiplyResponse from int. func NewProtoMultiplyResponse(result int) *calcpb.MultiplyResponse { message := &calcpb.MultiplyResponse{} message.Field = int32(result) diff --git a/basic/gen/grpc/cli/calc/cli.go b/basic/gen/grpc/cli/calc/cli.go index 6543c27f4..2e2378b9e 100644 --- a/basic/gen/grpc/cli/calc/cli.go +++ b/basic/gen/grpc/cli/calc/cli.go @@ -28,7 +28,7 @@ func UsageCommands() []string { // UsageExamples produces an example of a valid invocation of the CLI tool. func UsageExamples() string { - return os.Args[0] + " " + "calc multiply --message '{\n \"a\": 7452483468033160813,\n \"b\": 6772490184910890684\n }'" + "\n" + + return os.Args[0] + " " + "calc multiply --message '{\n \"a\": 7630570414871587529,\n \"b\": 2968728213815611862\n }'" + "\n" + "" } @@ -147,5 +147,5 @@ func calcMultiplyUsage() { fmt.Fprintln(os.Stderr) fmt.Fprintln(os.Stderr, "Example:") - fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "calc multiply --message '{\n \"a\": 7452483468033160813,\n \"b\": 6772490184910890684\n }'") + fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "calc multiply --message '{\n \"a\": 7630570414871587529,\n \"b\": 2968728213815611862\n }'") } diff --git a/basic/gen/http/calc/client/encode_decode.go b/basic/gen/http/calc/client/encode_decode.go index fffd67aab..ef440157d 100644 --- a/basic/gen/http/calc/client/encode_decode.go +++ b/basic/gen/http/calc/client/encode_decode.go @@ -10,6 +10,7 @@ package client import ( "bytes" "context" + "errors" "io" "net/http" "net/url" @@ -49,18 +50,24 @@ func (c *Client) BuildMultiplyRequest(ctx context.Context, v any) (*http.Request // multiply endpoint. restoreBody controls whether the response body should be // restored after having been read. func DecodeMultiplyResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (any, error) { - return func(resp *http.Response) (any, error) { + return func(resp *http.Response) (result any, decodeErr error) { + responseBody := resp.Body if restoreBody { - b, err := io.ReadAll(resp.Body) - if err != nil { - return nil, err + b, readErr := io.ReadAll(responseBody) + closeErr := responseBody.Close() + if err := errors.Join(readErr, closeErr); err != nil { + return nil, goahttp.ErrDecodingError("calc", "multiply", err) } resp.Body = io.NopCloser(bytes.NewBuffer(b)) defer func() { resp.Body = io.NopCloser(bytes.NewBuffer(b)) }() } else { - defer resp.Body.Close() + defer func() { + if err := responseBody.Close(); err != nil { + decodeErr = errors.Join(decodeErr, goahttp.ErrDecodingError("calc", "multiply", err)) + } + }() } switch resp.StatusCode { case http.StatusOK: @@ -74,7 +81,10 @@ func DecodeMultiplyResponse(decoder func(*http.Response) goahttp.Decoder, restor } return body, nil default: - body, _ := io.ReadAll(resp.Body) + body, err := io.ReadAll(resp.Body) + if err != nil { + return nil, goahttp.ErrDecodingError("calc", "multiply", err) + } return nil, goahttp.ErrInvalidResponse("calc", "multiply", resp.StatusCode, string(body)) } } diff --git a/basic/gen/http/calc/server/server.go b/basic/gen/http/calc/server/server.go index bcc2f3fda..3987e77da 100644 --- a/basic/gen/http/calc/server/server.go +++ b/basic/gen/http/calc/server/server.go @@ -139,15 +139,14 @@ func NewMultiplyHandler( }) } -// appendFS is a custom implementation of fs.FS that appends a specified prefix -// to the file paths before delegating the Open call to the underlying fs.FS. +// appendFS adds a fixed directory to file paths before opening them. type appendFS struct { prefix string fs http.FileSystem } // Open opens the named file, appending the prefix to the file path before -// passing it to the underlying fs.FS. +// passing it to the underlying file system. func (s appendFS) Open(name string) (http.File, error) { switch name { case "/openapi.json": @@ -156,8 +155,7 @@ func (s appendFS) Open(name string) (http.File, error) { return s.fs.Open(path.Join(s.prefix, name)) } -// appendPrefix returns a new fs.FS that appends the specified prefix to file paths -// before delegating to the provided embed.FS. +// appendPrefix returns a file system that adds prefix before opening each path. func appendPrefix(fsys http.FileSystem, prefix string) http.FileSystem { return appendFS{prefix: prefix, fs: fsys} } diff --git a/basic/gen/http/cli/calc/cli.go b/basic/gen/http/cli/calc/cli.go index cd317cd48..330293e74 100644 --- a/basic/gen/http/cli/calc/cli.go +++ b/basic/gen/http/cli/calc/cli.go @@ -29,7 +29,7 @@ func UsageCommands() []string { // UsageExamples produces an example of a valid invocation of the CLI tool. func UsageExamples() string { - return os.Args[0] + " " + "calc multiply --a 2827624921536156404 --b 5648438437472980127" + "\n" + + return os.Args[0] + " " + "calc multiply --a 8789074496583346340 --b 7413121258658775183" + "\n" + "" } @@ -154,5 +154,5 @@ func calcMultiplyUsage() { fmt.Fprintln(os.Stderr) fmt.Fprintln(os.Stderr, "Example:") - fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "calc multiply --a 2827624921536156404 --b 5648438437472980127") + fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "calc multiply --a 8789074496583346340 --b 7413121258658775183") } diff --git a/basic/gen/http/openapi3.2.json b/basic/gen/http/openapi3.2.json index cda3da9f3..ec634cfb7 100644 --- a/basic/gen/http/openapi3.2.json +++ b/basic/gen/http/openapi3.2.json @@ -1 +1 @@ -{"openapi":"3.2.0","info":{"title":"Calculator Service","description":"HTTP service for multiplying numbers, a goa teaser","version":"0.0.1"},"servers":[{"url":"http://localhost:8000/calc","name":"calc-development","description":"calc hosts the Calculator Service."},{"url":"https://{version}.goa.design/calc","name":"calc-production","description":"calc hosts the Calculator Service.","variables":{"version":{"default":"v1"}}}],"paths":{"/multiply/{a}/{b}":{"get":{"tags":["calc"],"summary":"multiply calc","operationId":"calc#multiply","parameters":[{"name":"a","in":"path","description":"Left operand","required":true,"schema":{"type":"integer","description":"Left operand","example":2827624921536156404,"format":"int64"},"example":1382634857916332518},{"name":"b","in":"path","description":"Right operand","required":true,"schema":{"type":"integer","description":"Right operand","example":5648438437472980127,"format":"int64"},"example":6509684248140511211}],"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"type":"integer","example":4628236506152770078,"format":"int64"},"example":4628236506152770078}}}}}},"/openapi.json":{"get":{"tags":["calc"],"summary":"Download gen/http/openapi3.json","operationId":"calc#/openapi.json","responses":{"200":{"description":"File downloaded"}}}}},"components":{},"tags":[{"name":"calc","description":"The calc service performs operations on numbers"}]} \ No newline at end of file +{"openapi":"3.2.0","info":{"title":"Calculator Service","description":"HTTP service for multiplying numbers, a goa teaser","version":"0.0.1"},"servers":[{"url":"http://localhost:8000/calc","name":"calc-development","description":"calc hosts the Calculator Service."},{"url":"https://{version}.goa.design/calc","name":"calc-production","description":"calc hosts the Calculator Service.","variables":{"version":{"default":"v1","description":"API version"}}}],"paths":{"/multiply/{a}/{b}":{"get":{"tags":["calc"],"summary":"multiply calc","operationId":"calc#multiply","parameters":[{"name":"a","in":"path","description":"Left operand","required":true,"schema":{"type":"integer","description":"Left operand","example":8789074496583346340,"format":"int64"},"example":8789074496583346340},{"name":"b","in":"path","description":"Right operand","required":true,"schema":{"type":"integer","description":"Right operand","example":7413121258658775183,"format":"int64"},"example":7413121258658775183}],"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"type":"integer","example":9089701625346839968,"format":"int64"},"example":9089701625346839968}}}}}},"/openapi.json":{"get":{"tags":["calc"],"summary":"Download gen/http/openapi3.json","operationId":"calc#/openapi.json","responses":{"200":{"description":"File downloaded"}}}}},"components":{},"tags":[{"name":"calc","description":"The calc service performs operations on numbers"}]} \ No newline at end of file diff --git a/basic/gen/http/openapi3.2.yaml b/basic/gen/http/openapi3.2.yaml index 11acaa09c..0fd2caaa1 100644 --- a/basic/gen/http/openapi3.2.yaml +++ b/basic/gen/http/openapi3.2.yaml @@ -13,6 +13,7 @@ servers: variables: version: default: v1 + description: API version paths: /multiply/{a}/{b}: get: @@ -28,9 +29,9 @@ paths: schema: type: integer description: Left operand - example: 2827624921536156404 + example: 8789074496583346340 format: int64 - example: 1382634857916332518 + example: 8789074496583346340 - name: b in: path description: Right operand @@ -38,9 +39,9 @@ paths: schema: type: integer description: Right operand - example: 5648438437472980127 + example: 7413121258658775183 format: int64 - example: 6509684248140511211 + example: 7413121258658775183 responses: "200": description: OK response. @@ -48,9 +49,9 @@ paths: application/json: schema: type: integer - example: 4628236506152770078 + example: 9089701625346839968 format: int64 - example: 4628236506152770078 + example: 9089701625346839968 /openapi.json: get: tags: diff --git a/basic/gen/http/openapi3.json b/basic/gen/http/openapi3.json index ea97b0450..668036fb7 100644 --- a/basic/gen/http/openapi3.json +++ b/basic/gen/http/openapi3.json @@ -1 +1 @@ -{"openapi":"3.0.3","info":{"title":"Calculator Service","description":"HTTP service for multiplying numbers, a goa teaser","version":"0.0.1"},"servers":[{"url":"http://localhost:8000/calc","description":"calc hosts the Calculator Service."},{"url":"https://{version}.goa.design/calc","description":"calc hosts the Calculator Service.","variables":{"version":{"default":"v1"}}}],"paths":{"/multiply/{a}/{b}":{"get":{"tags":["calc"],"summary":"multiply calc","operationId":"calc#multiply","parameters":[{"name":"a","in":"path","description":"Left operand","required":true,"schema":{"type":"integer","description":"Left operand","example":2827624921536156404,"format":"int64"},"example":1382634857916332518},{"name":"b","in":"path","description":"Right operand","required":true,"schema":{"type":"integer","description":"Right operand","example":5648438437472980127,"format":"int64"},"example":6509684248140511211}],"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"type":"integer","example":4628236506152770078,"format":"int64"},"example":4628236506152770078}}}}}},"/openapi.json":{"get":{"tags":["calc"],"summary":"Download gen/http/openapi3.json","operationId":"calc#/openapi.json","responses":{"200":{"description":"File downloaded"}}}}},"components":{},"tags":[{"name":"calc","description":"The calc service performs operations on numbers"}]} \ No newline at end of file +{"openapi":"3.0.3","info":{"title":"Calculator Service","description":"HTTP service for multiplying numbers, a goa teaser","version":"0.0.1"},"servers":[{"url":"http://localhost:8000/calc","description":"calc hosts the Calculator Service."},{"url":"https://{version}.goa.design/calc","description":"calc hosts the Calculator Service.","variables":{"version":{"default":"v1","description":"API version"}}}],"paths":{"/multiply/{a}/{b}":{"get":{"tags":["calc"],"summary":"multiply calc","operationId":"calc#multiply","parameters":[{"name":"a","in":"path","description":"Left operand","required":true,"schema":{"type":"integer","description":"Left operand","example":8789074496583346340,"format":"int64"},"example":8789074496583346340},{"name":"b","in":"path","description":"Right operand","required":true,"schema":{"type":"integer","description":"Right operand","example":7413121258658775183,"format":"int64"},"example":7413121258658775183}],"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"type":"integer","example":9089701625346839968,"format":"int64"},"example":9089701625346839968}}}}}},"/openapi.json":{"get":{"tags":["calc"],"summary":"Download gen/http/openapi3.json","operationId":"calc#/openapi.json","responses":{"200":{"description":"File downloaded"}}}}},"components":{},"tags":[{"name":"calc","description":"The calc service performs operations on numbers"}]} \ No newline at end of file diff --git a/basic/gen/http/openapi3.yaml b/basic/gen/http/openapi3.yaml index a27093181..e1720319b 100644 --- a/basic/gen/http/openapi3.yaml +++ b/basic/gen/http/openapi3.yaml @@ -11,6 +11,7 @@ servers: variables: version: default: v1 + description: API version paths: /multiply/{a}/{b}: get: @@ -26,9 +27,9 @@ paths: schema: type: integer description: Left operand - example: 2827624921536156404 + example: 8789074496583346340 format: int64 - example: 1382634857916332518 + example: 8789074496583346340 - name: b in: path description: Right operand @@ -36,9 +37,9 @@ paths: schema: type: integer description: Right operand - example: 5648438437472980127 + example: 7413121258658775183 format: int64 - example: 6509684248140511211 + example: 7413121258658775183 responses: "200": description: OK response. @@ -46,9 +47,9 @@ paths: application/json: schema: type: integer - example: 4628236506152770078 + example: 9089701625346839968 format: int64 - example: 4628236506152770078 + example: 9089701625346839968 /openapi.json: get: tags: diff --git a/cellar/gen/grpc/cli/cellar/cli.go b/cellar/gen/grpc/cli/cellar/cli.go index 3e2cc593d..5b13274e9 100644 --- a/cellar/gen/grpc/cli/cellar/cli.go +++ b/cellar/gen/grpc/cli/cellar/cli.go @@ -286,7 +286,7 @@ func storageShowUsage() { fmt.Fprintln(os.Stderr) fmt.Fprintln(os.Stderr, "Example:") - fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "storage show --message '{\n \"id\": \"Sed voluptatibus excepturi culpa aut aliquam ea.\"\n }' --view \"tiny\"") + fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "storage show --message '{\n \"id\": \"Neque voluptas molestias.\"\n }' --view \"tiny\"") } func storageAddUsage() { @@ -304,7 +304,7 @@ func storageAddUsage() { fmt.Fprintln(os.Stderr) fmt.Fprintln(os.Stderr, "Example:") - fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "storage add --message '{\n \"composition\": [\n {\n \"percentage\": 62,\n \"varietal\": \"Syrah\"\n },\n {\n \"percentage\": 62,\n \"varietal\": \"Syrah\"\n },\n {\n \"percentage\": 62,\n \"varietal\": \"Syrah\"\n }\n ],\n \"description\": \"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah\",\n \"name\": \"Blue\\'s Cuvee\",\n \"rating\": 1,\n \"vintage\": 2015,\n \"winery\": {\n \"country\": \"USA\",\n \"name\": \"Longoria\",\n \"region\": \"Central Coast, California\",\n \"url\": \"http://www.longoriawine.com/\"\n }\n }'") + fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "storage add --message '{\n \"composition\": [\n {\n \"percentage\": 8,\n \"varietal\": \"Syrah\"\n },\n {\n \"percentage\": 8,\n \"varietal\": \"Syrah\"\n }\n ],\n \"description\": \"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah\",\n \"name\": \"Blue\\'s Cuvee\",\n \"rating\": 2,\n \"vintage\": 1918,\n \"winery\": {\n \"country\": \"USA\",\n \"name\": \"Longoria\",\n \"region\": \"Central Coast, California\",\n \"url\": \"http://www.longoriawine.com/\"\n }\n }'") } func storageRemoveUsage() { @@ -322,7 +322,7 @@ func storageRemoveUsage() { fmt.Fprintln(os.Stderr) fmt.Fprintln(os.Stderr, "Example:") - fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "storage remove --message '{\n \"id\": \"At commodi tempore iure qui cumque.\"\n }'") + fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "storage remove --message '{\n \"id\": \"Consectetur quaerat neque sed.\"\n }'") } func storageRateUsage() { @@ -340,7 +340,7 @@ func storageRateUsage() { fmt.Fprintln(os.Stderr) fmt.Fprintln(os.Stderr, "Example:") - fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "storage rate --message '{\n \"field\": {\n \"2226247690\": {\n \"field\": [\n \"Fugiat rem ut eaque explicabo iure non.\",\n \"Quo eius perspiciatis est ut.\",\n \"Magni nihil tenetur dolorem.\",\n \"Quod quae ut debitis iste.\"\n ]\n }\n }\n }'") + fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "storage rate --message '{\n \"field\": {\n \"3188487350\": {\n \"field\": [\n \"Sed quibusdam quidem.\",\n \"Dolore ratione libero.\"\n ]\n },\n \"507886676\": {\n \"field\": [\n \"Sed quibusdam quidem.\",\n \"Dolore ratione libero.\"\n ]\n },\n \"890945719\": {\n \"field\": [\n \"Sed quibusdam quidem.\",\n \"Dolore ratione libero.\"\n ]\n }\n }\n }'") } func storageMultiAddUsage() { @@ -358,7 +358,7 @@ func storageMultiAddUsage() { fmt.Fprintln(os.Stderr) fmt.Fprintln(os.Stderr, "Example:") - fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "storage multi-add --message '{\n \"field\": [\n {\n \"composition\": [\n {\n \"percentage\": 62,\n \"varietal\": \"Syrah\"\n },\n {\n \"percentage\": 62,\n \"varietal\": \"Syrah\"\n },\n {\n \"percentage\": 62,\n \"varietal\": \"Syrah\"\n },\n {\n \"percentage\": 62,\n \"varietal\": \"Syrah\"\n }\n ],\n \"description\": \"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah\",\n \"name\": \"Blue\\'s Cuvee\",\n \"rating\": 4,\n \"vintage\": 1967,\n \"winery\": {\n \"country\": \"USA\",\n \"name\": \"Longoria\",\n \"region\": \"Central Coast, California\",\n \"url\": \"http://www.longoriawine.com/\"\n }\n },\n {\n \"composition\": [\n {\n \"percentage\": 62,\n \"varietal\": \"Syrah\"\n },\n {\n \"percentage\": 62,\n \"varietal\": \"Syrah\"\n },\n {\n \"percentage\": 62,\n \"varietal\": \"Syrah\"\n },\n {\n \"percentage\": 62,\n \"varietal\": \"Syrah\"\n }\n ],\n \"description\": \"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah\",\n \"name\": \"Blue\\'s Cuvee\",\n \"rating\": 4,\n \"vintage\": 1967,\n \"winery\": {\n \"country\": \"USA\",\n \"name\": \"Longoria\",\n \"region\": \"Central Coast, California\",\n \"url\": \"http://www.longoriawine.com/\"\n }\n },\n {\n \"composition\": [\n {\n \"percentage\": 62,\n \"varietal\": \"Syrah\"\n },\n {\n \"percentage\": 62,\n \"varietal\": \"Syrah\"\n },\n {\n \"percentage\": 62,\n \"varietal\": \"Syrah\"\n },\n {\n \"percentage\": 62,\n \"varietal\": \"Syrah\"\n }\n ],\n \"description\": \"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah\",\n \"name\": \"Blue\\'s Cuvee\",\n \"rating\": 4,\n \"vintage\": 1967,\n \"winery\": {\n \"country\": \"USA\",\n \"name\": \"Longoria\",\n \"region\": \"Central Coast, California\",\n \"url\": \"http://www.longoriawine.com/\"\n }\n }\n ]\n }'") + fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "storage multi-add --message '{\n \"field\": [\n {\n \"composition\": [\n {\n \"percentage\": 8,\n \"varietal\": \"Syrah\"\n },\n {\n \"percentage\": 8,\n \"varietal\": \"Syrah\"\n },\n {\n \"percentage\": 8,\n \"varietal\": \"Syrah\"\n }\n ],\n \"description\": \"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah\",\n \"name\": \"Blue\\'s Cuvee\",\n \"rating\": 3,\n \"vintage\": 2003,\n \"winery\": {\n \"country\": \"USA\",\n \"name\": \"Longoria\",\n \"region\": \"Central Coast, California\",\n \"url\": \"http://www.longoriawine.com/\"\n }\n },\n {\n \"composition\": [\n {\n \"percentage\": 8,\n \"varietal\": \"Syrah\"\n },\n {\n \"percentage\": 8,\n \"varietal\": \"Syrah\"\n },\n {\n \"percentage\": 8,\n \"varietal\": \"Syrah\"\n }\n ],\n \"description\": \"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah\",\n \"name\": \"Blue\\'s Cuvee\",\n \"rating\": 3,\n \"vintage\": 2003,\n \"winery\": {\n \"country\": \"USA\",\n \"name\": \"Longoria\",\n \"region\": \"Central Coast, California\",\n \"url\": \"http://www.longoriawine.com/\"\n }\n }\n ]\n }'") } func storageMultiUpdateUsage() { @@ -376,5 +376,5 @@ func storageMultiUpdateUsage() { fmt.Fprintln(os.Stderr) fmt.Fprintln(os.Stderr, "Example:") - fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "storage multi-update --message '{\n \"bottles\": [\n {\n \"composition\": [\n {\n \"percentage\": 62,\n \"varietal\": \"Syrah\"\n },\n {\n \"percentage\": 62,\n \"varietal\": \"Syrah\"\n },\n {\n \"percentage\": 62,\n \"varietal\": \"Syrah\"\n },\n {\n \"percentage\": 62,\n \"varietal\": \"Syrah\"\n }\n ],\n \"description\": \"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah\",\n \"name\": \"Blue\\'s Cuvee\",\n \"rating\": 4,\n \"vintage\": 1967,\n \"winery\": {\n \"country\": \"USA\",\n \"name\": \"Longoria\",\n \"region\": \"Central Coast, California\",\n \"url\": \"http://www.longoriawine.com/\"\n }\n },\n {\n \"composition\": [\n {\n \"percentage\": 62,\n \"varietal\": \"Syrah\"\n },\n {\n \"percentage\": 62,\n \"varietal\": \"Syrah\"\n },\n {\n \"percentage\": 62,\n \"varietal\": \"Syrah\"\n },\n {\n \"percentage\": 62,\n \"varietal\": \"Syrah\"\n }\n ],\n \"description\": \"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah\",\n \"name\": \"Blue\\'s Cuvee\",\n \"rating\": 4,\n \"vintage\": 1967,\n \"winery\": {\n \"country\": \"USA\",\n \"name\": \"Longoria\",\n \"region\": \"Central Coast, California\",\n \"url\": \"http://www.longoriawine.com/\"\n }\n },\n {\n \"composition\": [\n {\n \"percentage\": 62,\n \"varietal\": \"Syrah\"\n },\n {\n \"percentage\": 62,\n \"varietal\": \"Syrah\"\n },\n {\n \"percentage\": 62,\n \"varietal\": \"Syrah\"\n },\n {\n \"percentage\": 62,\n \"varietal\": \"Syrah\"\n }\n ],\n \"description\": \"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah\",\n \"name\": \"Blue\\'s Cuvee\",\n \"rating\": 4,\n \"vintage\": 1967,\n \"winery\": {\n \"country\": \"USA\",\n \"name\": \"Longoria\",\n \"region\": \"Central Coast, California\",\n \"url\": \"http://www.longoriawine.com/\"\n }\n }\n ],\n \"ids\": [\n \"Pariatur porro fugiat et ex voluptates molestias.\",\n \"Rem cupiditate.\",\n \"Dolorem id et dolore.\"\n ]\n }'") + fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "storage multi-update --message '{\n \"bottles\": [\n {\n \"composition\": [\n {\n \"percentage\": 8,\n \"varietal\": \"Syrah\"\n },\n {\n \"percentage\": 8,\n \"varietal\": \"Syrah\"\n },\n {\n \"percentage\": 8,\n \"varietal\": \"Syrah\"\n }\n ],\n \"description\": \"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah\",\n \"name\": \"Blue\\'s Cuvee\",\n \"rating\": 3,\n \"vintage\": 2003,\n \"winery\": {\n \"country\": \"USA\",\n \"name\": \"Longoria\",\n \"region\": \"Central Coast, California\",\n \"url\": \"http://www.longoriawine.com/\"\n }\n },\n {\n \"composition\": [\n {\n \"percentage\": 8,\n \"varietal\": \"Syrah\"\n },\n {\n \"percentage\": 8,\n \"varietal\": \"Syrah\"\n },\n {\n \"percentage\": 8,\n \"varietal\": \"Syrah\"\n }\n ],\n \"description\": \"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah\",\n \"name\": \"Blue\\'s Cuvee\",\n \"rating\": 3,\n \"vintage\": 2003,\n \"winery\": {\n \"country\": \"USA\",\n \"name\": \"Longoria\",\n \"region\": \"Central Coast, California\",\n \"url\": \"http://www.longoriawine.com/\"\n }\n }\n ],\n \"ids\": [\n \"Nihil voluptatibus aut mollitia ipsam.\",\n \"Qui optio non voluptate rem adipisci soluta.\",\n \"Omnis corporis quod veritatis temporibus dolores.\",\n \"Dolores voluptatem sunt architecto consequatur non.\"\n ]\n }'") } diff --git a/cellar/gen/grpc/sommelier/client/encode_decode.go b/cellar/gen/grpc/sommelier/client/encode_decode.go index 02f14fbf4..62e55e44b 100644 --- a/cellar/gen/grpc/sommelier/client/encode_decode.go +++ b/cellar/gen/grpc/sommelier/client/encode_decode.go @@ -43,18 +43,12 @@ func EncodePickRequest(ctx context.Context, v any, md *metadata.MD) (any, error) // DecodePickResponse decodes responses from the sommelier pick endpoint. func DecodePickResponse(ctx context.Context, v any, hdr, trlr metadata.MD) (any, error) { - var view string - { - if vals := hdr.Get("goa-view"); len(vals) > 0 { - view = vals[0] - } - } message, ok := v.(*sommelierpb.StoredBottleCollection) if !ok { return nil, goagrpc.ErrInvalidType("sommelier", "pick", "*sommelierpb.StoredBottleCollection", v) } res := NewPickResult(message) - vres := sommelierviews.StoredBottleCollection{Projected: res, View: view} + vres := sommelierviews.StoredBottleCollection{Projected: res, View: "default"} if err := sommelierviews.ValidateStoredBottleCollection(vres); err != nil { return nil, err } diff --git a/cellar/gen/grpc/sommelier/client/types.go b/cellar/gen/grpc/sommelier/client/types.go index 44ef89bc3..77ecc4d7b 100644 --- a/cellar/gen/grpc/sommelier/client/types.go +++ b/cellar/gen/grpc/sommelier/client/types.go @@ -16,8 +16,7 @@ import ( goa "goa.design/goa/v3/pkg" ) -// NewProtoPickRequest builds the gRPC request type from the payload of the -// "pick" endpoint of the "sommelier" service. +// NewProtoPickRequest builds *sommelierpb.PickRequest from *sommelier.Criteria. func NewProtoPickRequest(payload *sommelier.Criteria) *sommelierpb.PickRequest { message := &sommelierpb.PickRequest{ Name: payload.Name, @@ -32,8 +31,8 @@ func NewProtoPickRequest(payload *sommelier.Criteria) *sommelierpb.PickRequest { return message } -// NewPickResult builds the result type of the "pick" endpoint of the -// "sommelier" service from the gRPC response type. +// NewPickResult builds sommelierviews.StoredBottleCollectionView from +// *sommelierpb.StoredBottleCollection. func NewPickResult(message *sommelierpb.StoredBottleCollection) sommelierviews.StoredBottleCollectionView { result := make([]*sommelierviews.StoredBottleView, len(message.Field)) for i, val := range message.Field { @@ -45,7 +44,7 @@ func NewPickResult(message *sommelierpb.StoredBottleCollection) sommelierviews.S Rating: val.Rating, } if val.Winery != nil { - result[i].Winery = protobufSommelierpbWineryToSommelierviewsWineryView(val.Winery) + result[i].Winery = transformProtoWineryToWineryView(val.Winery) } if val.Composition != nil { result[i].Composition = make([]*sommelierviews.ComponentView, len(val.Composition)) @@ -108,8 +107,6 @@ func ValidateStoredBottle(elem *sommelierpb.StoredBottle) (err error) { if *elem.Rating < 1 { err = goa.MergeErrors(err, goa.InvalidRangeError("elem.rating", *elem.Rating, 1, true)) } - } - if elem.Rating != nil { if *elem.Rating > 5 { err = goa.MergeErrors(err, goa.InvalidRangeError("elem.rating", *elem.Rating, 5, false)) } @@ -137,8 +134,6 @@ func ValidateComponent(elem *sommelierpb.Component) (err error) { if *elem.Percentage < 1 { err = goa.MergeErrors(err, goa.InvalidRangeError("elem.percentage", *elem.Percentage, 1, true)) } - } - if elem.Percentage != nil { if *elem.Percentage > 100 { err = goa.MergeErrors(err, goa.InvalidRangeError("elem.percentage", *elem.Percentage, 100, false)) } @@ -146,27 +141,11 @@ func ValidateComponent(elem *sommelierpb.Component) (err error) { return } -// svcSommelierviewsWineryViewToSommelierpbWinery builds a value of type -// *sommelierpb.Winery from a value of type *sommelierviews.WineryView. -func svcSommelierviewsWineryViewToSommelierpbWinery(v *sommelierviews.WineryView) *sommelierpb.Winery { - res := &sommelierpb.Winery{ - Name: *v.Name, - Region: *v.Region, - Country: *v.Country, - Url: v.URL, - } - - return res -} - -// protobufSommelierpbWineryToSommelierviewsWineryView builds a value of type +// transformProtoWineryToWineryView builds a value of type // *sommelierviews.WineryView from a value of type *sommelierpb.Winery. -func protobufSommelierpbWineryToSommelierviewsWineryView(v *sommelierpb.Winery) *sommelierviews.WineryView { +func transformProtoWineryToWineryView(v *sommelierpb.Winery) *sommelierviews.WineryView { res := &sommelierviews.WineryView{ - Name: &v.Name, - Region: &v.Region, - Country: &v.Country, - URL: v.Url, + Name: &v.Name, } return res diff --git a/cellar/gen/grpc/sommelier/pb/goagen_cellar_sommelier.pb.go b/cellar/gen/grpc/sommelier/pb/goagen_cellar_sommelier.pb.go index cbc2088f9..b38dc5e68 100644 --- a/cellar/gen/grpc/sommelier/pb/goagen_cellar_sommelier.pb.go +++ b/cellar/gen/grpc/sommelier/pb/goagen_cellar_sommelier.pb.go @@ -7,8 +7,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.36.11 -// protoc v7.34.1 +// protoc-gen-go v1.36.12 +// protoc v7.36.0 // source: goagen_cellar_sommelier.proto package sommelierpb diff --git a/cellar/gen/grpc/sommelier/pb/goagen_cellar_sommelier_grpc.pb.go b/cellar/gen/grpc/sommelier/pb/goagen_cellar_sommelier_grpc.pb.go index 0e8f37f7b..3f0a7ca36 100644 --- a/cellar/gen/grpc/sommelier/pb/goagen_cellar_sommelier_grpc.pb.go +++ b/cellar/gen/grpc/sommelier/pb/goagen_cellar_sommelier_grpc.pb.go @@ -8,7 +8,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.6.2 -// - protoc v7.34.1 +// - protoc v7.36.0 // source: goagen_cellar_sommelier.proto package sommelierpb diff --git a/cellar/gen/grpc/sommelier/server/encode_decode.go b/cellar/gen/grpc/sommelier/server/encode_decode.go index 161de89ec..5bab22034 100644 --- a/cellar/gen/grpc/sommelier/server/encode_decode.go +++ b/cellar/gen/grpc/sommelier/server/encode_decode.go @@ -25,8 +25,8 @@ func EncodePickResponse(ctx context.Context, v any, hdr, trlr *metadata.MD) (any return nil, goagrpc.ErrInvalidType("sommelier", "pick", "sommelierviews.StoredBottleCollection", v) } result := vres.Projected - (*hdr).Append("goa-view", vres.View) resp := NewProtoStoredBottleCollection(result) + (*hdr).Append("goa-view", "default") return resp, nil } diff --git a/cellar/gen/grpc/sommelier/server/types.go b/cellar/gen/grpc/sommelier/server/types.go index 477ec0fc0..31d31b9b9 100644 --- a/cellar/gen/grpc/sommelier/server/types.go +++ b/cellar/gen/grpc/sommelier/server/types.go @@ -13,8 +13,7 @@ import ( sommelierviews "goa.design/examples/cellar/gen/sommelier/views" ) -// NewPickPayload builds the payload of the "pick" endpoint of the "sommelier" -// service from the gRPC request type. +// NewPickPayload builds *sommelier.Criteria from *sommelierpb.PickRequest. func NewPickPayload(message *sommelierpb.PickRequest) *sommelier.Criteria { v := &sommelier.Criteria{ Name: message.Name, @@ -29,8 +28,8 @@ func NewPickPayload(message *sommelierpb.PickRequest) *sommelier.Criteria { return v } -// NewProtoStoredBottleCollection builds the gRPC response type from the result -// of the "pick" endpoint of the "sommelier" service. +// NewProtoStoredBottleCollection builds *sommelierpb.StoredBottleCollection +// from sommelierviews.StoredBottleCollectionView. func NewProtoStoredBottleCollection(result sommelierviews.StoredBottleCollectionView) *sommelierpb.StoredBottleCollection { message := &sommelierpb.StoredBottleCollection{} message.Field = make([]*sommelierpb.StoredBottle, len(result)) @@ -43,7 +42,7 @@ func NewProtoStoredBottleCollection(result sommelierviews.StoredBottleCollection Rating: val.Rating, } if val.Winery != nil { - message.Field[i].Winery = svcSommelierviewsWineryViewToSommelierpbWinery(val.Winery) + message.Field[i].Winery = transformWineryViewToProtoWinery(val.Winery) } if val.Composition != nil { message.Field[i].Composition = make([]*sommelierpb.Component, len(val.Composition)) @@ -58,27 +57,11 @@ func NewProtoStoredBottleCollection(result sommelierviews.StoredBottleCollection return message } -// svcSommelierviewsWineryViewToSommelierpbWinery builds a value of type -// *sommelierpb.Winery from a value of type *sommelierviews.WineryView. -func svcSommelierviewsWineryViewToSommelierpbWinery(v *sommelierviews.WineryView) *sommelierpb.Winery { +// transformWineryViewToProtoWinery builds a value of type *sommelierpb.Winery +// from a value of type *sommelierviews.WineryView. +func transformWineryViewToProtoWinery(v *sommelierviews.WineryView) *sommelierpb.Winery { res := &sommelierpb.Winery{ - Name: *v.Name, - Region: *v.Region, - Country: *v.Country, - Url: v.URL, - } - - return res -} - -// protobufSommelierpbWineryToSommelierviewsWineryView builds a value of type -// *sommelierviews.WineryView from a value of type *sommelierpb.Winery. -func protobufSommelierpbWineryToSommelierviewsWineryView(v *sommelierpb.Winery) *sommelierviews.WineryView { - res := &sommelierviews.WineryView{ - Name: &v.Name, - Region: &v.Region, - Country: &v.Country, - URL: v.Url, + Name: *v.Name, } return res diff --git a/cellar/gen/grpc/storage/client/cli.go b/cellar/gen/grpc/storage/client/cli.go index f9c8e7caa..c42c03c42 100644 --- a/cellar/gen/grpc/storage/client/cli.go +++ b/cellar/gen/grpc/storage/client/cli.go @@ -25,7 +25,7 @@ func BuildShowPayload(storageShowMessage string, storageShowView string) (*stora if storageShowMessage != "" { err = json.Unmarshal([]byte(storageShowMessage), &message) if err != nil { - return nil, fmt.Errorf("invalid JSON for message, \nerror: %s, \nexample of valid JSON:\n%s", err, "'{\n \"id\": \"Sed voluptatibus excepturi culpa aut aliquam ea.\"\n }'") + return nil, fmt.Errorf("invalid JSON for message, \nerror: %s, \nexample of valid JSON:\n%s", err, "'{\n \"id\": \"Neque voluptas molestias.\"\n }'") } } } @@ -33,8 +33,8 @@ func BuildShowPayload(storageShowMessage string, storageShowView string) (*stora { if storageShowView != "" { view = &storageShowView - if !(*view == "default" || *view == "tiny") { - err = goa.MergeErrors(err, goa.InvalidEnumValueError("view", *view, []any{"default", "tiny"})) + if !(storageShowView == "default" || storageShowView == "tiny") { + err = goa.MergeErrors(err, goa.InvalidEnumValueError("view", storageShowView, []any{"default", "tiny"})) } if err != nil { return nil, err @@ -58,7 +58,7 @@ func BuildAddPayload(storageAddMessage string) (*storage.Bottle, error) { if storageAddMessage != "" { err = json.Unmarshal([]byte(storageAddMessage), &message) if err != nil { - return nil, fmt.Errorf("invalid JSON for message, \nerror: %s, \nexample of valid JSON:\n%s", err, "'{\n \"composition\": [\n {\n \"percentage\": 62,\n \"varietal\": \"Syrah\"\n },\n {\n \"percentage\": 62,\n \"varietal\": \"Syrah\"\n },\n {\n \"percentage\": 62,\n \"varietal\": \"Syrah\"\n }\n ],\n \"description\": \"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah\",\n \"name\": \"Blue\\'s Cuvee\",\n \"rating\": 1,\n \"vintage\": 2015,\n \"winery\": {\n \"country\": \"USA\",\n \"name\": \"Longoria\",\n \"region\": \"Central Coast, California\",\n \"url\": \"http://www.longoriawine.com/\"\n }\n }'") + return nil, fmt.Errorf("invalid JSON for message, \nerror: %s, \nexample of valid JSON:\n%s", err, "'{\n \"composition\": [\n {\n \"percentage\": 8,\n \"varietal\": \"Syrah\"\n },\n {\n \"percentage\": 8,\n \"varietal\": \"Syrah\"\n }\n ],\n \"description\": \"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah\",\n \"name\": \"Blue\\'s Cuvee\",\n \"rating\": 2,\n \"vintage\": 1918,\n \"winery\": {\n \"country\": \"USA\",\n \"name\": \"Longoria\",\n \"region\": \"Central Coast, California\",\n \"url\": \"http://www.longoriawine.com/\"\n }\n }'") } } } @@ -69,7 +69,7 @@ func BuildAddPayload(storageAddMessage string) (*storage.Bottle, error) { Rating: message.Rating, } if message.Winery != nil { - v.Winery = protobufStoragepbWineryToStorageWinery(message.Winery) + v.Winery = transformProtoAddRequestWineryToBottleWinery(message.Winery) } if message.Composition != nil { v.Composition = make([]*storage.Component, len(message.Composition)) @@ -93,7 +93,7 @@ func BuildRemovePayload(storageRemoveMessage string) (*storage.RemovePayload, er if storageRemoveMessage != "" { err = json.Unmarshal([]byte(storageRemoveMessage), &message) if err != nil { - return nil, fmt.Errorf("invalid JSON for message, \nerror: %s, \nexample of valid JSON:\n%s", err, "'{\n \"id\": \"At commodi tempore iure qui cumque.\"\n }'") + return nil, fmt.Errorf("invalid JSON for message, \nerror: %s, \nexample of valid JSON:\n%s", err, "'{\n \"id\": \"Consectetur quaerat neque sed.\"\n }'") } } } @@ -113,7 +113,7 @@ func BuildRatePayload(storageRateMessage string) (map[uint32][]string, error) { if storageRateMessage != "" { err = json.Unmarshal([]byte(storageRateMessage), &message) if err != nil { - return nil, fmt.Errorf("invalid JSON for message, \nerror: %s, \nexample of valid JSON:\n%s", err, "'{\n \"field\": {\n \"2226247690\": {\n \"field\": [\n \"Fugiat rem ut eaque explicabo iure non.\",\n \"Quo eius perspiciatis est ut.\",\n \"Magni nihil tenetur dolorem.\",\n \"Quod quae ut debitis iste.\"\n ]\n }\n }\n }'") + return nil, fmt.Errorf("invalid JSON for message, \nerror: %s, \nexample of valid JSON:\n%s", err, "'{\n \"field\": {\n \"3188487350\": {\n \"field\": [\n \"Sed quibusdam quidem.\",\n \"Dolore ratione libero.\"\n ]\n },\n \"507886676\": {\n \"field\": [\n \"Sed quibusdam quidem.\",\n \"Dolore ratione libero.\"\n ]\n },\n \"890945719\": {\n \"field\": [\n \"Sed quibusdam quidem.\",\n \"Dolore ratione libero.\"\n ]\n }\n }\n }'") } } } @@ -138,7 +138,7 @@ func BuildMultiAddPayload(storageMultiAddMessage string) ([]*storage.Bottle, err if storageMultiAddMessage != "" { err = json.Unmarshal([]byte(storageMultiAddMessage), &message) if err != nil { - return nil, fmt.Errorf("invalid JSON for message, \nerror: %s, \nexample of valid JSON:\n%s", err, "'{\n \"field\": [\n {\n \"composition\": [\n {\n \"percentage\": 62,\n \"varietal\": \"Syrah\"\n },\n {\n \"percentage\": 62,\n \"varietal\": \"Syrah\"\n },\n {\n \"percentage\": 62,\n \"varietal\": \"Syrah\"\n },\n {\n \"percentage\": 62,\n \"varietal\": \"Syrah\"\n }\n ],\n \"description\": \"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah\",\n \"name\": \"Blue\\'s Cuvee\",\n \"rating\": 4,\n \"vintage\": 1967,\n \"winery\": {\n \"country\": \"USA\",\n \"name\": \"Longoria\",\n \"region\": \"Central Coast, California\",\n \"url\": \"http://www.longoriawine.com/\"\n }\n },\n {\n \"composition\": [\n {\n \"percentage\": 62,\n \"varietal\": \"Syrah\"\n },\n {\n \"percentage\": 62,\n \"varietal\": \"Syrah\"\n },\n {\n \"percentage\": 62,\n \"varietal\": \"Syrah\"\n },\n {\n \"percentage\": 62,\n \"varietal\": \"Syrah\"\n }\n ],\n \"description\": \"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah\",\n \"name\": \"Blue\\'s Cuvee\",\n \"rating\": 4,\n \"vintage\": 1967,\n \"winery\": {\n \"country\": \"USA\",\n \"name\": \"Longoria\",\n \"region\": \"Central Coast, California\",\n \"url\": \"http://www.longoriawine.com/\"\n }\n },\n {\n \"composition\": [\n {\n \"percentage\": 62,\n \"varietal\": \"Syrah\"\n },\n {\n \"percentage\": 62,\n \"varietal\": \"Syrah\"\n },\n {\n \"percentage\": 62,\n \"varietal\": \"Syrah\"\n },\n {\n \"percentage\": 62,\n \"varietal\": \"Syrah\"\n }\n ],\n \"description\": \"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah\",\n \"name\": \"Blue\\'s Cuvee\",\n \"rating\": 4,\n \"vintage\": 1967,\n \"winery\": {\n \"country\": \"USA\",\n \"name\": \"Longoria\",\n \"region\": \"Central Coast, California\",\n \"url\": \"http://www.longoriawine.com/\"\n }\n }\n ]\n }'") + return nil, fmt.Errorf("invalid JSON for message, \nerror: %s, \nexample of valid JSON:\n%s", err, "'{\n \"field\": [\n {\n \"composition\": [\n {\n \"percentage\": 8,\n \"varietal\": \"Syrah\"\n },\n {\n \"percentage\": 8,\n \"varietal\": \"Syrah\"\n },\n {\n \"percentage\": 8,\n \"varietal\": \"Syrah\"\n }\n ],\n \"description\": \"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah\",\n \"name\": \"Blue\\'s Cuvee\",\n \"rating\": 3,\n \"vintage\": 2003,\n \"winery\": {\n \"country\": \"USA\",\n \"name\": \"Longoria\",\n \"region\": \"Central Coast, California\",\n \"url\": \"http://www.longoriawine.com/\"\n }\n },\n {\n \"composition\": [\n {\n \"percentage\": 8,\n \"varietal\": \"Syrah\"\n },\n {\n \"percentage\": 8,\n \"varietal\": \"Syrah\"\n },\n {\n \"percentage\": 8,\n \"varietal\": \"Syrah\"\n }\n ],\n \"description\": \"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah\",\n \"name\": \"Blue\\'s Cuvee\",\n \"rating\": 3,\n \"vintage\": 2003,\n \"winery\": {\n \"country\": \"USA\",\n \"name\": \"Longoria\",\n \"region\": \"Central Coast, California\",\n \"url\": \"http://www.longoriawine.com/\"\n }\n }\n ]\n }'") } } } @@ -151,7 +151,7 @@ func BuildMultiAddPayload(storageMultiAddMessage string) ([]*storage.Bottle, err Rating: val.Rating, } if val.Winery != nil { - v[i].Winery = protobufStoragepbWineryToStorageWinery(val.Winery) + v[i].Winery = transformProtoMultiAddRequestWineryToMultiAddRequestWinery(val.Winery) } if val.Composition != nil { v[i].Composition = make([]*storage.Component, len(val.Composition)) @@ -175,7 +175,7 @@ func BuildMultiUpdatePayload(storageMultiUpdateMessage string) (*storage.MultiUp if storageMultiUpdateMessage != "" { err = json.Unmarshal([]byte(storageMultiUpdateMessage), &message) if err != nil { - return nil, fmt.Errorf("invalid JSON for message, \nerror: %s, \nexample of valid JSON:\n%s", err, "'{\n \"bottles\": [\n {\n \"composition\": [\n {\n \"percentage\": 62,\n \"varietal\": \"Syrah\"\n },\n {\n \"percentage\": 62,\n \"varietal\": \"Syrah\"\n },\n {\n \"percentage\": 62,\n \"varietal\": \"Syrah\"\n },\n {\n \"percentage\": 62,\n \"varietal\": \"Syrah\"\n }\n ],\n \"description\": \"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah\",\n \"name\": \"Blue\\'s Cuvee\",\n \"rating\": 4,\n \"vintage\": 1967,\n \"winery\": {\n \"country\": \"USA\",\n \"name\": \"Longoria\",\n \"region\": \"Central Coast, California\",\n \"url\": \"http://www.longoriawine.com/\"\n }\n },\n {\n \"composition\": [\n {\n \"percentage\": 62,\n \"varietal\": \"Syrah\"\n },\n {\n \"percentage\": 62,\n \"varietal\": \"Syrah\"\n },\n {\n \"percentage\": 62,\n \"varietal\": \"Syrah\"\n },\n {\n \"percentage\": 62,\n \"varietal\": \"Syrah\"\n }\n ],\n \"description\": \"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah\",\n \"name\": \"Blue\\'s Cuvee\",\n \"rating\": 4,\n \"vintage\": 1967,\n \"winery\": {\n \"country\": \"USA\",\n \"name\": \"Longoria\",\n \"region\": \"Central Coast, California\",\n \"url\": \"http://www.longoriawine.com/\"\n }\n },\n {\n \"composition\": [\n {\n \"percentage\": 62,\n \"varietal\": \"Syrah\"\n },\n {\n \"percentage\": 62,\n \"varietal\": \"Syrah\"\n },\n {\n \"percentage\": 62,\n \"varietal\": \"Syrah\"\n },\n {\n \"percentage\": 62,\n \"varietal\": \"Syrah\"\n }\n ],\n \"description\": \"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah\",\n \"name\": \"Blue\\'s Cuvee\",\n \"rating\": 4,\n \"vintage\": 1967,\n \"winery\": {\n \"country\": \"USA\",\n \"name\": \"Longoria\",\n \"region\": \"Central Coast, California\",\n \"url\": \"http://www.longoriawine.com/\"\n }\n }\n ],\n \"ids\": [\n \"Pariatur porro fugiat et ex voluptates molestias.\",\n \"Rem cupiditate.\",\n \"Dolorem id et dolore.\"\n ]\n }'") + return nil, fmt.Errorf("invalid JSON for message, \nerror: %s, \nexample of valid JSON:\n%s", err, "'{\n \"bottles\": [\n {\n \"composition\": [\n {\n \"percentage\": 8,\n \"varietal\": \"Syrah\"\n },\n {\n \"percentage\": 8,\n \"varietal\": \"Syrah\"\n },\n {\n \"percentage\": 8,\n \"varietal\": \"Syrah\"\n }\n ],\n \"description\": \"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah\",\n \"name\": \"Blue\\'s Cuvee\",\n \"rating\": 3,\n \"vintage\": 2003,\n \"winery\": {\n \"country\": \"USA\",\n \"name\": \"Longoria\",\n \"region\": \"Central Coast, California\",\n \"url\": \"http://www.longoriawine.com/\"\n }\n },\n {\n \"composition\": [\n {\n \"percentage\": 8,\n \"varietal\": \"Syrah\"\n },\n {\n \"percentage\": 8,\n \"varietal\": \"Syrah\"\n },\n {\n \"percentage\": 8,\n \"varietal\": \"Syrah\"\n }\n ],\n \"description\": \"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah\",\n \"name\": \"Blue\\'s Cuvee\",\n \"rating\": 3,\n \"vintage\": 2003,\n \"winery\": {\n \"country\": \"USA\",\n \"name\": \"Longoria\",\n \"region\": \"Central Coast, California\",\n \"url\": \"http://www.longoriawine.com/\"\n }\n }\n ],\n \"ids\": [\n \"Nihil voluptatibus aut mollitia ipsam.\",\n \"Qui optio non voluptate rem adipisci soluta.\",\n \"Omnis corporis quod veritatis temporibus dolores.\",\n \"Dolores voluptatem sunt architecto consequatur non.\"\n ]\n }'") } } } @@ -196,7 +196,7 @@ func BuildMultiUpdatePayload(storageMultiUpdateMessage string) (*storage.MultiUp Rating: val.Rating, } if val.Winery != nil { - v.Bottles[i].Winery = protobufStoragepbWineryToStorageWinery(val.Winery) + v.Bottles[i].Winery = transformProtoMultiUpdateRequestWineryToMultiUpdatePayloadWinery(val.Winery) } if val.Composition != nil { v.Bottles[i].Composition = make([]*storage.Component, len(val.Composition)) diff --git a/cellar/gen/grpc/storage/client/encode_decode.go b/cellar/gen/grpc/storage/client/encode_decode.go index d1448a131..0f1ed46f3 100644 --- a/cellar/gen/grpc/storage/client/encode_decode.go +++ b/cellar/gen/grpc/storage/client/encode_decode.go @@ -34,18 +34,12 @@ func BuildListFunc(grpccli storagepb.StorageClient, cliopts ...grpc.CallOption) // DecodeListResponse decodes responses from the storage list endpoint. func DecodeListResponse(ctx context.Context, v any, hdr, trlr metadata.MD) (any, error) { - var view string - { - if vals := hdr.Get("goa-view"); len(vals) > 0 { - view = vals[0] - } - } message, ok := v.(*storagepb.StoredBottleCollection) if !ok { return nil, goagrpc.ErrInvalidType("storage", "list", "*storagepb.StoredBottleCollection", v) } res := NewListResult(message) - vres := storageviews.StoredBottleCollection{Projected: res, View: view} + vres := storageviews.StoredBottleCollection{Projected: res, View: "tiny"} if err := storageviews.ValidateStoredBottleCollection(vres); err != nil { return nil, err } @@ -73,7 +67,8 @@ func EncodeShowRequest(ctx context.Context, v any, md *metadata.MD) (any, error) return nil, goagrpc.ErrInvalidType("storage", "show", "*storage.ShowPayload", v) } if payload.View != nil { - (*md).Append("view", *payload.View) + viewWire := *payload.View + (*md).Append("view", viewWire) } return NewProtoShowRequest(payload), nil } @@ -90,7 +85,13 @@ func DecodeShowResponse(ctx context.Context, v any, hdr, trlr metadata.MD) (any, if !ok { return nil, goagrpc.ErrInvalidType("storage", "show", "*storagepb.ShowResponse", v) } - res := NewShowResult(message) + var res *storageviews.StoredBottleView + switch view { + case "default", "": + res = NewShowResult(message) + case "tiny": + res = NewShowResultTiny(message) + } vres := &storageviews.StoredBottle{Projected: res, View: view} if err := storageviews.ValidateStoredBottle(vres); err != nil { return nil, err diff --git a/cellar/gen/grpc/storage/client/types.go b/cellar/gen/grpc/storage/client/types.go index f4e3bb0b1..bfb182a5c 100644 --- a/cellar/gen/grpc/storage/client/types.go +++ b/cellar/gen/grpc/storage/client/types.go @@ -16,43 +16,29 @@ import ( goa "goa.design/goa/v3/pkg" ) -// NewProtoListRequest builds the gRPC request type from the payload of the -// "list" endpoint of the "storage" service. +// NewProtoListRequest builds *storagepb.ListRequest from metadata values. func NewProtoListRequest() *storagepb.ListRequest { message := &storagepb.ListRequest{} return message } -// NewListResult builds the result type of the "list" endpoint of the "storage" -// service from the gRPC response type. +// NewListResult builds storageviews.StoredBottleCollectionView from +// *storagepb.StoredBottleCollection. func NewListResult(message *storagepb.StoredBottleCollection) storageviews.StoredBottleCollectionView { result := make([]*storageviews.StoredBottleView, len(message.Field)) for i, val := range message.Field { result[i] = &storageviews.StoredBottleView{ - ID: &val.Id, - Name: &val.Name, - Vintage: &val.Vintage, - Description: val.Description, - Rating: val.Rating, + ID: &val.Id, + Name: &val.Name, } if val.Winery != nil { - result[i].Winery = protobufStoragepbWineryToStorageviewsWineryView(val.Winery) - } - if val.Composition != nil { - result[i].Composition = make([]*storageviews.ComponentView, len(val.Composition)) - for j, val := range val.Composition { - result[i].Composition[j] = &storageviews.ComponentView{ - Varietal: &val.Varietal, - Percentage: val.Percentage, - } - } + result[i].Winery = transformProtoStoredBottleCollectionWineryToStoredBottleCollectionViewWineryView(val.Winery) } } return result } -// NewProtoShowRequest builds the gRPC request type from the payload of the -// "show" endpoint of the "storage" service. +// NewProtoShowRequest builds *storagepb.ShowRequest from *storage.ShowPayload. func NewProtoShowRequest(payload *storage.ShowPayload) *storagepb.ShowRequest { message := &storagepb.ShowRequest{ Id: payload.ID, @@ -60,8 +46,8 @@ func NewProtoShowRequest(payload *storage.ShowPayload) *storagepb.ShowRequest { return message } -// NewShowResult builds the result type of the "show" endpoint of the "storage" -// service from the gRPC response type. +// NewShowResult builds *storageviews.StoredBottleView from +// *storagepb.ShowResponse. func NewShowResult(message *storagepb.ShowResponse) *storageviews.StoredBottleView { result := &storageviews.StoredBottleView{ ID: &message.Id, @@ -71,7 +57,7 @@ func NewShowResult(message *storagepb.ShowResponse) *storageviews.StoredBottleVi Rating: message.Rating, } if message.Winery != nil { - result.Winery = protobufStoragepbWineryToStorageviewsWineryView(message.Winery) + result.Winery = transformProtoShowResponseWineryToStoredBottleViewWineryView(message.Winery) } if message.Composition != nil { result.Composition = make([]*storageviews.ComponentView, len(message.Composition)) @@ -85,8 +71,21 @@ func NewShowResult(message *storagepb.ShowResponse) *storageviews.StoredBottleVi return result } -// NewShowNotFoundError builds the error type of the "show" endpoint of the -// "storage" service from the gRPC error response type. +// NewShowResultTiny builds *storageviews.StoredBottleView from +// *storagepb.ShowResponse. +func NewShowResultTiny(message *storagepb.ShowResponse) *storageviews.StoredBottleView { + result := &storageviews.StoredBottleView{ + ID: &message.Id, + Name: &message.Name, + } + if message.Winery != nil { + result.Winery = transformProtoWineryToWineryViewTiny(message.Winery) + } + return result +} + +// NewShowNotFoundError builds *storage.NotFound from +// *storagepb.ShowNotFoundError. func NewShowNotFoundError(message *storagepb.ShowNotFoundError) *storage.NotFound { er := &storage.NotFound{ Message: message.Message_, @@ -95,8 +94,7 @@ func NewShowNotFoundError(message *storagepb.ShowNotFoundError) *storage.NotFoun return er } -// NewProtoAddRequest builds the gRPC request type from the payload of the -// "add" endpoint of the "storage" service. +// NewProtoAddRequest builds *storagepb.AddRequest from *storage.Bottle. func NewProtoAddRequest(payload *storage.Bottle) *storagepb.AddRequest { message := &storagepb.AddRequest{ Name: payload.Name, @@ -105,7 +103,7 @@ func NewProtoAddRequest(payload *storage.Bottle) *storagepb.AddRequest { Rating: payload.Rating, } if payload.Winery != nil { - message.Winery = svcStorageWineryToStoragepbWinery(payload.Winery) + message.Winery = transformBottleWineryToProtoAddRequestWinery(payload.Winery) } if payload.Composition != nil { message.Composition = make([]*storagepb.Component, len(payload.Composition)) @@ -119,15 +117,14 @@ func NewProtoAddRequest(payload *storage.Bottle) *storagepb.AddRequest { return message } -// NewAddResult builds the result type of the "add" endpoint of the "storage" -// service from the gRPC response type. +// NewAddResult builds string from *storagepb.AddResponse. func NewAddResult(message *storagepb.AddResponse) string { result := message.Field return result } -// NewProtoRemoveRequest builds the gRPC request type from the payload of the -// "remove" endpoint of the "storage" service. +// NewProtoRemoveRequest builds *storagepb.RemoveRequest from +// *storage.RemovePayload. func NewProtoRemoveRequest(payload *storage.RemovePayload) *storagepb.RemoveRequest { message := &storagepb.RemoveRequest{ Id: payload.ID, @@ -135,8 +132,7 @@ func NewProtoRemoveRequest(payload *storage.RemovePayload) *storagepb.RemoveRequ return message } -// NewProtoRateRequest builds the gRPC request type from the payload of the -// "rate" endpoint of the "storage" service. +// NewProtoRateRequest builds *storagepb.RateRequest from map[uint32][]string. func NewProtoRateRequest(payload map[uint32][]string) *storagepb.RateRequest { message := &storagepb.RateRequest{} message.Field = make(map[uint32]*storagepb.ArrayOfString, len(payload)) @@ -152,8 +148,8 @@ func NewProtoRateRequest(payload map[uint32][]string) *storagepb.RateRequest { return message } -// NewProtoMultiAddRequest builds the gRPC request type from the payload of the -// "multi_add" endpoint of the "storage" service. +// NewProtoMultiAddRequest builds *storagepb.MultiAddRequest from +// []*storage.Bottle. func NewProtoMultiAddRequest(payload []*storage.Bottle) *storagepb.MultiAddRequest { message := &storagepb.MultiAddRequest{} message.Field = make([]*storagepb.Bottle, len(payload)) @@ -165,7 +161,7 @@ func NewProtoMultiAddRequest(payload []*storage.Bottle) *storagepb.MultiAddReque Rating: val.Rating, } if val.Winery != nil { - message.Field[i].Winery = svcStorageWineryToStoragepbWinery(val.Winery) + message.Field[i].Winery = transformMultiAddRequestWineryToProtoMultiAddRequestWinery(val.Winery) } if val.Composition != nil { message.Field[i].Composition = make([]*storagepb.Component, len(val.Composition)) @@ -180,8 +176,7 @@ func NewProtoMultiAddRequest(payload []*storage.Bottle) *storagepb.MultiAddReque return message } -// NewMultiAddResult builds the result type of the "multi_add" endpoint of the -// "storage" service from the gRPC response type. +// NewMultiAddResult builds []string from *storagepb.MultiAddResponse. func NewMultiAddResult(message *storagepb.MultiAddResponse) []string { result := make([]string, len(message.Field)) for i, val := range message.Field { @@ -190,8 +185,8 @@ func NewMultiAddResult(message *storagepb.MultiAddResponse) []string { return result } -// NewProtoMultiUpdateRequest builds the gRPC request type from the payload of -// the "multi_update" endpoint of the "storage" service. +// NewProtoMultiUpdateRequest builds *storagepb.MultiUpdateRequest from +// *storage.MultiUpdatePayload. func NewProtoMultiUpdateRequest(payload *storage.MultiUpdatePayload) *storagepb.MultiUpdateRequest { message := &storagepb.MultiUpdateRequest{} if payload.Ids != nil { @@ -210,7 +205,7 @@ func NewProtoMultiUpdateRequest(payload *storage.MultiUpdatePayload) *storagepb. Rating: val.Rating, } if val.Winery != nil { - message.Bottles[i].Winery = svcStorageWineryToStoragepbWinery(val.Winery) + message.Bottles[i].Winery = transformMultiUpdatePayloadWineryToProtoMultiUpdateRequestWinery(val.Winery) } if val.Composition != nil { message.Bottles[i].Composition = make([]*storagepb.Component, len(val.Composition)) @@ -274,8 +269,6 @@ func ValidateStoredBottle(elem *storagepb.StoredBottle) (err error) { if *elem.Rating < 1 { err = goa.MergeErrors(err, goa.InvalidRangeError("elem.rating", *elem.Rating, 1, true)) } - } - if elem.Rating != nil { if *elem.Rating > 5 { err = goa.MergeErrors(err, goa.InvalidRangeError("elem.rating", *elem.Rating, 5, false)) } @@ -303,8 +296,6 @@ func ValidateComponent(elem *storagepb.Component) (err error) { if *elem.Percentage < 1 { err = goa.MergeErrors(err, goa.InvalidRangeError("elem.percentage", *elem.Percentage, 1, true)) } - } - if elem.Percentage != nil { if *elem.Percentage > 100 { err = goa.MergeErrors(err, goa.InvalidRangeError("elem.percentage", *elem.Percentage, 100, false)) } @@ -347,8 +338,6 @@ func ValidateShowResponse(message *storagepb.ShowResponse) (err error) { if *message.Rating < 1 { err = goa.MergeErrors(err, goa.InvalidRangeError("message.rating", *message.Rating, 1, true)) } - } - if message.Rating != nil { if *message.Rating > 5 { err = goa.MergeErrors(err, goa.InvalidRangeError("message.rating", *message.Rating, 5, false)) } @@ -356,35 +345,53 @@ func ValidateShowResponse(message *storagepb.ShowResponse) (err error) { return } -// svcStorageviewsWineryViewToStoragepbWinery builds a value of type -// *storagepb.Winery from a value of type *storageviews.WineryView. -func svcStorageviewsWineryViewToStoragepbWinery(v *storageviews.WineryView) *storagepb.Winery { - res := &storagepb.Winery{ - Name: *v.Name, - Region: *v.Region, - Country: *v.Country, - Url: v.URL, +// transformProtoStoredBottleCollectionWineryToStoredBottleCollectionViewWineryView +// builds a value of type *storageviews.WineryView from a value of type +// *storagepb.Winery. +func transformProtoStoredBottleCollectionWineryToStoredBottleCollectionViewWineryView(v *storagepb.Winery) *storageviews.WineryView { + res := &storageviews.WineryView{ + Name: &v.Name, + } + + return res +} + +// transformProtoShowResponseWineryToStoredBottleViewWineryView builds a value +// of type *storageviews.WineryView from a value of type *storagepb.Winery. +func transformProtoShowResponseWineryToStoredBottleViewWineryView(v *storagepb.Winery) *storageviews.WineryView { + res := &storageviews.WineryView{ + Name: &v.Name, } return res } -// protobufStoragepbWineryToStorageviewsWineryView builds a value of type +// transformProtoWineryToWineryViewTiny builds a value of type // *storageviews.WineryView from a value of type *storagepb.Winery. -func protobufStoragepbWineryToStorageviewsWineryView(v *storagepb.Winery) *storageviews.WineryView { +func transformProtoWineryToWineryViewTiny(v *storagepb.Winery) *storageviews.WineryView { res := &storageviews.WineryView{ - Name: &v.Name, - Region: &v.Region, - Country: &v.Country, - URL: v.Url, + Name: &v.Name, } return res } -// protobufStoragepbWineryToStorageWinery builds a value of type +// transformBottleWineryToProtoAddRequestWinery builds a value of type +// *storagepb.Winery from a value of type *storage.Winery. +func transformBottleWineryToProtoAddRequestWinery(v *storage.Winery) *storagepb.Winery { + res := &storagepb.Winery{ + Name: v.Name, + Region: v.Region, + Country: v.Country, + Url: v.URL, + } + + return res +} + +// transformProtoAddRequestWineryToBottleWinery builds a value of type // *storage.Winery from a value of type *storagepb.Winery. -func protobufStoragepbWineryToStorageWinery(v *storagepb.Winery) *storage.Winery { +func transformProtoAddRequestWineryToBottleWinery(v *storagepb.Winery) *storage.Winery { res := &storage.Winery{ Name: v.Name, Region: v.Region, @@ -395,9 +402,9 @@ func protobufStoragepbWineryToStorageWinery(v *storagepb.Winery) *storage.Winery return res } -// svcStorageWineryToStoragepbWinery builds a value of type *storagepb.Winery -// from a value of type *storage.Winery. -func svcStorageWineryToStoragepbWinery(v *storage.Winery) *storagepb.Winery { +// transformMultiAddRequestWineryToProtoMultiAddRequestWinery builds a value of +// type *storagepb.Winery from a value of type *storage.Winery. +func transformMultiAddRequestWineryToProtoMultiAddRequestWinery(v *storage.Winery) *storagepb.Winery { res := &storagepb.Winery{ Name: v.Name, Region: v.Region, @@ -407,3 +414,42 @@ func svcStorageWineryToStoragepbWinery(v *storage.Winery) *storagepb.Winery { return res } + +// transformProtoMultiAddRequestWineryToMultiAddRequestWinery builds a value of +// type *storage.Winery from a value of type *storagepb.Winery. +func transformProtoMultiAddRequestWineryToMultiAddRequestWinery(v *storagepb.Winery) *storage.Winery { + res := &storage.Winery{ + Name: v.Name, + Region: v.Region, + Country: v.Country, + URL: v.Url, + } + + return res +} + +// transformMultiUpdatePayloadWineryToProtoMultiUpdateRequestWinery builds a +// value of type *storagepb.Winery from a value of type *storage.Winery. +func transformMultiUpdatePayloadWineryToProtoMultiUpdateRequestWinery(v *storage.Winery) *storagepb.Winery { + res := &storagepb.Winery{ + Name: v.Name, + Region: v.Region, + Country: v.Country, + Url: v.URL, + } + + return res +} + +// transformProtoMultiUpdateRequestWineryToMultiUpdatePayloadWinery builds a +// value of type *storage.Winery from a value of type *storagepb.Winery. +func transformProtoMultiUpdateRequestWineryToMultiUpdatePayloadWinery(v *storagepb.Winery) *storage.Winery { + res := &storage.Winery{ + Name: v.Name, + Region: v.Region, + Country: v.Country, + URL: v.Url, + } + + return res +} diff --git a/cellar/gen/grpc/storage/pb/goagen_cellar_storage.pb.go b/cellar/gen/grpc/storage/pb/goagen_cellar_storage.pb.go index c28622082..0a83eb083 100644 --- a/cellar/gen/grpc/storage/pb/goagen_cellar_storage.pb.go +++ b/cellar/gen/grpc/storage/pb/goagen_cellar_storage.pb.go @@ -7,8 +7,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.36.11 -// protoc v7.34.1 +// protoc-gen-go v1.36.12 +// protoc v7.36.0 // source: goagen_cellar_storage.proto package storagepb diff --git a/cellar/gen/grpc/storage/pb/goagen_cellar_storage_grpc.pb.go b/cellar/gen/grpc/storage/pb/goagen_cellar_storage_grpc.pb.go index 851ec4d9f..d3a570442 100644 --- a/cellar/gen/grpc/storage/pb/goagen_cellar_storage_grpc.pb.go +++ b/cellar/gen/grpc/storage/pb/goagen_cellar_storage_grpc.pb.go @@ -8,7 +8,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.6.2 -// - protoc v7.34.1 +// - protoc v7.36.0 // source: goagen_cellar_storage.proto package storagepb diff --git a/cellar/gen/grpc/storage/server/encode_decode.go b/cellar/gen/grpc/storage/server/encode_decode.go index 15f712ac3..f0548287a 100644 --- a/cellar/gen/grpc/storage/server/encode_decode.go +++ b/cellar/gen/grpc/storage/server/encode_decode.go @@ -26,8 +26,8 @@ func EncodeListResponse(ctx context.Context, v any, hdr, trlr *metadata.MD) (any return nil, goagrpc.ErrInvalidType("storage", "list", "storageviews.StoredBottleCollection", v) } result := vres.Projected - (*hdr).Append("goa-view", vres.View) resp := NewProtoStoredBottleCollection(result) + (*hdr).Append("goa-view", "tiny") return resp, nil } @@ -39,8 +39,16 @@ func EncodeShowResponse(ctx context.Context, v any, hdr, trlr *metadata.MD) (any return nil, goagrpc.ErrInvalidType("storage", "show", "*storageviews.StoredBottle", v) } result := vres.Projected + var resp *storagepb.ShowResponse + switch vres.View { + case "default", "": + resp = NewProtoShowResponse(result) + case "tiny": + resp = NewProtoShowResponseTiny(result) + default: + return nil, goa.InvalidEnumValueError("view", vres.View, []any{"default", "tiny"}) + } (*hdr).Append("goa-view", vres.View) - resp := NewProtoShowResponse(result) return resp, nil } diff --git a/cellar/gen/grpc/storage/server/types.go b/cellar/gen/grpc/storage/server/types.go index a93335f5c..6fc304689 100644 --- a/cellar/gen/grpc/storage/server/types.go +++ b/cellar/gen/grpc/storage/server/types.go @@ -16,47 +16,38 @@ import ( goa "goa.design/goa/v3/pkg" ) -// NewProtoStoredBottleCollection builds the gRPC response type from the result -// of the "list" endpoint of the "storage" service. +// NewProtoStoredBottleCollection builds *storagepb.StoredBottleCollection from +// storageviews.StoredBottleCollectionView. func NewProtoStoredBottleCollection(result storageviews.StoredBottleCollectionView) *storagepb.StoredBottleCollection { message := &storagepb.StoredBottleCollection{} message.Field = make([]*storagepb.StoredBottle, len(result)) for i, val := range result { message.Field[i] = &storagepb.StoredBottle{ - Id: *val.ID, - Name: *val.Name, - Vintage: *val.Vintage, - Description: val.Description, - Rating: val.Rating, + Id: *val.ID, + Name: *val.Name, } if val.Winery != nil { - message.Field[i].Winery = svcStorageviewsWineryViewToStoragepbWinery(val.Winery) - } - if val.Composition != nil { - message.Field[i].Composition = make([]*storagepb.Component, len(val.Composition)) - for j, val := range val.Composition { - message.Field[i].Composition[j] = &storagepb.Component{ - Varietal: *val.Varietal, - Percentage: val.Percentage, - } - } + message.Field[i].Winery = transformStoredBottleCollectionViewWineryViewToProtoStoredBottleCollectionWinery(val.Winery) } } return message } -// NewShowPayload builds the payload of the "show" endpoint of the "storage" -// service from the gRPC request type. +// NewShowPayload builds *storage.ShowPayload from *storagepb.ShowRequest. func NewShowPayload(message *storagepb.ShowRequest, view *string) *storage.ShowPayload { v := &storage.ShowPayload{ ID: message.Id, } - v.View = view + if view != nil { + viewService := *view + v.View = &viewService + } + return v } -// NewProtoShowResponse builds the gRPC response type from the result of the -// "show" endpoint of the "storage" service. +// NewProtoShowResponse builds *storagepb.ShowResponse from +// *storageviews.StoredBottleView. func NewProtoShowResponse(result *storageviews.StoredBottleView) *storagepb.ShowResponse { message := &storagepb.ShowResponse{ Id: *result.ID, @@ -66,7 +57,7 @@ func NewProtoShowResponse(result *storageviews.StoredBottleView) *storagepb.Show Rating: result.Rating, } if result.Winery != nil { - message.Winery = svcStorageviewsWineryViewToStoragepbWinery(result.Winery) + message.Winery = transformStoredBottleViewWineryViewToProtoShowResponseWinery(result.Winery) } if result.Composition != nil { message.Composition = make([]*storagepb.Component, len(result.Composition)) @@ -80,8 +71,21 @@ func NewProtoShowResponse(result *storageviews.StoredBottleView) *storagepb.Show return message } -// NewShowNotFoundError builds the gRPC error response type from the error of -// the "show" endpoint of the "storage" service. +// NewProtoShowResponseTiny builds *storagepb.ShowResponse from +// *storageviews.StoredBottleView. +func NewProtoShowResponseTiny(result *storageviews.StoredBottleView) *storagepb.ShowResponse { + message := &storagepb.ShowResponse{ + Id: *result.ID, + Name: *result.Name, + } + if result.Winery != nil { + message.Winery = transformWineryViewToProtoWineryTiny(result.Winery) + } + return message +} + +// NewShowNotFoundError builds *storagepb.ShowNotFoundError from +// *storage.NotFound. func NewShowNotFoundError(er *storage.NotFound) *storagepb.ShowNotFoundError { message := &storagepb.ShowNotFoundError{ Message_: er.Message, @@ -90,8 +94,7 @@ func NewShowNotFoundError(er *storage.NotFound) *storagepb.ShowNotFoundError { return message } -// NewAddPayload builds the payload of the "add" endpoint of the "storage" -// service from the gRPC request type. +// NewAddPayload builds *storage.Bottle from *storagepb.AddRequest. func NewAddPayload(message *storagepb.AddRequest) *storage.Bottle { v := &storage.Bottle{ Name: message.Name, @@ -100,7 +103,7 @@ func NewAddPayload(message *storagepb.AddRequest) *storage.Bottle { Rating: message.Rating, } if message.Winery != nil { - v.Winery = protobufStoragepbWineryToStorageWinery(message.Winery) + v.Winery = transformProtoAddRequestWineryToBottleWinery(message.Winery) } if message.Composition != nil { v.Composition = make([]*storage.Component, len(message.Composition)) @@ -114,16 +117,14 @@ func NewAddPayload(message *storagepb.AddRequest) *storage.Bottle { return v } -// NewProtoAddResponse builds the gRPC response type from the result of the -// "add" endpoint of the "storage" service. +// NewProtoAddResponse builds *storagepb.AddResponse from string. func NewProtoAddResponse(result string) *storagepb.AddResponse { message := &storagepb.AddResponse{} message.Field = result return message } -// NewRemovePayload builds the payload of the "remove" endpoint of the -// "storage" service from the gRPC request type. +// NewRemovePayload builds *storage.RemovePayload from *storagepb.RemoveRequest. func NewRemovePayload(message *storagepb.RemoveRequest) *storage.RemovePayload { v := &storage.RemovePayload{ ID: message.Id, @@ -131,15 +132,13 @@ func NewRemovePayload(message *storagepb.RemoveRequest) *storage.RemovePayload { return v } -// NewProtoRemoveResponse builds the gRPC response type from the result of the -// "remove" endpoint of the "storage" service. +// NewProtoRemoveResponse builds *storagepb.RemoveResponse from metadata values. func NewProtoRemoveResponse() *storagepb.RemoveResponse { message := &storagepb.RemoveResponse{} return message } -// NewRatePayload builds the payload of the "rate" endpoint of the "storage" -// service from the gRPC request type. +// NewRatePayload builds map[uint32][]string from *storagepb.RateRequest. func NewRatePayload(message *storagepb.RateRequest) map[uint32][]string { v := make(map[uint32][]string, len(message.Field)) for key, val := range message.Field { @@ -153,15 +152,13 @@ func NewRatePayload(message *storagepb.RateRequest) map[uint32][]string { return v } -// NewProtoRateResponse builds the gRPC response type from the result of the -// "rate" endpoint of the "storage" service. +// NewProtoRateResponse builds *storagepb.RateResponse from metadata values. func NewProtoRateResponse() *storagepb.RateResponse { message := &storagepb.RateResponse{} return message } -// NewMultiAddPayload builds the payload of the "multi_add" endpoint of the -// "storage" service from the gRPC request type. +// NewMultiAddPayload builds []*storage.Bottle from *storagepb.MultiAddRequest. func NewMultiAddPayload(message *storagepb.MultiAddRequest) []*storage.Bottle { v := make([]*storage.Bottle, len(message.Field)) for i, val := range message.Field { @@ -172,7 +169,7 @@ func NewMultiAddPayload(message *storagepb.MultiAddRequest) []*storage.Bottle { Rating: val.Rating, } if val.Winery != nil { - v[i].Winery = protobufStoragepbWineryToStorageWinery(val.Winery) + v[i].Winery = transformProtoMultiAddRequestWineryToMultiAddRequestWinery(val.Winery) } if val.Composition != nil { v[i].Composition = make([]*storage.Component, len(val.Composition)) @@ -187,8 +184,7 @@ func NewMultiAddPayload(message *storagepb.MultiAddRequest) []*storage.Bottle { return v } -// NewProtoMultiAddResponse builds the gRPC response type from the result of -// the "multi_add" endpoint of the "storage" service. +// NewProtoMultiAddResponse builds *storagepb.MultiAddResponse from []string. func NewProtoMultiAddResponse(result []string) *storagepb.MultiAddResponse { message := &storagepb.MultiAddResponse{} message.Field = make([]string, len(result)) @@ -198,8 +194,8 @@ func NewProtoMultiAddResponse(result []string) *storagepb.MultiAddResponse { return message } -// NewMultiUpdatePayload builds the payload of the "multi_update" endpoint of -// the "storage" service from the gRPC request type. +// NewMultiUpdatePayload builds *storage.MultiUpdatePayload from +// *storagepb.MultiUpdateRequest. func NewMultiUpdatePayload(message *storagepb.MultiUpdateRequest) *storage.MultiUpdatePayload { v := &storage.MultiUpdatePayload{} if message.Ids != nil { @@ -218,7 +214,7 @@ func NewMultiUpdatePayload(message *storagepb.MultiUpdateRequest) *storage.Multi Rating: val.Rating, } if val.Winery != nil { - v.Bottles[i].Winery = protobufStoragepbWineryToStorageWinery(val.Winery) + v.Bottles[i].Winery = transformProtoMultiUpdateRequestWineryToMultiUpdatePayloadWinery(val.Winery) } if val.Composition != nil { v.Bottles[i].Composition = make([]*storage.Component, len(val.Composition)) @@ -234,42 +230,13 @@ func NewMultiUpdatePayload(message *storagepb.MultiUpdateRequest) *storage.Multi return v } -// NewProtoMultiUpdateResponse builds the gRPC response type from the result of -// the "multi_update" endpoint of the "storage" service. +// NewProtoMultiUpdateResponse builds *storagepb.MultiUpdateResponse from +// metadata values. func NewProtoMultiUpdateResponse() *storagepb.MultiUpdateResponse { message := &storagepb.MultiUpdateResponse{} return message } -// ValidateWinery runs the validations defined on Winery. -func ValidateWinery(winery *storagepb.Winery) (err error) { - err = goa.MergeErrors(err, goa.ValidatePattern("winery.region", winery.Region, "[a-zA-Z '\\.]+")) - err = goa.MergeErrors(err, goa.ValidatePattern("winery.country", winery.Country, "[a-zA-Z '\\.]+")) - if winery.Url != nil { - err = goa.MergeErrors(err, goa.ValidatePattern("winery.url", *winery.Url, "^(https?|ftp)://[^\\s/$.?#].[^\\s]*$")) - } - return -} - -// ValidateComponent runs the validations defined on Component. -func ValidateComponent(elem *storagepb.Component) (err error) { - err = goa.MergeErrors(err, goa.ValidatePattern("elem.varietal", elem.Varietal, "[A-Za-z' ]+")) - if utf8.RuneCountInString(elem.Varietal) > 100 { - err = goa.MergeErrors(err, goa.InvalidLengthError("elem.varietal", elem.Varietal, utf8.RuneCountInString(elem.Varietal), 100, false)) - } - if elem.Percentage != nil { - if *elem.Percentage < 1 { - err = goa.MergeErrors(err, goa.InvalidRangeError("elem.percentage", *elem.Percentage, 1, true)) - } - } - if elem.Percentage != nil { - if *elem.Percentage > 100 { - err = goa.MergeErrors(err, goa.InvalidRangeError("elem.percentage", *elem.Percentage, 100, false)) - } - } - return -} - // ValidateAddRequest runs the validations defined on AddRequest. func ValidateAddRequest(message *storagepb.AddRequest) (err error) { if message.Winery == nil { @@ -305,8 +272,6 @@ func ValidateAddRequest(message *storagepb.AddRequest) (err error) { if *message.Rating < 1 { err = goa.MergeErrors(err, goa.InvalidRangeError("message.rating", *message.Rating, 1, true)) } - } - if message.Rating != nil { if *message.Rating > 5 { err = goa.MergeErrors(err, goa.InvalidRangeError("message.rating", *message.Rating, 5, false)) } @@ -314,6 +279,33 @@ func ValidateAddRequest(message *storagepb.AddRequest) (err error) { return } +// ValidateWinery runs the validations defined on Winery. +func ValidateWinery(winery *storagepb.Winery) (err error) { + err = goa.MergeErrors(err, goa.ValidatePattern("winery.region", winery.Region, "[a-zA-Z '\\.]+")) + err = goa.MergeErrors(err, goa.ValidatePattern("winery.country", winery.Country, "[a-zA-Z '\\.]+")) + if winery.Url != nil { + err = goa.MergeErrors(err, goa.ValidatePattern("winery.url", *winery.Url, "^(https?|ftp)://[^\\s/$.?#].[^\\s]*$")) + } + return +} + +// ValidateComponent runs the validations defined on Component. +func ValidateComponent(elem *storagepb.Component) (err error) { + err = goa.MergeErrors(err, goa.ValidatePattern("elem.varietal", elem.Varietal, "[A-Za-z' ]+")) + if utf8.RuneCountInString(elem.Varietal) > 100 { + err = goa.MergeErrors(err, goa.InvalidLengthError("elem.varietal", elem.Varietal, utf8.RuneCountInString(elem.Varietal), 100, false)) + } + if elem.Percentage != nil { + if *elem.Percentage < 1 { + err = goa.MergeErrors(err, goa.InvalidRangeError("elem.percentage", *elem.Percentage, 1, true)) + } + if *elem.Percentage > 100 { + err = goa.MergeErrors(err, goa.InvalidRangeError("elem.percentage", *elem.Percentage, 100, false)) + } + } + return +} + // ValidateRateRequest runs the validations defined on RateRequest. func ValidateRateRequest(message *storagepb.RateRequest) (err error) { for _, v := range message.Field { @@ -381,8 +373,6 @@ func ValidateBottle(elem *storagepb.Bottle) (err error) { if *elem.Rating < 1 { err = goa.MergeErrors(err, goa.InvalidRangeError("elem.rating", *elem.Rating, 1, true)) } - } - if elem.Rating != nil { if *elem.Rating > 5 { err = goa.MergeErrors(err, goa.InvalidRangeError("elem.rating", *elem.Rating, 5, false)) } @@ -409,35 +399,53 @@ func ValidateMultiUpdateRequest(message *storagepb.MultiUpdateRequest) (err erro return } -// svcStorageviewsWineryViewToStoragepbWinery builds a value of type +// transformStoredBottleCollectionViewWineryViewToProtoStoredBottleCollectionWinery +// builds a value of type *storagepb.Winery from a value of type +// *storageviews.WineryView. +func transformStoredBottleCollectionViewWineryViewToProtoStoredBottleCollectionWinery(v *storageviews.WineryView) *storagepb.Winery { + res := &storagepb.Winery{ + Name: *v.Name, + } + + return res +} + +// transformStoredBottleViewWineryViewToProtoShowResponseWinery builds a value +// of type *storagepb.Winery from a value of type *storageviews.WineryView. +func transformStoredBottleViewWineryViewToProtoShowResponseWinery(v *storageviews.WineryView) *storagepb.Winery { + res := &storagepb.Winery{ + Name: *v.Name, + } + + return res +} + +// transformWineryViewToProtoWineryTiny builds a value of type // *storagepb.Winery from a value of type *storageviews.WineryView. -func svcStorageviewsWineryViewToStoragepbWinery(v *storageviews.WineryView) *storagepb.Winery { +func transformWineryViewToProtoWineryTiny(v *storageviews.WineryView) *storagepb.Winery { res := &storagepb.Winery{ - Name: *v.Name, - Region: *v.Region, - Country: *v.Country, - Url: v.URL, + Name: *v.Name, } return res } -// protobufStoragepbWineryToStorageviewsWineryView builds a value of type -// *storageviews.WineryView from a value of type *storagepb.Winery. -func protobufStoragepbWineryToStorageviewsWineryView(v *storagepb.Winery) *storageviews.WineryView { - res := &storageviews.WineryView{ - Name: &v.Name, - Region: &v.Region, - Country: &v.Country, +// transformProtoAddRequestWineryToBottleWinery builds a value of type +// *storage.Winery from a value of type *storagepb.Winery. +func transformProtoAddRequestWineryToBottleWinery(v *storagepb.Winery) *storage.Winery { + res := &storage.Winery{ + Name: v.Name, + Region: v.Region, + Country: v.Country, URL: v.Url, } return res } -// protobufStoragepbWineryToStorageWinery builds a value of type -// *storage.Winery from a value of type *storagepb.Winery. -func protobufStoragepbWineryToStorageWinery(v *storagepb.Winery) *storage.Winery { +// transformProtoMultiAddRequestWineryToMultiAddRequestWinery builds a value of +// type *storage.Winery from a value of type *storagepb.Winery. +func transformProtoMultiAddRequestWineryToMultiAddRequestWinery(v *storagepb.Winery) *storage.Winery { res := &storage.Winery{ Name: v.Name, Region: v.Region, @@ -448,14 +456,14 @@ func protobufStoragepbWineryToStorageWinery(v *storagepb.Winery) *storage.Winery return res } -// svcStorageWineryToStoragepbWinery builds a value of type *storagepb.Winery -// from a value of type *storage.Winery. -func svcStorageWineryToStoragepbWinery(v *storage.Winery) *storagepb.Winery { - res := &storagepb.Winery{ +// transformProtoMultiUpdateRequestWineryToMultiUpdatePayloadWinery builds a +// value of type *storage.Winery from a value of type *storagepb.Winery. +func transformProtoMultiUpdateRequestWineryToMultiUpdatePayloadWinery(v *storagepb.Winery) *storage.Winery { + res := &storage.Winery{ Name: v.Name, Region: v.Region, Country: v.Country, - Url: v.URL, + URL: v.Url, } return res diff --git a/cellar/gen/http/cli/cellar/cli.go b/cellar/gen/http/cli/cellar/cli.go index 0a2434953..3f031e3e4 100644 --- a/cellar/gen/http/cli/cellar/cli.go +++ b/cellar/gen/http/cli/cellar/cli.go @@ -204,7 +204,7 @@ func ParseEndpoint( err = json.Unmarshal([]byte(*storageRatePFlag), &val) data = val if err != nil { - return nil, nil, fmt.Errorf("invalid JSON for storageRatePFlag, \nerror: %s, \nexample of valid JSON:\n%s", err, "'{\n \"\\u003cuint32 Value\\u003e\": [\n \"Error libero.\",\n \"Architecto ut mollitia facere debitis molestiae.\",\n \"Perspiciatis qui aut voluptate consequatur sint error.\",\n \"Repudiandae rerum repellat.\"\n ]\n }'") + return nil, nil, fmt.Errorf("invalid JSON for storageRatePFlag, \nerror: %s, \nexample of valid JSON:\n%s", err, "'{\n \"\\u003cuint32 Value\\u003e\": [\n \"Similique officia.\",\n \"Reprehenderit ut similique iste velit.\",\n \"Expedita quia.\"\n ]\n }'") } case "multi-add": endpoint = c.MultiAdd(storageMultiAddEncoderFn) @@ -300,7 +300,7 @@ func storageShowUsage() { fmt.Fprintln(os.Stderr) fmt.Fprintln(os.Stderr, "Example:") - fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "storage show --id \"Et aut a enim qui.\" --view \"tiny\"") + fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "storage show --id \"Repellat numquam autem.\" --view \"tiny\"") } func storageAddUsage() { @@ -318,7 +318,7 @@ func storageAddUsage() { fmt.Fprintln(os.Stderr) fmt.Fprintln(os.Stderr, "Example:") - fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "storage add --body '{\n \"composition\": [\n {\n \"percentage\": 65,\n \"varietal\": \"Syrah\"\n },\n {\n \"percentage\": 65,\n \"varietal\": \"Syrah\"\n },\n {\n \"percentage\": 65,\n \"varietal\": \"Syrah\"\n }\n ],\n \"description\": \"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah\",\n \"name\": \"Blue\\'s Cuvee\",\n \"rating\": 2,\n \"vintage\": 2000,\n \"winery\": {\n \"country\": \"USA\",\n \"name\": \"Longoria\",\n \"region\": \"Central Coast, California\",\n \"url\": \"http://www.longoriawine.com/\"\n }\n }'") + fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "storage add --body '{\n \"composition\": [\n {\n \"percentage\": 8,\n \"varietal\": \"Syrah\"\n },\n {\n \"percentage\": 8,\n \"varietal\": \"Syrah\"\n }\n ],\n \"description\": \"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah\",\n \"name\": \"Blue\\'s Cuvee\",\n \"rating\": 3,\n \"vintage\": 2005,\n \"winery\": {\n \"country\": \"USA\",\n \"name\": \"Longoria\",\n \"region\": \"Central Coast, California\",\n \"url\": \"http://www.longoriawine.com/\"\n }\n }'") } func storageRemoveUsage() { @@ -336,7 +336,7 @@ func storageRemoveUsage() { fmt.Fprintln(os.Stderr) fmt.Fprintln(os.Stderr, "Example:") - fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "storage remove --id \"Id libero accusantium incidunt.\"") + fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "storage remove --id \"Tenetur molestiae aut dolorem.\"") } func storageRateUsage() { @@ -354,7 +354,7 @@ func storageRateUsage() { fmt.Fprintln(os.Stderr) fmt.Fprintln(os.Stderr, "Example:") - fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "storage rate --p '{\n \"\\u003cuint32 Value\\u003e\": [\n \"Error libero.\",\n \"Architecto ut mollitia facere debitis molestiae.\",\n \"Perspiciatis qui aut voluptate consequatur sint error.\",\n \"Repudiandae rerum repellat.\"\n ]\n }'") + fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "storage rate --p '{\n \"\\u003cuint32 Value\\u003e\": [\n \"Similique officia.\",\n \"Reprehenderit ut similique iste velit.\",\n \"Expedita quia.\"\n ]\n }'") } func storageMultiAddUsage() { @@ -372,7 +372,7 @@ func storageMultiAddUsage() { fmt.Fprintln(os.Stderr) fmt.Fprintln(os.Stderr, "Example:") - fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "storage multi-add --body '[\n {\n \"composition\": [\n {\n \"percentage\": 65,\n \"varietal\": \"Syrah\"\n },\n {\n \"percentage\": 65,\n \"varietal\": \"Syrah\"\n },\n {\n \"percentage\": 65,\n \"varietal\": \"Syrah\"\n }\n ],\n \"description\": \"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah\",\n \"name\": \"Blue\\'s Cuvee\",\n \"rating\": 2,\n \"vintage\": 2009,\n \"winery\": {\n \"country\": \"USA\",\n \"name\": \"Longoria\",\n \"region\": \"Central Coast, California\",\n \"url\": \"http://www.longoriawine.com/\"\n }\n },\n {\n \"composition\": [\n {\n \"percentage\": 65,\n \"varietal\": \"Syrah\"\n },\n {\n \"percentage\": 65,\n \"varietal\": \"Syrah\"\n },\n {\n \"percentage\": 65,\n \"varietal\": \"Syrah\"\n }\n ],\n \"description\": \"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah\",\n \"name\": \"Blue\\'s Cuvee\",\n \"rating\": 2,\n \"vintage\": 2009,\n \"winery\": {\n \"country\": \"USA\",\n \"name\": \"Longoria\",\n \"region\": \"Central Coast, California\",\n \"url\": \"http://www.longoriawine.com/\"\n }\n },\n {\n \"composition\": [\n {\n \"percentage\": 65,\n \"varietal\": \"Syrah\"\n },\n {\n \"percentage\": 65,\n \"varietal\": \"Syrah\"\n },\n {\n \"percentage\": 65,\n \"varietal\": \"Syrah\"\n }\n ],\n \"description\": \"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah\",\n \"name\": \"Blue\\'s Cuvee\",\n \"rating\": 2,\n \"vintage\": 2009,\n \"winery\": {\n \"country\": \"USA\",\n \"name\": \"Longoria\",\n \"region\": \"Central Coast, California\",\n \"url\": \"http://www.longoriawine.com/\"\n }\n }\n ]'") + fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "storage multi-add --body '[\n {\n \"composition\": [\n {\n \"percentage\": 8,\n \"varietal\": \"Syrah\"\n },\n {\n \"percentage\": 8,\n \"varietal\": \"Syrah\"\n },\n {\n \"percentage\": 8,\n \"varietal\": \"Syrah\"\n }\n ],\n \"description\": \"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah\",\n \"name\": \"Blue\\'s Cuvee\",\n \"rating\": 3,\n \"vintage\": 2003,\n \"winery\": {\n \"country\": \"USA\",\n \"name\": \"Longoria\",\n \"region\": \"Central Coast, California\",\n \"url\": \"http://www.longoriawine.com/\"\n }\n },\n {\n \"composition\": [\n {\n \"percentage\": 8,\n \"varietal\": \"Syrah\"\n },\n {\n \"percentage\": 8,\n \"varietal\": \"Syrah\"\n },\n {\n \"percentage\": 8,\n \"varietal\": \"Syrah\"\n }\n ],\n \"description\": \"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah\",\n \"name\": \"Blue\\'s Cuvee\",\n \"rating\": 3,\n \"vintage\": 2003,\n \"winery\": {\n \"country\": \"USA\",\n \"name\": \"Longoria\",\n \"region\": \"Central Coast, California\",\n \"url\": \"http://www.longoriawine.com/\"\n }\n }\n ]'") } func storageMultiUpdateUsage() { @@ -392,5 +392,5 @@ func storageMultiUpdateUsage() { fmt.Fprintln(os.Stderr) fmt.Fprintln(os.Stderr, "Example:") - fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "storage multi-update --body '{\n \"bottles\": [\n {\n \"composition\": [\n {\n \"percentage\": 65,\n \"varietal\": \"Syrah\"\n },\n {\n \"percentage\": 65,\n \"varietal\": \"Syrah\"\n },\n {\n \"percentage\": 65,\n \"varietal\": \"Syrah\"\n }\n ],\n \"description\": \"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah\",\n \"name\": \"Blue\\'s Cuvee\",\n \"rating\": 2,\n \"vintage\": 2009,\n \"winery\": {\n \"country\": \"USA\",\n \"name\": \"Longoria\",\n \"region\": \"Central Coast, California\",\n \"url\": \"http://www.longoriawine.com/\"\n }\n },\n {\n \"composition\": [\n {\n \"percentage\": 65,\n \"varietal\": \"Syrah\"\n },\n {\n \"percentage\": 65,\n \"varietal\": \"Syrah\"\n },\n {\n \"percentage\": 65,\n \"varietal\": \"Syrah\"\n }\n ],\n \"description\": \"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah\",\n \"name\": \"Blue\\'s Cuvee\",\n \"rating\": 2,\n \"vintage\": 2009,\n \"winery\": {\n \"country\": \"USA\",\n \"name\": \"Longoria\",\n \"region\": \"Central Coast, California\",\n \"url\": \"http://www.longoriawine.com/\"\n }\n },\n {\n \"composition\": [\n {\n \"percentage\": 65,\n \"varietal\": \"Syrah\"\n },\n {\n \"percentage\": 65,\n \"varietal\": \"Syrah\"\n },\n {\n \"percentage\": 65,\n \"varietal\": \"Syrah\"\n }\n ],\n \"description\": \"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah\",\n \"name\": \"Blue\\'s Cuvee\",\n \"rating\": 2,\n \"vintage\": 2009,\n \"winery\": {\n \"country\": \"USA\",\n \"name\": \"Longoria\",\n \"region\": \"Central Coast, California\",\n \"url\": \"http://www.longoriawine.com/\"\n }\n }\n ]\n }' --ids '[\n \"Ut non voluptatem.\",\n \"Officia tenetur rerum possimus voluptates.\"\n ]'") + fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "storage multi-update --body '{\n \"bottles\": [\n {\n \"composition\": [\n {\n \"percentage\": 8,\n \"varietal\": \"Syrah\"\n },\n {\n \"percentage\": 8,\n \"varietal\": \"Syrah\"\n },\n {\n \"percentage\": 8,\n \"varietal\": \"Syrah\"\n }\n ],\n \"description\": \"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah\",\n \"name\": \"Blue\\'s Cuvee\",\n \"rating\": 3,\n \"vintage\": 2003,\n \"winery\": {\n \"country\": \"USA\",\n \"name\": \"Longoria\",\n \"region\": \"Central Coast, California\",\n \"url\": \"http://www.longoriawine.com/\"\n }\n },\n {\n \"composition\": [\n {\n \"percentage\": 8,\n \"varietal\": \"Syrah\"\n },\n {\n \"percentage\": 8,\n \"varietal\": \"Syrah\"\n },\n {\n \"percentage\": 8,\n \"varietal\": \"Syrah\"\n }\n ],\n \"description\": \"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah\",\n \"name\": \"Blue\\'s Cuvee\",\n \"rating\": 3,\n \"vintage\": 2003,\n \"winery\": {\n \"country\": \"USA\",\n \"name\": \"Longoria\",\n \"region\": \"Central Coast, California\",\n \"url\": \"http://www.longoriawine.com/\"\n }\n },\n {\n \"composition\": [\n {\n \"percentage\": 8,\n \"varietal\": \"Syrah\"\n },\n {\n \"percentage\": 8,\n \"varietal\": \"Syrah\"\n },\n {\n \"percentage\": 8,\n \"varietal\": \"Syrah\"\n }\n ],\n \"description\": \"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah\",\n \"name\": \"Blue\\'s Cuvee\",\n \"rating\": 3,\n \"vintage\": 2003,\n \"winery\": {\n \"country\": \"USA\",\n \"name\": \"Longoria\",\n \"region\": \"Central Coast, California\",\n \"url\": \"http://www.longoriawine.com/\"\n }\n }\n ]\n }' --ids '[\n \"Deserunt itaque omnis necessitatibus enim aspernatur.\",\n \"Tempore in voluptate asperiores.\",\n \"Incidunt quia ut eius quibusdam rerum.\",\n \"Consequatur architecto ratione.\"\n ]'") } diff --git a/cellar/gen/http/openapi.json b/cellar/gen/http/openapi.json index 7f347cc38..6d9718134 100644 --- a/cellar/gen/http/openapi.json +++ b/cellar/gen/http/openapi.json @@ -1 +1 @@ -{"swagger":"2.0","info":{"title":"Cellar Service","description":"HTTP service for managing your wine cellar","version":"0.0.1"},"host":"localhost:8000","consumes":["application/json","application/xml","application/gob"],"produces":["application/json","application/xml","application/gob"],"paths":{"/sommelier":{"post":{"tags":["sommelier"],"summary":"pick sommelier","operationId":"sommelier#pick","parameters":[{"name":"PickRequestBody","in":"body","required":true,"schema":{"$ref":"#/definitions/Criteria"}}],"responses":{"200":{"description":"OK response.","schema":{"$ref":"#/definitions/SommelierStoredBottleResponseCollection"}},"400":{"description":"Bad Request response.","schema":{"type":"string"}},"404":{"description":"Not Found response.","schema":{"type":"string"}}},"schemes":["http"]}},"/storage":{"get":{"tags":["storage"],"summary":"list storage","description":"List all stored bottles","operationId":"storage#list","responses":{"200":{"description":"OK response.","schema":{"$ref":"#/definitions/StorageStoredBottleResponseTinyCollection"}}},"schemes":["http"]},"post":{"tags":["storage"],"summary":"add storage","description":"Add new bottle and return its ID.","operationId":"storage#add","parameters":[{"name":"AddRequestBody","in":"body","required":true,"schema":{"$ref":"#/definitions/Bottle","required":["name","winery","vintage"]}}],"responses":{"201":{"description":"Created response.","schema":{"type":"string"}}},"schemes":["http"]}},"/storage/multi_add":{"post":{"tags":["storage"],"summary":"multi_add storage","description":"Add n number of bottles and return their IDs. This is a multipart request and each part has field name 'bottle' and contains the encoded bottle info to be added.","operationId":"storage#multi_add","consumes":["multipart/form-data"],"parameters":[{"name":"array","in":"formData","required":true,"schema":{"type":"array","items":{"$ref":"#/definitions/Bottle"}}}],"responses":{"200":{"description":"OK response.","schema":{"type":"array","items":{"type":"string","example":"Placeat quae qui dolorem doloremque neque et."}}}},"schemes":["http"]}},"/storage/multi_update":{"put":{"tags":["storage"],"summary":"multi_update storage","description":"Update bottles with the given IDs. This is a multipart request and each part has field name 'bottle' and contains the encoded bottle info to be updated. The IDs in the query parameter is mapped to each part in the request.","operationId":"storage#multi_update","consumes":["multipart/form-data"],"parameters":[{"name":"ids","in":"query","description":"IDs of the bottles to be updated","required":true,"type":"array","items":{"type":"string"},"collectionFormat":"multi"},{"name":"multi_update_request_body","in":"formData","required":true,"schema":{"$ref":"#/definitions/StorageMultiUpdateRequestBody","required":["bottles"]}}],"responses":{"204":{"description":"No Content response."}},"schemes":["http"]}},"/storage/rate":{"post":{"tags":["storage"],"summary":"rate storage","description":"Rate bottles by IDs","operationId":"storage#rate","responses":{"200":{"description":"OK response."}},"schemes":["http"]}},"/storage/{id}":{"get":{"tags":["storage"],"summary":"show storage","description":"Show bottle by ID","operationId":"storage#show","parameters":[{"name":"view","in":"query","description":"View to render","required":false,"type":"string","enum":["default","tiny"]},{"name":"id","in":"path","description":"ID of bottle to show","required":true,"type":"string"}],"responses":{"200":{"description":"OK response.","schema":{"$ref":"#/definitions/CellarStoredBottle"}},"404":{"description":"Not Found response.","schema":{"$ref":"#/definitions/NotFound","required":["message","id"]}}},"schemes":["http"]},"delete":{"tags":["storage"],"summary":"remove storage","description":"Remove bottle from storage","operationId":"storage#remove","parameters":[{"name":"id","in":"path","description":"ID of bottle to remove","required":true,"type":"string"}],"responses":{"204":{"description":"No Content response."}},"schemes":["http"]}},"/swagger/swagger.json":{"get":{"tags":["swagger"],"summary":"Download gen/http/openapi.json","description":"JSON document containing the API swagger definition","operationId":"swagger#/swagger/swagger.json","responses":{"200":{"description":"File downloaded","schema":{"type":"file"}}},"schemes":["http","https"]}}},"definitions":{"Bottle":{"title":"Bottle","type":"object","properties":{"composition":{"type":"array","items":{"$ref":"#/definitions/Component"},"description":"Composition is the list of grape varietals and associated percentage.","example":[{"percentage":65,"varietal":"Syrah"},{"percentage":65,"varietal":"Syrah"},{"percentage":65,"varietal":"Syrah"}]},"description":{"type":"string","description":"Description of bottle","example":"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah","maxLength":2000},"name":{"type":"string","description":"Name of bottle","example":"Blue's Cuvee","maxLength":100},"rating":{"type":"integer","description":"Rating of bottle from 1 (worst) to 5 (best)","example":2,"format":"int32","minimum":1,"maximum":5},"vintage":{"type":"integer","description":"Vintage of bottle","example":2000,"format":"int32","minimum":1900,"maximum":2020},"winery":{"$ref":"#/definitions/Winery"}},"example":{"composition":[{"percentage":65,"varietal":"Syrah"},{"percentage":65,"varietal":"Syrah"},{"percentage":65,"varietal":"Syrah"}],"description":"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah","name":"Blue's Cuvee","rating":2,"vintage":2000,"winery":{"country":"USA","name":"Longoria","region":"Central Coast, California","url":"http://www.longoriawine.com/"}},"required":["name","winery","vintage"]},"CellarStoredBottle":{"title":"Mediatype identifier: application/vnd.cellar.stored-bottle; view=default","type":"object","properties":{"composition":{"type":"array","items":{"$ref":"#/definitions/Component"},"description":"Composition is the list of grape varietals and associated percentage.","example":[{"percentage":55,"varietal":"Syrah"},{"percentage":55,"varietal":"Syrah"},{"percentage":55,"varietal":"Syrah"}]},"description":{"type":"string","description":"Description of bottle","example":"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah","maxLength":2000},"id":{"type":"string","description":"ID is the unique id of the bottle.","example":"123abc"},"name":{"type":"string","description":"Name of bottle","example":"Blue's Cuvee","maxLength":100},"rating":{"type":"integer","description":"Rating of bottle from 1 (worst) to 5 (best)","example":3,"format":"int32","minimum":1,"maximum":5},"vintage":{"type":"integer","description":"Vintage of bottle","example":1963,"format":"int32","minimum":1900,"maximum":2020},"winery":{"$ref":"#/definitions/WineryResponseBodyTiny"}},"description":"A StoredBottle describes a bottle retrieved by the storage service. (default view)","example":{"composition":[{"percentage":55,"varietal":"Syrah"},{"percentage":55,"varietal":"Syrah"},{"percentage":55,"varietal":"Syrah"}],"description":"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah","id":"123abc","name":"Blue's Cuvee","rating":3,"vintage":1963,"winery":{"name":"Longoria"}},"required":["id","name","winery","vintage"]},"Component":{"title":"Component","type":"object","properties":{"percentage":{"type":"integer","description":"Percentage of varietal in wine","example":36,"format":"int32","minimum":1,"maximum":100},"varietal":{"type":"string","description":"Grape varietal","example":"Syrah","pattern":"[A-Za-z' ]+","maxLength":100}},"example":{"percentage":36,"varietal":"Syrah"},"required":["varietal"]},"Criteria":{"title":"Criteria","type":"object","properties":{"name":{"type":"string","description":"Name of bottle to pick","example":"Blue's Cuvee"},"varietal":{"type":"array","items":{"type":"string","example":"Qui quae rem officiis est dolores et."},"description":"Varietals in preference order","example":["pinot noir","merlot","cabernet franc"]},"winery":{"type":"string","description":"Winery of bottle to pick","example":"longoria"}},"example":{"name":"Blue's Cuvee","varietal":["pinot noir","merlot","cabernet franc"],"winery":"longoria"}},"NotFound":{"title":"NotFound","type":"object","properties":{"id":{"type":"string","description":"ID of missing bottle","example":"Quae officiis expedita dolores."},"message":{"type":"string","description":"Message of error","example":"bottle 1 not found"}},"description":"Bottle not found","example":{"id":"Quae officiis expedita dolores.","message":"bottle 1 not found"},"required":["message","id"]},"SommelierStoredBottleResponseCollection":{"title":"Mediatype identifier: application/vnd.cellar.stored-bottle; type=collection; view=default","type":"array","items":{"$ref":"#/definitions/StoredBottleResponse"},"description":"PickResponseBody is the result type for an array of StoredBottleResponse (default view)","example":[{"composition":[{"percentage":36,"varietal":"Syrah"},{"percentage":36,"varietal":"Syrah"},{"percentage":36,"varietal":"Syrah"}],"description":"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah","id":"123abc","name":"Blue's Cuvee","rating":3,"vintage":1963,"winery":{"name":"Longoria"}},{"composition":[{"percentage":36,"varietal":"Syrah"},{"percentage":36,"varietal":"Syrah"},{"percentage":36,"varietal":"Syrah"}],"description":"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah","id":"123abc","name":"Blue's Cuvee","rating":3,"vintage":1963,"winery":{"name":"Longoria"}}]},"StorageMultiUpdateRequestBody":{"title":"StorageMultiUpdateRequestBody","type":"object","properties":{"bottles":{"type":"array","items":{"$ref":"#/definitions/Bottle"},"description":"Array of bottle info that matches the ids attribute","example":[{"composition":[{"percentage":65,"varietal":"Syrah"},{"percentage":65,"varietal":"Syrah"},{"percentage":65,"varietal":"Syrah"}],"description":"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah","name":"Blue's Cuvee","rating":2,"vintage":2009,"winery":{"country":"USA","name":"Longoria","region":"Central Coast, California","url":"http://www.longoriawine.com/"}},{"composition":[{"percentage":65,"varietal":"Syrah"},{"percentage":65,"varietal":"Syrah"},{"percentage":65,"varietal":"Syrah"}],"description":"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah","name":"Blue's Cuvee","rating":2,"vintage":2009,"winery":{"country":"USA","name":"Longoria","region":"Central Coast, California","url":"http://www.longoriawine.com/"}},{"composition":[{"percentage":65,"varietal":"Syrah"},{"percentage":65,"varietal":"Syrah"},{"percentage":65,"varietal":"Syrah"}],"description":"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah","name":"Blue's Cuvee","rating":2,"vintage":2009,"winery":{"country":"USA","name":"Longoria","region":"Central Coast, California","url":"http://www.longoriawine.com/"}}]}},"example":{"bottles":[{"composition":[{"percentage":65,"varietal":"Syrah"},{"percentage":65,"varietal":"Syrah"},{"percentage":65,"varietal":"Syrah"}],"description":"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah","name":"Blue's Cuvee","rating":2,"vintage":2009,"winery":{"country":"USA","name":"Longoria","region":"Central Coast, California","url":"http://www.longoriawine.com/"}},{"composition":[{"percentage":65,"varietal":"Syrah"},{"percentage":65,"varietal":"Syrah"},{"percentage":65,"varietal":"Syrah"}],"description":"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah","name":"Blue's Cuvee","rating":2,"vintage":2009,"winery":{"country":"USA","name":"Longoria","region":"Central Coast, California","url":"http://www.longoriawine.com/"}},{"composition":[{"percentage":65,"varietal":"Syrah"},{"percentage":65,"varietal":"Syrah"},{"percentage":65,"varietal":"Syrah"}],"description":"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah","name":"Blue's Cuvee","rating":2,"vintage":2009,"winery":{"country":"USA","name":"Longoria","region":"Central Coast, California","url":"http://www.longoriawine.com/"}}]},"required":["bottles"]},"StorageStoredBottleResponseTinyCollection":{"title":"Mediatype identifier: application/vnd.cellar.stored-bottle; type=collection; view=tiny","type":"array","items":{"$ref":"#/definitions/StoredBottleResponseTiny"},"description":"StorageStoredBottleResponseTinyCollection is the result type for an array of StoredBottleResponseTiny (default view)","example":[{"id":"123abc","name":"Blue's Cuvee","winery":{"name":"Longoria"}},{"id":"123abc","name":"Blue's Cuvee","winery":{"name":"Longoria"}}]},"StoredBottleResponse":{"title":"Mediatype identifier: application/vnd.cellar.stored-bottle; view=default","type":"object","properties":{"composition":{"type":"array","items":{"$ref":"#/definitions/Component"},"description":"Composition is the list of grape varietals and associated percentage.","example":[{"percentage":36,"varietal":"Syrah"},{"percentage":36,"varietal":"Syrah"},{"percentage":36,"varietal":"Syrah"}]},"description":{"type":"string","description":"Description of bottle","example":"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah","maxLength":2000},"id":{"type":"string","description":"ID is the unique id of the bottle.","example":"123abc"},"name":{"type":"string","description":"Name of bottle","example":"Blue's Cuvee","maxLength":100},"rating":{"type":"integer","description":"Rating of bottle from 1 (worst) to 5 (best)","example":3,"format":"int32","minimum":1,"maximum":5},"vintage":{"type":"integer","description":"Vintage of bottle","example":1963,"format":"int32","minimum":1900,"maximum":2020},"winery":{"$ref":"#/definitions/WineryResponseTiny"}},"description":"A StoredBottle describes a bottle retrieved by the storage service. (default view)","example":{"composition":[{"percentage":36,"varietal":"Syrah"},{"percentage":36,"varietal":"Syrah"},{"percentage":36,"varietal":"Syrah"}],"description":"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah","id":"123abc","name":"Blue's Cuvee","rating":3,"vintage":1963,"winery":{"name":"Longoria"}},"required":["id","name","winery","vintage"]},"StoredBottleResponseTiny":{"title":"Mediatype identifier: application/vnd.cellar.stored-bottle; view=default","type":"object","properties":{"id":{"type":"string","description":"ID is the unique id of the bottle.","example":"123abc"},"name":{"type":"string","description":"Name of bottle","example":"Blue's Cuvee","maxLength":100},"winery":{"$ref":"#/definitions/WineryResponseTiny"}},"description":"A StoredBottle describes a bottle retrieved by the storage service. (tiny view) (default view)","example":{"id":"123abc","name":"Blue's Cuvee","winery":{"name":"Longoria"}},"required":["id","name","winery"]},"Winery":{"title":"Mediatype identifier: winery; view=default","type":"object","properties":{"country":{"type":"string","description":"Country of winery","example":"USA","pattern":"[a-zA-Z '\\.]+"},"name":{"type":"string","description":"Name of winery","example":"Longoria"},"region":{"type":"string","description":"Region of winery","example":"Central Coast, California","pattern":"[a-zA-Z '\\.]+"},"url":{"type":"string","description":"Winery website URL","example":"http://www.longoriawine.com/","pattern":"^(https?|ftp)://[^\\s/$.?#].[^\\s]*$"}},"description":"WineryRequestBody result type (default view)","example":{"country":"USA","name":"Longoria","region":"Central Coast, California","url":"http://www.longoriawine.com/"},"required":["name","region","country"]},"WineryResponseBodyTiny":{"title":"Mediatype identifier: winery; view=default","type":"object","properties":{"name":{"type":"string","description":"Name of winery","example":"Longoria"}},"description":"WineryResponseBody result type (tiny view) (default view)","example":{"name":"Longoria"},"required":["name"]},"WineryResponseTiny":{"title":"Mediatype identifier: winery; view=default","type":"object","properties":{"name":{"type":"string","description":"Name of winery","example":"Longoria"}},"description":"WineryResponse result type (tiny view) (default view)","example":{"name":"Longoria"},"required":["name"]}}} \ No newline at end of file +{"swagger":"2.0","info":{"title":"Cellar Service","description":"HTTP service for managing your wine cellar","version":"0.0.1"},"host":"localhost:8000","consumes":["application/json","application/xml","application/gob"],"produces":["application/json","application/xml","application/gob"],"paths":{"/sommelier":{"post":{"tags":["sommelier"],"summary":"pick sommelier","operationId":"sommelier#pick","parameters":[{"name":"PickRequestBody","in":"body","required":true,"schema":{"$ref":"#/definitions/Criteria"}}],"responses":{"200":{"description":"OK response.","schema":{"$ref":"#/definitions/SommelierStoredBottleResponseCollection"}},"400":{"description":"no_criteria: Bad Request response.","schema":{"type":"string"}},"404":{"description":"no_match: Not Found response.","schema":{"type":"string"}}},"schemes":["http"]}},"/storage":{"get":{"tags":["storage"],"summary":"list storage","description":"List all stored bottles","operationId":"storage#list","responses":{"200":{"description":"OK response.","schema":{"$ref":"#/definitions/StorageStoredBottleResponseTinyCollection"}}},"schemes":["http"]},"post":{"tags":["storage"],"summary":"add storage","description":"Add new bottle and return its ID.","operationId":"storage#add","parameters":[{"name":"AddRequestBody","in":"body","required":true,"schema":{"$ref":"#/definitions/Bottle","required":["name","winery","vintage"]}}],"responses":{"201":{"description":"Created response.","schema":{"type":"string"}}},"schemes":["http"]}},"/storage/multi_add":{"post":{"tags":["storage"],"summary":"multi_add storage","description":"Add n number of bottles and return their IDs. This is a multipart request and each part has field name 'bottle' and contains the encoded bottle info to be added.","operationId":"storage#multi_add","consumes":["multipart/form-data"],"parameters":[{"name":"array","in":"formData","required":true,"schema":{"type":"array","items":{"$ref":"#/definitions/Bottle"}}}],"responses":{"200":{"description":"OK response.","schema":{"type":"array","items":{"type":"string","example":"Ut aperiam voluptas."}}}},"schemes":["http"]}},"/storage/multi_update":{"put":{"tags":["storage"],"summary":"multi_update storage","description":"Update bottles with the given IDs. This is a multipart request and each part has field name 'bottle' and contains the encoded bottle info to be updated. The IDs in the query parameter is mapped to each part in the request.","operationId":"storage#multi_update","consumes":["multipart/form-data"],"parameters":[{"name":"ids","in":"query","description":"IDs of the bottles to be updated","required":true,"type":"array","items":{"type":"string"},"collectionFormat":"multi"},{"name":"multi_update_request_body","in":"formData","required":true,"schema":{"$ref":"#/definitions/StorageMultiUpdateRequestBody","required":["bottles"]}}],"responses":{"204":{"description":"No Content response."}},"schemes":["http"]}},"/storage/rate":{"post":{"tags":["storage"],"summary":"rate storage","description":"Rate bottles by IDs","operationId":"storage#rate","responses":{"200":{"description":"OK response."}},"schemes":["http"]}},"/storage/{id}":{"get":{"tags":["storage"],"summary":"show storage","description":"Show bottle by ID","operationId":"storage#show","parameters":[{"name":"view","in":"query","description":"View to render","required":false,"type":"string","enum":["default","tiny"]},{"name":"id","in":"path","description":"ID of bottle to show","required":true,"type":"string"}],"responses":{"200":{"description":"OK response.","schema":{"$ref":"#/definitions/CellarStoredBottle"}},"404":{"description":"not_found: Bottle not found","schema":{"$ref":"#/definitions/NotFound","required":["message","id"]}}},"schemes":["http"]},"delete":{"tags":["storage"],"summary":"remove storage","description":"Remove bottle from storage","operationId":"storage#remove","parameters":[{"name":"id","in":"path","description":"ID of bottle to remove","required":true,"type":"string"}],"responses":{"204":{"description":"No Content response."}},"schemes":["http"]}},"/swagger/swagger.json":{"get":{"tags":["swagger"],"summary":"Download gen/http/openapi.json","description":"JSON document containing the API swagger definition","operationId":"swagger#/swagger/swagger.json","responses":{"200":{"description":"File downloaded","schema":{"type":"file"}}},"schemes":["http","https"]}}},"definitions":{"Bottle":{"title":"Bottle","type":"object","properties":{"composition":{"type":"array","items":{"$ref":"#/definitions/Component"},"description":"Composition is the list of grape varietals and associated percentage.","example":[{"percentage":8,"varietal":"Syrah"},{"percentage":8,"varietal":"Syrah"}]},"description":{"type":"string","description":"Description of bottle","example":"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah","maxLength":2000},"name":{"type":"string","description":"Name of bottle","example":"Blue's Cuvee","maxLength":100},"rating":{"type":"integer","description":"Rating of bottle from 1 (worst) to 5 (best)","example":3,"format":"int32","minimum":1,"maximum":5},"vintage":{"type":"integer","description":"Vintage of bottle","example":2005,"format":"int32","minimum":1900,"maximum":2020},"winery":{"$ref":"#/definitions/Winery"}},"example":{"composition":[{"percentage":8,"varietal":"Syrah"},{"percentage":8,"varietal":"Syrah"}],"description":"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah","name":"Blue's Cuvee","rating":3,"vintage":2005,"winery":{"country":"USA","name":"Longoria","region":"Central Coast, California","url":"http://www.longoriawine.com/"}},"required":["name","winery","vintage"]},"CellarStoredBottle":{"title":"Mediatype identifier: application/vnd.cellar.stored-bottle; view=default","type":"object","properties":{"composition":{"type":"array","items":{"$ref":"#/definitions/Component"},"description":"Composition is the list of grape varietals and associated percentage.","example":[{"percentage":8,"varietal":"Syrah"},{"percentage":8,"varietal":"Syrah"}]},"description":{"type":"string","description":"Description of bottle","example":"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah","maxLength":2000},"id":{"type":"string","description":"ID is the unique id of the bottle.","example":"123abc"},"name":{"type":"string","description":"Name of bottle","example":"Blue's Cuvee","maxLength":100},"rating":{"type":"integer","description":"Rating of bottle from 1 (worst) to 5 (best)","example":3,"format":"int32","minimum":1,"maximum":5},"vintage":{"type":"integer","description":"Vintage of bottle","example":1917,"format":"int32","minimum":1900,"maximum":2020},"winery":{"$ref":"#/definitions/WineryTiny"}},"description":"A StoredBottle describes a bottle retrieved by the storage service. (default view)","example":{"composition":[{"percentage":8,"varietal":"Syrah"},{"percentage":8,"varietal":"Syrah"}],"description":"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah","id":"123abc","name":"Blue's Cuvee","rating":3,"vintage":1917,"winery":{"name":"Longoria"}},"required":["id","name","winery","vintage"]},"Component":{"title":"Component","type":"object","properties":{"percentage":{"type":"integer","description":"Percentage of varietal in wine","example":8,"format":"int32","minimum":1,"maximum":100},"varietal":{"type":"string","description":"Grape varietal","example":"Syrah","pattern":"[A-Za-z' ]+","maxLength":100}},"example":{"percentage":8,"varietal":"Syrah"},"required":["varietal"]},"Criteria":{"title":"Criteria","type":"object","properties":{"name":{"type":"string","description":"Name of bottle to pick","example":"Blue's Cuvee"},"varietal":{"type":"array","items":{"type":"string","example":"Deleniti deleniti reiciendis."},"description":"Varietals in preference order","example":["pinot noir","merlot","cabernet franc"]},"winery":{"type":"string","description":"Winery of bottle to pick","example":"longoria"}},"example":{"name":"Blue's Cuvee","varietal":["pinot noir","merlot","cabernet franc"],"winery":"longoria"}},"NotFound":{"title":"NotFound","type":"object","properties":{"id":{"type":"string","description":"ID of missing bottle","example":"Est excepturi corrupti magnam."},"message":{"type":"string","description":"Message of error","example":"bottle 1 not found"}},"description":"NotFound is the type returned when attempting to show or delete a bottle that does not exist.","example":{"id":"Est excepturi corrupti magnam.","message":"bottle 1 not found"},"required":["message","id"]},"SommelierStoredBottleResponseCollection":{"title":"Mediatype identifier: application/vnd.cellar.stored-bottle; type=collection; view=default","type":"array","items":{"$ref":"#/definitions/StoredBottleResponse"},"description":"PickResponseBody is the result type for an array of StoredBottle (default view)","example":[{"composition":[{"percentage":8,"varietal":"Syrah"},{"percentage":8,"varietal":"Syrah"}],"description":"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah","id":"123abc","name":"Blue's Cuvee","rating":4,"vintage":1983,"winery":{"name":"Longoria"}},{"composition":[{"percentage":8,"varietal":"Syrah"},{"percentage":8,"varietal":"Syrah"}],"description":"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah","id":"123abc","name":"Blue's Cuvee","rating":4,"vintage":1983,"winery":{"name":"Longoria"}},{"composition":[{"percentage":8,"varietal":"Syrah"},{"percentage":8,"varietal":"Syrah"}],"description":"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah","id":"123abc","name":"Blue's Cuvee","rating":4,"vintage":1983,"winery":{"name":"Longoria"}}]},"StorageMultiUpdateRequestBody":{"title":"StorageMultiUpdateRequestBody","type":"object","properties":{"bottles":{"type":"array","items":{"$ref":"#/definitions/Bottle"},"description":"Array of bottle info that matches the ids attribute","example":[{"composition":[{"percentage":8,"varietal":"Syrah"},{"percentage":8,"varietal":"Syrah"},{"percentage":8,"varietal":"Syrah"}],"description":"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah","name":"Blue's Cuvee","rating":3,"vintage":2003,"winery":{"country":"USA","name":"Longoria","region":"Central Coast, California","url":"http://www.longoriawine.com/"}},{"composition":[{"percentage":8,"varietal":"Syrah"},{"percentage":8,"varietal":"Syrah"},{"percentage":8,"varietal":"Syrah"}],"description":"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah","name":"Blue's Cuvee","rating":3,"vintage":2003,"winery":{"country":"USA","name":"Longoria","region":"Central Coast, California","url":"http://www.longoriawine.com/"}},{"composition":[{"percentage":8,"varietal":"Syrah"},{"percentage":8,"varietal":"Syrah"},{"percentage":8,"varietal":"Syrah"}],"description":"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah","name":"Blue's Cuvee","rating":3,"vintage":2003,"winery":{"country":"USA","name":"Longoria","region":"Central Coast, California","url":"http://www.longoriawine.com/"}}]}},"example":{"bottles":[{"composition":[{"percentage":8,"varietal":"Syrah"},{"percentage":8,"varietal":"Syrah"},{"percentage":8,"varietal":"Syrah"}],"description":"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah","name":"Blue's Cuvee","rating":3,"vintage":2003,"winery":{"country":"USA","name":"Longoria","region":"Central Coast, California","url":"http://www.longoriawine.com/"}},{"composition":[{"percentage":8,"varietal":"Syrah"},{"percentage":8,"varietal":"Syrah"},{"percentage":8,"varietal":"Syrah"}],"description":"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah","name":"Blue's Cuvee","rating":3,"vintage":2003,"winery":{"country":"USA","name":"Longoria","region":"Central Coast, California","url":"http://www.longoriawine.com/"}},{"composition":[{"percentage":8,"varietal":"Syrah"},{"percentage":8,"varietal":"Syrah"},{"percentage":8,"varietal":"Syrah"}],"description":"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah","name":"Blue's Cuvee","rating":3,"vintage":2003,"winery":{"country":"USA","name":"Longoria","region":"Central Coast, California","url":"http://www.longoriawine.com/"}}]},"required":["bottles"]},"StorageStoredBottleResponseTinyCollection":{"title":"Mediatype identifier: application/vnd.cellar.stored-bottle; type=collection; view=tiny","type":"array","items":{"$ref":"#/definitions/StoredBottleResponseTiny"},"description":"StorageStoredBottleResponseTinyCollection is the result type for an array of StoredBottleResponseTiny (default view)","example":[{"id":"123abc","name":"Blue's Cuvee","winery":{"name":"Longoria"}},{"id":"123abc","name":"Blue's Cuvee","winery":{"name":"Longoria"}},{"id":"123abc","name":"Blue's Cuvee","winery":{"name":"Longoria"}}]},"StoredBottleResponse":{"title":"Mediatype identifier: application/vnd.cellar.stored-bottle; view=default","type":"object","properties":{"composition":{"type":"array","items":{"$ref":"#/definitions/Component"},"description":"Composition is the list of grape varietals and associated percentage.","example":[{"percentage":8,"varietal":"Syrah"},{"percentage":8,"varietal":"Syrah"}]},"description":{"type":"string","description":"Description of bottle","example":"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah","maxLength":2000},"id":{"type":"string","description":"ID is the unique id of the bottle.","example":"123abc"},"name":{"type":"string","description":"Name of bottle","example":"Blue's Cuvee","maxLength":100},"rating":{"type":"integer","description":"Rating of bottle from 1 (worst) to 5 (best)","example":4,"format":"int32","minimum":1,"maximum":5},"vintage":{"type":"integer","description":"Vintage of bottle","example":1983,"format":"int32","minimum":1900,"maximum":2020},"winery":{"$ref":"#/definitions/WineryTiny"}},"description":"A StoredBottle describes a bottle retrieved by the storage service. (default view)","example":{"composition":[{"percentage":8,"varietal":"Syrah"},{"percentage":8,"varietal":"Syrah"}],"description":"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah","id":"123abc","name":"Blue's Cuvee","rating":4,"vintage":1983,"winery":{"name":"Longoria"}},"required":["id","name","winery","vintage"]},"StoredBottleResponseTiny":{"title":"Mediatype identifier: application/vnd.cellar.stored-bottle; view=default","type":"object","properties":{"id":{"type":"string","description":"ID is the unique id of the bottle.","example":"123abc"},"name":{"type":"string","description":"Name of bottle","example":"Blue's Cuvee","maxLength":100},"winery":{"$ref":"#/definitions/WineryTiny"}},"description":"A StoredBottle describes a bottle retrieved by the storage service. (tiny view) (default view)","example":{"id":"123abc","name":"Blue's Cuvee","winery":{"name":"Longoria"}},"required":["id","name","winery"]},"Winery":{"title":"Mediatype identifier: winery; view=default","type":"object","properties":{"country":{"type":"string","description":"Country of winery","example":"USA","pattern":"[a-zA-Z '\\.]+"},"name":{"type":"string","description":"Name of winery","example":"Longoria"},"region":{"type":"string","description":"Region of winery","example":"Central Coast, California","pattern":"[a-zA-Z '\\.]+"},"url":{"type":"string","description":"Winery website URL","example":"http://www.longoriawine.com/","pattern":"^(https?|ftp)://[^\\s/$.?#].[^\\s]*$"}},"description":"Winery result type (default view)","example":{"country":"USA","name":"Longoria","region":"Central Coast, California","url":"http://www.longoriawine.com/"},"required":["name","region","country"]},"WineryTiny":{"title":"Mediatype identifier: winery; view=default","type":"object","properties":{"name":{"type":"string","description":"Name of winery","example":"Longoria"}},"description":"Winery result type (tiny view) (default view)","example":{"name":"Longoria"},"required":["name"]}}} \ No newline at end of file diff --git a/cellar/gen/http/openapi.yaml b/cellar/gen/http/openapi.yaml index 7cea7e025..8b29475a2 100644 --- a/cellar/gen/http/openapi.yaml +++ b/cellar/gen/http/openapi.yaml @@ -31,11 +31,11 @@ paths: schema: $ref: '#/definitions/SommelierStoredBottleResponseCollection' "400": - description: Bad Request response. + description: 'no_criteria: Bad Request response.' schema: type: string "404": - description: Not Found response. + description: 'no_match: Not Found response.' schema: type: string schemes: @@ -104,7 +104,7 @@ paths: schema: $ref: '#/definitions/CellarStoredBottle' "404": - description: Not Found response. + description: 'not_found: Bottle not found' schema: $ref: '#/definitions/NotFound' required: @@ -153,7 +153,7 @@ paths: type: array items: type: string - example: Placeat quae qui dolorem doloremque neque et. + example: Ut aperiam voluptas. schemes: - http /storage/multi_update: @@ -224,11 +224,9 @@ definitions: $ref: '#/definitions/Component' description: Composition is the list of grape varietals and associated percentage. example: - - percentage: 65 + - percentage: 8 varietal: Syrah - - percentage: 65 - varietal: Syrah - - percentage: 65 + - percentage: 8 varietal: Syrah description: type: string @@ -243,14 +241,14 @@ definitions: rating: type: integer description: Rating of bottle from 1 (worst) to 5 (best) - example: 2 + example: 3 format: int32 minimum: 1 maximum: 5 vintage: type: integer description: Vintage of bottle - example: 2000 + example: 2005 format: int32 minimum: 1900 maximum: 2020 @@ -258,16 +256,14 @@ definitions: $ref: '#/definitions/Winery' example: composition: - - percentage: 65 - varietal: Syrah - - percentage: 65 + - percentage: 8 varietal: Syrah - - percentage: 65 + - percentage: 8 varietal: Syrah description: Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah name: Blue's Cuvee - rating: 2 - vintage: 2000 + rating: 3 + vintage: 2005 winery: country: USA name: Longoria @@ -287,11 +283,9 @@ definitions: $ref: '#/definitions/Component' description: Composition is the list of grape varietals and associated percentage. example: - - percentage: 55 - varietal: Syrah - - percentage: 55 + - percentage: 8 varietal: Syrah - - percentage: 55 + - percentage: 8 varietal: Syrah description: type: string @@ -317,26 +311,24 @@ definitions: vintage: type: integer description: Vintage of bottle - example: 1963 + example: 1917 format: int32 minimum: 1900 maximum: 2020 winery: - $ref: '#/definitions/WineryResponseBodyTiny' + $ref: '#/definitions/WineryTiny' description: A StoredBottle describes a bottle retrieved by the storage service. (default view) example: composition: - - percentage: 55 + - percentage: 8 varietal: Syrah - - percentage: 55 - varietal: Syrah - - percentage: 55 + - percentage: 8 varietal: Syrah description: Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah id: 123abc name: Blue's Cuvee rating: 3 - vintage: 1963 + vintage: 1917 winery: name: Longoria required: @@ -351,7 +343,7 @@ definitions: percentage: type: integer description: Percentage of varietal in wine - example: 36 + example: 8 format: int32 minimum: 1 maximum: 100 @@ -362,7 +354,7 @@ definitions: pattern: '[A-Za-z'' ]+' maxLength: 100 example: - percentage: 36 + percentage: 8 varietal: Syrah required: - varietal @@ -378,7 +370,7 @@ definitions: type: array items: type: string - example: Qui quae rem officiis est dolores et. + example: Deleniti deleniti reiciendis. description: Varietals in preference order example: - pinot noir @@ -402,14 +394,14 @@ definitions: id: type: string description: ID of missing bottle - example: Quae officiis expedita dolores. + example: Est excepturi corrupti magnam. message: type: string description: Message of error example: bottle 1 not found - description: Bottle not found + description: NotFound is the type returned when attempting to show or delete a bottle that does not exist. example: - id: Quae officiis expedita dolores. + id: Est excepturi corrupti magnam. message: bottle 1 not found required: - message @@ -419,34 +411,42 @@ definitions: type: array items: $ref: '#/definitions/StoredBottleResponse' - description: PickResponseBody is the result type for an array of StoredBottleResponse (default view) + description: PickResponseBody is the result type for an array of StoredBottle (default view) example: - composition: - - percentage: 36 - varietal: Syrah - - percentage: 36 + - percentage: 8 varietal: Syrah - - percentage: 36 + - percentage: 8 varietal: Syrah description: Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah id: 123abc name: Blue's Cuvee - rating: 3 - vintage: 1963 + rating: 4 + vintage: 1983 winery: name: Longoria - composition: - - percentage: 36 + - percentage: 8 varietal: Syrah - - percentage: 36 + - percentage: 8 varietal: Syrah - - percentage: 36 + description: Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah + id: 123abc + name: Blue's Cuvee + rating: 4 + vintage: 1983 + winery: + name: Longoria + - composition: + - percentage: 8 + varietal: Syrah + - percentage: 8 varietal: Syrah description: Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah id: 123abc name: Blue's Cuvee - rating: 3 - vintage: 1963 + rating: 4 + vintage: 1983 winery: name: Longoria StorageMultiUpdateRequestBody: @@ -460,48 +460,48 @@ definitions: description: Array of bottle info that matches the ids attribute example: - composition: - - percentage: 65 + - percentage: 8 varietal: Syrah - - percentage: 65 + - percentage: 8 varietal: Syrah - - percentage: 65 + - percentage: 8 varietal: Syrah description: Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah name: Blue's Cuvee - rating: 2 - vintage: 2009 + rating: 3 + vintage: 2003 winery: country: USA name: Longoria region: Central Coast, California url: http://www.longoriawine.com/ - composition: - - percentage: 65 + - percentage: 8 varietal: Syrah - - percentage: 65 + - percentage: 8 varietal: Syrah - - percentage: 65 + - percentage: 8 varietal: Syrah description: Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah name: Blue's Cuvee - rating: 2 - vintage: 2009 + rating: 3 + vintage: 2003 winery: country: USA name: Longoria region: Central Coast, California url: http://www.longoriawine.com/ - composition: - - percentage: 65 + - percentage: 8 varietal: Syrah - - percentage: 65 + - percentage: 8 varietal: Syrah - - percentage: 65 + - percentage: 8 varietal: Syrah description: Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah name: Blue's Cuvee - rating: 2 - vintage: 2009 + rating: 3 + vintage: 2003 winery: country: USA name: Longoria @@ -510,48 +510,48 @@ definitions: example: bottles: - composition: - - percentage: 65 + - percentage: 8 varietal: Syrah - - percentage: 65 + - percentage: 8 varietal: Syrah - - percentage: 65 + - percentage: 8 varietal: Syrah description: Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah name: Blue's Cuvee - rating: 2 - vintage: 2009 + rating: 3 + vintage: 2003 winery: country: USA name: Longoria region: Central Coast, California url: http://www.longoriawine.com/ - composition: - - percentage: 65 + - percentage: 8 varietal: Syrah - - percentage: 65 + - percentage: 8 varietal: Syrah - - percentage: 65 + - percentage: 8 varietal: Syrah description: Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah name: Blue's Cuvee - rating: 2 - vintage: 2009 + rating: 3 + vintage: 2003 winery: country: USA name: Longoria region: Central Coast, California url: http://www.longoriawine.com/ - composition: - - percentage: 65 + - percentage: 8 varietal: Syrah - - percentage: 65 + - percentage: 8 varietal: Syrah - - percentage: 65 + - percentage: 8 varietal: Syrah description: Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah name: Blue's Cuvee - rating: 2 - vintage: 2009 + rating: 3 + vintage: 2003 winery: country: USA name: Longoria @@ -574,6 +574,10 @@ definitions: name: Blue's Cuvee winery: name: Longoria + - id: 123abc + name: Blue's Cuvee + winery: + name: Longoria StoredBottleResponse: title: 'Mediatype identifier: application/vnd.cellar.stored-bottle; view=default' type: object @@ -584,11 +588,9 @@ definitions: $ref: '#/definitions/Component' description: Composition is the list of grape varietals and associated percentage. example: - - percentage: 36 - varietal: Syrah - - percentage: 36 + - percentage: 8 varietal: Syrah - - percentage: 36 + - percentage: 8 varietal: Syrah description: type: string @@ -607,33 +609,31 @@ definitions: rating: type: integer description: Rating of bottle from 1 (worst) to 5 (best) - example: 3 + example: 4 format: int32 minimum: 1 maximum: 5 vintage: type: integer description: Vintage of bottle - example: 1963 + example: 1983 format: int32 minimum: 1900 maximum: 2020 winery: - $ref: '#/definitions/WineryResponseTiny' + $ref: '#/definitions/WineryTiny' description: A StoredBottle describes a bottle retrieved by the storage service. (default view) example: composition: - - percentage: 36 - varietal: Syrah - - percentage: 36 + - percentage: 8 varietal: Syrah - - percentage: 36 + - percentage: 8 varietal: Syrah description: Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah id: 123abc name: Blue's Cuvee - rating: 3 - vintage: 1963 + rating: 4 + vintage: 1983 winery: name: Longoria required: @@ -655,7 +655,7 @@ definitions: example: Blue's Cuvee maxLength: 100 winery: - $ref: '#/definitions/WineryResponseTiny' + $ref: '#/definitions/WineryTiny' description: A StoredBottle describes a bottle retrieved by the storage service. (tiny view) (default view) example: id: 123abc @@ -689,7 +689,7 @@ definitions: description: Winery website URL example: http://www.longoriawine.com/ pattern: ^(https?|ftp)://[^\s/$.?#].[^\s]*$ - description: WineryRequestBody result type (default view) + description: Winery result type (default view) example: country: USA name: Longoria @@ -699,20 +699,7 @@ definitions: - name - region - country - WineryResponseBodyTiny: - title: 'Mediatype identifier: winery; view=default' - type: object - properties: - name: - type: string - description: Name of winery - example: Longoria - description: WineryResponseBody result type (tiny view) (default view) - example: - name: Longoria - required: - - name - WineryResponseTiny: + WineryTiny: title: 'Mediatype identifier: winery; view=default' type: object properties: @@ -720,7 +707,7 @@ definitions: type: string description: Name of winery example: Longoria - description: WineryResponse result type (tiny view) (default view) + description: Winery result type (tiny view) (default view) example: name: Longoria required: diff --git a/cellar/gen/http/openapi3.2.json b/cellar/gen/http/openapi3.2.json index dff413210..c9bba60f6 100644 --- a/cellar/gen/http/openapi3.2.json +++ b/cellar/gen/http/openapi3.2.json @@ -1 +1 @@ -{"openapi":"3.2.0","info":{"title":"Cellar Service","description":"HTTP service for managing your wine cellar","version":"0.0.1"},"servers":[{"url":"http://localhost:8000/cellar","name":"cellar-localhost","description":"cellar hosts the storage, sommelier and swagger services."},{"url":"https://goa.design/cellar","name":"cellar-goa.design","description":"cellar hosts the storage, sommelier and swagger services."}],"paths":{"/sommelier":{"post":{"tags":["sommelier"],"summary":"pick sommelier","operationId":"sommelier#pick","requestBody":{"description":"Request body for pick.","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Criteria"},"example":{"name":"Blue's Cuvee","varietal":["pinot noir","merlot","cabernet franc"],"winery":"longoria"}}}},"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StoredBottleResponseCollection"},"example":[{"composition":[{"percentage":36,"varietal":"Syrah"},{"percentage":36,"varietal":"Syrah"},{"percentage":36,"varietal":"Syrah"}],"description":"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah","id":"123abc","name":"Blue's Cuvee","rating":3,"vintage":1963,"winery":{"name":"Longoria"}},{"composition":[{"percentage":36,"varietal":"Syrah"},{"percentage":36,"varietal":"Syrah"},{"percentage":36,"varietal":"Syrah"}],"description":"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah","id":"123abc","name":"Blue's Cuvee","rating":3,"vintage":1963,"winery":{"name":"Longoria"}}]}}},"400":{"description":"no_criteria: Bad Request response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NoCriteria"},"example":"Eum voluptas consectetur molestiae voluptatem animi voluptas."}}},"404":{"description":"no_match: Not Found response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NoCriteria"},"example":"Iste ratione."}}}}}},"/storage":{"get":{"tags":["storage"],"summary":"list storage","description":"List all stored bottles","operationId":"storage#list","responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StoredBottleResponseTinyCollection"},"example":[{"id":"123abc","name":"Blue's Cuvee","winery":{"name":"Longoria"}},{"id":"123abc","name":"Blue's Cuvee","winery":{"name":"Longoria"}},{"id":"123abc","name":"Blue's Cuvee","winery":{"name":"Longoria"}},{"id":"123abc","name":"Blue's Cuvee","winery":{"name":"Longoria"}}]}}}}},"post":{"tags":["storage"],"summary":"add storage","description":"Add new bottle and return its ID.","operationId":"storage#add","requestBody":{"description":"Request body for add.","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Bottle"},"example":{"composition":[{"percentage":65,"varietal":"Syrah"},{"percentage":65,"varietal":"Syrah"},{"percentage":65,"varietal":"Syrah"}],"description":"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah","name":"Blue's Cuvee","rating":2,"vintage":2000,"winery":{"country":"USA","name":"Longoria","region":"Central Coast, California","url":"http://www.longoriawine.com/"}}}}},"responses":{"201":{"description":"Created response.","content":{"application/json":{"schema":{"type":"string","example":"Accusamus nisi id provident ut suscipit quam."},"example":"Accusamus nisi id provident ut suscipit quam."}}}}}},"/storage/multi_add":{"post":{"tags":["storage"],"summary":"multi_add storage","description":"Add n number of bottles and return their IDs. This is a multipart request and each part has field name 'bottle' and contains the encoded bottle info to be added.","operationId":"storage#multi_add","requestBody":{"description":"Request body for multi_add.","required":true,"content":{"multipart/form-data":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Bottle"},"example":[{"composition":[{"percentage":65,"varietal":"Syrah"},{"percentage":65,"varietal":"Syrah"},{"percentage":65,"varietal":"Syrah"}],"description":"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah","name":"Blue's Cuvee","rating":2,"vintage":2009,"winery":{"country":"USA","name":"Longoria","region":"Central Coast, California","url":"http://www.longoriawine.com/"}},{"composition":[{"percentage":65,"varietal":"Syrah"},{"percentage":65,"varietal":"Syrah"},{"percentage":65,"varietal":"Syrah"}],"description":"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah","name":"Blue's Cuvee","rating":2,"vintage":2009,"winery":{"country":"USA","name":"Longoria","region":"Central Coast, California","url":"http://www.longoriawine.com/"}},{"composition":[{"percentage":65,"varietal":"Syrah"},{"percentage":65,"varietal":"Syrah"},{"percentage":65,"varietal":"Syrah"}],"description":"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah","name":"Blue's Cuvee","rating":2,"vintage":2009,"winery":{"country":"USA","name":"Longoria","region":"Central Coast, California","url":"http://www.longoriawine.com/"}}]},"example":[{"composition":[{"percentage":65,"varietal":"Syrah"},{"percentage":65,"varietal":"Syrah"},{"percentage":65,"varietal":"Syrah"}],"description":"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah","name":"Blue's Cuvee","rating":2,"vintage":2009,"winery":{"country":"USA","name":"Longoria","region":"Central Coast, California","url":"http://www.longoriawine.com/"}},{"composition":[{"percentage":65,"varietal":"Syrah"},{"percentage":65,"varietal":"Syrah"},{"percentage":65,"varietal":"Syrah"}],"description":"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah","name":"Blue's Cuvee","rating":2,"vintage":2009,"winery":{"country":"USA","name":"Longoria","region":"Central Coast, California","url":"http://www.longoriawine.com/"}},{"composition":[{"percentage":65,"varietal":"Syrah"},{"percentage":65,"varietal":"Syrah"},{"percentage":65,"varietal":"Syrah"}],"description":"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah","name":"Blue's Cuvee","rating":2,"vintage":2009,"winery":{"country":"USA","name":"Longoria","region":"Central Coast, California","url":"http://www.longoriawine.com/"}}]}}},"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"type":"array","items":{"type":"string","example":"Qui incidunt quas libero est."},"example":["Qui incidunt quas libero est.","Vero iusto sunt est quaerat."]},"example":["Qui incidunt quas libero est.","Vero iusto sunt est quaerat."]}}}}}},"/storage/multi_update":{"put":{"tags":["storage"],"summary":"multi_update storage","description":"Update bottles with the given IDs. This is a multipart request and each part has field name 'bottle' and contains the encoded bottle info to be updated. The IDs in the query parameter is mapped to each part in the request.","operationId":"storage#multi_update","parameters":[{"name":"ids","in":"query","description":"IDs of the bottles to be updated","allowEmptyValue":true,"required":true,"schema":{"type":"array","items":{"type":"string","example":"Ut non voluptatem."},"description":"IDs of the bottles to be updated","example":["Ut non voluptatem.","Officia tenetur rerum possimus voluptates."]},"example":["Ut non voluptatem.","Officia tenetur rerum possimus voluptates.","Deserunt quidem non molestias non inventore.","Consequatur praesentium ipsa aut et voluptates illo."]}],"requestBody":{"description":"Request body for multi_update.","required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/MultiUpdateRequestBody"},"example":{"bottles":[{"composition":[{"percentage":65,"varietal":"Syrah"},{"percentage":65,"varietal":"Syrah"},{"percentage":65,"varietal":"Syrah"}],"description":"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah","name":"Blue's Cuvee","rating":2,"vintage":2009,"winery":{"country":"USA","name":"Longoria","region":"Central Coast, California","url":"http://www.longoriawine.com/"}},{"composition":[{"percentage":65,"varietal":"Syrah"},{"percentage":65,"varietal":"Syrah"},{"percentage":65,"varietal":"Syrah"}],"description":"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah","name":"Blue's Cuvee","rating":2,"vintage":2009,"winery":{"country":"USA","name":"Longoria","region":"Central Coast, California","url":"http://www.longoriawine.com/"}},{"composition":[{"percentage":65,"varietal":"Syrah"},{"percentage":65,"varietal":"Syrah"},{"percentage":65,"varietal":"Syrah"}],"description":"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah","name":"Blue's Cuvee","rating":2,"vintage":2009,"winery":{"country":"USA","name":"Longoria","region":"Central Coast, California","url":"http://www.longoriawine.com/"}}]}}}},"responses":{"204":{"description":"No Content response."}}}},"/storage/rate":{"post":{"tags":["storage"],"summary":"rate storage","description":"Rate bottles by IDs","operationId":"storage#rate","parameters":[{"name":"payload","in":"query","description":"Query parameters","style":"deepObject","required":true,"schema":{"type":"object","additionalProperties":true}}],"responses":{"200":{"description":"OK response."}}}},"/storage/{id}":{"delete":{"tags":["storage"],"summary":"remove storage","description":"Remove bottle from storage","operationId":"storage#remove","parameters":[{"name":"id","in":"path","description":"ID of bottle to remove","required":true,"schema":{"type":"string","description":"ID of bottle to remove","example":"Id libero accusantium incidunt."},"example":"Aut rerum deserunt aut consequatur."}],"responses":{"204":{"description":"No Content response."}}},"get":{"tags":["storage"],"summary":"show storage","description":"Show bottle by ID","operationId":"storage#show","parameters":[{"name":"view","in":"query","description":"View to render","allowEmptyValue":true,"schema":{"type":"string","description":"View to render","example":"tiny","enum":["default","tiny"]},"example":"default"},{"name":"id","in":"path","description":"ID of bottle to show","required":true,"schema":{"type":"string","description":"ID of bottle to show","example":"Et aut a enim qui."},"example":"Sequi excepturi harum numquam."}],"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CellarStoredBottle"},"example":{"composition":[{"percentage":55,"varietal":"Syrah"},{"percentage":55,"varietal":"Syrah"},{"percentage":55,"varietal":"Syrah"},{"percentage":55,"varietal":"Syrah"}],"description":"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah","id":"123abc","name":"Blue's Cuvee","rating":1,"vintage":1913,"winery":{"country":"USA","name":"Longoria","region":"Central Coast, California","url":"http://www.longoriawine.com/"}}}}},"404":{"description":"not_found: Bottle not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"},"example":{"id":"Quae officiis expedita dolores.","message":"bottle 1 not found"}}}}}}},"/swagger/swagger.json":{"get":{"tags":["swagger"],"summary":"Download gen/http/openapi.json","description":"JSON document containing the API swagger definition","operationId":"swagger#/swagger/swagger.json","responses":{"200":{"description":"File downloaded"}}}}},"components":{"schemas":{"Bottle":{"type":"object","properties":{"composition":{"type":"array","items":{"$ref":"#/components/schemas/Component"},"description":"Composition is the list of grape varietals and associated percentage.","example":[{"percentage":65,"varietal":"Syrah"},{"percentage":65,"varietal":"Syrah"},{"percentage":65,"varietal":"Syrah"}]},"description":{"type":"string","description":"Description of bottle","example":"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah","maxLength":2000},"name":{"type":"string","description":"Name of bottle","example":"Blue's Cuvee","maxLength":100},"rating":{"type":"integer","description":"Rating of bottle from 1 (worst) to 5 (best)","example":2,"format":"int32","minimum":1,"maximum":5},"vintage":{"type":"integer","description":"Vintage of bottle","example":2000,"format":"int32","minimum":1900,"maximum":2020},"winery":{"$ref":"#/components/schemas/Winery"}},"description":"Request body for add.","example":{"composition":[{"percentage":65,"varietal":"Syrah"},{"percentage":65,"varietal":"Syrah"},{"percentage":65,"varietal":"Syrah"}],"description":"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah","name":"Blue's Cuvee","rating":2,"vintage":2000,"winery":{"country":"USA","name":"Longoria","region":"Central Coast, California","url":"http://www.longoriawine.com/"}},"required":["name","winery","vintage"]},"CellarStoredBottle":{"type":"object","properties":{"composition":{"type":"array","items":{"$ref":"#/components/schemas/Component"},"description":"Composition is the list of grape varietals and associated percentage.","example":[{"percentage":55,"varietal":"Syrah"},{"percentage":55,"varietal":"Syrah"},{"percentage":55,"varietal":"Syrah"}]},"description":{"type":"string","description":"Description of bottle","example":"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah","maxLength":2000},"id":{"type":"string","description":"ID is the unique id of the bottle.","example":"123abc"},"name":{"type":"string","description":"Name of bottle","example":"Blue's Cuvee","maxLength":100},"rating":{"type":"integer","description":"Rating of bottle from 1 (worst) to 5 (best)","example":4,"format":"int32","minimum":1,"maximum":5},"vintage":{"type":"integer","description":"Vintage of bottle","example":1919,"format":"int32","minimum":1900,"maximum":2020},"winery":{"$ref":"#/components/schemas/Winery"}},"description":"A StoredBottle describes a bottle retrieved by the storage service.","example":{"composition":[{"percentage":55,"varietal":"Syrah"},{"percentage":55,"varietal":"Syrah"},{"percentage":55,"varietal":"Syrah"}],"description":"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah","id":"123abc","name":"Blue's Cuvee","rating":4,"vintage":1919,"winery":{"country":"USA","name":"Longoria","region":"Central Coast, California","url":"http://www.longoriawine.com/"}},"required":["id","name","winery","vintage"]},"Component":{"type":"object","properties":{"percentage":{"type":"integer","description":"Percentage of varietal in wine","example":36,"format":"int32","minimum":1,"maximum":100},"varietal":{"type":"string","description":"Grape varietal","example":"Syrah","pattern":"[A-Za-z' ]+","maxLength":100}},"example":{"percentage":36,"varietal":"Syrah"},"required":["varietal"]},"Criteria":{"type":"object","properties":{"name":{"type":"string","description":"Name of bottle to pick","example":"Blue's Cuvee"},"varietal":{"type":"array","items":{"type":"string","example":"Qui quae rem officiis est dolores et."},"description":"Varietals in preference order","example":["pinot noir","merlot","cabernet franc"]},"winery":{"type":"string","description":"Winery of bottle to pick","example":"longoria"}},"description":"Request body for pick.","example":{"name":"Blue's Cuvee","varietal":["pinot noir","merlot","cabernet franc"],"winery":"longoria"}},"MultiUpdateRequestBody":{"type":"object","properties":{"bottles":{"type":"array","items":{"$ref":"#/components/schemas/Bottle"},"description":"Array of bottle info that matches the ids attribute","example":[{"composition":[{"percentage":65,"varietal":"Syrah"},{"percentage":65,"varietal":"Syrah"},{"percentage":65,"varietal":"Syrah"}],"description":"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah","name":"Blue's Cuvee","rating":2,"vintage":2009,"winery":{"country":"USA","name":"Longoria","region":"Central Coast, California","url":"http://www.longoriawine.com/"}},{"composition":[{"percentage":65,"varietal":"Syrah"},{"percentage":65,"varietal":"Syrah"},{"percentage":65,"varietal":"Syrah"}],"description":"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah","name":"Blue's Cuvee","rating":2,"vintage":2009,"winery":{"country":"USA","name":"Longoria","region":"Central Coast, California","url":"http://www.longoriawine.com/"}},{"composition":[{"percentage":65,"varietal":"Syrah"},{"percentage":65,"varietal":"Syrah"},{"percentage":65,"varietal":"Syrah"}],"description":"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah","name":"Blue's Cuvee","rating":2,"vintage":2009,"winery":{"country":"USA","name":"Longoria","region":"Central Coast, California","url":"http://www.longoriawine.com/"}}]}},"description":"Request body for multi_update.","example":{"bottles":[{"composition":[{"percentage":65,"varietal":"Syrah"},{"percentage":65,"varietal":"Syrah"},{"percentage":65,"varietal":"Syrah"}],"description":"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah","name":"Blue's Cuvee","rating":2,"vintage":2009,"winery":{"country":"USA","name":"Longoria","region":"Central Coast, California","url":"http://www.longoriawine.com/"}},{"composition":[{"percentage":65,"varietal":"Syrah"},{"percentage":65,"varietal":"Syrah"},{"percentage":65,"varietal":"Syrah"}],"description":"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah","name":"Blue's Cuvee","rating":2,"vintage":2009,"winery":{"country":"USA","name":"Longoria","region":"Central Coast, California","url":"http://www.longoriawine.com/"}},{"composition":[{"percentage":65,"varietal":"Syrah"},{"percentage":65,"varietal":"Syrah"},{"percentage":65,"varietal":"Syrah"}],"description":"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah","name":"Blue's Cuvee","rating":2,"vintage":2009,"winery":{"country":"USA","name":"Longoria","region":"Central Coast, California","url":"http://www.longoriawine.com/"}}]},"required":["bottles"]},"NoCriteria":{"type":"string","description":"Missing criteria","example":"Eum voluptas consectetur molestiae voluptatem animi voluptas."},"NotFound":{"type":"object","properties":{"id":{"type":"string","description":"ID of missing bottle","example":"Quae officiis expedita dolores."},"message":{"type":"string","description":"Message of error","example":"bottle 1 not found"}},"description":"Bottle not found","example":{"id":"Quae officiis expedita dolores.","message":"bottle 1 not found"},"required":["message","id"]},"StoredBottleResponse":{"type":"object","properties":{"composition":{"type":"array","items":{"$ref":"#/components/schemas/Component"},"description":"Composition is the list of grape varietals and associated percentage.","example":[{"percentage":36,"varietal":"Syrah"},{"percentage":36,"varietal":"Syrah"},{"percentage":36,"varietal":"Syrah"}]},"description":{"type":"string","description":"Description of bottle","example":"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah","maxLength":2000},"id":{"type":"string","description":"ID is the unique id of the bottle.","example":"123abc"},"name":{"type":"string","description":"Name of bottle","example":"Blue's Cuvee","maxLength":100},"rating":{"type":"integer","description":"Rating of bottle from 1 (worst) to 5 (best)","example":3,"format":"int32","minimum":1,"maximum":5},"vintage":{"type":"integer","description":"Vintage of bottle","example":1963,"format":"int32","minimum":1900,"maximum":2020},"winery":{"$ref":"#/components/schemas/WineryResponseTiny"}},"description":"A StoredBottle describes a bottle retrieved by the storage service. (default view)","example":{"composition":[{"percentage":36,"varietal":"Syrah"},{"percentage":36,"varietal":"Syrah"},{"percentage":36,"varietal":"Syrah"}],"description":"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah","id":"123abc","name":"Blue's Cuvee","rating":3,"vintage":1963,"winery":{"name":"Longoria"}},"required":["id","name","winery","vintage"]},"StoredBottleResponseCollection":{"type":"array","items":{"$ref":"#/components/schemas/StoredBottleResponse"},"description":"PickResponseBody is the result type for an array of StoredBottleResponse (default view)","example":[{"composition":[{"percentage":36,"varietal":"Syrah"},{"percentage":36,"varietal":"Syrah"},{"percentage":36,"varietal":"Syrah"}],"description":"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah","id":"123abc","name":"Blue's Cuvee","rating":3,"vintage":1963,"winery":{"name":"Longoria"}},{"composition":[{"percentage":36,"varietal":"Syrah"},{"percentage":36,"varietal":"Syrah"},{"percentage":36,"varietal":"Syrah"}],"description":"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah","id":"123abc","name":"Blue's Cuvee","rating":3,"vintage":1963,"winery":{"name":"Longoria"}}]},"StoredBottleResponseTiny":{"type":"object","properties":{"id":{"type":"string","description":"ID is the unique id of the bottle.","example":"123abc"},"name":{"type":"string","description":"Name of bottle","example":"Blue's Cuvee","maxLength":100},"winery":{"$ref":"#/components/schemas/WineryResponseTiny"}},"description":"A StoredBottle describes a bottle retrieved by the storage service. (tiny view)","example":{"id":"123abc","name":"Blue's Cuvee","winery":{"name":"Longoria"}},"required":["id","name","winery"]},"StoredBottleResponseTinyCollection":{"type":"array","items":{"$ref":"#/components/schemas/StoredBottleResponseTiny"},"description":"ListResponseBody is the result type for an array of StoredBottleResponse (tiny view)","example":[{"id":"123abc","name":"Blue's Cuvee","winery":{"name":"Longoria"}},{"id":"123abc","name":"Blue's Cuvee","winery":{"name":"Longoria"}},{"id":"123abc","name":"Blue's Cuvee","winery":{"name":"Longoria"}},{"id":"123abc","name":"Blue's Cuvee","winery":{"name":"Longoria"}}]},"Winery":{"type":"object","properties":{"country":{"type":"string","description":"Country of winery","example":"USA","pattern":"[a-zA-Z '\\.]+"},"name":{"type":"string","description":"Name of winery","example":"Longoria"},"region":{"type":"string","description":"Region of winery","example":"Central Coast, California","pattern":"[a-zA-Z '\\.]+"},"url":{"type":"string","description":"Winery website URL","example":"http://www.longoriawine.com/","pattern":"^(https?|ftp)://[^\\s/$.?#].[^\\s]*$"}},"description":"Winery that produces wine","example":{"country":"USA","name":"Longoria","region":"Central Coast, California","url":"http://www.longoriawine.com/"},"required":["name","region","country"]},"WineryResponseTiny":{"type":"object","properties":{"name":{"type":"string","description":"Name of winery","example":"Longoria"}},"description":"WineryResponse result type (tiny view)","example":{"name":"Longoria"},"required":["name"]}}},"tags":[{"name":"sommelier","description":"The sommelier service retrieves bottles given a set of criteria."},{"name":"storage","description":"The storage service makes it possible to view, add or remove wine bottles."},{"name":"swagger","description":"The swagger service serves the API swagger definition."}]} \ No newline at end of file +{"openapi":"3.2.0","info":{"title":"Cellar Service","description":"HTTP service for managing your wine cellar","version":"0.0.1"},"servers":[{"url":"http://localhost:8000/cellar","name":"cellar-localhost","description":"cellar hosts the storage, sommelier and swagger services."},{"url":"https://goa.design/cellar","name":"cellar-goa.design","description":"cellar hosts the storage, sommelier and swagger services."}],"paths":{"/sommelier":{"post":{"tags":["sommelier"],"summary":"pick sommelier","operationId":"sommelier#pick","requestBody":{"description":"Request body for pick.","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Criteria"},"example":{"name":"Blue's Cuvee","varietal":["pinot noir","merlot","cabernet franc"],"winery":"longoria"}}}},"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StoredBottleResponseCollection"},"example":[{"composition":[{"percentage":8,"varietal":"Syrah"},{"percentage":8,"varietal":"Syrah"}],"description":"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah","id":"123abc","name":"Blue's Cuvee","rating":4,"vintage":1983,"winery":{"name":"Longoria"}},{"composition":[{"percentage":8,"varietal":"Syrah"},{"percentage":8,"varietal":"Syrah"}],"description":"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah","id":"123abc","name":"Blue's Cuvee","rating":4,"vintage":1983,"winery":{"name":"Longoria"}},{"composition":[{"percentage":8,"varietal":"Syrah"},{"percentage":8,"varietal":"Syrah"}],"description":"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah","id":"123abc","name":"Blue's Cuvee","rating":4,"vintage":1983,"winery":{"name":"Longoria"}}]}}},"400":{"description":"no_criteria: Bad Request response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NoCriteria"},"example":"Eius maxime earum laudantium."}}},"404":{"description":"no_match: Not Found response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NoCriteria"},"example":"Ipsum tempore."}}}}}},"/storage":{"get":{"tags":["storage"],"summary":"list storage","description":"List all stored bottles","operationId":"storage#list","responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StoredBottleResponseTinyCollection"},"example":[{"id":"123abc","name":"Blue's Cuvee","winery":{"name":"Longoria"}},{"id":"123abc","name":"Blue's Cuvee","winery":{"name":"Longoria"}},{"id":"123abc","name":"Blue's Cuvee","winery":{"name":"Longoria"}}]}}}}},"post":{"tags":["storage"],"summary":"add storage","description":"Add new bottle and return its ID.","operationId":"storage#add","requestBody":{"description":"Request body for add.","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Bottle"},"example":{"composition":[{"percentage":8,"varietal":"Syrah"},{"percentage":8,"varietal":"Syrah"}],"description":"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah","name":"Blue's Cuvee","rating":3,"vintage":2005,"winery":{"country":"USA","name":"Longoria","region":"Central Coast, California","url":"http://www.longoriawine.com/"}}}}},"responses":{"201":{"description":"Created response.","content":{"application/json":{"schema":{"type":"string","example":"Qui dolorem atque ex est."},"example":"Qui dolorem atque ex est."}}}}}},"/storage/multi_add":{"post":{"tags":["storage"],"summary":"multi_add storage","description":"Add n number of bottles and return their IDs. This is a multipart request and each part has field name 'bottle' and contains the encoded bottle info to be added.","operationId":"storage#multi_add","requestBody":{"description":"Request body for multi_add.","required":true,"content":{"multipart/form-data":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Bottle"},"example":[{"composition":[{"percentage":8,"varietal":"Syrah"},{"percentage":8,"varietal":"Syrah"},{"percentage":8,"varietal":"Syrah"}],"description":"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah","name":"Blue's Cuvee","rating":3,"vintage":2003,"winery":{"country":"USA","name":"Longoria","region":"Central Coast, California","url":"http://www.longoriawine.com/"}},{"composition":[{"percentage":8,"varietal":"Syrah"},{"percentage":8,"varietal":"Syrah"},{"percentage":8,"varietal":"Syrah"}],"description":"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah","name":"Blue's Cuvee","rating":3,"vintage":2003,"winery":{"country":"USA","name":"Longoria","region":"Central Coast, California","url":"http://www.longoriawine.com/"}}]},"example":[{"composition":[{"percentage":8,"varietal":"Syrah"},{"percentage":8,"varietal":"Syrah"},{"percentage":8,"varietal":"Syrah"}],"description":"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah","name":"Blue's Cuvee","rating":3,"vintage":2003,"winery":{"country":"USA","name":"Longoria","region":"Central Coast, California","url":"http://www.longoriawine.com/"}},{"composition":[{"percentage":8,"varietal":"Syrah"},{"percentage":8,"varietal":"Syrah"},{"percentage":8,"varietal":"Syrah"}],"description":"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah","name":"Blue's Cuvee","rating":3,"vintage":2003,"winery":{"country":"USA","name":"Longoria","region":"Central Coast, California","url":"http://www.longoriawine.com/"}}]}}},"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"type":"array","items":{"type":"string","example":"Ut aperiam voluptas."},"example":["Ut aperiam voluptas.","Dolore ex sunt.","Ut ipsam."]},"example":["Ut aperiam voluptas.","Dolore ex sunt.","Ut ipsam."]}}}}}},"/storage/multi_update":{"put":{"tags":["storage"],"summary":"multi_update storage","description":"Update bottles with the given IDs. This is a multipart request and each part has field name 'bottle' and contains the encoded bottle info to be updated. The IDs in the query parameter is mapped to each part in the request.","operationId":"storage#multi_update","parameters":[{"name":"ids","in":"query","description":"IDs of the bottles to be updated","allowEmptyValue":true,"required":true,"schema":{"type":"array","items":{"type":"string","example":"Deserunt itaque omnis necessitatibus enim aspernatur."},"description":"IDs of the bottles to be updated","example":["Deserunt itaque omnis necessitatibus enim aspernatur.","Tempore in voluptate asperiores.","Incidunt quia ut eius quibusdam rerum.","Consequatur architecto ratione."]},"example":["Deserunt itaque omnis necessitatibus enim aspernatur.","Tempore in voluptate asperiores.","Incidunt quia ut eius quibusdam rerum.","Consequatur architecto ratione."]}],"requestBody":{"description":"Request body for multi_update.","required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/MultiUpdateRequestBody"},"example":{"bottles":[{"composition":[{"percentage":8,"varietal":"Syrah"},{"percentage":8,"varietal":"Syrah"},{"percentage":8,"varietal":"Syrah"}],"description":"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah","name":"Blue's Cuvee","rating":3,"vintage":2003,"winery":{"country":"USA","name":"Longoria","region":"Central Coast, California","url":"http://www.longoriawine.com/"}},{"composition":[{"percentage":8,"varietal":"Syrah"},{"percentage":8,"varietal":"Syrah"},{"percentage":8,"varietal":"Syrah"}],"description":"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah","name":"Blue's Cuvee","rating":3,"vintage":2003,"winery":{"country":"USA","name":"Longoria","region":"Central Coast, California","url":"http://www.longoriawine.com/"}},{"composition":[{"percentage":8,"varietal":"Syrah"},{"percentage":8,"varietal":"Syrah"},{"percentage":8,"varietal":"Syrah"}],"description":"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah","name":"Blue's Cuvee","rating":3,"vintage":2003,"winery":{"country":"USA","name":"Longoria","region":"Central Coast, California","url":"http://www.longoriawine.com/"}}]}}}},"responses":{"204":{"description":"No Content response."}}}},"/storage/rate":{"post":{"tags":["storage"],"summary":"rate storage","description":"Rate bottles by IDs","operationId":"storage#rate","parameters":[{"name":"payload","in":"query","description":"Query parameters","style":"deepObject","required":true,"schema":{"type":"object","additionalProperties":true}}],"responses":{"200":{"description":"OK response."}}}},"/storage/{id}":{"delete":{"tags":["storage"],"summary":"remove storage","description":"Remove bottle from storage","operationId":"storage#remove","parameters":[{"name":"id","in":"path","description":"ID of bottle to remove","required":true,"schema":{"type":"string","description":"ID of bottle to remove","example":"Tenetur molestiae aut dolorem."},"example":"Tenetur molestiae aut dolorem."}],"responses":{"204":{"description":"No Content response."}}},"get":{"tags":["storage"],"summary":"show storage","description":"Show bottle by ID","operationId":"storage#show","parameters":[{"name":"view","in":"query","description":"View to render","allowEmptyValue":true,"schema":{"type":"string","description":"View to render","example":"tiny","enum":["default","tiny"]},"example":"tiny"},{"name":"id","in":"path","description":"ID of bottle to show","required":true,"schema":{"type":"string","description":"ID of bottle to show","example":"Repellat numquam autem."},"example":"Repellat numquam autem."}],"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CellarStoredBottle"},"example":{"composition":[{"percentage":8,"varietal":"Syrah"},{"percentage":8,"varietal":"Syrah"}],"description":"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah","id":"123abc","name":"Blue's Cuvee","rating":3,"vintage":1917,"winery":{"country":"USA","name":"Longoria","region":"Central Coast, California","url":"http://www.longoriawine.com/"}}}}},"404":{"description":"not_found: Bottle not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"},"example":{"id":"Est excepturi corrupti magnam.","message":"bottle 1 not found"}}}}}}},"/swagger/swagger.json":{"get":{"tags":["swagger"],"summary":"Download gen/http/openapi.json","description":"JSON document containing the API swagger definition","operationId":"swagger#/swagger/swagger.json","responses":{"200":{"description":"File downloaded"}}}}},"components":{"schemas":{"Bottle":{"type":"object","properties":{"composition":{"type":"array","items":{"$ref":"#/components/schemas/Component"},"description":"Composition is the list of grape varietals and associated percentage.","example":[{"percentage":8,"varietal":"Syrah"},{"percentage":8,"varietal":"Syrah"}]},"description":{"type":"string","description":"Description of bottle","example":"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah","maxLength":2000},"name":{"type":"string","description":"Name of bottle","example":"Blue's Cuvee","maxLength":100},"rating":{"type":"integer","description":"Rating of bottle from 1 (worst) to 5 (best)","example":3,"format":"int32","minimum":1,"maximum":5},"vintage":{"type":"integer","description":"Vintage of bottle","example":2005,"format":"int32","minimum":1900,"maximum":2020},"winery":{"$ref":"#/components/schemas/Winery"}},"description":"Request body for add.","example":{"composition":[{"percentage":8,"varietal":"Syrah"},{"percentage":8,"varietal":"Syrah"}],"description":"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah","name":"Blue's Cuvee","rating":3,"vintage":2005,"winery":{"country":"USA","name":"Longoria","region":"Central Coast, California","url":"http://www.longoriawine.com/"}},"required":["name","winery","vintage"]},"CellarStoredBottle":{"type":"object","properties":{"composition":{"type":"array","items":{"$ref":"#/components/schemas/Component"},"description":"Composition is the list of grape varietals and associated percentage.","example":[{"percentage":8,"varietal":"Syrah"},{"percentage":8,"varietal":"Syrah"}]},"description":{"type":"string","description":"Description of bottle","example":"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah","maxLength":2000},"id":{"type":"string","description":"ID is the unique id of the bottle.","example":"123abc"},"name":{"type":"string","description":"Name of bottle","example":"Blue's Cuvee","maxLength":100},"rating":{"type":"integer","description":"Rating of bottle from 1 (worst) to 5 (best)","example":3,"format":"int32","minimum":1,"maximum":5},"vintage":{"type":"integer","description":"Vintage of bottle","example":1917,"format":"int32","minimum":1900,"maximum":2020},"winery":{"$ref":"#/components/schemas/Winery"}},"description":"A StoredBottle describes a bottle retrieved by the storage service.","example":{"composition":[{"percentage":8,"varietal":"Syrah"},{"percentage":8,"varietal":"Syrah"}],"description":"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah","id":"123abc","name":"Blue's Cuvee","rating":3,"vintage":1917,"winery":{"country":"USA","name":"Longoria","region":"Central Coast, California","url":"http://www.longoriawine.com/"}},"required":["id","name","winery","vintage"]},"Component":{"type":"object","properties":{"percentage":{"type":"integer","description":"Percentage of varietal in wine","example":8,"format":"int32","minimum":1,"maximum":100},"varietal":{"type":"string","description":"Grape varietal","example":"Syrah","pattern":"[A-Za-z' ]+","maxLength":100}},"example":{"percentage":8,"varietal":"Syrah"},"required":["varietal"]},"Criteria":{"type":"object","properties":{"name":{"type":"string","description":"Name of bottle to pick","example":"Blue's Cuvee"},"varietal":{"type":"array","items":{"type":"string","example":"Deleniti deleniti reiciendis."},"description":"Varietals in preference order","example":["pinot noir","merlot","cabernet franc"]},"winery":{"type":"string","description":"Winery of bottle to pick","example":"longoria"}},"description":"Request body for pick.","example":{"name":"Blue's Cuvee","varietal":["pinot noir","merlot","cabernet franc"],"winery":"longoria"}},"MultiUpdateRequestBody":{"type":"object","properties":{"bottles":{"type":"array","items":{"$ref":"#/components/schemas/Bottle"},"description":"Array of bottle info that matches the ids attribute","example":[{"composition":[{"percentage":8,"varietal":"Syrah"},{"percentage":8,"varietal":"Syrah"},{"percentage":8,"varietal":"Syrah"}],"description":"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah","name":"Blue's Cuvee","rating":3,"vintage":2003,"winery":{"country":"USA","name":"Longoria","region":"Central Coast, California","url":"http://www.longoriawine.com/"}},{"composition":[{"percentage":8,"varietal":"Syrah"},{"percentage":8,"varietal":"Syrah"},{"percentage":8,"varietal":"Syrah"}],"description":"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah","name":"Blue's Cuvee","rating":3,"vintage":2003,"winery":{"country":"USA","name":"Longoria","region":"Central Coast, California","url":"http://www.longoriawine.com/"}},{"composition":[{"percentage":8,"varietal":"Syrah"},{"percentage":8,"varietal":"Syrah"},{"percentage":8,"varietal":"Syrah"}],"description":"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah","name":"Blue's Cuvee","rating":3,"vintage":2003,"winery":{"country":"USA","name":"Longoria","region":"Central Coast, California","url":"http://www.longoriawine.com/"}}]}},"description":"Request body for multi_update.","example":{"bottles":[{"composition":[{"percentage":8,"varietal":"Syrah"},{"percentage":8,"varietal":"Syrah"},{"percentage":8,"varietal":"Syrah"}],"description":"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah","name":"Blue's Cuvee","rating":3,"vintage":2003,"winery":{"country":"USA","name":"Longoria","region":"Central Coast, California","url":"http://www.longoriawine.com/"}},{"composition":[{"percentage":8,"varietal":"Syrah"},{"percentage":8,"varietal":"Syrah"},{"percentage":8,"varietal":"Syrah"}],"description":"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah","name":"Blue's Cuvee","rating":3,"vintage":2003,"winery":{"country":"USA","name":"Longoria","region":"Central Coast, California","url":"http://www.longoriawine.com/"}},{"composition":[{"percentage":8,"varietal":"Syrah"},{"percentage":8,"varietal":"Syrah"},{"percentage":8,"varietal":"Syrah"}],"description":"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah","name":"Blue's Cuvee","rating":3,"vintage":2003,"winery":{"country":"USA","name":"Longoria","region":"Central Coast, California","url":"http://www.longoriawine.com/"}}]},"required":["bottles"]},"NoCriteria":{"type":"string","description":"Missing criteria","example":"Eius maxime earum laudantium."},"NotFound":{"type":"object","properties":{"id":{"type":"string","description":"ID of missing bottle","example":"Est excepturi corrupti magnam."},"message":{"type":"string","description":"Message of error","example":"bottle 1 not found"}},"description":"NotFound is the type returned when attempting to show or delete a bottle that does not exist.","example":{"id":"Est excepturi corrupti magnam.","message":"bottle 1 not found"},"required":["message","id"]},"StoredBottleResponse":{"type":"object","properties":{"composition":{"type":"array","items":{"$ref":"#/components/schemas/Component"},"description":"Composition is the list of grape varietals and associated percentage.","example":[{"percentage":8,"varietal":"Syrah"},{"percentage":8,"varietal":"Syrah"}]},"description":{"type":"string","description":"Description of bottle","example":"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah","maxLength":2000},"id":{"type":"string","description":"ID is the unique id of the bottle.","example":"123abc"},"name":{"type":"string","description":"Name of bottle","example":"Blue's Cuvee","maxLength":100},"rating":{"type":"integer","description":"Rating of bottle from 1 (worst) to 5 (best)","example":4,"format":"int32","minimum":1,"maximum":5},"vintage":{"type":"integer","description":"Vintage of bottle","example":1983,"format":"int32","minimum":1900,"maximum":2020},"winery":{"$ref":"#/components/schemas/WineryTiny"}},"description":"A StoredBottle describes a bottle retrieved by the storage service. (default view)","example":{"composition":[{"percentage":8,"varietal":"Syrah"},{"percentage":8,"varietal":"Syrah"}],"description":"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah","id":"123abc","name":"Blue's Cuvee","rating":4,"vintage":1983,"winery":{"name":"Longoria"}},"required":["id","name","winery","vintage"]},"StoredBottleResponseCollection":{"type":"array","items":{"$ref":"#/components/schemas/StoredBottleResponse"},"description":"PickResponseBody is the result type for an array of StoredBottle (default view)","example":[{"composition":[{"percentage":8,"varietal":"Syrah"},{"percentage":8,"varietal":"Syrah"}],"description":"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah","id":"123abc","name":"Blue's Cuvee","rating":4,"vintage":1983,"winery":{"name":"Longoria"}},{"composition":[{"percentage":8,"varietal":"Syrah"},{"percentage":8,"varietal":"Syrah"}],"description":"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah","id":"123abc","name":"Blue's Cuvee","rating":4,"vintage":1983,"winery":{"name":"Longoria"}},{"composition":[{"percentage":8,"varietal":"Syrah"},{"percentage":8,"varietal":"Syrah"}],"description":"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah","id":"123abc","name":"Blue's Cuvee","rating":4,"vintage":1983,"winery":{"name":"Longoria"}}]},"StoredBottleResponseTiny":{"type":"object","properties":{"id":{"type":"string","description":"ID is the unique id of the bottle.","example":"123abc"},"name":{"type":"string","description":"Name of bottle","example":"Blue's Cuvee","maxLength":100},"winery":{"$ref":"#/components/schemas/WineryTiny"}},"description":"A StoredBottle describes a bottle retrieved by the storage service. (tiny view)","example":{"id":"123abc","name":"Blue's Cuvee","winery":{"name":"Longoria"}},"required":["id","name","winery"]},"StoredBottleResponseTinyCollection":{"type":"array","items":{"$ref":"#/components/schemas/StoredBottleResponseTiny"},"description":"ListResponseBody is the result type for an array of StoredBottle (tiny view)","example":[{"id":"123abc","name":"Blue's Cuvee","winery":{"name":"Longoria"}},{"id":"123abc","name":"Blue's Cuvee","winery":{"name":"Longoria"}},{"id":"123abc","name":"Blue's Cuvee","winery":{"name":"Longoria"}}]},"Winery":{"type":"object","properties":{"country":{"type":"string","description":"Country of winery","example":"USA","pattern":"[a-zA-Z '\\.]+"},"name":{"type":"string","description":"Name of winery","example":"Longoria"},"region":{"type":"string","description":"Region of winery","example":"Central Coast, California","pattern":"[a-zA-Z '\\.]+"},"url":{"type":"string","description":"Winery website URL","example":"http://www.longoriawine.com/","pattern":"^(https?|ftp)://[^\\s/$.?#].[^\\s]*$"}},"example":{"country":"USA","name":"Longoria","region":"Central Coast, California","url":"http://www.longoriawine.com/"},"required":["name","region","country"]},"WineryTiny":{"type":"object","properties":{"name":{"type":"string","description":"Name of winery","example":"Longoria"}},"description":"Winery result type (tiny view)","example":{"name":"Longoria"},"required":["name"]}}},"tags":[{"name":"sommelier","description":"The sommelier service retrieves bottles given a set of criteria."},{"name":"storage","description":"The storage service makes it possible to view, add or remove wine bottles."},{"name":"swagger","description":"The swagger service serves the API swagger definition."}]} \ No newline at end of file diff --git a/cellar/gen/http/openapi3.2.yaml b/cellar/gen/http/openapi3.2.yaml index 2abbd61b1..95c1a4174 100644 --- a/cellar/gen/http/openapi3.2.yaml +++ b/cellar/gen/http/openapi3.2.yaml @@ -40,31 +40,39 @@ paths: $ref: '#/components/schemas/StoredBottleResponseCollection' example: - composition: - - percentage: 36 + - percentage: 8 varietal: Syrah - - percentage: 36 - varietal: Syrah - - percentage: 36 + - percentage: 8 varietal: Syrah description: Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah id: 123abc name: Blue's Cuvee - rating: 3 - vintage: 1963 + rating: 4 + vintage: 1983 winery: name: Longoria - composition: - - percentage: 36 + - percentage: 8 + varietal: Syrah + - percentage: 8 varietal: Syrah - - percentage: 36 + description: Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah + id: 123abc + name: Blue's Cuvee + rating: 4 + vintage: 1983 + winery: + name: Longoria + - composition: + - percentage: 8 varietal: Syrah - - percentage: 36 + - percentage: 8 varietal: Syrah description: Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah id: 123abc name: Blue's Cuvee - rating: 3 - vintage: 1963 + rating: 4 + vintage: 1983 winery: name: Longoria "400": @@ -73,14 +81,14 @@ paths: application/json: schema: $ref: '#/components/schemas/NoCriteria' - example: Eum voluptas consectetur molestiae voluptatem animi voluptas. + example: Eius maxime earum laudantium. "404": description: 'no_match: Not Found response.' content: application/json: schema: $ref: '#/components/schemas/NoCriteria' - example: Iste ratione. + example: Ipsum tempore. /storage: get: tags: @@ -108,10 +116,6 @@ paths: name: Blue's Cuvee winery: name: Longoria - - id: 123abc - name: Blue's Cuvee - winery: - name: Longoria post: tags: - storage @@ -127,16 +131,14 @@ paths: $ref: '#/components/schemas/Bottle' example: composition: - - percentage: 65 + - percentage: 8 varietal: Syrah - - percentage: 65 - varietal: Syrah - - percentage: 65 + - percentage: 8 varietal: Syrah description: Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah name: Blue's Cuvee - rating: 2 - vintage: 2000 + rating: 3 + vintage: 2005 winery: country: USA name: Longoria @@ -149,8 +151,8 @@ paths: application/json: schema: type: string - example: Accusamus nisi id provident ut suscipit quam. - example: Accusamus nisi id provident ut suscipit quam. + example: Qui dolorem atque ex est. + example: Qui dolorem atque ex est. /storage/{id}: delete: tags: @@ -166,8 +168,8 @@ paths: schema: type: string description: ID of bottle to remove - example: Id libero accusantium incidunt. - example: Aut rerum deserunt aut consequatur. + example: Tenetur molestiae aut dolorem. + example: Tenetur molestiae aut dolorem. responses: "204": description: No Content response. @@ -189,7 +191,7 @@ paths: enum: - default - tiny - example: default + example: tiny - name: id in: path description: ID of bottle to show @@ -197,8 +199,8 @@ paths: schema: type: string description: ID of bottle to show - example: Et aut a enim qui. - example: Sequi excepturi harum numquam. + example: Repellat numquam autem. + example: Repellat numquam autem. responses: "200": description: OK response. @@ -208,19 +210,15 @@ paths: $ref: '#/components/schemas/CellarStoredBottle' example: composition: - - percentage: 55 - varietal: Syrah - - percentage: 55 + - percentage: 8 varietal: Syrah - - percentage: 55 - varietal: Syrah - - percentage: 55 + - percentage: 8 varietal: Syrah description: Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah id: 123abc name: Blue's Cuvee - rating: 1 - vintage: 1913 + rating: 3 + vintage: 1917 winery: country: USA name: Longoria @@ -233,7 +231,7 @@ paths: schema: $ref: '#/components/schemas/NotFound' example: - id: Quae officiis expedita dolores. + id: Est excepturi corrupti magnam. message: bottle 1 not found /storage/multi_add: post: @@ -253,48 +251,32 @@ paths: $ref: '#/components/schemas/Bottle' example: - composition: - - percentage: 65 - varietal: Syrah - - percentage: 65 - varietal: Syrah - - percentage: 65 - varietal: Syrah - description: Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah - name: Blue's Cuvee - rating: 2 - vintage: 2009 - winery: - country: USA - name: Longoria - region: Central Coast, California - url: http://www.longoriawine.com/ - - composition: - - percentage: 65 + - percentage: 8 varietal: Syrah - - percentage: 65 + - percentage: 8 varietal: Syrah - - percentage: 65 + - percentage: 8 varietal: Syrah description: Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah name: Blue's Cuvee - rating: 2 - vintage: 2009 + rating: 3 + vintage: 2003 winery: country: USA name: Longoria region: Central Coast, California url: http://www.longoriawine.com/ - composition: - - percentage: 65 + - percentage: 8 varietal: Syrah - - percentage: 65 + - percentage: 8 varietal: Syrah - - percentage: 65 + - percentage: 8 varietal: Syrah description: Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah name: Blue's Cuvee - rating: 2 - vintage: 2009 + rating: 3 + vintage: 2003 winery: country: USA name: Longoria @@ -302,48 +284,32 @@ paths: url: http://www.longoriawine.com/ example: - composition: - - percentage: 65 - varietal: Syrah - - percentage: 65 - varietal: Syrah - - percentage: 65 - varietal: Syrah - description: Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah - name: Blue's Cuvee - rating: 2 - vintage: 2009 - winery: - country: USA - name: Longoria - region: Central Coast, California - url: http://www.longoriawine.com/ - - composition: - - percentage: 65 + - percentage: 8 varietal: Syrah - - percentage: 65 + - percentage: 8 varietal: Syrah - - percentage: 65 + - percentage: 8 varietal: Syrah description: Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah name: Blue's Cuvee - rating: 2 - vintage: 2009 + rating: 3 + vintage: 2003 winery: country: USA name: Longoria region: Central Coast, California url: http://www.longoriawine.com/ - composition: - - percentage: 65 + - percentage: 8 varietal: Syrah - - percentage: 65 + - percentage: 8 varietal: Syrah - - percentage: 65 + - percentage: 8 varietal: Syrah description: Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah name: Blue's Cuvee - rating: 2 - vintage: 2009 + rating: 3 + vintage: 2003 winery: country: USA name: Longoria @@ -358,13 +324,15 @@ paths: type: array items: type: string - example: Qui incidunt quas libero est. + example: Ut aperiam voluptas. example: - - Qui incidunt quas libero est. - - Vero iusto sunt est quaerat. + - Ut aperiam voluptas. + - Dolore ex sunt. + - Ut ipsam. example: - - Qui incidunt quas libero est. - - Vero iusto sunt est quaerat. + - Ut aperiam voluptas. + - Dolore ex sunt. + - Ut ipsam. /storage/multi_update: put: tags: @@ -382,16 +350,18 @@ paths: type: array items: type: string - example: Ut non voluptatem. + example: Deserunt itaque omnis necessitatibus enim aspernatur. description: IDs of the bottles to be updated example: - - Ut non voluptatem. - - Officia tenetur rerum possimus voluptates. + - Deserunt itaque omnis necessitatibus enim aspernatur. + - Tempore in voluptate asperiores. + - Incidunt quia ut eius quibusdam rerum. + - Consequatur architecto ratione. example: - - Ut non voluptatem. - - Officia tenetur rerum possimus voluptates. - - Deserunt quidem non molestias non inventore. - - Consequatur praesentium ipsa aut et voluptates illo. + - Deserunt itaque omnis necessitatibus enim aspernatur. + - Tempore in voluptate asperiores. + - Incidunt quia ut eius quibusdam rerum. + - Consequatur architecto ratione. requestBody: description: Request body for multi_update. required: true @@ -402,48 +372,48 @@ paths: example: bottles: - composition: - - percentage: 65 + - percentage: 8 varietal: Syrah - - percentage: 65 + - percentage: 8 varietal: Syrah - - percentage: 65 + - percentage: 8 varietal: Syrah description: Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah name: Blue's Cuvee - rating: 2 - vintage: 2009 + rating: 3 + vintage: 2003 winery: country: USA name: Longoria region: Central Coast, California url: http://www.longoriawine.com/ - composition: - - percentage: 65 + - percentage: 8 varietal: Syrah - - percentage: 65 + - percentage: 8 varietal: Syrah - - percentage: 65 + - percentage: 8 varietal: Syrah description: Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah name: Blue's Cuvee - rating: 2 - vintage: 2009 + rating: 3 + vintage: 2003 winery: country: USA name: Longoria region: Central Coast, California url: http://www.longoriawine.com/ - composition: - - percentage: 65 + - percentage: 8 varietal: Syrah - - percentage: 65 + - percentage: 8 varietal: Syrah - - percentage: 65 + - percentage: 8 varietal: Syrah description: Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah name: Blue's Cuvee - rating: 2 - vintage: 2009 + rating: 3 + vintage: 2003 winery: country: USA name: Longoria @@ -492,11 +462,9 @@ components: $ref: '#/components/schemas/Component' description: Composition is the list of grape varietals and associated percentage. example: - - percentage: 65 - varietal: Syrah - - percentage: 65 + - percentage: 8 varietal: Syrah - - percentage: 65 + - percentage: 8 varietal: Syrah description: type: string @@ -511,14 +479,14 @@ components: rating: type: integer description: Rating of bottle from 1 (worst) to 5 (best) - example: 2 + example: 3 format: int32 minimum: 1 maximum: 5 vintage: type: integer description: Vintage of bottle - example: 2000 + example: 2005 format: int32 minimum: 1900 maximum: 2020 @@ -527,16 +495,14 @@ components: description: Request body for add. example: composition: - - percentage: 65 - varietal: Syrah - - percentage: 65 + - percentage: 8 varietal: Syrah - - percentage: 65 + - percentage: 8 varietal: Syrah description: Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah name: Blue's Cuvee - rating: 2 - vintage: 2000 + rating: 3 + vintage: 2005 winery: country: USA name: Longoria @@ -555,11 +521,9 @@ components: $ref: '#/components/schemas/Component' description: Composition is the list of grape varietals and associated percentage. example: - - percentage: 55 + - percentage: 8 varietal: Syrah - - percentage: 55 - varietal: Syrah - - percentage: 55 + - percentage: 8 varietal: Syrah description: type: string @@ -578,14 +542,14 @@ components: rating: type: integer description: Rating of bottle from 1 (worst) to 5 (best) - example: 4 + example: 3 format: int32 minimum: 1 maximum: 5 vintage: type: integer description: Vintage of bottle - example: 1919 + example: 1917 format: int32 minimum: 1900 maximum: 2020 @@ -594,17 +558,15 @@ components: description: A StoredBottle describes a bottle retrieved by the storage service. example: composition: - - percentage: 55 - varietal: Syrah - - percentage: 55 + - percentage: 8 varietal: Syrah - - percentage: 55 + - percentage: 8 varietal: Syrah description: Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah id: 123abc name: Blue's Cuvee - rating: 4 - vintage: 1919 + rating: 3 + vintage: 1917 winery: country: USA name: Longoria @@ -621,7 +583,7 @@ components: percentage: type: integer description: Percentage of varietal in wine - example: 36 + example: 8 format: int32 minimum: 1 maximum: 100 @@ -632,7 +594,7 @@ components: pattern: '[A-Za-z'' ]+' maxLength: 100 example: - percentage: 36 + percentage: 8 varietal: Syrah required: - varietal @@ -647,7 +609,7 @@ components: type: array items: type: string - example: Qui quae rem officiis est dolores et. + example: Deleniti deleniti reiciendis. description: Varietals in preference order example: - pinot noir @@ -675,48 +637,48 @@ components: description: Array of bottle info that matches the ids attribute example: - composition: - - percentage: 65 + - percentage: 8 varietal: Syrah - - percentage: 65 + - percentage: 8 varietal: Syrah - - percentage: 65 + - percentage: 8 varietal: Syrah description: Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah name: Blue's Cuvee - rating: 2 - vintage: 2009 + rating: 3 + vintage: 2003 winery: country: USA name: Longoria region: Central Coast, California url: http://www.longoriawine.com/ - composition: - - percentage: 65 + - percentage: 8 varietal: Syrah - - percentage: 65 + - percentage: 8 varietal: Syrah - - percentage: 65 + - percentage: 8 varietal: Syrah description: Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah name: Blue's Cuvee - rating: 2 - vintage: 2009 + rating: 3 + vintage: 2003 winery: country: USA name: Longoria region: Central Coast, California url: http://www.longoriawine.com/ - composition: - - percentage: 65 + - percentage: 8 varietal: Syrah - - percentage: 65 + - percentage: 8 varietal: Syrah - - percentage: 65 + - percentage: 8 varietal: Syrah description: Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah name: Blue's Cuvee - rating: 2 - vintage: 2009 + rating: 3 + vintage: 2003 winery: country: USA name: Longoria @@ -726,48 +688,48 @@ components: example: bottles: - composition: - - percentage: 65 + - percentage: 8 varietal: Syrah - - percentage: 65 + - percentage: 8 varietal: Syrah - - percentage: 65 + - percentage: 8 varietal: Syrah description: Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah name: Blue's Cuvee - rating: 2 - vintage: 2009 + rating: 3 + vintage: 2003 winery: country: USA name: Longoria region: Central Coast, California url: http://www.longoriawine.com/ - composition: - - percentage: 65 + - percentage: 8 varietal: Syrah - - percentage: 65 + - percentage: 8 varietal: Syrah - - percentage: 65 + - percentage: 8 varietal: Syrah description: Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah name: Blue's Cuvee - rating: 2 - vintage: 2009 + rating: 3 + vintage: 2003 winery: country: USA name: Longoria region: Central Coast, California url: http://www.longoriawine.com/ - composition: - - percentage: 65 + - percentage: 8 varietal: Syrah - - percentage: 65 + - percentage: 8 varietal: Syrah - - percentage: 65 + - percentage: 8 varietal: Syrah description: Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah name: Blue's Cuvee - rating: 2 - vintage: 2009 + rating: 3 + vintage: 2003 winery: country: USA name: Longoria @@ -778,21 +740,21 @@ components: NoCriteria: type: string description: Missing criteria - example: Eum voluptas consectetur molestiae voluptatem animi voluptas. + example: Eius maxime earum laudantium. NotFound: type: object properties: id: type: string description: ID of missing bottle - example: Quae officiis expedita dolores. + example: Est excepturi corrupti magnam. message: type: string description: Message of error example: bottle 1 not found - description: Bottle not found + description: NotFound is the type returned when attempting to show or delete a bottle that does not exist. example: - id: Quae officiis expedita dolores. + id: Est excepturi corrupti magnam. message: bottle 1 not found required: - message @@ -806,11 +768,9 @@ components: $ref: '#/components/schemas/Component' description: Composition is the list of grape varietals and associated percentage. example: - - percentage: 36 + - percentage: 8 varietal: Syrah - - percentage: 36 - varietal: Syrah - - percentage: 36 + - percentage: 8 varietal: Syrah description: type: string @@ -829,33 +789,31 @@ components: rating: type: integer description: Rating of bottle from 1 (worst) to 5 (best) - example: 3 + example: 4 format: int32 minimum: 1 maximum: 5 vintage: type: integer description: Vintage of bottle - example: 1963 + example: 1983 format: int32 minimum: 1900 maximum: 2020 winery: - $ref: '#/components/schemas/WineryResponseTiny' + $ref: '#/components/schemas/WineryTiny' description: A StoredBottle describes a bottle retrieved by the storage service. (default view) example: composition: - - percentage: 36 + - percentage: 8 varietal: Syrah - - percentage: 36 - varietal: Syrah - - percentage: 36 + - percentage: 8 varietal: Syrah description: Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah id: 123abc name: Blue's Cuvee - rating: 3 - vintage: 1963 + rating: 4 + vintage: 1983 winery: name: Longoria required: @@ -867,34 +825,42 @@ components: type: array items: $ref: '#/components/schemas/StoredBottleResponse' - description: PickResponseBody is the result type for an array of StoredBottleResponse (default view) + description: PickResponseBody is the result type for an array of StoredBottle (default view) example: - composition: - - percentage: 36 - varietal: Syrah - - percentage: 36 + - percentage: 8 varietal: Syrah - - percentage: 36 + - percentage: 8 varietal: Syrah description: Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah id: 123abc name: Blue's Cuvee - rating: 3 - vintage: 1963 + rating: 4 + vintage: 1983 winery: name: Longoria - composition: - - percentage: 36 + - percentage: 8 varietal: Syrah - - percentage: 36 + - percentage: 8 + varietal: Syrah + description: Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah + id: 123abc + name: Blue's Cuvee + rating: 4 + vintage: 1983 + winery: + name: Longoria + - composition: + - percentage: 8 varietal: Syrah - - percentage: 36 + - percentage: 8 varietal: Syrah description: Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah id: 123abc name: Blue's Cuvee - rating: 3 - vintage: 1963 + rating: 4 + vintage: 1983 winery: name: Longoria StoredBottleResponseTiny: @@ -910,7 +876,7 @@ components: example: Blue's Cuvee maxLength: 100 winery: - $ref: '#/components/schemas/WineryResponseTiny' + $ref: '#/components/schemas/WineryTiny' description: A StoredBottle describes a bottle retrieved by the storage service. (tiny view) example: id: 123abc @@ -925,7 +891,7 @@ components: type: array items: $ref: '#/components/schemas/StoredBottleResponseTiny' - description: ListResponseBody is the result type for an array of StoredBottleResponse (tiny view) + description: ListResponseBody is the result type for an array of StoredBottle (tiny view) example: - id: 123abc name: Blue's Cuvee @@ -939,10 +905,6 @@ components: name: Blue's Cuvee winery: name: Longoria - - id: 123abc - name: Blue's Cuvee - winery: - name: Longoria Winery: type: object properties: @@ -965,7 +927,6 @@ components: description: Winery website URL example: http://www.longoriawine.com/ pattern: ^(https?|ftp)://[^\s/$.?#].[^\s]*$ - description: Winery that produces wine example: country: USA name: Longoria @@ -975,14 +936,14 @@ components: - name - region - country - WineryResponseTiny: + WineryTiny: type: object properties: name: type: string description: Name of winery example: Longoria - description: WineryResponse result type (tiny view) + description: Winery result type (tiny view) example: name: Longoria required: diff --git a/cellar/gen/http/openapi3.json b/cellar/gen/http/openapi3.json index ee5958962..ea9cba22b 100644 --- a/cellar/gen/http/openapi3.json +++ b/cellar/gen/http/openapi3.json @@ -1 +1 @@ -{"openapi":"3.0.3","info":{"title":"Cellar Service","description":"HTTP service for managing your wine cellar","version":"0.0.1"},"servers":[{"url":"http://localhost:8000/cellar","description":"cellar hosts the storage, sommelier and swagger services."},{"url":"https://goa.design/cellar","description":"cellar hosts the storage, sommelier and swagger services."}],"paths":{"/sommelier":{"post":{"tags":["sommelier"],"summary":"pick sommelier","operationId":"sommelier#pick","requestBody":{"description":"Request body for pick.","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Criteria"},"example":{"name":"Blue's Cuvee","varietal":["pinot noir","merlot","cabernet franc"],"winery":"longoria"}}}},"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StoredBottleResponseCollection"},"example":[{"composition":[{"percentage":36,"varietal":"Syrah"},{"percentage":36,"varietal":"Syrah"},{"percentage":36,"varietal":"Syrah"}],"description":"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah","id":"123abc","name":"Blue's Cuvee","rating":3,"vintage":1963,"winery":{"name":"Longoria"}},{"composition":[{"percentage":36,"varietal":"Syrah"},{"percentage":36,"varietal":"Syrah"},{"percentage":36,"varietal":"Syrah"}],"description":"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah","id":"123abc","name":"Blue's Cuvee","rating":3,"vintage":1963,"winery":{"name":"Longoria"}}]}}},"400":{"description":"no_criteria: Bad Request response.","content":{"application/json":{"schema":{"type":"string","description":"Missing criteria","example":"Eum voluptas consectetur molestiae voluptatem animi voluptas."},"example":"Eum voluptas consectetur molestiae voluptatem animi voluptas."}}},"404":{"description":"no_match: Not Found response.","content":{"application/json":{"schema":{"type":"string","description":"No bottle matched given criteria","example":"Iste ratione."},"example":"Iste ratione."}}}}}},"/storage":{"get":{"tags":["storage"],"summary":"list storage","description":"List all stored bottles","operationId":"storage#list","responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StoredBottleResponseTinyCollection"},"example":[{"id":"123abc","name":"Blue's Cuvee","winery":{"name":"Longoria"}},{"id":"123abc","name":"Blue's Cuvee","winery":{"name":"Longoria"}},{"id":"123abc","name":"Blue's Cuvee","winery":{"name":"Longoria"}},{"id":"123abc","name":"Blue's Cuvee","winery":{"name":"Longoria"}}]}}}}},"post":{"tags":["storage"],"summary":"add storage","description":"Add new bottle and return its ID.","operationId":"storage#add","requestBody":{"description":"Request body for add.","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Bottle"},"example":{"composition":[{"percentage":65,"varietal":"Syrah"},{"percentage":65,"varietal":"Syrah"},{"percentage":65,"varietal":"Syrah"}],"description":"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah","name":"Blue's Cuvee","rating":2,"vintage":2000,"winery":{"country":"USA","name":"Longoria","region":"Central Coast, California","url":"http://www.longoriawine.com/"}}}}},"responses":{"201":{"description":"Created response.","content":{"application/json":{"schema":{"type":"string","example":"Accusamus nisi id provident ut suscipit quam."},"example":"Accusamus nisi id provident ut suscipit quam."}}}}}},"/storage/multi_add":{"post":{"tags":["storage"],"summary":"multi_add storage","description":"Add n number of bottles and return their IDs. This is a multipart request and each part has field name 'bottle' and contains the encoded bottle info to be added.","operationId":"storage#multi_add","requestBody":{"description":"Request body for multi_add.","required":true,"content":{"multipart/form-data":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Bottle"},"example":[{"composition":[{"percentage":65,"varietal":"Syrah"},{"percentage":65,"varietal":"Syrah"},{"percentage":65,"varietal":"Syrah"}],"description":"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah","name":"Blue's Cuvee","rating":2,"vintage":2009,"winery":{"country":"USA","name":"Longoria","region":"Central Coast, California","url":"http://www.longoriawine.com/"}},{"composition":[{"percentage":65,"varietal":"Syrah"},{"percentage":65,"varietal":"Syrah"},{"percentage":65,"varietal":"Syrah"}],"description":"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah","name":"Blue's Cuvee","rating":2,"vintage":2009,"winery":{"country":"USA","name":"Longoria","region":"Central Coast, California","url":"http://www.longoriawine.com/"}},{"composition":[{"percentage":65,"varietal":"Syrah"},{"percentage":65,"varietal":"Syrah"},{"percentage":65,"varietal":"Syrah"}],"description":"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah","name":"Blue's Cuvee","rating":2,"vintage":2009,"winery":{"country":"USA","name":"Longoria","region":"Central Coast, California","url":"http://www.longoriawine.com/"}}]},"example":[{"composition":[{"percentage":65,"varietal":"Syrah"},{"percentage":65,"varietal":"Syrah"},{"percentage":65,"varietal":"Syrah"}],"description":"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah","name":"Blue's Cuvee","rating":2,"vintage":2009,"winery":{"country":"USA","name":"Longoria","region":"Central Coast, California","url":"http://www.longoriawine.com/"}},{"composition":[{"percentage":65,"varietal":"Syrah"},{"percentage":65,"varietal":"Syrah"},{"percentage":65,"varietal":"Syrah"}],"description":"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah","name":"Blue's Cuvee","rating":2,"vintage":2009,"winery":{"country":"USA","name":"Longoria","region":"Central Coast, California","url":"http://www.longoriawine.com/"}},{"composition":[{"percentage":65,"varietal":"Syrah"},{"percentage":65,"varietal":"Syrah"},{"percentage":65,"varietal":"Syrah"}],"description":"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah","name":"Blue's Cuvee","rating":2,"vintage":2009,"winery":{"country":"USA","name":"Longoria","region":"Central Coast, California","url":"http://www.longoriawine.com/"}}]}}},"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"type":"array","items":{"type":"string","example":"Qui incidunt quas libero est."},"example":["Qui incidunt quas libero est.","Vero iusto sunt est quaerat."]},"example":["Qui incidunt quas libero est.","Vero iusto sunt est quaerat."]}}}}}},"/storage/multi_update":{"put":{"tags":["storage"],"summary":"multi_update storage","description":"Update bottles with the given IDs. This is a multipart request and each part has field name 'bottle' and contains the encoded bottle info to be updated. The IDs in the query parameter is mapped to each part in the request.","operationId":"storage#multi_update","parameters":[{"name":"ids","in":"query","description":"IDs of the bottles to be updated","allowEmptyValue":true,"required":true,"schema":{"type":"array","items":{"type":"string","example":"Ut non voluptatem."},"description":"IDs of the bottles to be updated","example":["Ut non voluptatem.","Officia tenetur rerum possimus voluptates."]},"example":["Ut non voluptatem.","Officia tenetur rerum possimus voluptates.","Deserunt quidem non molestias non inventore.","Consequatur praesentium ipsa aut et voluptates illo."]}],"requestBody":{"description":"Request body for multi_update.","required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/MultiUpdateRequestBody"},"example":{"bottles":[{"composition":[{"percentage":65,"varietal":"Syrah"},{"percentage":65,"varietal":"Syrah"},{"percentage":65,"varietal":"Syrah"}],"description":"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah","name":"Blue's Cuvee","rating":2,"vintage":2009,"winery":{"country":"USA","name":"Longoria","region":"Central Coast, California","url":"http://www.longoriawine.com/"}},{"composition":[{"percentage":65,"varietal":"Syrah"},{"percentage":65,"varietal":"Syrah"},{"percentage":65,"varietal":"Syrah"}],"description":"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah","name":"Blue's Cuvee","rating":2,"vintage":2009,"winery":{"country":"USA","name":"Longoria","region":"Central Coast, California","url":"http://www.longoriawine.com/"}},{"composition":[{"percentage":65,"varietal":"Syrah"},{"percentage":65,"varietal":"Syrah"},{"percentage":65,"varietal":"Syrah"}],"description":"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah","name":"Blue's Cuvee","rating":2,"vintage":2009,"winery":{"country":"USA","name":"Longoria","region":"Central Coast, California","url":"http://www.longoriawine.com/"}}]}}}},"responses":{"204":{"description":"No Content response."}}}},"/storage/rate":{"post":{"tags":["storage"],"summary":"rate storage","description":"Rate bottles by IDs","operationId":"storage#rate","parameters":[{"name":"payload","in":"query","description":"Query parameters","style":"deepObject","required":true,"schema":{"type":"object","additionalProperties":true}}],"responses":{"200":{"description":"OK response."}}}},"/storage/{id}":{"delete":{"tags":["storage"],"summary":"remove storage","description":"Remove bottle from storage","operationId":"storage#remove","parameters":[{"name":"id","in":"path","description":"ID of bottle to remove","required":true,"schema":{"type":"string","description":"ID of bottle to remove","example":"Id libero accusantium incidunt."},"example":"Aut rerum deserunt aut consequatur."}],"responses":{"204":{"description":"No Content response."}}},"get":{"tags":["storage"],"summary":"show storage","description":"Show bottle by ID","operationId":"storage#show","parameters":[{"name":"view","in":"query","description":"View to render","allowEmptyValue":true,"schema":{"type":"string","description":"View to render","example":"tiny","enum":["default","tiny"]},"example":"default"},{"name":"id","in":"path","description":"ID of bottle to show","required":true,"schema":{"type":"string","description":"ID of bottle to show","example":"Et aut a enim qui."},"example":"Sequi excepturi harum numquam."}],"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CellarStoredBottle"},"example":{"composition":[{"percentage":55,"varietal":"Syrah"},{"percentage":55,"varietal":"Syrah"},{"percentage":55,"varietal":"Syrah"},{"percentage":55,"varietal":"Syrah"}],"description":"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah","id":"123abc","name":"Blue's Cuvee","rating":1,"vintage":1913,"winery":{"country":"USA","name":"Longoria","region":"Central Coast, California","url":"http://www.longoriawine.com/"}}}}},"404":{"description":"not_found: Bottle not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"},"example":{"id":"Quae officiis expedita dolores.","message":"bottle 1 not found"}}}}}}},"/swagger/swagger.json":{"get":{"tags":["swagger"],"summary":"Download gen/http/openapi.json","description":"JSON document containing the API swagger definition","operationId":"swagger#/swagger/swagger.json","responses":{"200":{"description":"File downloaded"}}}}},"components":{"schemas":{"Bottle":{"type":"object","properties":{"composition":{"type":"array","items":{"$ref":"#/components/schemas/Component"},"description":"Composition is the list of grape varietals and associated percentage.","example":[{"percentage":65,"varietal":"Syrah"},{"percentage":65,"varietal":"Syrah"},{"percentage":65,"varietal":"Syrah"}]},"description":{"type":"string","description":"Description of bottle","example":"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah","maxLength":2000},"name":{"type":"string","description":"Name of bottle","example":"Blue's Cuvee","maxLength":100},"rating":{"type":"integer","description":"Rating of bottle from 1 (worst) to 5 (best)","example":2,"format":"int32","minimum":1,"maximum":5},"vintage":{"type":"integer","description":"Vintage of bottle","example":2000,"format":"int32","minimum":1900,"maximum":2020},"winery":{"$ref":"#/components/schemas/Winery"}},"description":"Request body for add.","example":{"composition":[{"percentage":65,"varietal":"Syrah"},{"percentage":65,"varietal":"Syrah"},{"percentage":65,"varietal":"Syrah"}],"description":"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah","name":"Blue's Cuvee","rating":2,"vintage":2000,"winery":{"country":"USA","name":"Longoria","region":"Central Coast, California","url":"http://www.longoriawine.com/"}},"required":["name","winery","vintage"]},"CellarStoredBottle":{"type":"object","properties":{"composition":{"type":"array","items":{"$ref":"#/components/schemas/Component"},"description":"Composition is the list of grape varietals and associated percentage.","example":[{"percentage":55,"varietal":"Syrah"},{"percentage":55,"varietal":"Syrah"},{"percentage":55,"varietal":"Syrah"}]},"description":{"type":"string","description":"Description of bottle","example":"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah","maxLength":2000},"id":{"type":"string","description":"ID is the unique id of the bottle.","example":"123abc"},"name":{"type":"string","description":"Name of bottle","example":"Blue's Cuvee","maxLength":100},"rating":{"type":"integer","description":"Rating of bottle from 1 (worst) to 5 (best)","example":4,"format":"int32","minimum":1,"maximum":5},"vintage":{"type":"integer","description":"Vintage of bottle","example":1919,"format":"int32","minimum":1900,"maximum":2020},"winery":{"$ref":"#/components/schemas/Winery"}},"description":"A StoredBottle describes a bottle retrieved by the storage service.","example":{"composition":[{"percentage":55,"varietal":"Syrah"},{"percentage":55,"varietal":"Syrah"},{"percentage":55,"varietal":"Syrah"}],"description":"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah","id":"123abc","name":"Blue's Cuvee","rating":4,"vintage":1919,"winery":{"country":"USA","name":"Longoria","region":"Central Coast, California","url":"http://www.longoriawine.com/"}},"required":["id","name","winery","vintage"]},"Component":{"type":"object","properties":{"percentage":{"type":"integer","description":"Percentage of varietal in wine","example":36,"format":"int32","minimum":1,"maximum":100},"varietal":{"type":"string","description":"Grape varietal","example":"Syrah","pattern":"[A-Za-z' ]+","maxLength":100}},"example":{"percentage":36,"varietal":"Syrah"},"required":["varietal"]},"Criteria":{"type":"object","properties":{"name":{"type":"string","description":"Name of bottle to pick","example":"Blue's Cuvee"},"varietal":{"type":"array","items":{"type":"string","example":"Qui quae rem officiis est dolores et."},"description":"Varietals in preference order","example":["pinot noir","merlot","cabernet franc"]},"winery":{"type":"string","description":"Winery of bottle to pick","example":"longoria"}},"description":"Request body for pick.","example":{"name":"Blue's Cuvee","varietal":["pinot noir","merlot","cabernet franc"],"winery":"longoria"}},"MultiUpdateRequestBody":{"type":"object","properties":{"bottles":{"type":"array","items":{"$ref":"#/components/schemas/Bottle"},"description":"Array of bottle info that matches the ids attribute","example":[{"composition":[{"percentage":65,"varietal":"Syrah"},{"percentage":65,"varietal":"Syrah"},{"percentage":65,"varietal":"Syrah"}],"description":"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah","name":"Blue's Cuvee","rating":2,"vintage":2009,"winery":{"country":"USA","name":"Longoria","region":"Central Coast, California","url":"http://www.longoriawine.com/"}},{"composition":[{"percentage":65,"varietal":"Syrah"},{"percentage":65,"varietal":"Syrah"},{"percentage":65,"varietal":"Syrah"}],"description":"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah","name":"Blue's Cuvee","rating":2,"vintage":2009,"winery":{"country":"USA","name":"Longoria","region":"Central Coast, California","url":"http://www.longoriawine.com/"}},{"composition":[{"percentage":65,"varietal":"Syrah"},{"percentage":65,"varietal":"Syrah"},{"percentage":65,"varietal":"Syrah"}],"description":"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah","name":"Blue's Cuvee","rating":2,"vintage":2009,"winery":{"country":"USA","name":"Longoria","region":"Central Coast, California","url":"http://www.longoriawine.com/"}}]}},"description":"Request body for multi_update.","example":{"bottles":[{"composition":[{"percentage":65,"varietal":"Syrah"},{"percentage":65,"varietal":"Syrah"},{"percentage":65,"varietal":"Syrah"}],"description":"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah","name":"Blue's Cuvee","rating":2,"vintage":2009,"winery":{"country":"USA","name":"Longoria","region":"Central Coast, California","url":"http://www.longoriawine.com/"}},{"composition":[{"percentage":65,"varietal":"Syrah"},{"percentage":65,"varietal":"Syrah"},{"percentage":65,"varietal":"Syrah"}],"description":"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah","name":"Blue's Cuvee","rating":2,"vintage":2009,"winery":{"country":"USA","name":"Longoria","region":"Central Coast, California","url":"http://www.longoriawine.com/"}},{"composition":[{"percentage":65,"varietal":"Syrah"},{"percentage":65,"varietal":"Syrah"},{"percentage":65,"varietal":"Syrah"}],"description":"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah","name":"Blue's Cuvee","rating":2,"vintage":2009,"winery":{"country":"USA","name":"Longoria","region":"Central Coast, California","url":"http://www.longoriawine.com/"}}]},"required":["bottles"]},"NotFound":{"type":"object","properties":{"id":{"type":"string","description":"ID of missing bottle","example":"Quae officiis expedita dolores."},"message":{"type":"string","description":"Message of error","example":"bottle 1 not found"}},"description":"Bottle not found","example":{"id":"Quae officiis expedita dolores.","message":"bottle 1 not found"},"required":["message","id"]},"StoredBottleResponse":{"type":"object","properties":{"composition":{"type":"array","items":{"$ref":"#/components/schemas/Component"},"description":"Composition is the list of grape varietals and associated percentage.","example":[{"percentage":36,"varietal":"Syrah"},{"percentage":36,"varietal":"Syrah"},{"percentage":36,"varietal":"Syrah"}]},"description":{"type":"string","description":"Description of bottle","example":"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah","maxLength":2000},"id":{"type":"string","description":"ID is the unique id of the bottle.","example":"123abc"},"name":{"type":"string","description":"Name of bottle","example":"Blue's Cuvee","maxLength":100},"rating":{"type":"integer","description":"Rating of bottle from 1 (worst) to 5 (best)","example":3,"format":"int32","minimum":1,"maximum":5},"vintage":{"type":"integer","description":"Vintage of bottle","example":1963,"format":"int32","minimum":1900,"maximum":2020},"winery":{"$ref":"#/components/schemas/WineryResponseTiny"}},"description":"A StoredBottle describes a bottle retrieved by the storage service. (default view)","example":{"composition":[{"percentage":36,"varietal":"Syrah"},{"percentage":36,"varietal":"Syrah"},{"percentage":36,"varietal":"Syrah"}],"description":"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah","id":"123abc","name":"Blue's Cuvee","rating":3,"vintage":1963,"winery":{"name":"Longoria"}},"required":["id","name","winery","vintage"]},"StoredBottleResponseCollection":{"type":"array","items":{"$ref":"#/components/schemas/StoredBottleResponse"},"description":"PickResponseBody is the result type for an array of StoredBottleResponse (default view)","example":[{"composition":[{"percentage":36,"varietal":"Syrah"},{"percentage":36,"varietal":"Syrah"},{"percentage":36,"varietal":"Syrah"}],"description":"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah","id":"123abc","name":"Blue's Cuvee","rating":3,"vintage":1963,"winery":{"name":"Longoria"}},{"composition":[{"percentage":36,"varietal":"Syrah"},{"percentage":36,"varietal":"Syrah"},{"percentage":36,"varietal":"Syrah"}],"description":"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah","id":"123abc","name":"Blue's Cuvee","rating":3,"vintage":1963,"winery":{"name":"Longoria"}}]},"StoredBottleResponseTiny":{"type":"object","properties":{"id":{"type":"string","description":"ID is the unique id of the bottle.","example":"123abc"},"name":{"type":"string","description":"Name of bottle","example":"Blue's Cuvee","maxLength":100},"winery":{"$ref":"#/components/schemas/WineryResponseTiny"}},"description":"A StoredBottle describes a bottle retrieved by the storage service. (tiny view)","example":{"id":"123abc","name":"Blue's Cuvee","winery":{"name":"Longoria"}},"required":["id","name","winery"]},"StoredBottleResponseTinyCollection":{"type":"array","items":{"$ref":"#/components/schemas/StoredBottleResponseTiny"},"description":"ListResponseBody is the result type for an array of StoredBottleResponse (tiny view)","example":[{"id":"123abc","name":"Blue's Cuvee","winery":{"name":"Longoria"}},{"id":"123abc","name":"Blue's Cuvee","winery":{"name":"Longoria"}},{"id":"123abc","name":"Blue's Cuvee","winery":{"name":"Longoria"}},{"id":"123abc","name":"Blue's Cuvee","winery":{"name":"Longoria"}}]},"Winery":{"type":"object","properties":{"country":{"type":"string","description":"Country of winery","example":"USA","pattern":"[a-zA-Z '\\.]+"},"name":{"type":"string","description":"Name of winery","example":"Longoria"},"region":{"type":"string","description":"Region of winery","example":"Central Coast, California","pattern":"[a-zA-Z '\\.]+"},"url":{"type":"string","description":"Winery website URL","example":"http://www.longoriawine.com/","pattern":"^(https?|ftp)://[^\\s/$.?#].[^\\s]*$"}},"description":"Winery that produces wine","example":{"country":"USA","name":"Longoria","region":"Central Coast, California","url":"http://www.longoriawine.com/"},"required":["name","region","country"]},"WineryResponseTiny":{"type":"object","properties":{"name":{"type":"string","description":"Name of winery","example":"Longoria"}},"description":"WineryResponse result type (tiny view)","example":{"name":"Longoria"},"required":["name"]}}},"tags":[{"name":"sommelier","description":"The sommelier service retrieves bottles given a set of criteria."},{"name":"storage","description":"The storage service makes it possible to view, add or remove wine bottles."},{"name":"swagger","description":"The swagger service serves the API swagger definition."}]} \ No newline at end of file +{"openapi":"3.0.3","info":{"title":"Cellar Service","description":"HTTP service for managing your wine cellar","version":"0.0.1"},"servers":[{"url":"http://localhost:8000/cellar","description":"cellar hosts the storage, sommelier and swagger services."},{"url":"https://goa.design/cellar","description":"cellar hosts the storage, sommelier and swagger services."}],"paths":{"/sommelier":{"post":{"tags":["sommelier"],"summary":"pick sommelier","operationId":"sommelier#pick","requestBody":{"description":"Request body for pick.","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Criteria"},"example":{"name":"Blue's Cuvee","varietal":["pinot noir","merlot","cabernet franc"],"winery":"longoria"}}}},"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StoredBottleResponseCollection"},"example":[{"composition":[{"percentage":8,"varietal":"Syrah"},{"percentage":8,"varietal":"Syrah"}],"description":"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah","id":"123abc","name":"Blue's Cuvee","rating":4,"vintage":1983,"winery":{"name":"Longoria"}},{"composition":[{"percentage":8,"varietal":"Syrah"},{"percentage":8,"varietal":"Syrah"}],"description":"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah","id":"123abc","name":"Blue's Cuvee","rating":4,"vintage":1983,"winery":{"name":"Longoria"}},{"composition":[{"percentage":8,"varietal":"Syrah"},{"percentage":8,"varietal":"Syrah"}],"description":"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah","id":"123abc","name":"Blue's Cuvee","rating":4,"vintage":1983,"winery":{"name":"Longoria"}}]}}},"400":{"description":"no_criteria: Bad Request response.","content":{"application/json":{"schema":{"type":"string","description":"Missing criteria","example":"Eius maxime earum laudantium."},"example":"Eius maxime earum laudantium."}}},"404":{"description":"no_match: Not Found response.","content":{"application/json":{"schema":{"type":"string","description":"No bottle matched given criteria","example":"Ipsum tempore."},"example":"Ipsum tempore."}}}}}},"/storage":{"get":{"tags":["storage"],"summary":"list storage","description":"List all stored bottles","operationId":"storage#list","responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StoredBottleResponseTinyCollection"},"example":[{"id":"123abc","name":"Blue's Cuvee","winery":{"name":"Longoria"}},{"id":"123abc","name":"Blue's Cuvee","winery":{"name":"Longoria"}},{"id":"123abc","name":"Blue's Cuvee","winery":{"name":"Longoria"}}]}}}}},"post":{"tags":["storage"],"summary":"add storage","description":"Add new bottle and return its ID.","operationId":"storage#add","requestBody":{"description":"Request body for add.","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Bottle"},"example":{"composition":[{"percentage":8,"varietal":"Syrah"},{"percentage":8,"varietal":"Syrah"}],"description":"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah","name":"Blue's Cuvee","rating":3,"vintage":2005,"winery":{"country":"USA","name":"Longoria","region":"Central Coast, California","url":"http://www.longoriawine.com/"}}}}},"responses":{"201":{"description":"Created response.","content":{"application/json":{"schema":{"type":"string","example":"Qui dolorem atque ex est."},"example":"Qui dolorem atque ex est."}}}}}},"/storage/multi_add":{"post":{"tags":["storage"],"summary":"multi_add storage","description":"Add n number of bottles and return their IDs. This is a multipart request and each part has field name 'bottle' and contains the encoded bottle info to be added.","operationId":"storage#multi_add","requestBody":{"description":"Request body for multi_add.","required":true,"content":{"multipart/form-data":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Bottle"},"example":[{"composition":[{"percentage":8,"varietal":"Syrah"},{"percentage":8,"varietal":"Syrah"},{"percentage":8,"varietal":"Syrah"}],"description":"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah","name":"Blue's Cuvee","rating":3,"vintage":2003,"winery":{"country":"USA","name":"Longoria","region":"Central Coast, California","url":"http://www.longoriawine.com/"}},{"composition":[{"percentage":8,"varietal":"Syrah"},{"percentage":8,"varietal":"Syrah"},{"percentage":8,"varietal":"Syrah"}],"description":"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah","name":"Blue's Cuvee","rating":3,"vintage":2003,"winery":{"country":"USA","name":"Longoria","region":"Central Coast, California","url":"http://www.longoriawine.com/"}}]},"example":[{"composition":[{"percentage":8,"varietal":"Syrah"},{"percentage":8,"varietal":"Syrah"},{"percentage":8,"varietal":"Syrah"}],"description":"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah","name":"Blue's Cuvee","rating":3,"vintage":2003,"winery":{"country":"USA","name":"Longoria","region":"Central Coast, California","url":"http://www.longoriawine.com/"}},{"composition":[{"percentage":8,"varietal":"Syrah"},{"percentage":8,"varietal":"Syrah"},{"percentage":8,"varietal":"Syrah"}],"description":"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah","name":"Blue's Cuvee","rating":3,"vintage":2003,"winery":{"country":"USA","name":"Longoria","region":"Central Coast, California","url":"http://www.longoriawine.com/"}}]}}},"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"type":"array","items":{"type":"string","example":"Ut aperiam voluptas."},"example":["Ut aperiam voluptas.","Dolore ex sunt.","Ut ipsam."]},"example":["Ut aperiam voluptas.","Dolore ex sunt.","Ut ipsam."]}}}}}},"/storage/multi_update":{"put":{"tags":["storage"],"summary":"multi_update storage","description":"Update bottles with the given IDs. This is a multipart request and each part has field name 'bottle' and contains the encoded bottle info to be updated. The IDs in the query parameter is mapped to each part in the request.","operationId":"storage#multi_update","parameters":[{"name":"ids","in":"query","description":"IDs of the bottles to be updated","allowEmptyValue":true,"required":true,"schema":{"type":"array","items":{"type":"string","example":"Deserunt itaque omnis necessitatibus enim aspernatur."},"description":"IDs of the bottles to be updated","example":["Deserunt itaque omnis necessitatibus enim aspernatur.","Tempore in voluptate asperiores.","Incidunt quia ut eius quibusdam rerum.","Consequatur architecto ratione."]},"example":["Deserunt itaque omnis necessitatibus enim aspernatur.","Tempore in voluptate asperiores.","Incidunt quia ut eius quibusdam rerum.","Consequatur architecto ratione."]}],"requestBody":{"description":"Request body for multi_update.","required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/MultiUpdateRequestBody"},"example":{"bottles":[{"composition":[{"percentage":8,"varietal":"Syrah"},{"percentage":8,"varietal":"Syrah"},{"percentage":8,"varietal":"Syrah"}],"description":"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah","name":"Blue's Cuvee","rating":3,"vintage":2003,"winery":{"country":"USA","name":"Longoria","region":"Central Coast, California","url":"http://www.longoriawine.com/"}},{"composition":[{"percentage":8,"varietal":"Syrah"},{"percentage":8,"varietal":"Syrah"},{"percentage":8,"varietal":"Syrah"}],"description":"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah","name":"Blue's Cuvee","rating":3,"vintage":2003,"winery":{"country":"USA","name":"Longoria","region":"Central Coast, California","url":"http://www.longoriawine.com/"}},{"composition":[{"percentage":8,"varietal":"Syrah"},{"percentage":8,"varietal":"Syrah"},{"percentage":8,"varietal":"Syrah"}],"description":"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah","name":"Blue's Cuvee","rating":3,"vintage":2003,"winery":{"country":"USA","name":"Longoria","region":"Central Coast, California","url":"http://www.longoriawine.com/"}}]}}}},"responses":{"204":{"description":"No Content response."}}}},"/storage/rate":{"post":{"tags":["storage"],"summary":"rate storage","description":"Rate bottles by IDs","operationId":"storage#rate","parameters":[{"name":"payload","in":"query","description":"Query parameters","style":"deepObject","required":true,"schema":{"type":"object","additionalProperties":true}}],"responses":{"200":{"description":"OK response."}}}},"/storage/{id}":{"delete":{"tags":["storage"],"summary":"remove storage","description":"Remove bottle from storage","operationId":"storage#remove","parameters":[{"name":"id","in":"path","description":"ID of bottle to remove","required":true,"schema":{"type":"string","description":"ID of bottle to remove","example":"Tenetur molestiae aut dolorem."},"example":"Tenetur molestiae aut dolorem."}],"responses":{"204":{"description":"No Content response."}}},"get":{"tags":["storage"],"summary":"show storage","description":"Show bottle by ID","operationId":"storage#show","parameters":[{"name":"view","in":"query","description":"View to render","allowEmptyValue":true,"schema":{"type":"string","description":"View to render","example":"tiny","enum":["default","tiny"]},"example":"tiny"},{"name":"id","in":"path","description":"ID of bottle to show","required":true,"schema":{"type":"string","description":"ID of bottle to show","example":"Repellat numquam autem."},"example":"Repellat numquam autem."}],"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CellarStoredBottle"},"example":{"composition":[{"percentage":8,"varietal":"Syrah"},{"percentage":8,"varietal":"Syrah"}],"description":"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah","id":"123abc","name":"Blue's Cuvee","rating":3,"vintage":1917,"winery":{"country":"USA","name":"Longoria","region":"Central Coast, California","url":"http://www.longoriawine.com/"}}}}},"404":{"description":"not_found: Bottle not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"},"example":{"id":"Est excepturi corrupti magnam.","message":"bottle 1 not found"}}}}}}},"/swagger/swagger.json":{"get":{"tags":["swagger"],"summary":"Download gen/http/openapi.json","description":"JSON document containing the API swagger definition","operationId":"swagger#/swagger/swagger.json","responses":{"200":{"description":"File downloaded"}}}}},"components":{"schemas":{"Bottle":{"type":"object","properties":{"composition":{"type":"array","items":{"$ref":"#/components/schemas/Component"},"description":"Composition is the list of grape varietals and associated percentage.","example":[{"percentage":8,"varietal":"Syrah"},{"percentage":8,"varietal":"Syrah"}]},"description":{"type":"string","description":"Description of bottle","example":"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah","maxLength":2000},"name":{"type":"string","description":"Name of bottle","example":"Blue's Cuvee","maxLength":100},"rating":{"type":"integer","description":"Rating of bottle from 1 (worst) to 5 (best)","example":3,"format":"int32","minimum":1,"maximum":5},"vintage":{"type":"integer","description":"Vintage of bottle","example":2005,"format":"int32","minimum":1900,"maximum":2020},"winery":{"$ref":"#/components/schemas/Winery"}},"description":"Request body for add.","example":{"composition":[{"percentage":8,"varietal":"Syrah"},{"percentage":8,"varietal":"Syrah"}],"description":"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah","name":"Blue's Cuvee","rating":3,"vintage":2005,"winery":{"country":"USA","name":"Longoria","region":"Central Coast, California","url":"http://www.longoriawine.com/"}},"required":["name","winery","vintage"]},"CellarStoredBottle":{"type":"object","properties":{"composition":{"type":"array","items":{"$ref":"#/components/schemas/Component"},"description":"Composition is the list of grape varietals and associated percentage.","example":[{"percentage":8,"varietal":"Syrah"},{"percentage":8,"varietal":"Syrah"}]},"description":{"type":"string","description":"Description of bottle","example":"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah","maxLength":2000},"id":{"type":"string","description":"ID is the unique id of the bottle.","example":"123abc"},"name":{"type":"string","description":"Name of bottle","example":"Blue's Cuvee","maxLength":100},"rating":{"type":"integer","description":"Rating of bottle from 1 (worst) to 5 (best)","example":3,"format":"int32","minimum":1,"maximum":5},"vintage":{"type":"integer","description":"Vintage of bottle","example":1917,"format":"int32","minimum":1900,"maximum":2020},"winery":{"$ref":"#/components/schemas/Winery"}},"description":"A StoredBottle describes a bottle retrieved by the storage service.","example":{"composition":[{"percentage":8,"varietal":"Syrah"},{"percentage":8,"varietal":"Syrah"}],"description":"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah","id":"123abc","name":"Blue's Cuvee","rating":3,"vintage":1917,"winery":{"country":"USA","name":"Longoria","region":"Central Coast, California","url":"http://www.longoriawine.com/"}},"required":["id","name","winery","vintage"]},"Component":{"type":"object","properties":{"percentage":{"type":"integer","description":"Percentage of varietal in wine","example":8,"format":"int32","minimum":1,"maximum":100},"varietal":{"type":"string","description":"Grape varietal","example":"Syrah","pattern":"[A-Za-z' ]+","maxLength":100}},"example":{"percentage":8,"varietal":"Syrah"},"required":["varietal"]},"Criteria":{"type":"object","properties":{"name":{"type":"string","description":"Name of bottle to pick","example":"Blue's Cuvee"},"varietal":{"type":"array","items":{"type":"string","example":"Deleniti deleniti reiciendis."},"description":"Varietals in preference order","example":["pinot noir","merlot","cabernet franc"]},"winery":{"type":"string","description":"Winery of bottle to pick","example":"longoria"}},"description":"Request body for pick.","example":{"name":"Blue's Cuvee","varietal":["pinot noir","merlot","cabernet franc"],"winery":"longoria"}},"MultiUpdateRequestBody":{"type":"object","properties":{"bottles":{"type":"array","items":{"$ref":"#/components/schemas/Bottle"},"description":"Array of bottle info that matches the ids attribute","example":[{"composition":[{"percentage":8,"varietal":"Syrah"},{"percentage":8,"varietal":"Syrah"},{"percentage":8,"varietal":"Syrah"}],"description":"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah","name":"Blue's Cuvee","rating":3,"vintage":2003,"winery":{"country":"USA","name":"Longoria","region":"Central Coast, California","url":"http://www.longoriawine.com/"}},{"composition":[{"percentage":8,"varietal":"Syrah"},{"percentage":8,"varietal":"Syrah"},{"percentage":8,"varietal":"Syrah"}],"description":"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah","name":"Blue's Cuvee","rating":3,"vintage":2003,"winery":{"country":"USA","name":"Longoria","region":"Central Coast, California","url":"http://www.longoriawine.com/"}},{"composition":[{"percentage":8,"varietal":"Syrah"},{"percentage":8,"varietal":"Syrah"},{"percentage":8,"varietal":"Syrah"}],"description":"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah","name":"Blue's Cuvee","rating":3,"vintage":2003,"winery":{"country":"USA","name":"Longoria","region":"Central Coast, California","url":"http://www.longoriawine.com/"}}]}},"description":"Request body for multi_update.","example":{"bottles":[{"composition":[{"percentage":8,"varietal":"Syrah"},{"percentage":8,"varietal":"Syrah"},{"percentage":8,"varietal":"Syrah"}],"description":"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah","name":"Blue's Cuvee","rating":3,"vintage":2003,"winery":{"country":"USA","name":"Longoria","region":"Central Coast, California","url":"http://www.longoriawine.com/"}},{"composition":[{"percentage":8,"varietal":"Syrah"},{"percentage":8,"varietal":"Syrah"},{"percentage":8,"varietal":"Syrah"}],"description":"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah","name":"Blue's Cuvee","rating":3,"vintage":2003,"winery":{"country":"USA","name":"Longoria","region":"Central Coast, California","url":"http://www.longoriawine.com/"}},{"composition":[{"percentage":8,"varietal":"Syrah"},{"percentage":8,"varietal":"Syrah"},{"percentage":8,"varietal":"Syrah"}],"description":"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah","name":"Blue's Cuvee","rating":3,"vintage":2003,"winery":{"country":"USA","name":"Longoria","region":"Central Coast, California","url":"http://www.longoriawine.com/"}}]},"required":["bottles"]},"NotFound":{"type":"object","properties":{"id":{"type":"string","description":"ID of missing bottle","example":"Est excepturi corrupti magnam."},"message":{"type":"string","description":"Message of error","example":"bottle 1 not found"}},"description":"NotFound is the type returned when attempting to show or delete a bottle that does not exist.","example":{"id":"Est excepturi corrupti magnam.","message":"bottle 1 not found"},"required":["message","id"]},"StoredBottleResponse":{"type":"object","properties":{"composition":{"type":"array","items":{"$ref":"#/components/schemas/Component"},"description":"Composition is the list of grape varietals and associated percentage.","example":[{"percentage":8,"varietal":"Syrah"},{"percentage":8,"varietal":"Syrah"}]},"description":{"type":"string","description":"Description of bottle","example":"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah","maxLength":2000},"id":{"type":"string","description":"ID is the unique id of the bottle.","example":"123abc"},"name":{"type":"string","description":"Name of bottle","example":"Blue's Cuvee","maxLength":100},"rating":{"type":"integer","description":"Rating of bottle from 1 (worst) to 5 (best)","example":4,"format":"int32","minimum":1,"maximum":5},"vintage":{"type":"integer","description":"Vintage of bottle","example":1983,"format":"int32","minimum":1900,"maximum":2020},"winery":{"$ref":"#/components/schemas/WineryTiny"}},"description":"A StoredBottle describes a bottle retrieved by the storage service. (default view)","example":{"composition":[{"percentage":8,"varietal":"Syrah"},{"percentage":8,"varietal":"Syrah"}],"description":"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah","id":"123abc","name":"Blue's Cuvee","rating":4,"vintage":1983,"winery":{"name":"Longoria"}},"required":["id","name","winery","vintage"]},"StoredBottleResponseCollection":{"type":"array","items":{"$ref":"#/components/schemas/StoredBottleResponse"},"description":"PickResponseBody is the result type for an array of StoredBottle (default view)","example":[{"composition":[{"percentage":8,"varietal":"Syrah"},{"percentage":8,"varietal":"Syrah"}],"description":"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah","id":"123abc","name":"Blue's Cuvee","rating":4,"vintage":1983,"winery":{"name":"Longoria"}},{"composition":[{"percentage":8,"varietal":"Syrah"},{"percentage":8,"varietal":"Syrah"}],"description":"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah","id":"123abc","name":"Blue's Cuvee","rating":4,"vintage":1983,"winery":{"name":"Longoria"}},{"composition":[{"percentage":8,"varietal":"Syrah"},{"percentage":8,"varietal":"Syrah"}],"description":"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah","id":"123abc","name":"Blue's Cuvee","rating":4,"vintage":1983,"winery":{"name":"Longoria"}}]},"StoredBottleResponseTiny":{"type":"object","properties":{"id":{"type":"string","description":"ID is the unique id of the bottle.","example":"123abc"},"name":{"type":"string","description":"Name of bottle","example":"Blue's Cuvee","maxLength":100},"winery":{"$ref":"#/components/schemas/WineryTiny"}},"description":"A StoredBottle describes a bottle retrieved by the storage service. (tiny view)","example":{"id":"123abc","name":"Blue's Cuvee","winery":{"name":"Longoria"}},"required":["id","name","winery"]},"StoredBottleResponseTinyCollection":{"type":"array","items":{"$ref":"#/components/schemas/StoredBottleResponseTiny"},"description":"ListResponseBody is the result type for an array of StoredBottle (tiny view)","example":[{"id":"123abc","name":"Blue's Cuvee","winery":{"name":"Longoria"}},{"id":"123abc","name":"Blue's Cuvee","winery":{"name":"Longoria"}},{"id":"123abc","name":"Blue's Cuvee","winery":{"name":"Longoria"}}]},"Winery":{"type":"object","properties":{"country":{"type":"string","description":"Country of winery","example":"USA","pattern":"[a-zA-Z '\\.]+"},"name":{"type":"string","description":"Name of winery","example":"Longoria"},"region":{"type":"string","description":"Region of winery","example":"Central Coast, California","pattern":"[a-zA-Z '\\.]+"},"url":{"type":"string","description":"Winery website URL","example":"http://www.longoriawine.com/","pattern":"^(https?|ftp)://[^\\s/$.?#].[^\\s]*$"}},"example":{"country":"USA","name":"Longoria","region":"Central Coast, California","url":"http://www.longoriawine.com/"},"required":["name","region","country"]},"WineryTiny":{"type":"object","properties":{"name":{"type":"string","description":"Name of winery","example":"Longoria"}},"description":"Winery result type (tiny view)","example":{"name":"Longoria"},"required":["name"]}}},"tags":[{"name":"sommelier","description":"The sommelier service retrieves bottles given a set of criteria."},{"name":"storage","description":"The storage service makes it possible to view, add or remove wine bottles."},{"name":"swagger","description":"The swagger service serves the API swagger definition."}]} \ No newline at end of file diff --git a/cellar/gen/http/openapi3.yaml b/cellar/gen/http/openapi3.yaml index e13508b4e..665053477 100644 --- a/cellar/gen/http/openapi3.yaml +++ b/cellar/gen/http/openapi3.yaml @@ -38,31 +38,39 @@ paths: $ref: '#/components/schemas/StoredBottleResponseCollection' example: - composition: - - percentage: 36 + - percentage: 8 varietal: Syrah - - percentage: 36 - varietal: Syrah - - percentage: 36 + - percentage: 8 varietal: Syrah description: Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah id: 123abc name: Blue's Cuvee - rating: 3 - vintage: 1963 + rating: 4 + vintage: 1983 winery: name: Longoria - composition: - - percentage: 36 + - percentage: 8 + varietal: Syrah + - percentage: 8 varietal: Syrah - - percentage: 36 + description: Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah + id: 123abc + name: Blue's Cuvee + rating: 4 + vintage: 1983 + winery: + name: Longoria + - composition: + - percentage: 8 varietal: Syrah - - percentage: 36 + - percentage: 8 varietal: Syrah description: Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah id: 123abc name: Blue's Cuvee - rating: 3 - vintage: 1963 + rating: 4 + vintage: 1983 winery: name: Longoria "400": @@ -72,8 +80,8 @@ paths: schema: type: string description: Missing criteria - example: Eum voluptas consectetur molestiae voluptatem animi voluptas. - example: Eum voluptas consectetur molestiae voluptatem animi voluptas. + example: Eius maxime earum laudantium. + example: Eius maxime earum laudantium. "404": description: 'no_match: Not Found response.' content: @@ -81,8 +89,8 @@ paths: schema: type: string description: No bottle matched given criteria - example: Iste ratione. - example: Iste ratione. + example: Ipsum tempore. + example: Ipsum tempore. /storage: get: tags: @@ -110,10 +118,6 @@ paths: name: Blue's Cuvee winery: name: Longoria - - id: 123abc - name: Blue's Cuvee - winery: - name: Longoria post: tags: - storage @@ -129,16 +133,14 @@ paths: $ref: '#/components/schemas/Bottle' example: composition: - - percentage: 65 + - percentage: 8 varietal: Syrah - - percentage: 65 - varietal: Syrah - - percentage: 65 + - percentage: 8 varietal: Syrah description: Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah name: Blue's Cuvee - rating: 2 - vintage: 2000 + rating: 3 + vintage: 2005 winery: country: USA name: Longoria @@ -151,8 +153,8 @@ paths: application/json: schema: type: string - example: Accusamus nisi id provident ut suscipit quam. - example: Accusamus nisi id provident ut suscipit quam. + example: Qui dolorem atque ex est. + example: Qui dolorem atque ex est. /storage/{id}: delete: tags: @@ -168,8 +170,8 @@ paths: schema: type: string description: ID of bottle to remove - example: Id libero accusantium incidunt. - example: Aut rerum deserunt aut consequatur. + example: Tenetur molestiae aut dolorem. + example: Tenetur molestiae aut dolorem. responses: "204": description: No Content response. @@ -191,7 +193,7 @@ paths: enum: - default - tiny - example: default + example: tiny - name: id in: path description: ID of bottle to show @@ -199,8 +201,8 @@ paths: schema: type: string description: ID of bottle to show - example: Et aut a enim qui. - example: Sequi excepturi harum numquam. + example: Repellat numquam autem. + example: Repellat numquam autem. responses: "200": description: OK response. @@ -210,19 +212,15 @@ paths: $ref: '#/components/schemas/CellarStoredBottle' example: composition: - - percentage: 55 - varietal: Syrah - - percentage: 55 + - percentage: 8 varietal: Syrah - - percentage: 55 - varietal: Syrah - - percentage: 55 + - percentage: 8 varietal: Syrah description: Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah id: 123abc name: Blue's Cuvee - rating: 1 - vintage: 1913 + rating: 3 + vintage: 1917 winery: country: USA name: Longoria @@ -235,7 +233,7 @@ paths: schema: $ref: '#/components/schemas/NotFound' example: - id: Quae officiis expedita dolores. + id: Est excepturi corrupti magnam. message: bottle 1 not found /storage/multi_add: post: @@ -255,48 +253,32 @@ paths: $ref: '#/components/schemas/Bottle' example: - composition: - - percentage: 65 - varietal: Syrah - - percentage: 65 - varietal: Syrah - - percentage: 65 - varietal: Syrah - description: Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah - name: Blue's Cuvee - rating: 2 - vintage: 2009 - winery: - country: USA - name: Longoria - region: Central Coast, California - url: http://www.longoriawine.com/ - - composition: - - percentage: 65 + - percentage: 8 varietal: Syrah - - percentage: 65 + - percentage: 8 varietal: Syrah - - percentage: 65 + - percentage: 8 varietal: Syrah description: Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah name: Blue's Cuvee - rating: 2 - vintage: 2009 + rating: 3 + vintage: 2003 winery: country: USA name: Longoria region: Central Coast, California url: http://www.longoriawine.com/ - composition: - - percentage: 65 + - percentage: 8 varietal: Syrah - - percentage: 65 + - percentage: 8 varietal: Syrah - - percentage: 65 + - percentage: 8 varietal: Syrah description: Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah name: Blue's Cuvee - rating: 2 - vintage: 2009 + rating: 3 + vintage: 2003 winery: country: USA name: Longoria @@ -304,48 +286,32 @@ paths: url: http://www.longoriawine.com/ example: - composition: - - percentage: 65 - varietal: Syrah - - percentage: 65 - varietal: Syrah - - percentage: 65 - varietal: Syrah - description: Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah - name: Blue's Cuvee - rating: 2 - vintage: 2009 - winery: - country: USA - name: Longoria - region: Central Coast, California - url: http://www.longoriawine.com/ - - composition: - - percentage: 65 + - percentage: 8 varietal: Syrah - - percentage: 65 + - percentage: 8 varietal: Syrah - - percentage: 65 + - percentage: 8 varietal: Syrah description: Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah name: Blue's Cuvee - rating: 2 - vintage: 2009 + rating: 3 + vintage: 2003 winery: country: USA name: Longoria region: Central Coast, California url: http://www.longoriawine.com/ - composition: - - percentage: 65 + - percentage: 8 varietal: Syrah - - percentage: 65 + - percentage: 8 varietal: Syrah - - percentage: 65 + - percentage: 8 varietal: Syrah description: Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah name: Blue's Cuvee - rating: 2 - vintage: 2009 + rating: 3 + vintage: 2003 winery: country: USA name: Longoria @@ -360,13 +326,15 @@ paths: type: array items: type: string - example: Qui incidunt quas libero est. + example: Ut aperiam voluptas. example: - - Qui incidunt quas libero est. - - Vero iusto sunt est quaerat. + - Ut aperiam voluptas. + - Dolore ex sunt. + - Ut ipsam. example: - - Qui incidunt quas libero est. - - Vero iusto sunt est quaerat. + - Ut aperiam voluptas. + - Dolore ex sunt. + - Ut ipsam. /storage/multi_update: put: tags: @@ -384,16 +352,18 @@ paths: type: array items: type: string - example: Ut non voluptatem. + example: Deserunt itaque omnis necessitatibus enim aspernatur. description: IDs of the bottles to be updated example: - - Ut non voluptatem. - - Officia tenetur rerum possimus voluptates. + - Deserunt itaque omnis necessitatibus enim aspernatur. + - Tempore in voluptate asperiores. + - Incidunt quia ut eius quibusdam rerum. + - Consequatur architecto ratione. example: - - Ut non voluptatem. - - Officia tenetur rerum possimus voluptates. - - Deserunt quidem non molestias non inventore. - - Consequatur praesentium ipsa aut et voluptates illo. + - Deserunt itaque omnis necessitatibus enim aspernatur. + - Tempore in voluptate asperiores. + - Incidunt quia ut eius quibusdam rerum. + - Consequatur architecto ratione. requestBody: description: Request body for multi_update. required: true @@ -404,48 +374,48 @@ paths: example: bottles: - composition: - - percentage: 65 + - percentage: 8 varietal: Syrah - - percentage: 65 + - percentage: 8 varietal: Syrah - - percentage: 65 + - percentage: 8 varietal: Syrah description: Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah name: Blue's Cuvee - rating: 2 - vintage: 2009 + rating: 3 + vintage: 2003 winery: country: USA name: Longoria region: Central Coast, California url: http://www.longoriawine.com/ - composition: - - percentage: 65 + - percentage: 8 varietal: Syrah - - percentage: 65 + - percentage: 8 varietal: Syrah - - percentage: 65 + - percentage: 8 varietal: Syrah description: Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah name: Blue's Cuvee - rating: 2 - vintage: 2009 + rating: 3 + vintage: 2003 winery: country: USA name: Longoria region: Central Coast, California url: http://www.longoriawine.com/ - composition: - - percentage: 65 + - percentage: 8 varietal: Syrah - - percentage: 65 + - percentage: 8 varietal: Syrah - - percentage: 65 + - percentage: 8 varietal: Syrah description: Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah name: Blue's Cuvee - rating: 2 - vintage: 2009 + rating: 3 + vintage: 2003 winery: country: USA name: Longoria @@ -494,11 +464,9 @@ components: $ref: '#/components/schemas/Component' description: Composition is the list of grape varietals and associated percentage. example: - - percentage: 65 - varietal: Syrah - - percentage: 65 + - percentage: 8 varietal: Syrah - - percentage: 65 + - percentage: 8 varietal: Syrah description: type: string @@ -513,14 +481,14 @@ components: rating: type: integer description: Rating of bottle from 1 (worst) to 5 (best) - example: 2 + example: 3 format: int32 minimum: 1 maximum: 5 vintage: type: integer description: Vintage of bottle - example: 2000 + example: 2005 format: int32 minimum: 1900 maximum: 2020 @@ -529,16 +497,14 @@ components: description: Request body for add. example: composition: - - percentage: 65 - varietal: Syrah - - percentage: 65 + - percentage: 8 varietal: Syrah - - percentage: 65 + - percentage: 8 varietal: Syrah description: Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah name: Blue's Cuvee - rating: 2 - vintage: 2000 + rating: 3 + vintage: 2005 winery: country: USA name: Longoria @@ -557,11 +523,9 @@ components: $ref: '#/components/schemas/Component' description: Composition is the list of grape varietals and associated percentage. example: - - percentage: 55 + - percentage: 8 varietal: Syrah - - percentage: 55 - varietal: Syrah - - percentage: 55 + - percentage: 8 varietal: Syrah description: type: string @@ -580,14 +544,14 @@ components: rating: type: integer description: Rating of bottle from 1 (worst) to 5 (best) - example: 4 + example: 3 format: int32 minimum: 1 maximum: 5 vintage: type: integer description: Vintage of bottle - example: 1919 + example: 1917 format: int32 minimum: 1900 maximum: 2020 @@ -596,17 +560,15 @@ components: description: A StoredBottle describes a bottle retrieved by the storage service. example: composition: - - percentage: 55 - varietal: Syrah - - percentage: 55 + - percentage: 8 varietal: Syrah - - percentage: 55 + - percentage: 8 varietal: Syrah description: Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah id: 123abc name: Blue's Cuvee - rating: 4 - vintage: 1919 + rating: 3 + vintage: 1917 winery: country: USA name: Longoria @@ -623,7 +585,7 @@ components: percentage: type: integer description: Percentage of varietal in wine - example: 36 + example: 8 format: int32 minimum: 1 maximum: 100 @@ -634,7 +596,7 @@ components: pattern: '[A-Za-z'' ]+' maxLength: 100 example: - percentage: 36 + percentage: 8 varietal: Syrah required: - varietal @@ -649,7 +611,7 @@ components: type: array items: type: string - example: Qui quae rem officiis est dolores et. + example: Deleniti deleniti reiciendis. description: Varietals in preference order example: - pinot noir @@ -677,48 +639,48 @@ components: description: Array of bottle info that matches the ids attribute example: - composition: - - percentage: 65 + - percentage: 8 varietal: Syrah - - percentage: 65 + - percentage: 8 varietal: Syrah - - percentage: 65 + - percentage: 8 varietal: Syrah description: Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah name: Blue's Cuvee - rating: 2 - vintage: 2009 + rating: 3 + vintage: 2003 winery: country: USA name: Longoria region: Central Coast, California url: http://www.longoriawine.com/ - composition: - - percentage: 65 + - percentage: 8 varietal: Syrah - - percentage: 65 + - percentage: 8 varietal: Syrah - - percentage: 65 + - percentage: 8 varietal: Syrah description: Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah name: Blue's Cuvee - rating: 2 - vintage: 2009 + rating: 3 + vintage: 2003 winery: country: USA name: Longoria region: Central Coast, California url: http://www.longoriawine.com/ - composition: - - percentage: 65 + - percentage: 8 varietal: Syrah - - percentage: 65 + - percentage: 8 varietal: Syrah - - percentage: 65 + - percentage: 8 varietal: Syrah description: Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah name: Blue's Cuvee - rating: 2 - vintage: 2009 + rating: 3 + vintage: 2003 winery: country: USA name: Longoria @@ -728,48 +690,48 @@ components: example: bottles: - composition: - - percentage: 65 + - percentage: 8 varietal: Syrah - - percentage: 65 + - percentage: 8 varietal: Syrah - - percentage: 65 + - percentage: 8 varietal: Syrah description: Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah name: Blue's Cuvee - rating: 2 - vintage: 2009 + rating: 3 + vintage: 2003 winery: country: USA name: Longoria region: Central Coast, California url: http://www.longoriawine.com/ - composition: - - percentage: 65 + - percentage: 8 varietal: Syrah - - percentage: 65 + - percentage: 8 varietal: Syrah - - percentage: 65 + - percentage: 8 varietal: Syrah description: Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah name: Blue's Cuvee - rating: 2 - vintage: 2009 + rating: 3 + vintage: 2003 winery: country: USA name: Longoria region: Central Coast, California url: http://www.longoriawine.com/ - composition: - - percentage: 65 + - percentage: 8 varietal: Syrah - - percentage: 65 + - percentage: 8 varietal: Syrah - - percentage: 65 + - percentage: 8 varietal: Syrah description: Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah name: Blue's Cuvee - rating: 2 - vintage: 2009 + rating: 3 + vintage: 2003 winery: country: USA name: Longoria @@ -783,14 +745,14 @@ components: id: type: string description: ID of missing bottle - example: Quae officiis expedita dolores. + example: Est excepturi corrupti magnam. message: type: string description: Message of error example: bottle 1 not found - description: Bottle not found + description: NotFound is the type returned when attempting to show or delete a bottle that does not exist. example: - id: Quae officiis expedita dolores. + id: Est excepturi corrupti magnam. message: bottle 1 not found required: - message @@ -804,11 +766,9 @@ components: $ref: '#/components/schemas/Component' description: Composition is the list of grape varietals and associated percentage. example: - - percentage: 36 + - percentage: 8 varietal: Syrah - - percentage: 36 - varietal: Syrah - - percentage: 36 + - percentage: 8 varietal: Syrah description: type: string @@ -827,33 +787,31 @@ components: rating: type: integer description: Rating of bottle from 1 (worst) to 5 (best) - example: 3 + example: 4 format: int32 minimum: 1 maximum: 5 vintage: type: integer description: Vintage of bottle - example: 1963 + example: 1983 format: int32 minimum: 1900 maximum: 2020 winery: - $ref: '#/components/schemas/WineryResponseTiny' + $ref: '#/components/schemas/WineryTiny' description: A StoredBottle describes a bottle retrieved by the storage service. (default view) example: composition: - - percentage: 36 + - percentage: 8 varietal: Syrah - - percentage: 36 - varietal: Syrah - - percentage: 36 + - percentage: 8 varietal: Syrah description: Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah id: 123abc name: Blue's Cuvee - rating: 3 - vintage: 1963 + rating: 4 + vintage: 1983 winery: name: Longoria required: @@ -865,34 +823,42 @@ components: type: array items: $ref: '#/components/schemas/StoredBottleResponse' - description: PickResponseBody is the result type for an array of StoredBottleResponse (default view) + description: PickResponseBody is the result type for an array of StoredBottle (default view) example: - composition: - - percentage: 36 - varietal: Syrah - - percentage: 36 + - percentage: 8 varietal: Syrah - - percentage: 36 + - percentage: 8 varietal: Syrah description: Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah id: 123abc name: Blue's Cuvee - rating: 3 - vintage: 1963 + rating: 4 + vintage: 1983 winery: name: Longoria - composition: - - percentage: 36 + - percentage: 8 varietal: Syrah - - percentage: 36 + - percentage: 8 + varietal: Syrah + description: Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah + id: 123abc + name: Blue's Cuvee + rating: 4 + vintage: 1983 + winery: + name: Longoria + - composition: + - percentage: 8 varietal: Syrah - - percentage: 36 + - percentage: 8 varietal: Syrah description: Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah id: 123abc name: Blue's Cuvee - rating: 3 - vintage: 1963 + rating: 4 + vintage: 1983 winery: name: Longoria StoredBottleResponseTiny: @@ -908,7 +874,7 @@ components: example: Blue's Cuvee maxLength: 100 winery: - $ref: '#/components/schemas/WineryResponseTiny' + $ref: '#/components/schemas/WineryTiny' description: A StoredBottle describes a bottle retrieved by the storage service. (tiny view) example: id: 123abc @@ -923,7 +889,7 @@ components: type: array items: $ref: '#/components/schemas/StoredBottleResponseTiny' - description: ListResponseBody is the result type for an array of StoredBottleResponse (tiny view) + description: ListResponseBody is the result type for an array of StoredBottle (tiny view) example: - id: 123abc name: Blue's Cuvee @@ -937,10 +903,6 @@ components: name: Blue's Cuvee winery: name: Longoria - - id: 123abc - name: Blue's Cuvee - winery: - name: Longoria Winery: type: object properties: @@ -963,7 +925,6 @@ components: description: Winery website URL example: http://www.longoriawine.com/ pattern: ^(https?|ftp)://[^\s/$.?#].[^\s]*$ - description: Winery that produces wine example: country: USA name: Longoria @@ -973,14 +934,14 @@ components: - name - region - country - WineryResponseTiny: + WineryTiny: type: object properties: name: type: string description: Name of winery example: Longoria - description: WineryResponse result type (tiny view) + description: Winery result type (tiny view) example: name: Longoria required: diff --git a/cellar/gen/http/sommelier/client/encode_decode.go b/cellar/gen/http/sommelier/client/encode_decode.go index 36f299d47..d4900d19e 100644 --- a/cellar/gen/http/sommelier/client/encode_decode.go +++ b/cellar/gen/http/sommelier/client/encode_decode.go @@ -10,6 +10,7 @@ package client import ( "bytes" "context" + "errors" "io" "net/http" "net/url" @@ -58,18 +59,24 @@ func EncodePickRequest(encoder func(*http.Request) goahttp.Encoder) func(*http.R // - "no_match" (type sommelier.NoMatch): http.StatusNotFound // - error: internal error func DecodePickResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (any, error) { - return func(resp *http.Response) (any, error) { + return func(resp *http.Response) (result any, decodeErr error) { + responseBody := resp.Body if restoreBody { - b, err := io.ReadAll(resp.Body) - if err != nil { - return nil, err + b, readErr := io.ReadAll(responseBody) + closeErr := responseBody.Close() + if err := errors.Join(readErr, closeErr); err != nil { + return nil, goahttp.ErrDecodingError("sommelier", "pick", err) } resp.Body = io.NopCloser(bytes.NewBuffer(b)) defer func() { resp.Body = io.NopCloser(bytes.NewBuffer(b)) }() } else { - defer resp.Body.Close() + defer func() { + if err := responseBody.Close(); err != nil { + decodeErr = errors.Join(decodeErr, goahttp.ErrDecodingError("sommelier", "pick", err)) + } + }() } switch resp.StatusCode { case http.StatusOK: @@ -110,7 +117,10 @@ func DecodePickResponse(decoder func(*http.Response) goahttp.Decoder, restoreBod } return nil, NewPickNoMatch(body) default: - body, _ := io.ReadAll(resp.Body) + body, err := io.ReadAll(resp.Body) + if err != nil { + return nil, goahttp.ErrDecodingError("sommelier", "pick", err) + } return nil, goahttp.ErrInvalidResponse("sommelier", "pick", resp.StatusCode, string(body)) } } @@ -135,7 +145,7 @@ func unmarshalStoredBottleResponseToSommelierviewsStoredBottleView(v *StoredBott res.Composition[i] = nil continue } - res.Composition[i] = unmarshalComponentResponseToSommelierviewsComponentView(val) + res.Composition[i] = unmarshalComponentResponseToSommelierviewsComponentViewOptional(val) } } @@ -152,9 +162,10 @@ func unmarshalWineryResponseTinyToSommelierviewsWineryView(v *WineryResponseTiny return res } -// unmarshalComponentResponseToSommelierviewsComponentView builds a value of -// type *sommelierviews.ComponentView from a value of type *ComponentResponse. -func unmarshalComponentResponseToSommelierviewsComponentView(v *ComponentResponse) *sommelierviews.ComponentView { +// unmarshalComponentResponseToSommelierviewsComponentViewOptional builds a +// value of type *sommelierviews.ComponentView from a value of type +// *ComponentResponse. +func unmarshalComponentResponseToSommelierviewsComponentViewOptional(v *ComponentResponse) *sommelierviews.ComponentView { if v == nil { return nil } diff --git a/cellar/gen/http/sommelier/client/types.go b/cellar/gen/http/sommelier/client/types.go index 7c45f0b6d..415400dc6 100644 --- a/cellar/gen/http/sommelier/client/types.go +++ b/cellar/gen/http/sommelier/client/types.go @@ -107,8 +107,7 @@ func NewPickNoMatch(body string) sommelier.NoMatch { return v } -// ValidateStoredBottleResponse runs the validations defined on -// StoredBottleResponse +// ValidateStoredBottleResponse runs the validations defined on StoredBottle func ValidateStoredBottleResponse(body *StoredBottleResponse) (err error) { if body.ID == nil { err = goa.MergeErrors(err, goa.MissingFieldError("id", "body")) @@ -128,7 +127,7 @@ func ValidateStoredBottleResponse(body *StoredBottleResponse) (err error) { } } if body.Winery != nil { - if err2 := ValidateWineryResponseTiny(body.Winery); err2 != nil { + if err2 := validateWineryResponseTiny(body.Winery, "body.winery"); err2 != nil { err = goa.MergeErrors(err, err2) } } @@ -136,15 +135,13 @@ func ValidateStoredBottleResponse(body *StoredBottleResponse) (err error) { if *body.Vintage < 1900 { err = goa.MergeErrors(err, goa.InvalidRangeError("body.vintage", *body.Vintage, 1900, true)) } - } - if body.Vintage != nil { if *body.Vintage > 2020 { err = goa.MergeErrors(err, goa.InvalidRangeError("body.vintage", *body.Vintage, 2020, false)) } } for _, e := range body.Composition { if e != nil { - if err2 := ValidateComponentResponse(e); err2 != nil { + if err2 := validateComponentResponse(e, "body.composition[*]"); err2 != nil { err = goa.MergeErrors(err, err2) } } @@ -158,8 +155,6 @@ func ValidateStoredBottleResponse(body *StoredBottleResponse) (err error) { if *body.Rating < 1 { err = goa.MergeErrors(err, goa.InvalidRangeError("body.rating", *body.Rating, 1, true)) } - } - if body.Rating != nil { if *body.Rating > 5 { err = goa.MergeErrors(err, goa.InvalidRangeError("body.rating", *body.Rating, 5, false)) } @@ -167,7 +162,7 @@ func ValidateStoredBottleResponse(body *StoredBottleResponse) (err error) { return } -// ValidateWineryResponseTiny runs the validations defined on WineryResponseTiny +// ValidateWineryResponseTiny runs the validations defined on WineryTiny func ValidateWineryResponseTiny(body *WineryResponseTiny) (err error) { if body.Name == nil { err = goa.MergeErrors(err, goa.MissingFieldError("name", "body")) @@ -175,15 +170,22 @@ func ValidateWineryResponseTiny(body *WineryResponseTiny) (err error) { return } -// ValidateComponentResponse runs the validations defined on ComponentResponse +// validateWineryResponseTiny checks WineryTiny and reports errors using the +// path supplied by its caller +func validateWineryResponseTiny(body *WineryResponseTiny, path string) (err error) { + if body.Name == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("name", path)) + } + return +} + +// ValidateComponentResponse runs the validations defined on Component func ValidateComponentResponse(body *ComponentResponse) (err error) { if body.Varietal == nil { err = goa.MergeErrors(err, goa.MissingFieldError("varietal", "body")) } if body.Varietal != nil { err = goa.MergeErrors(err, goa.ValidatePattern("body.varietal", *body.Varietal, "[A-Za-z' ]+")) - } - if body.Varietal != nil { if utf8.RuneCountInString(*body.Varietal) > 100 { err = goa.MergeErrors(err, goa.InvalidLengthError("body.varietal", *body.Varietal, utf8.RuneCountInString(*body.Varietal), 100, false)) } @@ -192,10 +194,31 @@ func ValidateComponentResponse(body *ComponentResponse) (err error) { if *body.Percentage < 1 { err = goa.MergeErrors(err, goa.InvalidRangeError("body.percentage", *body.Percentage, 1, true)) } + if *body.Percentage > 100 { + err = goa.MergeErrors(err, goa.InvalidRangeError("body.percentage", *body.Percentage, 100, false)) + } + } + return +} + +// validateComponentResponse checks Component and reports errors using the path +// supplied by its caller +func validateComponentResponse(body *ComponentResponse, path string) (err error) { + if body.Varietal == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("varietal", path)) + } + if body.Varietal != nil { + err = goa.MergeErrors(err, goa.ValidatePattern(path+".varietal", *body.Varietal, "[A-Za-z' ]+")) + if utf8.RuneCountInString(*body.Varietal) > 100 { + err = goa.MergeErrors(err, goa.InvalidLengthError(path+".varietal", *body.Varietal, utf8.RuneCountInString(*body.Varietal), 100, false)) + } } if body.Percentage != nil { + if *body.Percentage < 1 { + err = goa.MergeErrors(err, goa.InvalidRangeError(path+".percentage", *body.Percentage, 1, true)) + } if *body.Percentage > 100 { - err = goa.MergeErrors(err, goa.InvalidRangeError("body.percentage", *body.Percentage, 100, false)) + err = goa.MergeErrors(err, goa.InvalidRangeError(path+".percentage", *body.Percentage, 100, false)) } } return diff --git a/cellar/gen/http/sommelier/server/encode_decode.go b/cellar/gen/http/sommelier/server/encode_decode.go index 5a7d15244..b557c3463 100644 --- a/cellar/gen/http/sommelier/server/encode_decode.go +++ b/cellar/gen/http/sommelier/server/encode_decode.go @@ -110,7 +110,7 @@ func marshalSommelierviewsStoredBottleViewToStoredBottleResponse(v *sommeliervie res.Composition[i] = nil continue } - res.Composition[i] = marshalSommelierviewsComponentViewToComponentResponse(val) + res.Composition[i] = marshalSommelierviewsComponentViewToComponentResponseOptional(val) } } @@ -127,9 +127,10 @@ func marshalSommelierviewsWineryViewToWineryResponseTiny(v *sommelierviews.Winer return res } -// marshalSommelierviewsComponentViewToComponentResponse builds a value of type -// *ComponentResponse from a value of type *sommelierviews.ComponentView. -func marshalSommelierviewsComponentViewToComponentResponse(v *sommelierviews.ComponentView) *ComponentResponse { +// marshalSommelierviewsComponentViewToComponentResponseOptional builds a value +// of type *ComponentResponse from a value of type +// *sommelierviews.ComponentView. +func marshalSommelierviewsComponentViewToComponentResponseOptional(v *sommelierviews.ComponentView) *ComponentResponse { if v == nil { return nil } diff --git a/cellar/gen/http/storage/client/cli.go b/cellar/gen/http/storage/client/cli.go index 600fdef76..1d4fc7ce2 100644 --- a/cellar/gen/http/storage/client/cli.go +++ b/cellar/gen/http/storage/client/cli.go @@ -28,8 +28,8 @@ func BuildShowPayload(storageShowID string, storageShowView string) (*storage.Sh { if storageShowView != "" { view = &storageShowView - if !(*view == "default" || *view == "tiny") { - err = goa.MergeErrors(err, goa.InvalidEnumValueError("view", *view, []any{"default", "tiny"})) + if !(storageShowView == "default" || storageShowView == "tiny") { + err = goa.MergeErrors(err, goa.InvalidEnumValueError("view", storageShowView, []any{"default", "tiny"})) } if err != nil { return nil, err @@ -51,7 +51,7 @@ func BuildAddPayload(storageAddBody string) (*storage.Bottle, error) { { err = json.Unmarshal([]byte(storageAddBody), &body) if err != nil { - return nil, fmt.Errorf("invalid JSON for body, \nerror: %s, \nexample of valid JSON:\n%s", err, "'{\n \"composition\": [\n {\n \"percentage\": 65,\n \"varietal\": \"Syrah\"\n },\n {\n \"percentage\": 65,\n \"varietal\": \"Syrah\"\n },\n {\n \"percentage\": 65,\n \"varietal\": \"Syrah\"\n }\n ],\n \"description\": \"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah\",\n \"name\": \"Blue\\'s Cuvee\",\n \"rating\": 2,\n \"vintage\": 2000,\n \"winery\": {\n \"country\": \"USA\",\n \"name\": \"Longoria\",\n \"region\": \"Central Coast, California\",\n \"url\": \"http://www.longoriawine.com/\"\n }\n }'") + return nil, fmt.Errorf("invalid JSON for body, \nerror: %s, \nexample of valid JSON:\n%s", err, "'{\n \"composition\": [\n {\n \"percentage\": 8,\n \"varietal\": \"Syrah\"\n },\n {\n \"percentage\": 8,\n \"varietal\": \"Syrah\"\n }\n ],\n \"description\": \"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah\",\n \"name\": \"Blue\\'s Cuvee\",\n \"rating\": 3,\n \"vintage\": 2005,\n \"winery\": {\n \"country\": \"USA\",\n \"name\": \"Longoria\",\n \"region\": \"Central Coast, California\",\n \"url\": \"http://www.longoriawine.com/\"\n }\n }'") } if body.Winery == nil { err = goa.MergeErrors(err, goa.MissingFieldError("winery", "body")) @@ -60,7 +60,7 @@ func BuildAddPayload(storageAddBody string) (*storage.Bottle, error) { err = goa.MergeErrors(err, goa.InvalidLengthError("body.name", body.Name, utf8.RuneCountInString(body.Name), 100, false)) } if body.Winery != nil { - if err2 := ValidateWineryRequestBody(body.Winery); err2 != nil { + if err2 := validateWineryRequestBody(body.Winery, "body.winery"); err2 != nil { err = goa.MergeErrors(err, err2) } } @@ -72,7 +72,7 @@ func BuildAddPayload(storageAddBody string) (*storage.Bottle, error) { } for _, e := range body.Composition { if e != nil { - if err2 := ValidateComponentRequestBody(e); err2 != nil { + if err2 := validateComponentRequestBody(e, "body.composition[*]"); err2 != nil { err = goa.MergeErrors(err, err2) } } @@ -86,8 +86,6 @@ func BuildAddPayload(storageAddBody string) (*storage.Bottle, error) { if *body.Rating < 1 { err = goa.MergeErrors(err, goa.InvalidRangeError("body.rating", *body.Rating, 1, true)) } - } - if body.Rating != nil { if *body.Rating > 5 { err = goa.MergeErrors(err, goa.InvalidRangeError("body.rating", *body.Rating, 5, false)) } @@ -112,7 +110,7 @@ func BuildAddPayload(storageAddBody string) (*storage.Bottle, error) { v.Composition[i] = nil continue } - v.Composition[i] = marshalComponentRequestBodyToStorageComponent(val) + v.Composition[i] = marshalComponentRequestBodyToStorageComponentOptional(val) } } @@ -140,7 +138,7 @@ func BuildMultiAddPayload(storageMultiAddBody string) ([]*storage.Bottle, error) { err = json.Unmarshal([]byte(storageMultiAddBody), &body) if err != nil { - return nil, fmt.Errorf("invalid JSON for body, \nerror: %s, \nexample of valid JSON:\n%s", err, "'[\n {\n \"composition\": [\n {\n \"percentage\": 65,\n \"varietal\": \"Syrah\"\n },\n {\n \"percentage\": 65,\n \"varietal\": \"Syrah\"\n },\n {\n \"percentage\": 65,\n \"varietal\": \"Syrah\"\n }\n ],\n \"description\": \"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah\",\n \"name\": \"Blue\\'s Cuvee\",\n \"rating\": 2,\n \"vintage\": 2009,\n \"winery\": {\n \"country\": \"USA\",\n \"name\": \"Longoria\",\n \"region\": \"Central Coast, California\",\n \"url\": \"http://www.longoriawine.com/\"\n }\n },\n {\n \"composition\": [\n {\n \"percentage\": 65,\n \"varietal\": \"Syrah\"\n },\n {\n \"percentage\": 65,\n \"varietal\": \"Syrah\"\n },\n {\n \"percentage\": 65,\n \"varietal\": \"Syrah\"\n }\n ],\n \"description\": \"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah\",\n \"name\": \"Blue\\'s Cuvee\",\n \"rating\": 2,\n \"vintage\": 2009,\n \"winery\": {\n \"country\": \"USA\",\n \"name\": \"Longoria\",\n \"region\": \"Central Coast, California\",\n \"url\": \"http://www.longoriawine.com/\"\n }\n },\n {\n \"composition\": [\n {\n \"percentage\": 65,\n \"varietal\": \"Syrah\"\n },\n {\n \"percentage\": 65,\n \"varietal\": \"Syrah\"\n },\n {\n \"percentage\": 65,\n \"varietal\": \"Syrah\"\n }\n ],\n \"description\": \"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah\",\n \"name\": \"Blue\\'s Cuvee\",\n \"rating\": 2,\n \"vintage\": 2009,\n \"winery\": {\n \"country\": \"USA\",\n \"name\": \"Longoria\",\n \"region\": \"Central Coast, California\",\n \"url\": \"http://www.longoriawine.com/\"\n }\n }\n ]'") + return nil, fmt.Errorf("invalid JSON for body, \nerror: %s, \nexample of valid JSON:\n%s", err, "'[\n {\n \"composition\": [\n {\n \"percentage\": 8,\n \"varietal\": \"Syrah\"\n },\n {\n \"percentage\": 8,\n \"varietal\": \"Syrah\"\n },\n {\n \"percentage\": 8,\n \"varietal\": \"Syrah\"\n }\n ],\n \"description\": \"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah\",\n \"name\": \"Blue\\'s Cuvee\",\n \"rating\": 3,\n \"vintage\": 2003,\n \"winery\": {\n \"country\": \"USA\",\n \"name\": \"Longoria\",\n \"region\": \"Central Coast, California\",\n \"url\": \"http://www.longoriawine.com/\"\n }\n },\n {\n \"composition\": [\n {\n \"percentage\": 8,\n \"varietal\": \"Syrah\"\n },\n {\n \"percentage\": 8,\n \"varietal\": \"Syrah\"\n },\n {\n \"percentage\": 8,\n \"varietal\": \"Syrah\"\n }\n ],\n \"description\": \"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah\",\n \"name\": \"Blue\\'s Cuvee\",\n \"rating\": 3,\n \"vintage\": 2003,\n \"winery\": {\n \"country\": \"USA\",\n \"name\": \"Longoria\",\n \"region\": \"Central Coast, California\",\n \"url\": \"http://www.longoriawine.com/\"\n }\n }\n ]'") } } v := make([]*storage.Bottle, len(body)) @@ -162,14 +160,14 @@ func BuildMultiUpdatePayload(storageMultiUpdateBody string, storageMultiUpdateId { err = json.Unmarshal([]byte(storageMultiUpdateBody), &body) if err != nil { - return nil, fmt.Errorf("invalid JSON for body, \nerror: %s, \nexample of valid JSON:\n%s", err, "'{\n \"bottles\": [\n {\n \"composition\": [\n {\n \"percentage\": 65,\n \"varietal\": \"Syrah\"\n },\n {\n \"percentage\": 65,\n \"varietal\": \"Syrah\"\n },\n {\n \"percentage\": 65,\n \"varietal\": \"Syrah\"\n }\n ],\n \"description\": \"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah\",\n \"name\": \"Blue\\'s Cuvee\",\n \"rating\": 2,\n \"vintage\": 2009,\n \"winery\": {\n \"country\": \"USA\",\n \"name\": \"Longoria\",\n \"region\": \"Central Coast, California\",\n \"url\": \"http://www.longoriawine.com/\"\n }\n },\n {\n \"composition\": [\n {\n \"percentage\": 65,\n \"varietal\": \"Syrah\"\n },\n {\n \"percentage\": 65,\n \"varietal\": \"Syrah\"\n },\n {\n \"percentage\": 65,\n \"varietal\": \"Syrah\"\n }\n ],\n \"description\": \"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah\",\n \"name\": \"Blue\\'s Cuvee\",\n \"rating\": 2,\n \"vintage\": 2009,\n \"winery\": {\n \"country\": \"USA\",\n \"name\": \"Longoria\",\n \"region\": \"Central Coast, California\",\n \"url\": \"http://www.longoriawine.com/\"\n }\n },\n {\n \"composition\": [\n {\n \"percentage\": 65,\n \"varietal\": \"Syrah\"\n },\n {\n \"percentage\": 65,\n \"varietal\": \"Syrah\"\n },\n {\n \"percentage\": 65,\n \"varietal\": \"Syrah\"\n }\n ],\n \"description\": \"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah\",\n \"name\": \"Blue\\'s Cuvee\",\n \"rating\": 2,\n \"vintage\": 2009,\n \"winery\": {\n \"country\": \"USA\",\n \"name\": \"Longoria\",\n \"region\": \"Central Coast, California\",\n \"url\": \"http://www.longoriawine.com/\"\n }\n }\n ]\n }'") + return nil, fmt.Errorf("invalid JSON for body, \nerror: %s, \nexample of valid JSON:\n%s", err, "'{\n \"bottles\": [\n {\n \"composition\": [\n {\n \"percentage\": 8,\n \"varietal\": \"Syrah\"\n },\n {\n \"percentage\": 8,\n \"varietal\": \"Syrah\"\n },\n {\n \"percentage\": 8,\n \"varietal\": \"Syrah\"\n }\n ],\n \"description\": \"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah\",\n \"name\": \"Blue\\'s Cuvee\",\n \"rating\": 3,\n \"vintage\": 2003,\n \"winery\": {\n \"country\": \"USA\",\n \"name\": \"Longoria\",\n \"region\": \"Central Coast, California\",\n \"url\": \"http://www.longoriawine.com/\"\n }\n },\n {\n \"composition\": [\n {\n \"percentage\": 8,\n \"varietal\": \"Syrah\"\n },\n {\n \"percentage\": 8,\n \"varietal\": \"Syrah\"\n },\n {\n \"percentage\": 8,\n \"varietal\": \"Syrah\"\n }\n ],\n \"description\": \"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah\",\n \"name\": \"Blue\\'s Cuvee\",\n \"rating\": 3,\n \"vintage\": 2003,\n \"winery\": {\n \"country\": \"USA\",\n \"name\": \"Longoria\",\n \"region\": \"Central Coast, California\",\n \"url\": \"http://www.longoriawine.com/\"\n }\n },\n {\n \"composition\": [\n {\n \"percentage\": 8,\n \"varietal\": \"Syrah\"\n },\n {\n \"percentage\": 8,\n \"varietal\": \"Syrah\"\n },\n {\n \"percentage\": 8,\n \"varietal\": \"Syrah\"\n }\n ],\n \"description\": \"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah\",\n \"name\": \"Blue\\'s Cuvee\",\n \"rating\": 3,\n \"vintage\": 2003,\n \"winery\": {\n \"country\": \"USA\",\n \"name\": \"Longoria\",\n \"region\": \"Central Coast, California\",\n \"url\": \"http://www.longoriawine.com/\"\n }\n }\n ]\n }'") } if body.Bottles == nil { err = goa.MergeErrors(err, goa.MissingFieldError("bottles", "body")) } for _, e := range body.Bottles { if e != nil { - if err2 := ValidateBottleRequestBody(e); err2 != nil { + if err2 := validateBottleRequestBody(e, "body.bottles[*]"); err2 != nil { err = goa.MergeErrors(err, err2) } } @@ -182,7 +180,7 @@ func BuildMultiUpdatePayload(storageMultiUpdateBody string, storageMultiUpdateId { err = json.Unmarshal([]byte(storageMultiUpdateIds), &ids) if err != nil { - return nil, fmt.Errorf("invalid JSON for ids, \nerror: %s, \nexample of valid JSON:\n%s", err, "'[\n \"Ut non voluptatem.\",\n \"Officia tenetur rerum possimus voluptates.\"\n ]'") + return nil, fmt.Errorf("invalid JSON for ids, \nerror: %s, \nexample of valid JSON:\n%s", err, "'[\n \"Deserunt itaque omnis necessitatibus enim aspernatur.\",\n \"Tempore in voluptate asperiores.\",\n \"Incidunt quia ut eius quibusdam rerum.\",\n \"Consequatur architecto ratione.\"\n ]'") } } v := &storage.MultiUpdatePayload{} diff --git a/cellar/gen/http/storage/client/encode_decode.go b/cellar/gen/http/storage/client/encode_decode.go index 52e35fa2c..2bff2e8a6 100644 --- a/cellar/gen/http/storage/client/encode_decode.go +++ b/cellar/gen/http/storage/client/encode_decode.go @@ -10,6 +10,7 @@ package client import ( "bytes" "context" + "errors" "io" "mime/multipart" "net/http" @@ -40,18 +41,24 @@ func (c *Client) BuildListRequest(ctx context.Context, v any) (*http.Request, er // list endpoint. restoreBody controls whether the response body should be // restored after having been read. func DecodeListResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (any, error) { - return func(resp *http.Response) (any, error) { + return func(resp *http.Response) (result any, decodeErr error) { + responseBody := resp.Body if restoreBody { - b, err := io.ReadAll(resp.Body) - if err != nil { - return nil, err + b, readErr := io.ReadAll(responseBody) + closeErr := responseBody.Close() + if err := errors.Join(readErr, closeErr); err != nil { + return nil, goahttp.ErrDecodingError("storage", "list", err) } resp.Body = io.NopCloser(bytes.NewBuffer(b)) defer func() { resp.Body = io.NopCloser(bytes.NewBuffer(b)) }() } else { - defer resp.Body.Close() + defer func() { + if err := responseBody.Close(); err != nil { + decodeErr = errors.Join(decodeErr, goahttp.ErrDecodingError("storage", "list", err)) + } + }() } switch resp.StatusCode { case http.StatusOK: @@ -72,7 +79,10 @@ func DecodeListResponse(decoder func(*http.Response) goahttp.Decoder, restoreBod res := storage.NewStoredBottleCollection(vres) return res, nil default: - body, _ := io.ReadAll(resp.Body) + body, err := io.ReadAll(resp.Body) + if err != nil { + return nil, goahttp.ErrDecodingError("storage", "list", err) + } return nil, goahttp.ErrInvalidResponse("storage", "list", resp.StatusCode, string(body)) } } @@ -127,18 +137,24 @@ func EncodeShowRequest(encoder func(*http.Request) goahttp.Encoder) func(*http.R // - "not_found" (type *storage.NotFound): http.StatusNotFound // - error: internal error func DecodeShowResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (any, error) { - return func(resp *http.Response) (any, error) { + return func(resp *http.Response) (result any, decodeErr error) { + responseBody := resp.Body if restoreBody { - b, err := io.ReadAll(resp.Body) - if err != nil { - return nil, err + b, readErr := io.ReadAll(responseBody) + closeErr := responseBody.Close() + if err := errors.Join(readErr, closeErr); err != nil { + return nil, goahttp.ErrDecodingError("storage", "show", err) } resp.Body = io.NopCloser(bytes.NewBuffer(b)) defer func() { resp.Body = io.NopCloser(bytes.NewBuffer(b)) }() } else { - defer resp.Body.Close() + defer func() { + if err := responseBody.Close(); err != nil { + decodeErr = errors.Join(decodeErr, goahttp.ErrDecodingError("storage", "show", err)) + } + }() } switch resp.StatusCode { case http.StatusOK: @@ -173,7 +189,10 @@ func DecodeShowResponse(decoder func(*http.Response) goahttp.Decoder, restoreBod } return nil, NewShowNotFound(&body) default: - body, _ := io.ReadAll(resp.Body) + body, err := io.ReadAll(resp.Body) + if err != nil { + return nil, goahttp.ErrDecodingError("storage", "show", err) + } return nil, goahttp.ErrInvalidResponse("storage", "show", resp.StatusCode, string(body)) } } @@ -214,18 +233,24 @@ func EncodeAddRequest(encoder func(*http.Request) goahttp.Encoder) func(*http.Re // add endpoint. restoreBody controls whether the response body should be // restored after having been read. func DecodeAddResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (any, error) { - return func(resp *http.Response) (any, error) { + return func(resp *http.Response) (result any, decodeErr error) { + responseBody := resp.Body if restoreBody { - b, err := io.ReadAll(resp.Body) - if err != nil { - return nil, err + b, readErr := io.ReadAll(responseBody) + closeErr := responseBody.Close() + if err := errors.Join(readErr, closeErr); err != nil { + return nil, goahttp.ErrDecodingError("storage", "add", err) } resp.Body = io.NopCloser(bytes.NewBuffer(b)) defer func() { resp.Body = io.NopCloser(bytes.NewBuffer(b)) }() } else { - defer resp.Body.Close() + defer func() { + if err := responseBody.Close(); err != nil { + decodeErr = errors.Join(decodeErr, goahttp.ErrDecodingError("storage", "add", err)) + } + }() } switch resp.StatusCode { case http.StatusCreated: @@ -239,7 +264,10 @@ func DecodeAddResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody } return body, nil default: - body, _ := io.ReadAll(resp.Body) + body, err := io.ReadAll(resp.Body) + if err != nil { + return nil, goahttp.ErrDecodingError("storage", "add", err) + } return nil, goahttp.ErrInvalidResponse("storage", "add", resp.StatusCode, string(body)) } } @@ -274,24 +302,33 @@ func (c *Client) BuildRemoveRequest(ctx context.Context, v any) (*http.Request, // remove endpoint. restoreBody controls whether the response body should be // restored after having been read. func DecodeRemoveResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (any, error) { - return func(resp *http.Response) (any, error) { + return func(resp *http.Response) (result any, decodeErr error) { + responseBody := resp.Body if restoreBody { - b, err := io.ReadAll(resp.Body) - if err != nil { - return nil, err + b, readErr := io.ReadAll(responseBody) + closeErr := responseBody.Close() + if err := errors.Join(readErr, closeErr); err != nil { + return nil, goahttp.ErrDecodingError("storage", "remove", err) } resp.Body = io.NopCloser(bytes.NewBuffer(b)) defer func() { resp.Body = io.NopCloser(bytes.NewBuffer(b)) }() } else { - defer resp.Body.Close() + defer func() { + if err := responseBody.Close(); err != nil { + decodeErr = errors.Join(decodeErr, goahttp.ErrDecodingError("storage", "remove", err)) + } + }() } switch resp.StatusCode { case http.StatusNoContent: return nil, nil default: - body, _ := io.ReadAll(resp.Body) + body, err := io.ReadAll(resp.Body) + if err != nil { + return nil, goahttp.ErrDecodingError("storage", "remove", err) + } return nil, goahttp.ErrInvalidResponse("storage", "remove", resp.StatusCode, string(body)) } } @@ -337,24 +374,33 @@ func EncodeRateRequest(encoder func(*http.Request) goahttp.Encoder) func(*http.R // rate endpoint. restoreBody controls whether the response body should be // restored after having been read. func DecodeRateResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (any, error) { - return func(resp *http.Response) (any, error) { + return func(resp *http.Response) (result any, decodeErr error) { + responseBody := resp.Body if restoreBody { - b, err := io.ReadAll(resp.Body) - if err != nil { - return nil, err + b, readErr := io.ReadAll(responseBody) + closeErr := responseBody.Close() + if err := errors.Join(readErr, closeErr); err != nil { + return nil, goahttp.ErrDecodingError("storage", "rate", err) } resp.Body = io.NopCloser(bytes.NewBuffer(b)) defer func() { resp.Body = io.NopCloser(bytes.NewBuffer(b)) }() } else { - defer resp.Body.Close() + defer func() { + if err := responseBody.Close(); err != nil { + decodeErr = errors.Join(decodeErr, goahttp.ErrDecodingError("storage", "rate", err)) + } + }() } switch resp.StatusCode { case http.StatusOK: return nil, nil default: - body, _ := io.ReadAll(resp.Body) + body, err := io.ReadAll(resp.Body) + if err != nil { + return nil, goahttp.ErrDecodingError("storage", "rate", err) + } return nil, goahttp.ErrInvalidResponse("storage", "rate", resp.StatusCode, string(body)) } } @@ -412,18 +458,24 @@ func NewStorageMultiAddEncoder(encoderFn StorageMultiAddEncoderFunc) func(r *htt // storage multi_add endpoint. restoreBody controls whether the response body // should be restored after having been read. func DecodeMultiAddResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (any, error) { - return func(resp *http.Response) (any, error) { + return func(resp *http.Response) (result any, decodeErr error) { + responseBody := resp.Body if restoreBody { - b, err := io.ReadAll(resp.Body) - if err != nil { - return nil, err + b, readErr := io.ReadAll(responseBody) + closeErr := responseBody.Close() + if err := errors.Join(readErr, closeErr); err != nil { + return nil, goahttp.ErrDecodingError("storage", "multi_add", err) } resp.Body = io.NopCloser(bytes.NewBuffer(b)) defer func() { resp.Body = io.NopCloser(bytes.NewBuffer(b)) }() } else { - defer resp.Body.Close() + defer func() { + if err := responseBody.Close(); err != nil { + decodeErr = errors.Join(decodeErr, goahttp.ErrDecodingError("storage", "multi_add", err)) + } + }() } switch resp.StatusCode { case http.StatusOK: @@ -437,7 +489,10 @@ func DecodeMultiAddResponse(decoder func(*http.Response) goahttp.Decoder, restor } return body, nil default: - body, _ := io.ReadAll(resp.Body) + body, err := io.ReadAll(resp.Body) + if err != nil { + return nil, goahttp.ErrDecodingError("storage", "multi_add", err) + } return nil, goahttp.ErrInvalidResponse("storage", "multi_add", resp.StatusCode, string(body)) } } @@ -500,24 +555,33 @@ func NewStorageMultiUpdateEncoder(encoderFn StorageMultiUpdateEncoderFunc) func( // storage multi_update endpoint. restoreBody controls whether the response // body should be restored after having been read. func DecodeMultiUpdateResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (any, error) { - return func(resp *http.Response) (any, error) { + return func(resp *http.Response) (result any, decodeErr error) { + responseBody := resp.Body if restoreBody { - b, err := io.ReadAll(resp.Body) - if err != nil { - return nil, err + b, readErr := io.ReadAll(responseBody) + closeErr := responseBody.Close() + if err := errors.Join(readErr, closeErr); err != nil { + return nil, goahttp.ErrDecodingError("storage", "multi_update", err) } resp.Body = io.NopCloser(bytes.NewBuffer(b)) defer func() { resp.Body = io.NopCloser(bytes.NewBuffer(b)) }() } else { - defer resp.Body.Close() + defer func() { + if err := responseBody.Close(); err != nil { + decodeErr = errors.Join(decodeErr, goahttp.ErrDecodingError("storage", "multi_update", err)) + } + }() } switch resp.StatusCode { case http.StatusNoContent: return nil, nil default: - body, _ := io.ReadAll(resp.Body) + body, err := io.ReadAll(resp.Body) + if err != nil { + return nil, goahttp.ErrDecodingError("storage", "multi_update", err) + } return nil, goahttp.ErrInvalidResponse("storage", "multi_update", resp.StatusCode, string(body)) } } @@ -559,9 +623,10 @@ func unmarshalWineryResponseBodyToStorageviewsWineryView(v *WineryResponseBody) return res } -// unmarshalComponentResponseBodyToStorageviewsComponentView builds a value of -// type *storageviews.ComponentView from a value of type *ComponentResponseBody. -func unmarshalComponentResponseBodyToStorageviewsComponentView(v *ComponentResponseBody) *storageviews.ComponentView { +// unmarshalComponentResponseBodyToStorageviewsComponentViewOptional builds a +// value of type *storageviews.ComponentView from a value of type +// *ComponentResponseBody. +func unmarshalComponentResponseBodyToStorageviewsComponentViewOptional(v *ComponentResponseBody) *storageviews.ComponentView { if v == nil { return nil } @@ -586,9 +651,9 @@ func marshalStorageWineryToWineryRequestBody(v *storage.Winery) *WineryRequestBo return res } -// marshalStorageComponentToComponentRequestBody builds a value of type +// marshalStorageComponentToComponentRequestBodyOptional builds a value of type // *ComponentRequestBody from a value of type *storage.Component. -func marshalStorageComponentToComponentRequestBody(v *storage.Component) *ComponentRequestBody { +func marshalStorageComponentToComponentRequestBodyOptional(v *storage.Component) *ComponentRequestBody { if v == nil { return nil } @@ -613,9 +678,9 @@ func marshalWineryRequestBodyToStorageWinery(v *WineryRequestBody) *storage.Wine return res } -// marshalComponentRequestBodyToStorageComponent builds a value of type +// marshalComponentRequestBodyToStorageComponentOptional builds a value of type // *storage.Component from a value of type *ComponentRequestBody. -func marshalComponentRequestBodyToStorageComponent(v *ComponentRequestBody) *storage.Component { +func marshalComponentRequestBodyToStorageComponentOptional(v *ComponentRequestBody) *storage.Component { if v == nil { return nil } @@ -646,7 +711,7 @@ func marshalStorageBottleToBottleRequestBody(v *storage.Bottle) *BottleRequestBo res.Composition[i] = nil continue } - res.Composition[i] = marshalStorageComponentToComponentRequestBody(val) + res.Composition[i] = marshalStorageComponentToComponentRequestBodyOptional(val) } } @@ -672,7 +737,7 @@ func marshalBottleRequestBodyToStorageBottle(v *BottleRequestBody) *storage.Bott res.Composition[i] = nil continue } - res.Composition[i] = marshalComponentRequestBodyToStorageComponent(val) + res.Composition[i] = marshalComponentRequestBodyToStorageComponentOptional(val) } } diff --git a/cellar/gen/http/storage/client/types.go b/cellar/gen/http/storage/client/types.go index d14f313bf..608f61ed8 100644 --- a/cellar/gen/http/storage/client/types.go +++ b/cellar/gen/http/storage/client/types.go @@ -162,7 +162,7 @@ func NewAddRequestBody(p *storage.Bottle) *AddRequestBody { body.Composition[i] = nil continue } - body.Composition[i] = marshalStorageComponentToComponentRequestBody(val) + body.Composition[i] = marshalStorageComponentToComponentRequestBodyOptional(val) } } return body @@ -234,7 +234,7 @@ func NewShowStoredBottleOK(body *ShowResponseBody) *storageviews.StoredBottleVie v.Composition[i] = nil continue } - v.Composition[i] = unmarshalComponentResponseBodyToStorageviewsComponentView(val) + v.Composition[i] = unmarshalComponentResponseBodyToStorageviewsComponentViewOptional(val) } } @@ -252,7 +252,7 @@ func NewShowNotFound(body *ShowNotFoundResponseBody) *storage.NotFound { } // ValidateShowNotFoundResponseBody runs the validations defined on -// show_not_found_response_body +// ShowNotFoundResponseBody func ValidateShowNotFoundResponseBody(body *ShowNotFoundResponseBody) (err error) { if body.Message == nil { err = goa.MergeErrors(err, goa.MissingFieldError("message", "body")) @@ -264,7 +264,7 @@ func ValidateShowNotFoundResponseBody(body *ShowNotFoundResponseBody) (err error } // ValidateStoredBottleResponseTiny runs the validations defined on -// StoredBottleResponseTiny +// StoredBottleTiny func ValidateStoredBottleResponseTiny(body *StoredBottleResponseTiny) (err error) { if body.ID == nil { err = goa.MergeErrors(err, goa.MissingFieldError("id", "body")) @@ -281,14 +281,14 @@ func ValidateStoredBottleResponseTiny(body *StoredBottleResponseTiny) (err error } } if body.Winery != nil { - if err2 := ValidateWineryResponseTiny(body.Winery); err2 != nil { + if err2 := validateWineryResponseTiny(body.Winery, "body.winery"); err2 != nil { err = goa.MergeErrors(err, err2) } } return } -// ValidateWineryResponseTiny runs the validations defined on WineryResponseTiny +// ValidateWineryResponseTiny runs the validations defined on WineryTiny func ValidateWineryResponseTiny(body *WineryResponseTiny) (err error) { if body.Name == nil { err = goa.MergeErrors(err, goa.MissingFieldError("name", "body")) @@ -296,7 +296,16 @@ func ValidateWineryResponseTiny(body *WineryResponseTiny) (err error) { return } -// ValidateWineryResponseBody runs the validations defined on WineryResponseBody +// validateWineryResponseTiny checks WineryTiny and reports errors using the +// path supplied by its caller +func validateWineryResponseTiny(body *WineryResponseTiny, path string) (err error) { + if body.Name == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("name", path)) + } + return +} + +// ValidateWineryResponseBody runs the validations defined on Winery func ValidateWineryResponseBody(body *WineryResponseBody) (err error) { if body.Name == nil { err = goa.MergeErrors(err, goa.MissingFieldError("name", "body")) @@ -319,16 +328,13 @@ func ValidateWineryResponseBody(body *WineryResponseBody) (err error) { return } -// ValidateComponentResponseBody runs the validations defined on -// ComponentResponseBody +// ValidateComponentResponseBody runs the validations defined on Component func ValidateComponentResponseBody(body *ComponentResponseBody) (err error) { if body.Varietal == nil { err = goa.MergeErrors(err, goa.MissingFieldError("varietal", "body")) } if body.Varietal != nil { err = goa.MergeErrors(err, goa.ValidatePattern("body.varietal", *body.Varietal, "[A-Za-z' ]+")) - } - if body.Varietal != nil { if utf8.RuneCountInString(*body.Varietal) > 100 { err = goa.MergeErrors(err, goa.InvalidLengthError("body.varietal", *body.Varietal, utf8.RuneCountInString(*body.Varietal), 100, false)) } @@ -337,8 +343,6 @@ func ValidateComponentResponseBody(body *ComponentResponseBody) (err error) { if *body.Percentage < 1 { err = goa.MergeErrors(err, goa.InvalidRangeError("body.percentage", *body.Percentage, 1, true)) } - } - if body.Percentage != nil { if *body.Percentage > 100 { err = goa.MergeErrors(err, goa.InvalidRangeError("body.percentage", *body.Percentage, 100, false)) } @@ -346,7 +350,7 @@ func ValidateComponentResponseBody(body *ComponentResponseBody) (err error) { return } -// ValidateWineryRequestBody runs the validations defined on WineryRequestBody +// ValidateWineryRequestBody runs the validations defined on Winery func ValidateWineryRequestBody(body *WineryRequestBody) (err error) { err = goa.MergeErrors(err, goa.ValidatePattern("body.region", body.Region, "[a-zA-Z '\\.]+")) err = goa.MergeErrors(err, goa.ValidatePattern("body.country", body.Country, "[a-zA-Z '\\.]+")) @@ -356,8 +360,18 @@ func ValidateWineryRequestBody(body *WineryRequestBody) (err error) { return } -// ValidateComponentRequestBody runs the validations defined on -// ComponentRequestBody +// validateWineryRequestBody checks Winery and reports errors using the path +// supplied by its caller +func validateWineryRequestBody(body *WineryRequestBody, path string) (err error) { + err = goa.MergeErrors(err, goa.ValidatePattern(path+".region", body.Region, "[a-zA-Z '\\.]+")) + err = goa.MergeErrors(err, goa.ValidatePattern(path+".country", body.Country, "[a-zA-Z '\\.]+")) + if body.URL != nil { + err = goa.MergeErrors(err, goa.ValidatePattern(path+".url", *body.URL, "^(https?|ftp)://[^\\s/$.?#].[^\\s]*$")) + } + return +} + +// ValidateComponentRequestBody runs the validations defined on Component func ValidateComponentRequestBody(body *ComponentRequestBody) (err error) { err = goa.MergeErrors(err, goa.ValidatePattern("body.varietal", body.Varietal, "[A-Za-z' ]+")) if utf8.RuneCountInString(body.Varietal) > 100 { @@ -367,16 +381,32 @@ func ValidateComponentRequestBody(body *ComponentRequestBody) (err error) { if *body.Percentage < 1 { err = goa.MergeErrors(err, goa.InvalidRangeError("body.percentage", *body.Percentage, 1, true)) } + if *body.Percentage > 100 { + err = goa.MergeErrors(err, goa.InvalidRangeError("body.percentage", *body.Percentage, 100, false)) + } + } + return +} + +// validateComponentRequestBody checks Component and reports errors using the +// path supplied by its caller +func validateComponentRequestBody(body *ComponentRequestBody, path string) (err error) { + err = goa.MergeErrors(err, goa.ValidatePattern(path+".varietal", body.Varietal, "[A-Za-z' ]+")) + if utf8.RuneCountInString(body.Varietal) > 100 { + err = goa.MergeErrors(err, goa.InvalidLengthError(path+".varietal", body.Varietal, utf8.RuneCountInString(body.Varietal), 100, false)) } if body.Percentage != nil { + if *body.Percentage < 1 { + err = goa.MergeErrors(err, goa.InvalidRangeError(path+".percentage", *body.Percentage, 1, true)) + } if *body.Percentage > 100 { - err = goa.MergeErrors(err, goa.InvalidRangeError("body.percentage", *body.Percentage, 100, false)) + err = goa.MergeErrors(err, goa.InvalidRangeError(path+".percentage", *body.Percentage, 100, false)) } } return } -// ValidateBottleRequestBody runs the validations defined on BottleRequestBody +// ValidateBottleRequestBody runs the validations defined on Bottle func ValidateBottleRequestBody(body *BottleRequestBody) (err error) { if body.Winery == nil { err = goa.MergeErrors(err, goa.MissingFieldError("winery", "body")) @@ -385,7 +415,7 @@ func ValidateBottleRequestBody(body *BottleRequestBody) (err error) { err = goa.MergeErrors(err, goa.InvalidLengthError("body.name", body.Name, utf8.RuneCountInString(body.Name), 100, false)) } if body.Winery != nil { - if err2 := ValidateWineryRequestBody(body.Winery); err2 != nil { + if err2 := validateWineryRequestBody(body.Winery, "body.winery"); err2 != nil { err = goa.MergeErrors(err, err2) } } @@ -397,7 +427,7 @@ func ValidateBottleRequestBody(body *BottleRequestBody) (err error) { } for _, e := range body.Composition { if e != nil { - if err2 := ValidateComponentRequestBody(e); err2 != nil { + if err2 := validateComponentRequestBody(e, "body.composition[*]"); err2 != nil { err = goa.MergeErrors(err, err2) } } @@ -411,10 +441,51 @@ func ValidateBottleRequestBody(body *BottleRequestBody) (err error) { if *body.Rating < 1 { err = goa.MergeErrors(err, goa.InvalidRangeError("body.rating", *body.Rating, 1, true)) } + if *body.Rating > 5 { + err = goa.MergeErrors(err, goa.InvalidRangeError("body.rating", *body.Rating, 5, false)) + } + } + return +} + +// validateBottleRequestBody checks Bottle and reports errors using the path +// supplied by its caller +func validateBottleRequestBody(body *BottleRequestBody, path string) (err error) { + if body.Winery == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("winery", path)) + } + if utf8.RuneCountInString(body.Name) > 100 { + err = goa.MergeErrors(err, goa.InvalidLengthError(path+".name", body.Name, utf8.RuneCountInString(body.Name), 100, false)) + } + if body.Winery != nil { + if err2 := validateWineryRequestBody(body.Winery, path+".winery"); err2 != nil { + err = goa.MergeErrors(err, err2) + } + } + if body.Vintage < 1900 { + err = goa.MergeErrors(err, goa.InvalidRangeError(path+".vintage", body.Vintage, 1900, true)) + } + if body.Vintage > 2020 { + err = goa.MergeErrors(err, goa.InvalidRangeError(path+".vintage", body.Vintage, 2020, false)) + } + for _, e := range body.Composition { + if e != nil { + if err2 := validateComponentRequestBody(e, path+".composition[*]"); err2 != nil { + err = goa.MergeErrors(err, err2) + } + } + } + if body.Description != nil { + if utf8.RuneCountInString(*body.Description) > 2000 { + err = goa.MergeErrors(err, goa.InvalidLengthError(path+".description", *body.Description, utf8.RuneCountInString(*body.Description), 2000, false)) + } } if body.Rating != nil { + if *body.Rating < 1 { + err = goa.MergeErrors(err, goa.InvalidRangeError(path+".rating", *body.Rating, 1, true)) + } if *body.Rating > 5 { - err = goa.MergeErrors(err, goa.InvalidRangeError("body.rating", *body.Rating, 5, false)) + err = goa.MergeErrors(err, goa.InvalidRangeError(path+".rating", *body.Rating, 5, false)) } } return diff --git a/cellar/gen/http/storage/server/encode_decode.go b/cellar/gen/http/storage/server/encode_decode.go index 8107f8489..c5cfeca0e 100644 --- a/cellar/gen/http/storage/server/encode_decode.go +++ b/cellar/gen/http/storage/server/encode_decode.go @@ -253,13 +253,32 @@ func EncodeMultiAddResponse(encoder func(context.Context, http.ResponseWriter) g func DecodeMultiAddRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder) func(*http.Request) ([]*storage.Bottle, error) { return func(r *http.Request) ([]*storage.Bottle, error) { var payload []*storage.Bottle - if err := decoder(r).Decode(&payload); err != nil { + var ( + body []*BottleRequestBody + err error + ) + err = decoder(r).Decode(&body) + if err != nil { + if errors.Is(err, io.EOF) { + return payload, goa.MissingPayloadError() + } var gerr *goa.ServiceError if errors.As(err, &gerr) { return payload, gerr } return payload, goa.DecodePayloadError(err.Error()) } + for _, e := range body { + if e != nil { + if err2 := validateBottleRequestBody(e, "body[*]"); err2 != nil { + err = goa.MergeErrors(err, err2) + } + } + } + if err != nil { + return payload, err + } + payload = NewMultiAddBottle(body) return payload, nil } @@ -267,15 +286,15 @@ func DecodeMultiAddRequest(mux goahttp.Muxer, decoder func(*http.Request) goahtt // NewStorageMultiAddDecoder returns a decoder to decode the multipart request // for the "storage" service "multi_add" endpoint. -func NewStorageMultiAddDecoder(mux goahttp.Muxer, storageMultiAddDecoderFn StorageMultiAddDecoderFunc) func(r *http.Request) goahttp.Decoder { +func NewStorageMultiAddDecoder(_ goahttp.Muxer, storageMultiAddDecoderFn StorageMultiAddDecoderFunc) func(r *http.Request) goahttp.Decoder { return func(r *http.Request) goahttp.Decoder { return goahttp.EncodingFunc(func(v any) error { mr, merr := r.MultipartReader() if merr != nil { return merr } - p := v.(*[]*storage.Bottle) - if err := storageMultiAddDecoderFn(mr, p); err != nil { + body := v.(*[]*BottleRequestBody) + if err := storageMultiAddDecoderFn(mr, body); err != nil { return err } return nil @@ -297,13 +316,37 @@ func EncodeMultiUpdateResponse(encoder func(context.Context, http.ResponseWriter func DecodeMultiUpdateRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder) func(*http.Request) (*storage.MultiUpdatePayload, error) { return func(r *http.Request) (*storage.MultiUpdatePayload, error) { var payload *storage.MultiUpdatePayload - if err := decoder(r).Decode(&payload); err != nil { + var ( + body MultiUpdateRequestBody + err error + ) + err = decoder(r).Decode(&body) + if err != nil { + if errors.Is(err, io.EOF) { + return payload, goa.MissingPayloadError() + } var gerr *goa.ServiceError if errors.As(err, &gerr) { return payload, gerr } return payload, goa.DecodePayloadError(err.Error()) } + err = ValidateMultiUpdateRequestBody(&body) + if err != nil { + return payload, err + } + + var ( + ids []string + ) + ids = r.URL.Query()["ids"] + if ids == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("ids", "query string")) + } + if err != nil { + return payload, err + } + payload = NewMultiUpdatePayload(&body, ids) return payload, nil } @@ -311,30 +354,17 @@ func DecodeMultiUpdateRequest(mux goahttp.Muxer, decoder func(*http.Request) goa // NewStorageMultiUpdateDecoder returns a decoder to decode the multipart // request for the "storage" service "multi_update" endpoint. -func NewStorageMultiUpdateDecoder(mux goahttp.Muxer, storageMultiUpdateDecoderFn StorageMultiUpdateDecoderFunc) func(r *http.Request) goahttp.Decoder { +func NewStorageMultiUpdateDecoder(_ goahttp.Muxer, storageMultiUpdateDecoderFn StorageMultiUpdateDecoderFunc) func(r *http.Request) goahttp.Decoder { return func(r *http.Request) goahttp.Decoder { return goahttp.EncodingFunc(func(v any) error { mr, merr := r.MultipartReader() if merr != nil { return merr } - p := v.(**storage.MultiUpdatePayload) - if err := storageMultiUpdateDecoderFn(mr, p); err != nil { + body := v.(*MultiUpdateRequestBody) + if err := storageMultiUpdateDecoderFn(mr, body); err != nil { return err } - - var ( - ids []string - err error - ) - ids = r.URL.Query()["ids"] - if ids == nil { - err = goa.MergeErrors(err, goa.MissingFieldError("ids", "query string")) - } - if err != nil { - return err - } - (*p).Ids = ids return nil }) } @@ -349,35 +379,26 @@ func marshalStorageviewsStoredBottleViewToStoredBottleResponseTiny(v *storagevie Name: *v.Name, } if v.Winery != nil { - res.Winery = marshalStorageviewsWineryViewToWineryResponseTiny(v.Winery) - } - - return res -} - -// marshalStorageviewsWineryViewToWineryResponseTiny builds a value of type -// *WineryResponseTiny from a value of type *storageviews.WineryView. -func marshalStorageviewsWineryViewToWineryResponseTiny(v *storageviews.WineryView) *WineryResponseTiny { - res := &WineryResponseTiny{ - Name: *v.Name, + res.Winery = marshalStorageviewsWineryViewToWineryTiny(v.Winery) } return res } -// marshalStorageviewsWineryViewToWineryResponseBodyTiny builds a value of type -// *WineryResponseBodyTiny from a value of type *storageviews.WineryView. -func marshalStorageviewsWineryViewToWineryResponseBodyTiny(v *storageviews.WineryView) *WineryResponseBodyTiny { - res := &WineryResponseBodyTiny{ +// marshalStorageviewsWineryViewToWineryTiny builds a value of type *WineryTiny +// from a value of type *storageviews.WineryView. +func marshalStorageviewsWineryViewToWineryTiny(v *storageviews.WineryView) *WineryTiny { + res := &WineryTiny{ Name: *v.Name, } return res } -// marshalStorageviewsComponentViewToComponentResponseBody builds a value of -// type *ComponentResponseBody from a value of type *storageviews.ComponentView. -func marshalStorageviewsComponentViewToComponentResponseBody(v *storageviews.ComponentView) *ComponentResponseBody { +// marshalStorageviewsComponentViewToComponentResponseBodyOptional builds a +// value of type *ComponentResponseBody from a value of type +// *storageviews.ComponentView. +func marshalStorageviewsComponentViewToComponentResponseBodyOptional(v *storageviews.ComponentView) *ComponentResponseBody { if v == nil { return nil } @@ -402,9 +423,9 @@ func unmarshalWineryRequestBodyToStorageWinery(v *WineryRequestBody) *storage.Wi return res } -// unmarshalComponentRequestBodyToStorageComponent builds a value of type -// *storage.Component from a value of type *ComponentRequestBody. -func unmarshalComponentRequestBodyToStorageComponent(v *ComponentRequestBody) *storage.Component { +// unmarshalComponentRequestBodyToStorageComponentOptional builds a value of +// type *storage.Component from a value of type *ComponentRequestBody. +func unmarshalComponentRequestBodyToStorageComponentOptional(v *ComponentRequestBody) *storage.Component { if v == nil { return nil } @@ -433,7 +454,7 @@ func unmarshalBottleRequestBodyToStorageBottle(v *BottleRequestBody) *storage.Bo res.Composition[i] = nil continue } - res.Composition[i] = unmarshalComponentRequestBodyToStorageComponent(val) + res.Composition[i] = unmarshalComponentRequestBodyToStorageComponentOptional(val) } } diff --git a/cellar/gen/http/storage/server/server.go b/cellar/gen/http/storage/server/server.go index acb253206..84cf465f0 100644 --- a/cellar/gen/http/storage/server/server.go +++ b/cellar/gen/http/storage/server/server.go @@ -42,11 +42,11 @@ type MountPoint struct { // StorageMultiAddDecoderFunc is the type to decode multipart request for the // "storage" service "multi_add" endpoint. -type StorageMultiAddDecoderFunc func(*multipart.Reader, *[]*storage.Bottle) error +type StorageMultiAddDecoderFunc func(*multipart.Reader, *[]*BottleRequestBody) error // StorageMultiUpdateDecoderFunc is the type to decode multipart request for // the "storage" service "multi_update" endpoint. -type StorageMultiUpdateDecoderFunc func(*multipart.Reader, **storage.MultiUpdatePayload) error +type StorageMultiUpdateDecoderFunc func(*multipart.Reader, *MultiUpdateRequestBody) error // New instantiates HTTP handlers for all the storage service endpoints using // the provided encoder and decoder. The handlers are mounted on the given mux diff --git a/cellar/gen/http/storage/server/types.go b/cellar/gen/http/storage/server/types.go index 21f2a88d7..e5d34ca42 100644 --- a/cellar/gen/http/storage/server/types.go +++ b/cellar/gen/http/storage/server/types.go @@ -51,7 +51,7 @@ type ShowResponseBody struct { // Name of bottle Name string `form:"name" json:"name" xml:"name"` // Winery that produces wine - Winery *WineryResponseBodyTiny `form:"winery" json:"winery" xml:"winery"` + Winery *WineryTiny `form:"winery" json:"winery" xml:"winery"` // Vintage of bottle Vintage uint32 `form:"vintage" json:"vintage" xml:"vintage"` // Composition is the list of grape varietals and associated percentage. @@ -70,7 +70,7 @@ type ShowResponseBodyTiny struct { // Name of bottle Name string `form:"name" json:"name" xml:"name"` // Winery that produces wine - Winery *WineryResponseBodyTiny `form:"winery" json:"winery" xml:"winery"` + Winery *WineryTiny `form:"winery" json:"winery" xml:"winery"` } // ShowNotFoundResponseBody is the type of the "storage" service "show" @@ -89,17 +89,11 @@ type StoredBottleResponseTiny struct { // Name of bottle Name string `form:"name" json:"name" xml:"name"` // Winery that produces wine - Winery *WineryResponseTiny `form:"winery" json:"winery" xml:"winery"` + Winery *WineryTiny `form:"winery" json:"winery" xml:"winery"` } -// WineryResponseTiny is used to define fields on response body types. -type WineryResponseTiny struct { - // Name of winery - Name string `form:"name" json:"name" xml:"name"` -} - -// WineryResponseBodyTiny is used to define fields on response body types. -type WineryResponseBodyTiny struct { +// WineryTiny is used to define fields on response body types. +type WineryTiny struct { // Name of winery Name string `form:"name" json:"name" xml:"name"` } @@ -173,7 +167,7 @@ func NewShowResponseBody(res *storageviews.StoredBottleView) *ShowResponseBody { Rating: res.Rating, } if res.Winery != nil { - body.Winery = marshalStorageviewsWineryViewToWineryResponseBodyTiny(res.Winery) + body.Winery = marshalStorageviewsWineryViewToWineryTiny(res.Winery) } if res.Composition != nil { body.Composition = make([]*ComponentResponseBody, len(res.Composition)) @@ -182,7 +176,7 @@ func NewShowResponseBody(res *storageviews.StoredBottleView) *ShowResponseBody { body.Composition[i] = nil continue } - body.Composition[i] = marshalStorageviewsComponentViewToComponentResponseBody(val) + body.Composition[i] = marshalStorageviewsComponentViewToComponentResponseBodyOptional(val) } } return body @@ -196,7 +190,7 @@ func NewShowResponseBodyTiny(res *storageviews.StoredBottleView) *ShowResponseBo Name: *res.Name, } if res.Winery != nil { - body.Winery = marshalStorageviewsWineryViewToWineryResponseBodyTiny(res.Winery) + body.Winery = marshalStorageviewsWineryViewToWineryTiny(res.Winery) } return body } @@ -236,7 +230,7 @@ func NewAddBottle(body *AddRequestBody) *storage.Bottle { v.Composition[i] = nil continue } - v.Composition[i] = unmarshalComponentRequestBodyToStorageComponent(val) + v.Composition[i] = unmarshalComponentRequestBodyToStorageComponentOptional(val) } } @@ -297,7 +291,7 @@ func ValidateAddRequestBody(body *AddRequestBody) (err error) { } } if body.Winery != nil { - if err2 := ValidateWineryRequestBody(body.Winery); err2 != nil { + if err2 := validateWineryRequestBody(body.Winery, "body.winery"); err2 != nil { err = goa.MergeErrors(err, err2) } } @@ -305,15 +299,13 @@ func ValidateAddRequestBody(body *AddRequestBody) (err error) { if *body.Vintage < 1900 { err = goa.MergeErrors(err, goa.InvalidRangeError("body.vintage", *body.Vintage, 1900, true)) } - } - if body.Vintage != nil { if *body.Vintage > 2020 { err = goa.MergeErrors(err, goa.InvalidRangeError("body.vintage", *body.Vintage, 2020, false)) } } for _, e := range body.Composition { if e != nil { - if err2 := ValidateComponentRequestBody(e); err2 != nil { + if err2 := validateComponentRequestBody(e, "body.composition[*]"); err2 != nil { err = goa.MergeErrors(err, err2) } } @@ -327,8 +319,6 @@ func ValidateAddRequestBody(body *AddRequestBody) (err error) { if *body.Rating < 1 { err = goa.MergeErrors(err, goa.InvalidRangeError("body.rating", *body.Rating, 1, true)) } - } - if body.Rating != nil { if *body.Rating > 5 { err = goa.MergeErrors(err, goa.InvalidRangeError("body.rating", *body.Rating, 5, false)) } @@ -337,14 +327,14 @@ func ValidateAddRequestBody(body *AddRequestBody) (err error) { } // ValidateMultiUpdateRequestBody runs the validations defined on -// multi_update_request_body +// MultiUpdateRequestBody func ValidateMultiUpdateRequestBody(body *MultiUpdateRequestBody) (err error) { if body.Bottles == nil { err = goa.MergeErrors(err, goa.MissingFieldError("bottles", "body")) } for _, e := range body.Bottles { if e != nil { - if err2 := ValidateBottleRequestBody(e); err2 != nil { + if err2 := validateBottleRequestBody(e, "body.bottles[*]"); err2 != nil { err = goa.MergeErrors(err, err2) } } @@ -352,7 +342,7 @@ func ValidateMultiUpdateRequestBody(body *MultiUpdateRequestBody) (err error) { return } -// ValidateWineryRequestBody runs the validations defined on WineryRequestBody +// ValidateWineryRequestBody runs the validations defined on Winery func ValidateWineryRequestBody(body *WineryRequestBody) (err error) { if body.Name == nil { err = goa.MergeErrors(err, goa.MissingFieldError("name", "body")) @@ -375,16 +365,37 @@ func ValidateWineryRequestBody(body *WineryRequestBody) (err error) { return } -// ValidateComponentRequestBody runs the validations defined on -// ComponentRequestBody +// validateWineryRequestBody checks Winery and reports errors using the path +// supplied by its caller +func validateWineryRequestBody(body *WineryRequestBody, path string) (err error) { + if body.Name == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("name", path)) + } + if body.Region == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("region", path)) + } + if body.Country == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("country", path)) + } + if body.Region != nil { + err = goa.MergeErrors(err, goa.ValidatePattern(path+".region", *body.Region, "[a-zA-Z '\\.]+")) + } + if body.Country != nil { + err = goa.MergeErrors(err, goa.ValidatePattern(path+".country", *body.Country, "[a-zA-Z '\\.]+")) + } + if body.URL != nil { + err = goa.MergeErrors(err, goa.ValidatePattern(path+".url", *body.URL, "^(https?|ftp)://[^\\s/$.?#].[^\\s]*$")) + } + return +} + +// ValidateComponentRequestBody runs the validations defined on Component func ValidateComponentRequestBody(body *ComponentRequestBody) (err error) { if body.Varietal == nil { err = goa.MergeErrors(err, goa.MissingFieldError("varietal", "body")) } if body.Varietal != nil { err = goa.MergeErrors(err, goa.ValidatePattern("body.varietal", *body.Varietal, "[A-Za-z' ]+")) - } - if body.Varietal != nil { if utf8.RuneCountInString(*body.Varietal) > 100 { err = goa.MergeErrors(err, goa.InvalidLengthError("body.varietal", *body.Varietal, utf8.RuneCountInString(*body.Varietal), 100, false)) } @@ -393,16 +404,37 @@ func ValidateComponentRequestBody(body *ComponentRequestBody) (err error) { if *body.Percentage < 1 { err = goa.MergeErrors(err, goa.InvalidRangeError("body.percentage", *body.Percentage, 1, true)) } + if *body.Percentage > 100 { + err = goa.MergeErrors(err, goa.InvalidRangeError("body.percentage", *body.Percentage, 100, false)) + } + } + return +} + +// validateComponentRequestBody checks Component and reports errors using the +// path supplied by its caller +func validateComponentRequestBody(body *ComponentRequestBody, path string) (err error) { + if body.Varietal == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("varietal", path)) + } + if body.Varietal != nil { + err = goa.MergeErrors(err, goa.ValidatePattern(path+".varietal", *body.Varietal, "[A-Za-z' ]+")) + if utf8.RuneCountInString(*body.Varietal) > 100 { + err = goa.MergeErrors(err, goa.InvalidLengthError(path+".varietal", *body.Varietal, utf8.RuneCountInString(*body.Varietal), 100, false)) + } } if body.Percentage != nil { + if *body.Percentage < 1 { + err = goa.MergeErrors(err, goa.InvalidRangeError(path+".percentage", *body.Percentage, 1, true)) + } if *body.Percentage > 100 { - err = goa.MergeErrors(err, goa.InvalidRangeError("body.percentage", *body.Percentage, 100, false)) + err = goa.MergeErrors(err, goa.InvalidRangeError(path+".percentage", *body.Percentage, 100, false)) } } return } -// ValidateBottleRequestBody runs the validations defined on BottleRequestBody +// ValidateBottleRequestBody runs the validations defined on Bottle func ValidateBottleRequestBody(body *BottleRequestBody) (err error) { if body.Name == nil { err = goa.MergeErrors(err, goa.MissingFieldError("name", "body")) @@ -419,7 +451,7 @@ func ValidateBottleRequestBody(body *BottleRequestBody) (err error) { } } if body.Winery != nil { - if err2 := ValidateWineryRequestBody(body.Winery); err2 != nil { + if err2 := validateWineryRequestBody(body.Winery, "body.winery"); err2 != nil { err = goa.MergeErrors(err, err2) } } @@ -427,15 +459,13 @@ func ValidateBottleRequestBody(body *BottleRequestBody) (err error) { if *body.Vintage < 1900 { err = goa.MergeErrors(err, goa.InvalidRangeError("body.vintage", *body.Vintage, 1900, true)) } - } - if body.Vintage != nil { if *body.Vintage > 2020 { err = goa.MergeErrors(err, goa.InvalidRangeError("body.vintage", *body.Vintage, 2020, false)) } } for _, e := range body.Composition { if e != nil { - if err2 := ValidateComponentRequestBody(e); err2 != nil { + if err2 := validateComponentRequestBody(e, "body.composition[*]"); err2 != nil { err = goa.MergeErrors(err, err2) } } @@ -449,10 +479,61 @@ func ValidateBottleRequestBody(body *BottleRequestBody) (err error) { if *body.Rating < 1 { err = goa.MergeErrors(err, goa.InvalidRangeError("body.rating", *body.Rating, 1, true)) } + if *body.Rating > 5 { + err = goa.MergeErrors(err, goa.InvalidRangeError("body.rating", *body.Rating, 5, false)) + } + } + return +} + +// validateBottleRequestBody checks Bottle and reports errors using the path +// supplied by its caller +func validateBottleRequestBody(body *BottleRequestBody, path string) (err error) { + if body.Name == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("name", path)) + } + if body.Winery == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("winery", path)) + } + if body.Vintage == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("vintage", path)) + } + if body.Name != nil { + if utf8.RuneCountInString(*body.Name) > 100 { + err = goa.MergeErrors(err, goa.InvalidLengthError(path+".name", *body.Name, utf8.RuneCountInString(*body.Name), 100, false)) + } + } + if body.Winery != nil { + if err2 := validateWineryRequestBody(body.Winery, path+".winery"); err2 != nil { + err = goa.MergeErrors(err, err2) + } + } + if body.Vintage != nil { + if *body.Vintage < 1900 { + err = goa.MergeErrors(err, goa.InvalidRangeError(path+".vintage", *body.Vintage, 1900, true)) + } + if *body.Vintage > 2020 { + err = goa.MergeErrors(err, goa.InvalidRangeError(path+".vintage", *body.Vintage, 2020, false)) + } + } + for _, e := range body.Composition { + if e != nil { + if err2 := validateComponentRequestBody(e, path+".composition[*]"); err2 != nil { + err = goa.MergeErrors(err, err2) + } + } + } + if body.Description != nil { + if utf8.RuneCountInString(*body.Description) > 2000 { + err = goa.MergeErrors(err, goa.InvalidLengthError(path+".description", *body.Description, utf8.RuneCountInString(*body.Description), 2000, false)) + } } if body.Rating != nil { + if *body.Rating < 1 { + err = goa.MergeErrors(err, goa.InvalidRangeError(path+".rating", *body.Rating, 1, true)) + } if *body.Rating > 5 { - err = goa.MergeErrors(err, goa.InvalidRangeError("body.rating", *body.Rating, 5, false)) + err = goa.MergeErrors(err, goa.InvalidRangeError(path+".rating", *body.Rating, 5, false)) } } return diff --git a/cellar/gen/http/swagger/server/server.go b/cellar/gen/http/swagger/server/server.go index 7eced133e..4731efdee 100644 --- a/cellar/gen/http/swagger/server/server.go +++ b/cellar/gen/http/swagger/server/server.go @@ -80,15 +80,14 @@ func (s *Server) Mount(mux goahttp.Muxer) { Mount(mux, s) } -// appendFS is a custom implementation of fs.FS that appends a specified prefix -// to the file paths before delegating the Open call to the underlying fs.FS. +// appendFS adds a fixed directory to file paths before opening them. type appendFS struct { prefix string fs http.FileSystem } // Open opens the named file, appending the prefix to the file path before -// passing it to the underlying fs.FS. +// passing it to the underlying file system. func (s appendFS) Open(name string) (http.File, error) { switch name { case "/swagger.json": @@ -97,8 +96,7 @@ func (s appendFS) Open(name string) (http.File, error) { return s.fs.Open(path.Join(s.prefix, name)) } -// appendPrefix returns a new fs.FS that appends the specified prefix to file paths -// before delegating to the provided embed.FS. +// appendPrefix returns a file system that adds prefix before opening each path. func appendPrefix(fsys http.FileSystem, prefix string) http.FileSystem { return appendFS{prefix: prefix, fs: fsys} } diff --git a/cellar/gen/sommelier/endpoints.go b/cellar/gen/sommelier/endpoints.go index 5c24064c1..879b55f58 100644 --- a/cellar/gen/sommelier/endpoints.go +++ b/cellar/gen/sommelier/endpoints.go @@ -10,6 +10,7 @@ package sommelier import ( "context" + sommelierviews "goa.design/examples/cellar/gen/sommelier/views" goa "goa.design/goa/v3/pkg" ) @@ -40,6 +41,9 @@ func NewPickEndpoint(s Service) goa.Endpoint { return nil, err } vres := NewViewedStoredBottleCollection(res, "default") + if err := sommelierviews.ValidateStoredBottleCollection(vres); err != nil { + return nil, err + } return vres, nil } } diff --git a/cellar/gen/sommelier/service.go b/cellar/gen/sommelier/service.go index b0f445ecd..ba903cc33 100644 --- a/cellar/gen/sommelier/service.go +++ b/cellar/gen/sommelier/service.go @@ -142,7 +142,7 @@ func NewStoredBottleCollection(vres sommelierviews.StoredBottleCollection) Store // StoredBottleCollection from result type StoredBottleCollection using the // given view. func NewViewedStoredBottleCollection(res StoredBottleCollection, view string) sommelierviews.StoredBottleCollection { - var vres sommelierviews.StoredBottleCollection + vres := sommelierviews.StoredBottleCollection{View: view} switch view { case "default", "": p := newStoredBottleCollectionView(res) diff --git a/cellar/gen/sommelier/views/view.go b/cellar/gen/sommelier/views/view.go index ae4985ae4..4632383a9 100644 --- a/cellar/gen/sommelier/views/view.go +++ b/cellar/gen/sommelier/views/view.go @@ -172,8 +172,6 @@ func ValidateStoredBottleView(result *StoredBottleView) (err error) { if *result.Vintage < 1900 { err = goa.MergeErrors(err, goa.InvalidRangeError("result.vintage", *result.Vintage, 1900, true)) } - } - if result.Vintage != nil { if *result.Vintage > 2020 { err = goa.MergeErrors(err, goa.InvalidRangeError("result.vintage", *result.Vintage, 2020, false)) } @@ -194,12 +192,13 @@ func ValidateStoredBottleView(result *StoredBottleView) (err error) { if *result.Rating < 1 { err = goa.MergeErrors(err, goa.InvalidRangeError("result.rating", *result.Rating, 1, true)) } - } - if result.Rating != nil { if *result.Rating > 5 { err = goa.MergeErrors(err, goa.InvalidRangeError("result.rating", *result.Rating, 5, false)) } } + if result.Winery == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("winery", "result")) + } if result.Winery != nil { if err2 := ValidateWineryViewTiny(result.Winery); err2 != nil { err = goa.MergeErrors(err, err2) @@ -222,6 +221,9 @@ func ValidateStoredBottleViewTiny(result *StoredBottleView) (err error) { err = goa.MergeErrors(err, goa.InvalidLengthError("result.name", *result.Name, utf8.RuneCountInString(*result.Name), 100, false)) } } + if result.Winery == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("winery", "result")) + } if result.Winery != nil { if err2 := ValidateWineryViewTiny(result.Winery); err2 != nil { err = goa.MergeErrors(err, err2) @@ -270,8 +272,6 @@ func ValidateComponentView(result *ComponentView) (err error) { } if result.Varietal != nil { err = goa.MergeErrors(err, goa.ValidatePattern("result.varietal", *result.Varietal, "[A-Za-z' ]+")) - } - if result.Varietal != nil { if utf8.RuneCountInString(*result.Varietal) > 100 { err = goa.MergeErrors(err, goa.InvalidLengthError("result.varietal", *result.Varietal, utf8.RuneCountInString(*result.Varietal), 100, false)) } @@ -280,8 +280,6 @@ func ValidateComponentView(result *ComponentView) (err error) { if *result.Percentage < 1 { err = goa.MergeErrors(err, goa.InvalidRangeError("result.percentage", *result.Percentage, 1, true)) } - } - if result.Percentage != nil { if *result.Percentage > 100 { err = goa.MergeErrors(err, goa.InvalidRangeError("result.percentage", *result.Percentage, 100, false)) } diff --git a/cellar/gen/storage/endpoints.go b/cellar/gen/storage/endpoints.go index 52c7233bb..a00abc385 100644 --- a/cellar/gen/storage/endpoints.go +++ b/cellar/gen/storage/endpoints.go @@ -10,6 +10,7 @@ package storage import ( "context" + storageviews "goa.design/examples/cellar/gen/storage/views" goa "goa.design/goa/v3/pkg" ) @@ -57,6 +58,9 @@ func NewListEndpoint(s Service) goa.Endpoint { return nil, err } vres := NewViewedStoredBottleCollection(res, "tiny") + if err := storageviews.ValidateStoredBottleCollection(vres); err != nil { + return nil, err + } return vres, nil } } @@ -71,6 +75,9 @@ func NewShowEndpoint(s Service) goa.Endpoint { return nil, err } vres := NewViewedStoredBottle(res, view) + if err := storageviews.ValidateStoredBottle(vres); err != nil { + return nil, err + } return vres, nil } } diff --git a/cellar/gen/storage/service.go b/cellar/gen/storage/service.go index 68330094b..8eefbccba 100644 --- a/cellar/gen/storage/service.go +++ b/cellar/gen/storage/service.go @@ -175,7 +175,7 @@ func NewStoredBottleCollection(vres storageviews.StoredBottleCollection) StoredB // StoredBottleCollection from result type StoredBottleCollection using the // given view. func NewViewedStoredBottleCollection(res StoredBottleCollection, view string) storageviews.StoredBottleCollection { - var vres storageviews.StoredBottleCollection + vres := storageviews.StoredBottleCollection{View: view} switch view { case "default", "": p := newStoredBottleCollectionView(res) @@ -203,7 +203,7 @@ func NewStoredBottle(vres *storageviews.StoredBottle) *StoredBottle { // NewViewedStoredBottle initializes viewed result type StoredBottle from // result type StoredBottle using the given view. func NewViewedStoredBottle(res *StoredBottle, view string) *storageviews.StoredBottle { - var vres *storageviews.StoredBottle + vres := &storageviews.StoredBottle{View: view} switch view { case "default", "": p := newStoredBottleView(res) diff --git a/cellar/gen/storage/views/view.go b/cellar/gen/storage/views/view.go index 61f89f7e8..650af9650 100644 --- a/cellar/gen/storage/views/view.go +++ b/cellar/gen/storage/views/view.go @@ -194,8 +194,6 @@ func ValidateStoredBottleView(result *StoredBottleView) (err error) { if *result.Vintage < 1900 { err = goa.MergeErrors(err, goa.InvalidRangeError("result.vintage", *result.Vintage, 1900, true)) } - } - if result.Vintage != nil { if *result.Vintage > 2020 { err = goa.MergeErrors(err, goa.InvalidRangeError("result.vintage", *result.Vintage, 2020, false)) } @@ -216,12 +214,13 @@ func ValidateStoredBottleView(result *StoredBottleView) (err error) { if *result.Rating < 1 { err = goa.MergeErrors(err, goa.InvalidRangeError("result.rating", *result.Rating, 1, true)) } - } - if result.Rating != nil { if *result.Rating > 5 { err = goa.MergeErrors(err, goa.InvalidRangeError("result.rating", *result.Rating, 5, false)) } } + if result.Winery == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("winery", "result")) + } if result.Winery != nil { if err2 := ValidateWineryViewTiny(result.Winery); err2 != nil { err = goa.MergeErrors(err, err2) @@ -244,6 +243,9 @@ func ValidateStoredBottleViewTiny(result *StoredBottleView) (err error) { err = goa.MergeErrors(err, goa.InvalidLengthError("result.name", *result.Name, utf8.RuneCountInString(*result.Name), 100, false)) } } + if result.Winery == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("winery", "result")) + } if result.Winery != nil { if err2 := ValidateWineryViewTiny(result.Winery); err2 != nil { err = goa.MergeErrors(err, err2) @@ -292,8 +294,6 @@ func ValidateComponentView(result *ComponentView) (err error) { } if result.Varietal != nil { err = goa.MergeErrors(err, goa.ValidatePattern("result.varietal", *result.Varietal, "[A-Za-z' ]+")) - } - if result.Varietal != nil { if utf8.RuneCountInString(*result.Varietal) > 100 { err = goa.MergeErrors(err, goa.InvalidLengthError("result.varietal", *result.Varietal, utf8.RuneCountInString(*result.Varietal), 100, false)) } @@ -302,8 +302,6 @@ func ValidateComponentView(result *ComponentView) (err error) { if *result.Percentage < 1 { err = goa.MergeErrors(err, goa.InvalidRangeError("result.percentage", *result.Percentage, 1, true)) } - } - if result.Percentage != nil { if *result.Percentage > 100 { err = goa.MergeErrors(err, goa.InvalidRangeError("result.percentage", *result.Percentage, 100, false)) } diff --git a/cellar/multipart.go b/cellar/multipart.go index 0e8b86419..59059f859 100644 --- a/cellar/multipart.go +++ b/cellar/multipart.go @@ -13,8 +13,8 @@ import ( // StorageMultiAddDecoderFunc implements the multipart decoder for service // "storage" endpoint "multi_add". The decoder must populate the argument p -// after encoding. -func StorageMultiAddDecoderFunc(mr *multipart.Reader, p *[]*storage.Bottle) error { +// after decoding the request parts. +func StorageMultiAddDecoderFunc(mr *multipart.Reader, p *[]*storages.BottleRequestBody) error { var bottles []*storages.BottleRequestBody for { part, err := mr.NextPart() @@ -31,7 +31,7 @@ func StorageMultiAddDecoderFunc(mr *multipart.Reader, p *[]*storage.Bottle) erro } bottles = append(bottles, &bottle) } - *p = storages.NewMultiAddBottle(bottles) + *p = bottles return nil } @@ -53,8 +53,8 @@ func StorageMultiAddEncoderFunc(mw *multipart.Writer, p []*storage.Bottle) error // StorageMultiUpdateDecoderFunc implements the multipart decoder for service // "storage" endpoint "multi_update". The decoder must populate the argument p -// after encoding. -func StorageMultiUpdateDecoderFunc(mr *multipart.Reader, p **storage.MultiUpdatePayload) error { +// after decoding the request parts. +func StorageMultiUpdateDecoderFunc(mr *multipart.Reader, p *storages.MultiUpdateRequestBody) error { var bottles []*storages.BottleRequestBody for { part, err := mr.NextPart() @@ -71,8 +71,7 @@ func StorageMultiUpdateDecoderFunc(mr *multipart.Reader, p **storage.MultiUpdate } bottles = append(bottles, &bottle) } - reqBody := storages.MultiUpdateRequestBody{Bottles: bottles} - *p = storages.NewMultiUpdatePayload(&reqBody, []string{}) + p.Bottles = bottles return nil } diff --git a/concerts/gen/http/concerts/client/cli.go b/concerts/gen/http/concerts/client/cli.go index 9994c1a17..a62e182d7 100644 --- a/concerts/gen/http/concerts/client/cli.go +++ b/concerts/gen/http/concerts/client/cli.go @@ -140,8 +140,6 @@ func BuildUpdatePayload(concertsUpdateBody string, concertsUpdateConcertID strin if utf8.RuneCountInString(*body.Artist) < 1 { err = goa.MergeErrors(err, goa.InvalidLengthError("body.artist", *body.Artist, utf8.RuneCountInString(*body.Artist), 1, true)) } - } - if body.Artist != nil { if utf8.RuneCountInString(*body.Artist) > 200 { err = goa.MergeErrors(err, goa.InvalidLengthError("body.artist", *body.Artist, utf8.RuneCountInString(*body.Artist), 200, false)) } @@ -153,8 +151,6 @@ func BuildUpdatePayload(concertsUpdateBody string, concertsUpdateConcertID strin if utf8.RuneCountInString(*body.Venue) < 1 { err = goa.MergeErrors(err, goa.InvalidLengthError("body.venue", *body.Venue, utf8.RuneCountInString(*body.Venue), 1, true)) } - } - if body.Venue != nil { if utf8.RuneCountInString(*body.Venue) > 300 { err = goa.MergeErrors(err, goa.InvalidLengthError("body.venue", *body.Venue, utf8.RuneCountInString(*body.Venue), 300, false)) } @@ -163,8 +159,6 @@ func BuildUpdatePayload(concertsUpdateBody string, concertsUpdateConcertID strin if *body.Price < 0 { err = goa.MergeErrors(err, goa.InvalidRangeError("body.price", *body.Price, 0, true)) } - } - if body.Price != nil { if *body.Price > 100000 { err = goa.MergeErrors(err, goa.InvalidRangeError("body.price", *body.Price, 100000, false)) } diff --git a/concerts/gen/http/concerts/client/encode_decode.go b/concerts/gen/http/concerts/client/encode_decode.go index 72240d866..24a4ab6f8 100644 --- a/concerts/gen/http/concerts/client/encode_decode.go +++ b/concerts/gen/http/concerts/client/encode_decode.go @@ -10,10 +10,11 @@ package client import ( "bytes" "context" - "fmt" + "errors" "io" "net/http" "net/url" + "strconv" concerts "goa.design/examples/concerts/gen/concerts" goahttp "goa.design/goa/v3/http" @@ -44,8 +45,8 @@ func EncodeListRequest(encoder func(*http.Request) goahttp.Encoder) func(*http.R return goahttp.ErrInvalidType("concerts", "list", "*concerts.ListPayload", v) } values := req.URL.Query() - values.Add("page", fmt.Sprintf("%v", p.Page)) - values.Add("limit", fmt.Sprintf("%v", p.Limit)) + values.Add("page", strconv.Itoa(p.Page)) + values.Add("limit", strconv.Itoa(p.Limit)) req.URL.RawQuery = values.Encode() return nil } @@ -55,18 +56,24 @@ func EncodeListRequest(encoder func(*http.Request) goahttp.Encoder) func(*http.R // list endpoint. restoreBody controls whether the response body should be // restored after having been read. func DecodeListResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (any, error) { - return func(resp *http.Response) (any, error) { + return func(resp *http.Response) (result any, decodeErr error) { + responseBody := resp.Body if restoreBody { - b, err := io.ReadAll(resp.Body) - if err != nil { - return nil, err + b, readErr := io.ReadAll(responseBody) + closeErr := responseBody.Close() + if err := errors.Join(readErr, closeErr); err != nil { + return nil, goahttp.ErrDecodingError("concerts", "list", err) } resp.Body = io.NopCloser(bytes.NewBuffer(b)) defer func() { resp.Body = io.NopCloser(bytes.NewBuffer(b)) }() } else { - defer resp.Body.Close() + defer func() { + if err := responseBody.Close(); err != nil { + decodeErr = errors.Join(decodeErr, goahttp.ErrDecodingError("concerts", "list", err)) + } + }() } switch resp.StatusCode { case http.StatusOK: @@ -80,7 +87,7 @@ func DecodeListResponse(decoder func(*http.Response) goahttp.Decoder, restoreBod } for _, e := range body { if e != nil { - if err2 := ValidateConcertResponse(e); err2 != nil { + if err2 := validateConcertResponse(e, "body[*]"); err2 != nil { err = goa.MergeErrors(err, err2) } } @@ -91,7 +98,10 @@ func DecodeListResponse(decoder func(*http.Response) goahttp.Decoder, restoreBod res := NewListConcertOK(body) return res, nil default: - body, _ := io.ReadAll(resp.Body) + body, err := io.ReadAll(resp.Body) + if err != nil { + return nil, goahttp.ErrDecodingError("concerts", "list", err) + } return nil, goahttp.ErrInvalidResponse("concerts", "list", resp.StatusCode, string(body)) } } @@ -135,18 +145,24 @@ func EncodeCreateRequest(encoder func(*http.Request) goahttp.Encoder) func(*http // - "bad_request" (type *goa.ServiceError): http.StatusBadRequest // - error: internal error func DecodeCreateResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (any, error) { - return func(resp *http.Response) (any, error) { + return func(resp *http.Response) (result any, decodeErr error) { + responseBody := resp.Body if restoreBody { - b, err := io.ReadAll(resp.Body) - if err != nil { - return nil, err + b, readErr := io.ReadAll(responseBody) + closeErr := responseBody.Close() + if err := errors.Join(readErr, closeErr); err != nil { + return nil, goahttp.ErrDecodingError("concerts", "create", err) } resp.Body = io.NopCloser(bytes.NewBuffer(b)) defer func() { resp.Body = io.NopCloser(bytes.NewBuffer(b)) }() } else { - defer resp.Body.Close() + defer func() { + if err := responseBody.Close(); err != nil { + decodeErr = errors.Join(decodeErr, goahttp.ErrDecodingError("concerts", "create", err)) + } + }() } switch resp.StatusCode { case http.StatusCreated: @@ -179,7 +195,10 @@ func DecodeCreateResponse(decoder func(*http.Response) goahttp.Decoder, restoreB } return nil, NewCreateBadRequest(&body) default: - body, _ := io.ReadAll(resp.Body) + body, err := io.ReadAll(resp.Body) + if err != nil { + return nil, goahttp.ErrDecodingError("concerts", "create", err) + } return nil, goahttp.ErrInvalidResponse("concerts", "create", resp.StatusCode, string(body)) } } @@ -217,18 +236,24 @@ func (c *Client) BuildShowRequest(ctx context.Context, v any) (*http.Request, er // - "not_found" (type *goa.ServiceError): http.StatusNotFound // - error: internal error func DecodeShowResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (any, error) { - return func(resp *http.Response) (any, error) { + return func(resp *http.Response) (result any, decodeErr error) { + responseBody := resp.Body if restoreBody { - b, err := io.ReadAll(resp.Body) - if err != nil { - return nil, err + b, readErr := io.ReadAll(responseBody) + closeErr := responseBody.Close() + if err := errors.Join(readErr, closeErr); err != nil { + return nil, goahttp.ErrDecodingError("concerts", "show", err) } resp.Body = io.NopCloser(bytes.NewBuffer(b)) defer func() { resp.Body = io.NopCloser(bytes.NewBuffer(b)) }() } else { - defer resp.Body.Close() + defer func() { + if err := responseBody.Close(); err != nil { + decodeErr = errors.Join(decodeErr, goahttp.ErrDecodingError("concerts", "show", err)) + } + }() } switch resp.StatusCode { case http.StatusOK: @@ -261,7 +286,10 @@ func DecodeShowResponse(decoder func(*http.Response) goahttp.Decoder, restoreBod } return nil, NewShowNotFound(&body) default: - body, _ := io.ReadAll(resp.Body) + body, err := io.ReadAll(resp.Body) + if err != nil { + return nil, goahttp.ErrDecodingError("concerts", "show", err) + } return nil, goahttp.ErrInvalidResponse("concerts", "show", resp.StatusCode, string(body)) } } @@ -316,18 +344,24 @@ func EncodeUpdateRequest(encoder func(*http.Request) goahttp.Encoder) func(*http // - "bad_request" (type *goa.ServiceError): http.StatusBadRequest // - error: internal error func DecodeUpdateResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (any, error) { - return func(resp *http.Response) (any, error) { + return func(resp *http.Response) (result any, decodeErr error) { + responseBody := resp.Body if restoreBody { - b, err := io.ReadAll(resp.Body) - if err != nil { - return nil, err + b, readErr := io.ReadAll(responseBody) + closeErr := responseBody.Close() + if err := errors.Join(readErr, closeErr); err != nil { + return nil, goahttp.ErrDecodingError("concerts", "update", err) } resp.Body = io.NopCloser(bytes.NewBuffer(b)) defer func() { resp.Body = io.NopCloser(bytes.NewBuffer(b)) }() } else { - defer resp.Body.Close() + defer func() { + if err := responseBody.Close(); err != nil { + decodeErr = errors.Join(decodeErr, goahttp.ErrDecodingError("concerts", "update", err)) + } + }() } switch resp.StatusCode { case http.StatusOK: @@ -374,7 +408,10 @@ func DecodeUpdateResponse(decoder func(*http.Response) goahttp.Decoder, restoreB } return nil, NewUpdateBadRequest(&body) default: - body, _ := io.ReadAll(resp.Body) + body, err := io.ReadAll(resp.Body) + if err != nil { + return nil, goahttp.ErrDecodingError("concerts", "update", err) + } return nil, goahttp.ErrInvalidResponse("concerts", "update", resp.StatusCode, string(body)) } } @@ -412,18 +449,24 @@ func (c *Client) BuildDeleteRequest(ctx context.Context, v any) (*http.Request, // - "not_found" (type *goa.ServiceError): http.StatusNotFound // - error: internal error func DecodeDeleteResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (any, error) { - return func(resp *http.Response) (any, error) { + return func(resp *http.Response) (result any, decodeErr error) { + responseBody := resp.Body if restoreBody { - b, err := io.ReadAll(resp.Body) - if err != nil { - return nil, err + b, readErr := io.ReadAll(responseBody) + closeErr := responseBody.Close() + if err := errors.Join(readErr, closeErr); err != nil { + return nil, goahttp.ErrDecodingError("concerts", "delete", err) } resp.Body = io.NopCloser(bytes.NewBuffer(b)) defer func() { resp.Body = io.NopCloser(bytes.NewBuffer(b)) }() } else { - defer resp.Body.Close() + defer func() { + if err := responseBody.Close(); err != nil { + decodeErr = errors.Join(decodeErr, goahttp.ErrDecodingError("concerts", "delete", err)) + } + }() } switch resp.StatusCode { case http.StatusNoContent: @@ -443,7 +486,10 @@ func DecodeDeleteResponse(decoder func(*http.Response) goahttp.Decoder, restoreB } return nil, NewDeleteNotFound(&body) default: - body, _ := io.ReadAll(resp.Body) + body, err := io.ReadAll(resp.Body) + if err != nil { + return nil, goahttp.ErrDecodingError("concerts", "delete", err) + } return nil, goahttp.ErrInvalidResponse("concerts", "delete", resp.StatusCode, string(body)) } } diff --git a/concerts/gen/http/concerts/client/types.go b/concerts/gen/http/concerts/client/types.go index 52207bc99..cb10d1040 100644 --- a/concerts/gen/http/concerts/client/types.go +++ b/concerts/gen/http/concerts/client/types.go @@ -366,8 +366,6 @@ func ValidateCreateResponseBody(body *CreateResponseBody) (err error) { if utf8.RuneCountInString(*body.Artist) < 1 { err = goa.MergeErrors(err, goa.InvalidLengthError("body.artist", *body.Artist, utf8.RuneCountInString(*body.Artist), 1, true)) } - } - if body.Artist != nil { if utf8.RuneCountInString(*body.Artist) > 200 { err = goa.MergeErrors(err, goa.InvalidLengthError("body.artist", *body.Artist, utf8.RuneCountInString(*body.Artist), 200, false)) } @@ -379,8 +377,6 @@ func ValidateCreateResponseBody(body *CreateResponseBody) (err error) { if utf8.RuneCountInString(*body.Venue) < 1 { err = goa.MergeErrors(err, goa.InvalidLengthError("body.venue", *body.Venue, utf8.RuneCountInString(*body.Venue), 1, true)) } - } - if body.Venue != nil { if utf8.RuneCountInString(*body.Venue) > 300 { err = goa.MergeErrors(err, goa.InvalidLengthError("body.venue", *body.Venue, utf8.RuneCountInString(*body.Venue), 300, false)) } @@ -389,8 +385,6 @@ func ValidateCreateResponseBody(body *CreateResponseBody) (err error) { if *body.Price < 0 { err = goa.MergeErrors(err, goa.InvalidRangeError("body.price", *body.Price, 0, true)) } - } - if body.Price != nil { if *body.Price > 100000 { err = goa.MergeErrors(err, goa.InvalidRangeError("body.price", *body.Price, 100000, false)) } @@ -422,8 +416,6 @@ func ValidateShowResponseBody(body *ShowResponseBody) (err error) { if utf8.RuneCountInString(*body.Artist) < 1 { err = goa.MergeErrors(err, goa.InvalidLengthError("body.artist", *body.Artist, utf8.RuneCountInString(*body.Artist), 1, true)) } - } - if body.Artist != nil { if utf8.RuneCountInString(*body.Artist) > 200 { err = goa.MergeErrors(err, goa.InvalidLengthError("body.artist", *body.Artist, utf8.RuneCountInString(*body.Artist), 200, false)) } @@ -435,8 +427,6 @@ func ValidateShowResponseBody(body *ShowResponseBody) (err error) { if utf8.RuneCountInString(*body.Venue) < 1 { err = goa.MergeErrors(err, goa.InvalidLengthError("body.venue", *body.Venue, utf8.RuneCountInString(*body.Venue), 1, true)) } - } - if body.Venue != nil { if utf8.RuneCountInString(*body.Venue) > 300 { err = goa.MergeErrors(err, goa.InvalidLengthError("body.venue", *body.Venue, utf8.RuneCountInString(*body.Venue), 300, false)) } @@ -445,8 +435,6 @@ func ValidateShowResponseBody(body *ShowResponseBody) (err error) { if *body.Price < 0 { err = goa.MergeErrors(err, goa.InvalidRangeError("body.price", *body.Price, 0, true)) } - } - if body.Price != nil { if *body.Price > 100000 { err = goa.MergeErrors(err, goa.InvalidRangeError("body.price", *body.Price, 100000, false)) } @@ -478,8 +466,6 @@ func ValidateUpdateResponseBody(body *UpdateResponseBody) (err error) { if utf8.RuneCountInString(*body.Artist) < 1 { err = goa.MergeErrors(err, goa.InvalidLengthError("body.artist", *body.Artist, utf8.RuneCountInString(*body.Artist), 1, true)) } - } - if body.Artist != nil { if utf8.RuneCountInString(*body.Artist) > 200 { err = goa.MergeErrors(err, goa.InvalidLengthError("body.artist", *body.Artist, utf8.RuneCountInString(*body.Artist), 200, false)) } @@ -491,8 +477,6 @@ func ValidateUpdateResponseBody(body *UpdateResponseBody) (err error) { if utf8.RuneCountInString(*body.Venue) < 1 { err = goa.MergeErrors(err, goa.InvalidLengthError("body.venue", *body.Venue, utf8.RuneCountInString(*body.Venue), 1, true)) } - } - if body.Venue != nil { if utf8.RuneCountInString(*body.Venue) > 300 { err = goa.MergeErrors(err, goa.InvalidLengthError("body.venue", *body.Venue, utf8.RuneCountInString(*body.Venue), 300, false)) } @@ -501,8 +485,6 @@ func ValidateUpdateResponseBody(body *UpdateResponseBody) (err error) { if *body.Price < 0 { err = goa.MergeErrors(err, goa.InvalidRangeError("body.price", *body.Price, 0, true)) } - } - if body.Price != nil { if *body.Price > 100000 { err = goa.MergeErrors(err, goa.InvalidRangeError("body.price", *body.Price, 100000, false)) } @@ -511,7 +493,7 @@ func ValidateUpdateResponseBody(body *UpdateResponseBody) (err error) { } // ValidateCreateBadRequestResponseBody runs the validations defined on -// create_bad_request_response_body +// CreateBadRequestResponseBody func ValidateCreateBadRequestResponseBody(body *CreateBadRequestResponseBody) (err error) { if body.Name == nil { err = goa.MergeErrors(err, goa.MissingFieldError("name", "body")) @@ -535,7 +517,7 @@ func ValidateCreateBadRequestResponseBody(body *CreateBadRequestResponseBody) (e } // ValidateShowNotFoundResponseBody runs the validations defined on -// show_not_found_response_body +// ShowNotFoundResponseBody func ValidateShowNotFoundResponseBody(body *ShowNotFoundResponseBody) (err error) { if body.Name == nil { err = goa.MergeErrors(err, goa.MissingFieldError("name", "body")) @@ -559,7 +541,7 @@ func ValidateShowNotFoundResponseBody(body *ShowNotFoundResponseBody) (err error } // ValidateUpdateNotFoundResponseBody runs the validations defined on -// update_not_found_response_body +// UpdateNotFoundResponseBody func ValidateUpdateNotFoundResponseBody(body *UpdateNotFoundResponseBody) (err error) { if body.Name == nil { err = goa.MergeErrors(err, goa.MissingFieldError("name", "body")) @@ -583,7 +565,7 @@ func ValidateUpdateNotFoundResponseBody(body *UpdateNotFoundResponseBody) (err e } // ValidateUpdateBadRequestResponseBody runs the validations defined on -// update_bad_request_response_body +// UpdateBadRequestResponseBody func ValidateUpdateBadRequestResponseBody(body *UpdateBadRequestResponseBody) (err error) { if body.Name == nil { err = goa.MergeErrors(err, goa.MissingFieldError("name", "body")) @@ -607,7 +589,7 @@ func ValidateUpdateBadRequestResponseBody(body *UpdateBadRequestResponseBody) (e } // ValidateDeleteNotFoundResponseBody runs the validations defined on -// delete_not_found_response_body +// DeleteNotFoundResponseBody func ValidateDeleteNotFoundResponseBody(body *DeleteNotFoundResponseBody) (err error) { if body.Name == nil { err = goa.MergeErrors(err, goa.MissingFieldError("name", "body")) @@ -630,7 +612,7 @@ func ValidateDeleteNotFoundResponseBody(body *DeleteNotFoundResponseBody) (err e return } -// ValidateConcertResponse runs the validations defined on ConcertResponse +// ValidateConcertResponse runs the validations defined on Concert func ValidateConcertResponse(body *ConcertResponse) (err error) { if body.ID == nil { err = goa.MergeErrors(err, goa.MissingFieldError("id", "body")) @@ -654,8 +636,6 @@ func ValidateConcertResponse(body *ConcertResponse) (err error) { if utf8.RuneCountInString(*body.Artist) < 1 { err = goa.MergeErrors(err, goa.InvalidLengthError("body.artist", *body.Artist, utf8.RuneCountInString(*body.Artist), 1, true)) } - } - if body.Artist != nil { if utf8.RuneCountInString(*body.Artist) > 200 { err = goa.MergeErrors(err, goa.InvalidLengthError("body.artist", *body.Artist, utf8.RuneCountInString(*body.Artist), 200, false)) } @@ -667,8 +647,6 @@ func ValidateConcertResponse(body *ConcertResponse) (err error) { if utf8.RuneCountInString(*body.Venue) < 1 { err = goa.MergeErrors(err, goa.InvalidLengthError("body.venue", *body.Venue, utf8.RuneCountInString(*body.Venue), 1, true)) } - } - if body.Venue != nil { if utf8.RuneCountInString(*body.Venue) > 300 { err = goa.MergeErrors(err, goa.InvalidLengthError("body.venue", *body.Venue, utf8.RuneCountInString(*body.Venue), 300, false)) } @@ -677,10 +655,59 @@ func ValidateConcertResponse(body *ConcertResponse) (err error) { if *body.Price < 0 { err = goa.MergeErrors(err, goa.InvalidRangeError("body.price", *body.Price, 0, true)) } + if *body.Price > 100000 { + err = goa.MergeErrors(err, goa.InvalidRangeError("body.price", *body.Price, 100000, false)) + } + } + return +} + +// validateConcertResponse checks Concert and reports errors using the path +// supplied by its caller +func validateConcertResponse(body *ConcertResponse, path string) (err error) { + if body.ID == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("id", path)) + } + if body.Artist == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("artist", path)) + } + if body.Date == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("date", path)) + } + if body.Venue == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("venue", path)) + } + if body.Price == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("price", path)) + } + if body.ID != nil { + err = goa.MergeErrors(err, goa.ValidateFormat(path+".id", *body.ID, goa.FormatUUID)) + } + if body.Artist != nil { + if utf8.RuneCountInString(*body.Artist) < 1 { + err = goa.MergeErrors(err, goa.InvalidLengthError(path+".artist", *body.Artist, utf8.RuneCountInString(*body.Artist), 1, true)) + } + if utf8.RuneCountInString(*body.Artist) > 200 { + err = goa.MergeErrors(err, goa.InvalidLengthError(path+".artist", *body.Artist, utf8.RuneCountInString(*body.Artist), 200, false)) + } + } + if body.Date != nil { + err = goa.MergeErrors(err, goa.ValidateFormat(path+".date", *body.Date, goa.FormatDate)) + } + if body.Venue != nil { + if utf8.RuneCountInString(*body.Venue) < 1 { + err = goa.MergeErrors(err, goa.InvalidLengthError(path+".venue", *body.Venue, utf8.RuneCountInString(*body.Venue), 1, true)) + } + if utf8.RuneCountInString(*body.Venue) > 300 { + err = goa.MergeErrors(err, goa.InvalidLengthError(path+".venue", *body.Venue, utf8.RuneCountInString(*body.Venue), 300, false)) + } } if body.Price != nil { + if *body.Price < 0 { + err = goa.MergeErrors(err, goa.InvalidRangeError(path+".price", *body.Price, 0, true)) + } if *body.Price > 100000 { - err = goa.MergeErrors(err, goa.InvalidRangeError("body.price", *body.Price, 100000, false)) + err = goa.MergeErrors(err, goa.InvalidRangeError(path+".price", *body.Price, 100000, false)) } } return diff --git a/concerts/gen/http/concerts/server/server.go b/concerts/gen/http/concerts/server/server.go index b2db03d31..f8aff8ec1 100644 --- a/concerts/gen/http/concerts/server/server.go +++ b/concerts/gen/http/concerts/server/server.go @@ -380,23 +380,21 @@ func NewDeleteHandler( }) } -// appendFS is a custom implementation of fs.FS that appends a specified prefix -// to the file paths before delegating the Open call to the underlying fs.FS. +// appendFS adds a fixed directory to file paths before opening them. type appendFS struct { prefix string fs http.FileSystem } // Open opens the named file, appending the prefix to the file path before -// passing it to the underlying fs.FS. +// passing it to the underlying file system. func (s appendFS) Open(name string) (http.File, error) { switch name { } return s.fs.Open(path.Join(s.prefix, name)) } -// appendPrefix returns a new fs.FS that appends the specified prefix to file paths -// before delegating to the provided embed.FS. +// appendPrefix returns a file system that adds prefix before opening each path. func appendPrefix(fsys http.FileSystem, prefix string) http.FileSystem { return appendFS{prefix: prefix, fs: fsys} } diff --git a/concerts/gen/http/concerts/server/types.go b/concerts/gen/http/concerts/server/types.go index 0154a8c2d..e08a8ac50 100644 --- a/concerts/gen/http/concerts/server/types.go +++ b/concerts/gen/http/concerts/server/types.go @@ -384,8 +384,6 @@ func ValidateCreateRequestBody(body *CreateRequestBody) (err error) { if utf8.RuneCountInString(*body.Artist) < 1 { err = goa.MergeErrors(err, goa.InvalidLengthError("body.artist", *body.Artist, utf8.RuneCountInString(*body.Artist), 1, true)) } - } - if body.Artist != nil { if utf8.RuneCountInString(*body.Artist) > 200 { err = goa.MergeErrors(err, goa.InvalidLengthError("body.artist", *body.Artist, utf8.RuneCountInString(*body.Artist), 200, false)) } @@ -397,8 +395,6 @@ func ValidateCreateRequestBody(body *CreateRequestBody) (err error) { if utf8.RuneCountInString(*body.Venue) < 1 { err = goa.MergeErrors(err, goa.InvalidLengthError("body.venue", *body.Venue, utf8.RuneCountInString(*body.Venue), 1, true)) } - } - if body.Venue != nil { if utf8.RuneCountInString(*body.Venue) > 300 { err = goa.MergeErrors(err, goa.InvalidLengthError("body.venue", *body.Venue, utf8.RuneCountInString(*body.Venue), 300, false)) } @@ -407,8 +403,6 @@ func ValidateCreateRequestBody(body *CreateRequestBody) (err error) { if *body.Price < 0 { err = goa.MergeErrors(err, goa.InvalidRangeError("body.price", *body.Price, 0, true)) } - } - if body.Price != nil { if *body.Price > 100000 { err = goa.MergeErrors(err, goa.InvalidRangeError("body.price", *body.Price, 100000, false)) } @@ -422,8 +416,6 @@ func ValidateUpdateRequestBody(body *UpdateRequestBody) (err error) { if utf8.RuneCountInString(*body.Artist) < 1 { err = goa.MergeErrors(err, goa.InvalidLengthError("body.artist", *body.Artist, utf8.RuneCountInString(*body.Artist), 1, true)) } - } - if body.Artist != nil { if utf8.RuneCountInString(*body.Artist) > 200 { err = goa.MergeErrors(err, goa.InvalidLengthError("body.artist", *body.Artist, utf8.RuneCountInString(*body.Artist), 200, false)) } @@ -435,8 +427,6 @@ func ValidateUpdateRequestBody(body *UpdateRequestBody) (err error) { if utf8.RuneCountInString(*body.Venue) < 1 { err = goa.MergeErrors(err, goa.InvalidLengthError("body.venue", *body.Venue, utf8.RuneCountInString(*body.Venue), 1, true)) } - } - if body.Venue != nil { if utf8.RuneCountInString(*body.Venue) > 300 { err = goa.MergeErrors(err, goa.InvalidLengthError("body.venue", *body.Venue, utf8.RuneCountInString(*body.Venue), 300, false)) } @@ -445,8 +435,6 @@ func ValidateUpdateRequestBody(body *UpdateRequestBody) (err error) { if *body.Price < 0 { err = goa.MergeErrors(err, goa.InvalidRangeError("body.price", *body.Price, 0, true)) } - } - if body.Price != nil { if *body.Price > 100000 { err = goa.MergeErrors(err, goa.InvalidRangeError("body.price", *body.Price, 100000, false)) } diff --git a/concerts/gen/http/openapi.json b/concerts/gen/http/openapi.json index 37289ac90..a70ee5982 100644 --- a/concerts/gen/http/openapi.json +++ b/concerts/gen/http/openapi.json @@ -1 +1 @@ -{"swagger":"2.0","info":{"title":"Concert Management API","description":"A simple API for managing music concert information","version":"1.0"},"host":"localhost:8080","consumes":["application/json","application/xml","application/gob"],"produces":["application/json","application/xml","application/gob"],"paths":{"/concerts":{"get":{"tags":["concerts"],"summary":"List all concerts","description":"List concerts with optional pagination. Returns an array of concerts sorted by date.","operationId":"concerts#list","parameters":[{"name":"page","in":"query","description":"Page number","required":false,"type":"integer","default":1,"minimum":1},{"name":"limit","in":"query","description":"Number of items per page","required":false,"type":"integer","default":10,"maximum":100,"minimum":1}],"responses":{"200":{"description":"OK response.","schema":{"type":"array","items":{"$ref":"#/definitions/Concert"}}}},"schemes":["http"]},"post":{"tags":["concerts"],"summary":"Create a new concert","description":"Create a new concert entry. All fields are required to ensure complete concert information.","operationId":"concerts#create","parameters":[{"name":"CreateRequestBody","in":"body","required":true,"schema":{"$ref":"#/definitions/ConcertPayload","required":["artist","date","venue","price"]}}],"responses":{"201":{"description":"Created response.","schema":{"$ref":"#/definitions/Concert","required":["id","artist","date","venue","price"]}},"400":{"description":"Bad Request response.","schema":{"$ref":"#/definitions/ConcertsCreateBadRequestResponseBody"}}},"schemes":["http"]}},"/concerts/{concertID}":{"get":{"tags":["concerts"],"summary":"Get concert by ID","description":"Get a single concert by its unique ID.","operationId":"concerts#show","parameters":[{"name":"concertID","in":"path","description":"Unique concert identifier","required":true,"type":"string","format":"uuid"}],"responses":{"200":{"description":"OK response.","schema":{"$ref":"#/definitions/Concert","required":["id","artist","date","venue","price"]}},"404":{"description":"Not Found response.","schema":{"$ref":"#/definitions/ConcertsShowNotFoundResponseBody"}}},"schemes":["http"]},"put":{"tags":["concerts"],"summary":"Update concert","description":"Update an existing concert by ID. Only provided fields will be updated.","operationId":"concerts#update","parameters":[{"name":"concertID","in":"path","description":"ID of the concert to update","required":true,"type":"string","format":"uuid"},{"name":"UpdateRequestBody","in":"body","required":true,"schema":{"$ref":"#/definitions/ConcertsUpdateRequestBody"}}],"responses":{"200":{"description":"OK response.","schema":{"$ref":"#/definitions/Concert","required":["id","artist","date","venue","price"]}},"400":{"description":"Bad Request response.","schema":{"$ref":"#/definitions/ConcertsUpdateBadRequestResponseBody"}},"404":{"description":"Not Found response.","schema":{"$ref":"#/definitions/ConcertsUpdateNotFoundResponseBody"}}},"schemes":["http"]},"delete":{"tags":["concerts"],"summary":"Delete concert","description":"Remove a concert from the system by ID. This operation cannot be undone.","operationId":"concerts#delete","parameters":[{"name":"concertID","in":"path","description":"ID of the concert to remove","required":true,"type":"string","format":"uuid"}],"responses":{"204":{"description":"No Content response."},"404":{"description":"Not Found response.","schema":{"$ref":"#/definitions/ConcertsDeleteNotFoundResponseBody"}}},"schemes":["http"]}},"/openapi3.json":{"get":{"tags":["concerts"],"summary":"Download openapi3.json","operationId":"concerts#/openapi3.json","responses":{"200":{"description":"File downloaded","schema":{"type":"file"}}},"schemes":["http"]}},"/openapi3.yaml":{"get":{"tags":["concerts"],"summary":"Download openapi3.yaml","operationId":"concerts#/openapi3.yaml","responses":{"200":{"description":"File downloaded","schema":{"type":"file"}}},"schemes":["http"]}}},"definitions":{"Concert":{"title":"Concert","type":"object","properties":{"artist":{"type":"string","description":"The main performer for this concert","example":"The White Stripes","minLength":1,"maxLength":200},"date":{"type":"string","description":"The date when the concert will take place","example":"2024-12-25","format":"date"},"id":{"type":"string","description":"System-generated unique identifier","example":"550e8400-e29b-41d4-a716-446655440000","format":"uuid"},"price":{"type":"integer","description":"Base ticket price in cents (e.g., 7500 = $75.00)","example":7500,"format":"int64","minimum":0,"maximum":100000},"venue":{"type":"string","description":"The venue where the concert will be held","example":"Madison Square Garden, New York, NY","minLength":1,"maxLength":300}},"description":"Complete concert information including system-generated ID.","example":{"artist":"The White Stripes","date":"2024-12-25","id":"550e8400-e29b-41d4-a716-446655440000","price":7500,"venue":"Madison Square Garden, New York, NY"},"required":["id","artist","date","venue","price"]},"ConcertPayload":{"title":"ConcertPayload","type":"object","properties":{"artist":{"type":"string","description":"The main performer for this concert","example":"The White Stripes","minLength":1,"maxLength":200},"date":{"type":"string","description":"The date when the concert will take place","example":"2024-12-25","format":"date"},"price":{"type":"integer","description":"Base ticket price in cents (e.g., 7500 = $75.00)","example":7500,"format":"int64","minimum":0,"maximum":100000},"venue":{"type":"string","description":"The venue where the concert will be held","example":"Madison Square Garden, New York, NY","minLength":1,"maxLength":300}},"description":"Concert information to create","example":{"artist":"The White Stripes","date":"2024-12-25","price":7500,"venue":"Madison Square Garden, New York, NY"},"required":["artist","date","venue","price"]},"ConcertsCreateBadRequestResponseBody":{"title":"Mediatype identifier: application/vnd.goa.error; view=default","type":"object","properties":{"fault":{"type":"boolean","description":"Is the error a server-side fault?","example":false},"id":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"message":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"name":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"temporary":{"type":"boolean","description":"Is the error temporary?","example":true},"timeout":{"type":"boolean","description":"Is the error a timeout?","example":true}},"description":"Invalid input data provided (default view)","example":{"fault":false,"id":"123abc","message":"parameter 'p' must be an integer","name":"bad_request","temporary":true,"timeout":true},"required":["name","id","message","temporary","timeout","fault"]},"ConcertsDeleteNotFoundResponseBody":{"title":"Mediatype identifier: application/vnd.goa.error; view=default","type":"object","properties":{"fault":{"type":"boolean","description":"Is the error a server-side fault?","example":false},"id":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"message":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"name":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"temporary":{"type":"boolean","description":"Is the error temporary?","example":true},"timeout":{"type":"boolean","description":"Is the error a timeout?","example":true}},"description":"Concert with the specified ID was not found (default view)","example":{"fault":false,"id":"123abc","message":"parameter 'p' must be an integer","name":"bad_request","temporary":true,"timeout":true},"required":["name","id","message","temporary","timeout","fault"]},"ConcertsShowNotFoundResponseBody":{"title":"Mediatype identifier: application/vnd.goa.error; view=default","type":"object","properties":{"fault":{"type":"boolean","description":"Is the error a server-side fault?","example":false},"id":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"message":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"name":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"temporary":{"type":"boolean","description":"Is the error temporary?","example":true},"timeout":{"type":"boolean","description":"Is the error a timeout?","example":true}},"description":"Concert with the specified ID was not found (default view)","example":{"fault":false,"id":"123abc","message":"parameter 'p' must be an integer","name":"bad_request","temporary":true,"timeout":true},"required":["name","id","message","temporary","timeout","fault"]},"ConcertsUpdateBadRequestResponseBody":{"title":"Mediatype identifier: application/vnd.goa.error; view=default","type":"object","properties":{"fault":{"type":"boolean","description":"Is the error a server-side fault?","example":false},"id":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"message":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"name":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"temporary":{"type":"boolean","description":"Is the error temporary?","example":true},"timeout":{"type":"boolean","description":"Is the error a timeout?","example":true}},"description":"Invalid update data provided (default view)","example":{"fault":false,"id":"123abc","message":"parameter 'p' must be an integer","name":"bad_request","temporary":true,"timeout":true},"required":["name","id","message","temporary","timeout","fault"]},"ConcertsUpdateNotFoundResponseBody":{"title":"Mediatype identifier: application/vnd.goa.error; view=default","type":"object","properties":{"fault":{"type":"boolean","description":"Is the error a server-side fault?","example":false},"id":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"message":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"name":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"temporary":{"type":"boolean","description":"Is the error temporary?","example":true},"timeout":{"type":"boolean","description":"Is the error a timeout?","example":true}},"description":"Concert with the specified ID was not found (default view)","example":{"fault":false,"id":"123abc","message":"parameter 'p' must be an integer","name":"bad_request","temporary":true,"timeout":true},"required":["name","id","message","temporary","timeout","fault"]},"ConcertsUpdateRequestBody":{"title":"ConcertsUpdateRequestBody","type":"object","properties":{"artist":{"type":"string","description":"The main performer for this concert","example":"The White Stripes","minLength":1,"maxLength":200},"date":{"type":"string","description":"The date when the concert will take place","example":"2024-12-25","format":"date"},"price":{"type":"integer","description":"Base ticket price in cents (e.g., 7500 = $75.00)","example":7500,"format":"int64","minimum":0,"maximum":100000},"venue":{"type":"string","description":"The venue where the concert will be held","example":"Madison Square Garden, New York, NY","minLength":1,"maxLength":300}},"example":{"artist":"The White Stripes","date":"2024-12-25","price":7500,"venue":"Madison Square Garden, New York, NY"}}}} \ No newline at end of file +{"swagger":"2.0","info":{"title":"Concert Management API","description":"A simple API for managing music concert information","version":"1.0"},"host":"localhost:8080","consumes":["application/json","application/xml","application/gob"],"produces":["application/json","application/xml","application/gob"],"paths":{"/concerts":{"get":{"tags":["concerts"],"summary":"List all concerts","description":"List concerts with optional pagination. Returns an array of concerts sorted by date.","operationId":"concerts#list","parameters":[{"name":"page","in":"query","description":"Page number","required":false,"type":"integer","default":1,"minimum":1},{"name":"limit","in":"query","description":"Number of items per page","required":false,"type":"integer","default":10,"maximum":100,"minimum":1}],"responses":{"200":{"description":"OK response.","schema":{"type":"array","items":{"$ref":"#/definitions/Concert"}}}},"schemes":["http"]},"post":{"tags":["concerts"],"summary":"Create a new concert","description":"Create a new concert entry. All fields are required to ensure complete concert information.","operationId":"concerts#create","parameters":[{"name":"CreateRequestBody","in":"body","required":true,"schema":{"$ref":"#/definitions/ConcertPayload","required":["artist","date","venue","price"]}}],"responses":{"201":{"description":"Created response.","schema":{"$ref":"#/definitions/Concert","required":["id","artist","date","venue","price"]}},"400":{"description":"bad_request: Invalid input data provided","schema":{"$ref":"#/definitions/ConcertsCreateBadRequestResponseBody"},"examples":{"application/vnd.goa.error":{"fault":false,"id":"123abc","message":"parameter 'p' must be an integer","name":"bad_request","temporary":false,"timeout":false}}}},"schemes":["http"]}},"/concerts/{concertID}":{"get":{"tags":["concerts"],"summary":"Get concert by ID","description":"Get a single concert by its unique ID.","operationId":"concerts#show","parameters":[{"name":"concertID","in":"path","description":"Unique concert identifier","required":true,"type":"string","format":"uuid"}],"responses":{"200":{"description":"OK response.","schema":{"$ref":"#/definitions/Concert","required":["id","artist","date","venue","price"]}},"404":{"description":"not_found: Concert with the specified ID was not found","schema":{"$ref":"#/definitions/ConcertsShowNotFoundResponseBody"},"examples":{"application/vnd.goa.error":{"fault":false,"id":"123abc","message":"parameter 'p' must be an integer","name":"not_found","temporary":false,"timeout":false}}}},"schemes":["http"]},"put":{"tags":["concerts"],"summary":"Update concert","description":"Update an existing concert by ID. Only provided fields will be updated.","operationId":"concerts#update","parameters":[{"name":"concertID","in":"path","description":"ID of the concert to update","required":true,"type":"string","format":"uuid"},{"name":"UpdateRequestBody","in":"body","required":true,"schema":{"$ref":"#/definitions/ConcertsUpdateRequestBody"}}],"responses":{"200":{"description":"OK response.","schema":{"$ref":"#/definitions/Concert","required":["id","artist","date","venue","price"]}},"400":{"description":"bad_request: Invalid update data provided","schema":{"$ref":"#/definitions/ConcertsUpdateBadRequestResponseBody"},"examples":{"application/vnd.goa.error":{"fault":false,"id":"123abc","message":"parameter 'p' must be an integer","name":"bad_request","temporary":false,"timeout":false}}},"404":{"description":"not_found: Concert with the specified ID was not found","schema":{"$ref":"#/definitions/ConcertsUpdateNotFoundResponseBody"},"examples":{"application/vnd.goa.error":{"fault":false,"id":"123abc","message":"parameter 'p' must be an integer","name":"not_found","temporary":false,"timeout":false}}}},"schemes":["http"]},"delete":{"tags":["concerts"],"summary":"Delete concert","description":"Remove a concert from the system by ID. This operation cannot be undone.","operationId":"concerts#delete","parameters":[{"name":"concertID","in":"path","description":"ID of the concert to remove","required":true,"type":"string","format":"uuid"}],"responses":{"204":{"description":"No Content response."},"404":{"description":"not_found: Concert with the specified ID was not found","schema":{"$ref":"#/definitions/ConcertsDeleteNotFoundResponseBody"},"examples":{"application/vnd.goa.error":{"fault":false,"id":"123abc","message":"parameter 'p' must be an integer","name":"not_found","temporary":false,"timeout":false}}}},"schemes":["http"]}},"/openapi3.json":{"get":{"tags":["concerts"],"summary":"Download openapi3.json","operationId":"concerts#/openapi3.json","responses":{"200":{"description":"File downloaded","schema":{"type":"file"}}},"schemes":["http"]}},"/openapi3.yaml":{"get":{"tags":["concerts"],"summary":"Download openapi3.yaml","operationId":"concerts#/openapi3.yaml","responses":{"200":{"description":"File downloaded","schema":{"type":"file"}}},"schemes":["http"]}}},"definitions":{"Concert":{"title":"Concert","type":"object","properties":{"artist":{"type":"string","description":"The main performer for this concert","example":"The White Stripes","minLength":1,"maxLength":200},"date":{"type":"string","description":"The date when the concert will take place","example":"2024-12-25","format":"date"},"id":{"type":"string","description":"System-generated unique identifier","example":"550e8400-e29b-41d4-a716-446655440000","format":"uuid"},"price":{"type":"integer","description":"Base ticket price in cents (e.g., 7500 = $75.00)","example":7500,"format":"int64","minimum":0,"maximum":100000},"venue":{"type":"string","description":"The venue where the concert will be held","example":"Madison Square Garden, New York, NY","minLength":1,"maxLength":300}},"description":"Complete concert information including system-generated ID.","example":{"artist":"The White Stripes","date":"2024-12-25","id":"550e8400-e29b-41d4-a716-446655440000","price":7500,"venue":"Madison Square Garden, New York, NY"},"required":["id","artist","date","venue","price"]},"ConcertPayload":{"title":"ConcertPayload","type":"object","properties":{"artist":{"type":"string","description":"The main performer for this concert","example":"The White Stripes","minLength":1,"maxLength":200},"date":{"type":"string","description":"The date when the concert will take place","example":"2024-12-25","format":"date"},"price":{"type":"integer","description":"Base ticket price in cents (e.g., 7500 = $75.00)","example":7500,"format":"int64","minimum":0,"maximum":100000},"venue":{"type":"string","description":"The venue where the concert will be held","example":"Madison Square Garden, New York, NY","minLength":1,"maxLength":300}},"description":"Concert information to create","example":{"artist":"The White Stripes","date":"2024-12-25","price":7500,"venue":"Madison Square Garden, New York, NY"},"required":["artist","date","venue","price"]},"ConcertsCreateBadRequestResponseBody":{"title":"Mediatype identifier: application/vnd.goa.error; view=default","type":"object","properties":{"fault":{"type":"boolean","description":"Is the error a server-side fault?","example":false},"id":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"message":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"name":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"temporary":{"type":"boolean","description":"Is the error temporary?","example":false},"timeout":{"type":"boolean","description":"Is the error a timeout?","example":false}},"description":"Error response result type (default view)","example":{"fault":false,"id":"123abc","message":"parameter 'p' must be an integer","name":"bad_request","temporary":false,"timeout":false},"required":["name","id","message","temporary","timeout","fault"]},"ConcertsDeleteNotFoundResponseBody":{"title":"Mediatype identifier: application/vnd.goa.error; view=default","type":"object","properties":{"fault":{"type":"boolean","description":"Is the error a server-side fault?","example":false},"id":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"message":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"name":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"temporary":{"type":"boolean","description":"Is the error temporary?","example":false},"timeout":{"type":"boolean","description":"Is the error a timeout?","example":false}},"description":"Error response result type (default view)","example":{"fault":false,"id":"123abc","message":"parameter 'p' must be an integer","name":"bad_request","temporary":false,"timeout":false},"required":["name","id","message","temporary","timeout","fault"]},"ConcertsShowNotFoundResponseBody":{"title":"Mediatype identifier: application/vnd.goa.error; view=default","type":"object","properties":{"fault":{"type":"boolean","description":"Is the error a server-side fault?","example":true},"id":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"message":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"name":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"temporary":{"type":"boolean","description":"Is the error temporary?","example":false},"timeout":{"type":"boolean","description":"Is the error a timeout?","example":false}},"description":"Error response result type (default view)","example":{"fault":true,"id":"123abc","message":"parameter 'p' must be an integer","name":"bad_request","temporary":false,"timeout":false},"required":["name","id","message","temporary","timeout","fault"]},"ConcertsUpdateBadRequestResponseBody":{"title":"Mediatype identifier: application/vnd.goa.error; view=default","type":"object","properties":{"fault":{"type":"boolean","description":"Is the error a server-side fault?","example":true},"id":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"message":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"name":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"temporary":{"type":"boolean","description":"Is the error temporary?","example":true},"timeout":{"type":"boolean","description":"Is the error a timeout?","example":true}},"description":"Error response result type (default view)","example":{"fault":true,"id":"123abc","message":"parameter 'p' must be an integer","name":"bad_request","temporary":true,"timeout":true},"required":["name","id","message","temporary","timeout","fault"]},"ConcertsUpdateNotFoundResponseBody":{"title":"Mediatype identifier: application/vnd.goa.error; view=default","type":"object","properties":{"fault":{"type":"boolean","description":"Is the error a server-side fault?","example":true},"id":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"message":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"name":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"temporary":{"type":"boolean","description":"Is the error temporary?","example":false},"timeout":{"type":"boolean","description":"Is the error a timeout?","example":true}},"description":"Error response result type (default view)","example":{"fault":true,"id":"123abc","message":"parameter 'p' must be an integer","name":"bad_request","temporary":false,"timeout":true},"required":["name","id","message","temporary","timeout","fault"]},"ConcertsUpdateRequestBody":{"title":"ConcertsUpdateRequestBody","type":"object","properties":{"artist":{"type":"string","description":"The main performer for this concert","example":"The White Stripes","minLength":1,"maxLength":200},"date":{"type":"string","description":"The date when the concert will take place","example":"2024-12-25","format":"date"},"price":{"type":"integer","description":"Base ticket price in cents (e.g., 7500 = $75.00)","example":7500,"format":"int64","minimum":0,"maximum":100000},"venue":{"type":"string","description":"The venue where the concert will be held","example":"Madison Square Garden, New York, NY","minLength":1,"maxLength":300}},"example":{"artist":"The White Stripes","date":"2024-12-25","price":7500,"venue":"Madison Square Garden, New York, NY"}}}} \ No newline at end of file diff --git a/concerts/gen/http/openapi.yaml b/concerts/gen/http/openapi.yaml index 78cac88d6..9d9b442b2 100644 --- a/concerts/gen/http/openapi.yaml +++ b/concerts/gen/http/openapi.yaml @@ -74,9 +74,17 @@ paths: - venue - price "400": - description: Bad Request response. + description: 'bad_request: Invalid input data provided' schema: $ref: '#/definitions/ConcertsCreateBadRequestResponseBody' + examples: + application/vnd.goa.error: + fault: false + id: 123abc + message: parameter 'p' must be an integer + name: bad_request + temporary: false + timeout: false schemes: - http /concerts/{concertID}: @@ -105,9 +113,17 @@ paths: - venue - price "404": - description: Not Found response. + description: 'not_found: Concert with the specified ID was not found' schema: $ref: '#/definitions/ConcertsShowNotFoundResponseBody' + examples: + application/vnd.goa.error: + fault: false + id: 123abc + message: parameter 'p' must be an integer + name: not_found + temporary: false + timeout: false schemes: - http put: @@ -140,13 +156,29 @@ paths: - venue - price "400": - description: Bad Request response. + description: 'bad_request: Invalid update data provided' schema: $ref: '#/definitions/ConcertsUpdateBadRequestResponseBody' + examples: + application/vnd.goa.error: + fault: false + id: 123abc + message: parameter 'p' must be an integer + name: bad_request + temporary: false + timeout: false "404": - description: Not Found response. + description: 'not_found: Concert with the specified ID was not found' schema: $ref: '#/definitions/ConcertsUpdateNotFoundResponseBody' + examples: + application/vnd.goa.error: + fault: false + id: 123abc + message: parameter 'p' must be an integer + name: not_found + temporary: false + timeout: false schemes: - http delete: @@ -166,9 +198,17 @@ paths: "204": description: No Content response. "404": - description: Not Found response. + description: 'not_found: Concert with the specified ID was not found' schema: $ref: '#/definitions/ConcertsDeleteNotFoundResponseBody' + examples: + application/vnd.goa.error: + fault: false + id: 123abc + message: parameter 'p' must be an integer + name: not_found + temporary: false + timeout: false schemes: - http /openapi3.json: @@ -306,19 +346,19 @@ definitions: temporary: type: boolean description: Is the error temporary? - example: true + example: false timeout: type: boolean description: Is the error a timeout? - example: true - description: Invalid input data provided (default view) + example: false + description: Error response result type (default view) example: fault: false id: 123abc message: parameter 'p' must be an integer name: bad_request - temporary: true - timeout: true + temporary: false + timeout: false required: - name - id @@ -349,19 +389,19 @@ definitions: temporary: type: boolean description: Is the error temporary? - example: true + example: false timeout: type: boolean description: Is the error a timeout? - example: true - description: Concert with the specified ID was not found (default view) + example: false + description: Error response result type (default view) example: fault: false id: 123abc message: parameter 'p' must be an integer name: bad_request - temporary: true - timeout: true + temporary: false + timeout: false required: - name - id @@ -376,7 +416,7 @@ definitions: fault: type: boolean description: Is the error a server-side fault? - example: false + example: true id: type: string description: ID is a unique identifier for this particular occurrence of the problem. @@ -392,19 +432,19 @@ definitions: temporary: type: boolean description: Is the error temporary? - example: true + example: false timeout: type: boolean description: Is the error a timeout? - example: true - description: Concert with the specified ID was not found (default view) + example: false + description: Error response result type (default view) example: - fault: false + fault: true id: 123abc message: parameter 'p' must be an integer name: bad_request - temporary: true - timeout: true + temporary: false + timeout: false required: - name - id @@ -419,7 +459,7 @@ definitions: fault: type: boolean description: Is the error a server-side fault? - example: false + example: true id: type: string description: ID is a unique identifier for this particular occurrence of the problem. @@ -440,9 +480,9 @@ definitions: type: boolean description: Is the error a timeout? example: true - description: Invalid update data provided (default view) + description: Error response result type (default view) example: - fault: false + fault: true id: 123abc message: parameter 'p' must be an integer name: bad_request @@ -462,7 +502,7 @@ definitions: fault: type: boolean description: Is the error a server-side fault? - example: false + example: true id: type: string description: ID is a unique identifier for this particular occurrence of the problem. @@ -478,18 +518,18 @@ definitions: temporary: type: boolean description: Is the error temporary? - example: true + example: false timeout: type: boolean description: Is the error a timeout? example: true - description: Concert with the specified ID was not found (default view) + description: Error response result type (default view) example: - fault: false + fault: true id: 123abc message: parameter 'p' must be an integer name: bad_request - temporary: true + temporary: false timeout: true required: - name diff --git a/concerts/gen/http/openapi3.2.json b/concerts/gen/http/openapi3.2.json index 90c11751a..be53abaca 100644 --- a/concerts/gen/http/openapi3.2.json +++ b/concerts/gen/http/openapi3.2.json @@ -1 +1 @@ -{"openapi":"3.2.0","info":{"title":"Concert Management API","description":"A simple API for managing music concert information","version":"1.0"},"servers":[{"url":"http://localhost:8080","name":"concerts","description":"Concert management server"}],"paths":{"/concerts":{"get":{"tags":["concerts"],"summary":"List all concerts","description":"List concerts with optional pagination. Returns an array of concerts sorted by date.","operationId":"concerts#list","parameters":[{"name":"page","in":"query","description":"Page number","allowEmptyValue":true,"schema":{"type":"integer","description":"Page number","default":1,"example":1,"format":"int64","minimum":1},"example":1},{"name":"limit","in":"query","description":"Number of items per page","allowEmptyValue":true,"schema":{"type":"integer","description":"Number of items per page","default":10,"example":10,"format":"int64","minimum":1,"maximum":100},"example":10}],"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Concert"},"description":"Array of concerts","example":[{"artist":"The White Stripes","date":"2024-12-25","id":"550e8400-e29b-41d4-a716-446655440000","price":7500,"venue":"Madison Square Garden, New York, NY"},{"artist":"The White Stripes","date":"2024-12-25","id":"550e8400-e29b-41d4-a716-446655440000","price":7500,"venue":"Madison Square Garden, New York, NY"},{"artist":"The White Stripes","date":"2024-12-25","id":"550e8400-e29b-41d4-a716-446655440000","price":7500,"venue":"Madison Square Garden, New York, NY"}]},"example":[{"artist":"The White Stripes","date":"2024-12-25","id":"550e8400-e29b-41d4-a716-446655440000","price":7500,"venue":"Madison Square Garden, New York, NY"},{"artist":"The White Stripes","date":"2024-12-25","id":"550e8400-e29b-41d4-a716-446655440000","price":7500,"venue":"Madison Square Garden, New York, NY"},{"artist":"The White Stripes","date":"2024-12-25","id":"550e8400-e29b-41d4-a716-446655440000","price":7500,"venue":"Madison Square Garden, New York, NY"}]}}}}},"post":{"tags":["concerts"],"summary":"Create a new concert","description":"Create a new concert entry. All fields are required to ensure complete concert information.","operationId":"concerts#create","requestBody":{"description":"Concert information to create","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConcertPayload"},"example":{"artist":"The White Stripes","date":"2024-12-25","price":7500,"venue":"Madison Square Garden, New York, NY"}}}},"responses":{"201":{"description":"Created response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Concert"},"example":{"artist":"The White Stripes","date":"2024-12-25","id":"550e8400-e29b-41d4-a716-446655440000","price":7500,"venue":"Madison Square Garden, New York, NY"}}}},"400":{"description":"bad_request: Invalid input data provided","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/concerts/{concertID}":{"delete":{"tags":["concerts"],"summary":"Delete concert","description":"Remove a concert from the system by ID. This operation cannot be undone.","operationId":"concerts#delete","parameters":[{"name":"concertID","in":"path","description":"ID of the concert to remove","required":true,"schema":{"type":"string","description":"ID of the concert to remove","example":"550e8400-e29b-41d4-a716-446655440000","format":"uuid"},"example":"550e8400-e29b-41d4-a716-446655440000"}],"responses":{"204":{"description":"No Content response."},"404":{"description":"not_found: Concert with the specified ID was not found","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"tags":["concerts"],"summary":"Get concert by ID","description":"Get a single concert by its unique ID.","operationId":"concerts#show","parameters":[{"name":"concertID","in":"path","description":"Unique concert identifier","required":true,"schema":{"type":"string","description":"Unique concert identifier","example":"550e8400-e29b-41d4-a716-446655440000","format":"uuid"},"example":"550e8400-e29b-41d4-a716-446655440000"}],"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Concert"},"example":{"artist":"The White Stripes","date":"2024-12-25","id":"550e8400-e29b-41d4-a716-446655440000","price":7500,"venue":"Madison Square Garden, New York, NY"}}}},"404":{"description":"not_found: Concert with the specified ID was not found","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"put":{"tags":["concerts"],"summary":"Update concert","description":"Update an existing concert by ID. Only provided fields will be updated.","operationId":"concerts#update","parameters":[{"name":"concertID","in":"path","description":"ID of the concert to update","required":true,"schema":{"type":"string","description":"ID of the concert to update","example":"550e8400-e29b-41d4-a716-446655440000","format":"uuid"},"example":"550e8400-e29b-41d4-a716-446655440000"}],"requestBody":{"description":"Request body for update.","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateRequestBody"},"example":{"artist":"The White Stripes","date":"2024-12-25","price":7500,"venue":"Madison Square Garden, New York, NY"}}}},"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Concert"},"example":{"artist":"The White Stripes","date":"2024-12-25","id":"550e8400-e29b-41d4-a716-446655440000","price":7500,"venue":"Madison Square Garden, New York, NY"}}}},"400":{"description":"bad_request: Invalid update data provided","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found: Concert with the specified ID was not found","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/openapi3.json":{"get":{"tags":["concerts"],"summary":"Download openapi3.json","operationId":"concerts#/openapi3.json","responses":{"200":{"description":"File downloaded"}}}},"/openapi3.yaml":{"get":{"tags":["concerts"],"summary":"Download openapi3.yaml","operationId":"concerts#/openapi3.yaml","responses":{"200":{"description":"File downloaded"}}}}},"components":{"schemas":{"Concert":{"type":"object","properties":{"artist":{"type":"string","description":"The main performer for this concert","example":"The White Stripes","minLength":1,"maxLength":200},"date":{"type":"string","description":"The date when the concert will take place","example":"2024-12-25","format":"date"},"id":{"type":"string","description":"System-generated unique identifier","example":"550e8400-e29b-41d4-a716-446655440000","format":"uuid"},"price":{"type":"integer","description":"Base ticket price in cents (e.g., 7500 = $75.00)","example":7500,"format":"int64","minimum":0,"maximum":100000},"venue":{"type":"string","description":"The venue where the concert will be held","example":"Madison Square Garden, New York, NY","minLength":1,"maxLength":300}},"description":"Complete concert information including system-generated ID.","example":{"artist":"The White Stripes","date":"2024-12-25","id":"550e8400-e29b-41d4-a716-446655440000","price":7500,"venue":"Madison Square Garden, New York, NY"},"required":["id","artist","date","venue","price"]},"ConcertPayload":{"type":"object","properties":{"artist":{"type":"string","description":"The main performer for this concert","example":"The White Stripes","minLength":1,"maxLength":200},"date":{"type":"string","description":"The date when the concert will take place","example":"2024-12-25","format":"date"},"price":{"type":"integer","description":"Base ticket price in cents (e.g., 7500 = $75.00)","example":7500,"format":"int64","minimum":0,"maximum":100000},"venue":{"type":"string","description":"The venue where the concert will be held","example":"Madison Square Garden, New York, NY","minLength":1,"maxLength":300}},"description":"Concert information to create","example":{"artist":"The White Stripes","date":"2024-12-25","price":7500,"venue":"Madison Square Garden, New York, NY"},"required":["artist","date","venue","price"]},"Error":{"type":"object","properties":{"fault":{"type":"boolean","description":"Is the error a server-side fault?","example":false},"id":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"message":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"name":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"temporary":{"type":"boolean","description":"Is the error temporary?","example":true},"timeout":{"type":"boolean","description":"Is the error a timeout?","example":true}},"description":"Invalid input data provided","example":{"fault":false,"id":"123abc","message":"parameter 'p' must be an integer","name":"bad_request","temporary":true,"timeout":true},"required":["name","id","message","temporary","timeout","fault"]},"UpdateRequestBody":{"type":"object","properties":{"artist":{"type":"string","description":"The main performer for this concert","example":"The White Stripes","minLength":1,"maxLength":200},"date":{"type":"string","description":"The date when the concert will take place","example":"2024-12-25","format":"date"},"price":{"type":"integer","description":"Base ticket price in cents (e.g., 7500 = $75.00)","example":7500,"format":"int64","minimum":0,"maximum":100000},"venue":{"type":"string","description":"The venue where the concert will be held","example":"Madison Square Garden, New York, NY","minLength":1,"maxLength":300}},"description":"Request body for update.","example":{"artist":"The White Stripes","date":"2024-12-25","price":7500,"venue":"Madison Square Garden, New York, NY"}}}},"tags":[{"name":"concerts","description":"The concerts service manages music concert data. It provides CRUD operations for concert information including artist details, venues, dates, and pricing."}]} \ No newline at end of file +{"openapi":"3.2.0","info":{"title":"Concert Management API","description":"A simple API for managing music concert information","version":"1.0"},"servers":[{"url":"http://localhost:8080","name":"concerts","description":"Concert management server"}],"paths":{"/concerts":{"get":{"tags":["concerts"],"summary":"List all concerts","description":"List concerts with optional pagination. Returns an array of concerts sorted by date.","operationId":"concerts#list","parameters":[{"name":"page","in":"query","description":"Page number","allowEmptyValue":true,"schema":{"type":"integer","description":"Page number","default":1,"example":1,"format":"int64","minimum":1},"example":1},{"name":"limit","in":"query","description":"Number of items per page","allowEmptyValue":true,"schema":{"type":"integer","description":"Number of items per page","default":10,"example":10,"format":"int64","minimum":1,"maximum":100},"example":10}],"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Concert"},"description":"Array of concerts","example":[{"artist":"The White Stripes","date":"2024-12-25","id":"550e8400-e29b-41d4-a716-446655440000","price":7500,"venue":"Madison Square Garden, New York, NY"},{"artist":"The White Stripes","date":"2024-12-25","id":"550e8400-e29b-41d4-a716-446655440000","price":7500,"venue":"Madison Square Garden, New York, NY"},{"artist":"The White Stripes","date":"2024-12-25","id":"550e8400-e29b-41d4-a716-446655440000","price":7500,"venue":"Madison Square Garden, New York, NY"},{"artist":"The White Stripes","date":"2024-12-25","id":"550e8400-e29b-41d4-a716-446655440000","price":7500,"venue":"Madison Square Garden, New York, NY"}]},"example":[{"artist":"The White Stripes","date":"2024-12-25","id":"550e8400-e29b-41d4-a716-446655440000","price":7500,"venue":"Madison Square Garden, New York, NY"},{"artist":"The White Stripes","date":"2024-12-25","id":"550e8400-e29b-41d4-a716-446655440000","price":7500,"venue":"Madison Square Garden, New York, NY"},{"artist":"The White Stripes","date":"2024-12-25","id":"550e8400-e29b-41d4-a716-446655440000","price":7500,"venue":"Madison Square Garden, New York, NY"},{"artist":"The White Stripes","date":"2024-12-25","id":"550e8400-e29b-41d4-a716-446655440000","price":7500,"venue":"Madison Square Garden, New York, NY"}]}}}}},"post":{"tags":["concerts"],"summary":"Create a new concert","description":"Create a new concert entry. All fields are required to ensure complete concert information.","operationId":"concerts#create","requestBody":{"description":"Concert information to create","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConcertPayload"},"example":{"artist":"The White Stripes","date":"2024-12-25","price":7500,"venue":"Madison Square Garden, New York, NY"}}}},"responses":{"201":{"description":"Created response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Concert"},"example":{"artist":"The White Stripes","date":"2024-12-25","id":"550e8400-e29b-41d4-a716-446655440000","price":7500,"venue":"Madison Square Garden, New York, NY"}}}},"400":{"description":"bad_request: Invalid input data provided","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"fault":false,"id":"123abc","message":"parameter 'p' must be an integer","name":"bad_request","temporary":false,"timeout":false}}}}}}},"/concerts/{concertID}":{"delete":{"tags":["concerts"],"summary":"Delete concert","description":"Remove a concert from the system by ID. This operation cannot be undone.","operationId":"concerts#delete","parameters":[{"name":"concertID","in":"path","description":"ID of the concert to remove","required":true,"schema":{"type":"string","description":"ID of the concert to remove","example":"550e8400-e29b-41d4-a716-446655440000","format":"uuid"},"example":"550e8400-e29b-41d4-a716-446655440000"}],"responses":{"204":{"description":"No Content response."},"404":{"description":"not_found: Concert with the specified ID was not found","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"fault":false,"id":"123abc","message":"parameter 'p' must be an integer","name":"not_found","temporary":false,"timeout":false}}}}}},"get":{"tags":["concerts"],"summary":"Get concert by ID","description":"Get a single concert by its unique ID.","operationId":"concerts#show","parameters":[{"name":"concertID","in":"path","description":"Unique concert identifier","required":true,"schema":{"type":"string","description":"Unique concert identifier","example":"550e8400-e29b-41d4-a716-446655440000","format":"uuid"},"example":"550e8400-e29b-41d4-a716-446655440000"}],"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Concert"},"example":{"artist":"The White Stripes","date":"2024-12-25","id":"550e8400-e29b-41d4-a716-446655440000","price":7500,"venue":"Madison Square Garden, New York, NY"}}}},"404":{"description":"not_found: Concert with the specified ID was not found","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"fault":false,"id":"123abc","message":"parameter 'p' must be an integer","name":"not_found","temporary":false,"timeout":false}}}}}},"put":{"tags":["concerts"],"summary":"Update concert","description":"Update an existing concert by ID. Only provided fields will be updated.","operationId":"concerts#update","parameters":[{"name":"concertID","in":"path","description":"ID of the concert to update","required":true,"schema":{"type":"string","description":"ID of the concert to update","example":"550e8400-e29b-41d4-a716-446655440000","format":"uuid"},"example":"550e8400-e29b-41d4-a716-446655440000"}],"requestBody":{"description":"Request body for update.","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateRequestBody"},"example":{"artist":"The White Stripes","date":"2024-12-25","price":7500,"venue":"Madison Square Garden, New York, NY"}}}},"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Concert"},"example":{"artist":"The White Stripes","date":"2024-12-25","id":"550e8400-e29b-41d4-a716-446655440000","price":7500,"venue":"Madison Square Garden, New York, NY"}}}},"400":{"description":"bad_request: Invalid update data provided","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"fault":false,"id":"123abc","message":"parameter 'p' must be an integer","name":"bad_request","temporary":false,"timeout":false}}}},"404":{"description":"not_found: Concert with the specified ID was not found","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"fault":false,"id":"123abc","message":"parameter 'p' must be an integer","name":"not_found","temporary":false,"timeout":false}}}}}}},"/openapi3.json":{"get":{"tags":["concerts"],"summary":"Download openapi3.json","operationId":"concerts#/openapi3.json","responses":{"200":{"description":"File downloaded"}}}},"/openapi3.yaml":{"get":{"tags":["concerts"],"summary":"Download openapi3.yaml","operationId":"concerts#/openapi3.yaml","responses":{"200":{"description":"File downloaded"}}}}},"components":{"schemas":{"Concert":{"type":"object","properties":{"artist":{"type":"string","description":"The main performer for this concert","example":"The White Stripes","minLength":1,"maxLength":200},"date":{"type":"string","description":"The date when the concert will take place","example":"2024-12-25","format":"date"},"id":{"type":"string","description":"System-generated unique identifier","example":"550e8400-e29b-41d4-a716-446655440000","format":"uuid"},"price":{"type":"integer","description":"Base ticket price in cents (e.g., 7500 = $75.00)","example":7500,"format":"int64","minimum":0,"maximum":100000},"venue":{"type":"string","description":"The venue where the concert will be held","example":"Madison Square Garden, New York, NY","minLength":1,"maxLength":300}},"description":"Complete concert information including system-generated ID.","example":{"artist":"The White Stripes","date":"2024-12-25","id":"550e8400-e29b-41d4-a716-446655440000","price":7500,"venue":"Madison Square Garden, New York, NY"},"required":["id","artist","date","venue","price"]},"ConcertPayload":{"type":"object","properties":{"artist":{"type":"string","description":"The main performer for this concert","example":"The White Stripes","minLength":1,"maxLength":200},"date":{"type":"string","description":"The date when the concert will take place","example":"2024-12-25","format":"date"},"price":{"type":"integer","description":"Base ticket price in cents (e.g., 7500 = $75.00)","example":7500,"format":"int64","minimum":0,"maximum":100000},"venue":{"type":"string","description":"The venue where the concert will be held","example":"Madison Square Garden, New York, NY","minLength":1,"maxLength":300}},"description":"Concert information to create","example":{"artist":"The White Stripes","date":"2024-12-25","price":7500,"venue":"Madison Square Garden, New York, NY"},"required":["artist","date","venue","price"]},"Error":{"type":"object","properties":{"fault":{"type":"boolean","description":"Is the error a server-side fault?","example":false},"id":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"message":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"name":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"temporary":{"type":"boolean","description":"Is the error temporary?","example":false},"timeout":{"type":"boolean","description":"Is the error a timeout?","example":false}},"description":"Error response result type","example":{"fault":false,"id":"123abc","message":"parameter 'p' must be an integer","name":"bad_request","temporary":false,"timeout":false},"required":["name","id","message","temporary","timeout","fault"]},"UpdateRequestBody":{"type":"object","properties":{"artist":{"type":"string","description":"The main performer for this concert","example":"The White Stripes","minLength":1,"maxLength":200},"date":{"type":"string","description":"The date when the concert will take place","example":"2024-12-25","format":"date"},"price":{"type":"integer","description":"Base ticket price in cents (e.g., 7500 = $75.00)","example":7500,"format":"int64","minimum":0,"maximum":100000},"venue":{"type":"string","description":"The venue where the concert will be held","example":"Madison Square Garden, New York, NY","minLength":1,"maxLength":300}},"description":"Request body for update.","example":{"artist":"The White Stripes","date":"2024-12-25","price":7500,"venue":"Madison Square Garden, New York, NY"}}}},"tags":[{"name":"concerts","description":"The concerts service manages music concert data. It provides CRUD operations for concert information including artist details, venues, dates, and pricing."}]} \ No newline at end of file diff --git a/concerts/gen/http/openapi3.2.yaml b/concerts/gen/http/openapi3.2.yaml index 68dfd504d..817564155 100644 --- a/concerts/gen/http/openapi3.2.yaml +++ b/concerts/gen/http/openapi3.2.yaml @@ -67,6 +67,11 @@ paths: id: 550e8400-e29b-41d4-a716-446655440000 price: 7500 venue: Madison Square Garden, New York, NY + - artist: The White Stripes + date: "2024-12-25" + id: 550e8400-e29b-41d4-a716-446655440000 + price: 7500 + venue: Madison Square Garden, New York, NY example: - artist: The White Stripes date: "2024-12-25" @@ -83,6 +88,11 @@ paths: id: 550e8400-e29b-41d4-a716-446655440000 price: 7500 venue: Madison Square Garden, New York, NY + - artist: The White Stripes + date: "2024-12-25" + id: 550e8400-e29b-41d4-a716-446655440000 + price: 7500 + venue: Madison Square Garden, New York, NY post: tags: - concerts @@ -120,6 +130,13 @@ paths: application/vnd.goa.error: schema: $ref: '#/components/schemas/Error' + example: + fault: false + id: 123abc + message: parameter 'p' must be an integer + name: bad_request + temporary: false + timeout: false /concerts/{concertID}: delete: tags: @@ -147,6 +164,13 @@ paths: application/vnd.goa.error: schema: $ref: '#/components/schemas/Error' + example: + fault: false + id: 123abc + message: parameter 'p' must be an integer + name: not_found + temporary: false + timeout: false get: tags: - concerts @@ -183,6 +207,13 @@ paths: application/vnd.goa.error: schema: $ref: '#/components/schemas/Error' + example: + fault: false + id: 123abc + message: parameter 'p' must be an integer + name: not_found + temporary: false + timeout: false put: tags: - concerts @@ -231,12 +262,26 @@ paths: application/vnd.goa.error: schema: $ref: '#/components/schemas/Error' + example: + fault: false + id: 123abc + message: parameter 'p' must be an integer + name: bad_request + temporary: false + timeout: false "404": description: 'not_found: Concert with the specified ID was not found' content: application/vnd.goa.error: schema: $ref: '#/components/schemas/Error' + example: + fault: false + id: 123abc + message: parameter 'p' must be an integer + name: not_found + temporary: false + timeout: false /openapi3.json: get: tags: @@ -362,19 +407,19 @@ components: temporary: type: boolean description: Is the error temporary? - example: true + example: false timeout: type: boolean description: Is the error a timeout? - example: true - description: Invalid input data provided + example: false + description: Error response result type example: fault: false id: 123abc message: parameter 'p' must be an integer name: bad_request - temporary: true - timeout: true + temporary: false + timeout: false required: - name - id diff --git a/concerts/gen/http/openapi3.json b/concerts/gen/http/openapi3.json index 1436506e4..e6fe95325 100644 --- a/concerts/gen/http/openapi3.json +++ b/concerts/gen/http/openapi3.json @@ -1 +1 @@ -{"openapi":"3.0.3","info":{"title":"Concert Management API","description":"A simple API for managing music concert information","version":"1.0"},"servers":[{"url":"http://localhost:8080","description":"Concert management server"}],"paths":{"/concerts":{"get":{"tags":["concerts"],"summary":"List all concerts","description":"List concerts with optional pagination. Returns an array of concerts sorted by date.","operationId":"concerts#list","parameters":[{"name":"page","in":"query","description":"Page number","allowEmptyValue":true,"schema":{"type":"integer","description":"Page number","default":1,"example":1,"format":"int64","minimum":1},"example":1},{"name":"limit","in":"query","description":"Number of items per page","allowEmptyValue":true,"schema":{"type":"integer","description":"Number of items per page","default":10,"example":10,"format":"int64","minimum":1,"maximum":100},"example":10}],"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Concert"},"description":"Array of concerts","example":[{"artist":"The White Stripes","date":"2024-12-25","id":"550e8400-e29b-41d4-a716-446655440000","price":7500,"venue":"Madison Square Garden, New York, NY"},{"artist":"The White Stripes","date":"2024-12-25","id":"550e8400-e29b-41d4-a716-446655440000","price":7500,"venue":"Madison Square Garden, New York, NY"},{"artist":"The White Stripes","date":"2024-12-25","id":"550e8400-e29b-41d4-a716-446655440000","price":7500,"venue":"Madison Square Garden, New York, NY"}]},"example":[{"artist":"The White Stripes","date":"2024-12-25","id":"550e8400-e29b-41d4-a716-446655440000","price":7500,"venue":"Madison Square Garden, New York, NY"},{"artist":"The White Stripes","date":"2024-12-25","id":"550e8400-e29b-41d4-a716-446655440000","price":7500,"venue":"Madison Square Garden, New York, NY"},{"artist":"The White Stripes","date":"2024-12-25","id":"550e8400-e29b-41d4-a716-446655440000","price":7500,"venue":"Madison Square Garden, New York, NY"}]}}}}},"post":{"tags":["concerts"],"summary":"Create a new concert","description":"Create a new concert entry. All fields are required to ensure complete concert information.","operationId":"concerts#create","requestBody":{"description":"Concert information to create","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConcertPayload"},"example":{"artist":"The White Stripes","date":"2024-12-25","price":7500,"venue":"Madison Square Garden, New York, NY"}}}},"responses":{"201":{"description":"Created response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Concert"},"example":{"artist":"The White Stripes","date":"2024-12-25","id":"550e8400-e29b-41d4-a716-446655440000","price":7500,"venue":"Madison Square Garden, New York, NY"}}}},"400":{"description":"bad_request: Invalid input data provided","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/concerts/{concertID}":{"delete":{"tags":["concerts"],"summary":"Delete concert","description":"Remove a concert from the system by ID. This operation cannot be undone.","operationId":"concerts#delete","parameters":[{"name":"concertID","in":"path","description":"ID of the concert to remove","required":true,"schema":{"type":"string","description":"ID of the concert to remove","example":"550e8400-e29b-41d4-a716-446655440000","format":"uuid"},"example":"550e8400-e29b-41d4-a716-446655440000"}],"responses":{"204":{"description":"No Content response."},"404":{"description":"not_found: Concert with the specified ID was not found","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"tags":["concerts"],"summary":"Get concert by ID","description":"Get a single concert by its unique ID.","operationId":"concerts#show","parameters":[{"name":"concertID","in":"path","description":"Unique concert identifier","required":true,"schema":{"type":"string","description":"Unique concert identifier","example":"550e8400-e29b-41d4-a716-446655440000","format":"uuid"},"example":"550e8400-e29b-41d4-a716-446655440000"}],"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Concert"},"example":{"artist":"The White Stripes","date":"2024-12-25","id":"550e8400-e29b-41d4-a716-446655440000","price":7500,"venue":"Madison Square Garden, New York, NY"}}}},"404":{"description":"not_found: Concert with the specified ID was not found","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"put":{"tags":["concerts"],"summary":"Update concert","description":"Update an existing concert by ID. Only provided fields will be updated.","operationId":"concerts#update","parameters":[{"name":"concertID","in":"path","description":"ID of the concert to update","required":true,"schema":{"type":"string","description":"ID of the concert to update","example":"550e8400-e29b-41d4-a716-446655440000","format":"uuid"},"example":"550e8400-e29b-41d4-a716-446655440000"}],"requestBody":{"description":"Request body for update.","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateRequestBody"},"example":{"artist":"The White Stripes","date":"2024-12-25","price":7500,"venue":"Madison Square Garden, New York, NY"}}}},"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Concert"},"example":{"artist":"The White Stripes","date":"2024-12-25","id":"550e8400-e29b-41d4-a716-446655440000","price":7500,"venue":"Madison Square Garden, New York, NY"}}}},"400":{"description":"bad_request: Invalid update data provided","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found: Concert with the specified ID was not found","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/openapi3.json":{"get":{"tags":["concerts"],"summary":"Download openapi3.json","operationId":"concerts#/openapi3.json","responses":{"200":{"description":"File downloaded"}}}},"/openapi3.yaml":{"get":{"tags":["concerts"],"summary":"Download openapi3.yaml","operationId":"concerts#/openapi3.yaml","responses":{"200":{"description":"File downloaded"}}}}},"components":{"schemas":{"Concert":{"type":"object","properties":{"artist":{"type":"string","description":"The main performer for this concert","example":"The White Stripes","minLength":1,"maxLength":200},"date":{"type":"string","description":"The date when the concert will take place","example":"2024-12-25","format":"date"},"id":{"type":"string","description":"System-generated unique identifier","example":"550e8400-e29b-41d4-a716-446655440000","format":"uuid"},"price":{"type":"integer","description":"Base ticket price in cents (e.g., 7500 = $75.00)","example":7500,"format":"int64","minimum":0,"maximum":100000},"venue":{"type":"string","description":"The venue where the concert will be held","example":"Madison Square Garden, New York, NY","minLength":1,"maxLength":300}},"description":"Complete concert information including system-generated ID.","example":{"artist":"The White Stripes","date":"2024-12-25","id":"550e8400-e29b-41d4-a716-446655440000","price":7500,"venue":"Madison Square Garden, New York, NY"},"required":["id","artist","date","venue","price"]},"ConcertPayload":{"type":"object","properties":{"artist":{"type":"string","description":"The main performer for this concert","example":"The White Stripes","minLength":1,"maxLength":200},"date":{"type":"string","description":"The date when the concert will take place","example":"2024-12-25","format":"date"},"price":{"type":"integer","description":"Base ticket price in cents (e.g., 7500 = $75.00)","example":7500,"format":"int64","minimum":0,"maximum":100000},"venue":{"type":"string","description":"The venue where the concert will be held","example":"Madison Square Garden, New York, NY","minLength":1,"maxLength":300}},"description":"Concert information to create","example":{"artist":"The White Stripes","date":"2024-12-25","price":7500,"venue":"Madison Square Garden, New York, NY"},"required":["artist","date","venue","price"]},"Error":{"type":"object","properties":{"fault":{"type":"boolean","description":"Is the error a server-side fault?","example":false},"id":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"message":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"name":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"temporary":{"type":"boolean","description":"Is the error temporary?","example":true},"timeout":{"type":"boolean","description":"Is the error a timeout?","example":true}},"description":"Invalid input data provided","example":{"fault":false,"id":"123abc","message":"parameter 'p' must be an integer","name":"bad_request","temporary":true,"timeout":true},"required":["name","id","message","temporary","timeout","fault"]},"UpdateRequestBody":{"type":"object","properties":{"artist":{"type":"string","description":"The main performer for this concert","example":"The White Stripes","minLength":1,"maxLength":200},"date":{"type":"string","description":"The date when the concert will take place","example":"2024-12-25","format":"date"},"price":{"type":"integer","description":"Base ticket price in cents (e.g., 7500 = $75.00)","example":7500,"format":"int64","minimum":0,"maximum":100000},"venue":{"type":"string","description":"The venue where the concert will be held","example":"Madison Square Garden, New York, NY","minLength":1,"maxLength":300}},"description":"Request body for update.","example":{"artist":"The White Stripes","date":"2024-12-25","price":7500,"venue":"Madison Square Garden, New York, NY"}}}},"tags":[{"name":"concerts","description":"The concerts service manages music concert data. It provides CRUD operations for concert information including artist details, venues, dates, and pricing."}]} \ No newline at end of file +{"openapi":"3.0.3","info":{"title":"Concert Management API","description":"A simple API for managing music concert information","version":"1.0"},"servers":[{"url":"http://localhost:8080","description":"Concert management server"}],"paths":{"/concerts":{"get":{"tags":["concerts"],"summary":"List all concerts","description":"List concerts with optional pagination. Returns an array of concerts sorted by date.","operationId":"concerts#list","parameters":[{"name":"page","in":"query","description":"Page number","allowEmptyValue":true,"schema":{"type":"integer","description":"Page number","default":1,"example":1,"format":"int64","minimum":1},"example":1},{"name":"limit","in":"query","description":"Number of items per page","allowEmptyValue":true,"schema":{"type":"integer","description":"Number of items per page","default":10,"example":10,"format":"int64","minimum":1,"maximum":100},"example":10}],"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Concert"},"description":"Array of concerts","example":[{"artist":"The White Stripes","date":"2024-12-25","id":"550e8400-e29b-41d4-a716-446655440000","price":7500,"venue":"Madison Square Garden, New York, NY"},{"artist":"The White Stripes","date":"2024-12-25","id":"550e8400-e29b-41d4-a716-446655440000","price":7500,"venue":"Madison Square Garden, New York, NY"},{"artist":"The White Stripes","date":"2024-12-25","id":"550e8400-e29b-41d4-a716-446655440000","price":7500,"venue":"Madison Square Garden, New York, NY"},{"artist":"The White Stripes","date":"2024-12-25","id":"550e8400-e29b-41d4-a716-446655440000","price":7500,"venue":"Madison Square Garden, New York, NY"}]},"example":[{"artist":"The White Stripes","date":"2024-12-25","id":"550e8400-e29b-41d4-a716-446655440000","price":7500,"venue":"Madison Square Garden, New York, NY"},{"artist":"The White Stripes","date":"2024-12-25","id":"550e8400-e29b-41d4-a716-446655440000","price":7500,"venue":"Madison Square Garden, New York, NY"},{"artist":"The White Stripes","date":"2024-12-25","id":"550e8400-e29b-41d4-a716-446655440000","price":7500,"venue":"Madison Square Garden, New York, NY"},{"artist":"The White Stripes","date":"2024-12-25","id":"550e8400-e29b-41d4-a716-446655440000","price":7500,"venue":"Madison Square Garden, New York, NY"}]}}}}},"post":{"tags":["concerts"],"summary":"Create a new concert","description":"Create a new concert entry. All fields are required to ensure complete concert information.","operationId":"concerts#create","requestBody":{"description":"Concert information to create","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConcertPayload"},"example":{"artist":"The White Stripes","date":"2024-12-25","price":7500,"venue":"Madison Square Garden, New York, NY"}}}},"responses":{"201":{"description":"Created response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Concert"},"example":{"artist":"The White Stripes","date":"2024-12-25","id":"550e8400-e29b-41d4-a716-446655440000","price":7500,"venue":"Madison Square Garden, New York, NY"}}}},"400":{"description":"bad_request: Invalid input data provided","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"fault":false,"id":"123abc","message":"parameter 'p' must be an integer","name":"bad_request","temporary":false,"timeout":false}}}}}}},"/concerts/{concertID}":{"delete":{"tags":["concerts"],"summary":"Delete concert","description":"Remove a concert from the system by ID. This operation cannot be undone.","operationId":"concerts#delete","parameters":[{"name":"concertID","in":"path","description":"ID of the concert to remove","required":true,"schema":{"type":"string","description":"ID of the concert to remove","example":"550e8400-e29b-41d4-a716-446655440000","format":"uuid"},"example":"550e8400-e29b-41d4-a716-446655440000"}],"responses":{"204":{"description":"No Content response."},"404":{"description":"not_found: Concert with the specified ID was not found","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"fault":false,"id":"123abc","message":"parameter 'p' must be an integer","name":"not_found","temporary":false,"timeout":false}}}}}},"get":{"tags":["concerts"],"summary":"Get concert by ID","description":"Get a single concert by its unique ID.","operationId":"concerts#show","parameters":[{"name":"concertID","in":"path","description":"Unique concert identifier","required":true,"schema":{"type":"string","description":"Unique concert identifier","example":"550e8400-e29b-41d4-a716-446655440000","format":"uuid"},"example":"550e8400-e29b-41d4-a716-446655440000"}],"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Concert"},"example":{"artist":"The White Stripes","date":"2024-12-25","id":"550e8400-e29b-41d4-a716-446655440000","price":7500,"venue":"Madison Square Garden, New York, NY"}}}},"404":{"description":"not_found: Concert with the specified ID was not found","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"fault":false,"id":"123abc","message":"parameter 'p' must be an integer","name":"not_found","temporary":false,"timeout":false}}}}}},"put":{"tags":["concerts"],"summary":"Update concert","description":"Update an existing concert by ID. Only provided fields will be updated.","operationId":"concerts#update","parameters":[{"name":"concertID","in":"path","description":"ID of the concert to update","required":true,"schema":{"type":"string","description":"ID of the concert to update","example":"550e8400-e29b-41d4-a716-446655440000","format":"uuid"},"example":"550e8400-e29b-41d4-a716-446655440000"}],"requestBody":{"description":"Request body for update.","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateRequestBody"},"example":{"artist":"The White Stripes","date":"2024-12-25","price":7500,"venue":"Madison Square Garden, New York, NY"}}}},"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Concert"},"example":{"artist":"The White Stripes","date":"2024-12-25","id":"550e8400-e29b-41d4-a716-446655440000","price":7500,"venue":"Madison Square Garden, New York, NY"}}}},"400":{"description":"bad_request: Invalid update data provided","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"fault":false,"id":"123abc","message":"parameter 'p' must be an integer","name":"bad_request","temporary":false,"timeout":false}}}},"404":{"description":"not_found: Concert with the specified ID was not found","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"fault":false,"id":"123abc","message":"parameter 'p' must be an integer","name":"not_found","temporary":false,"timeout":false}}}}}}},"/openapi3.json":{"get":{"tags":["concerts"],"summary":"Download openapi3.json","operationId":"concerts#/openapi3.json","responses":{"200":{"description":"File downloaded"}}}},"/openapi3.yaml":{"get":{"tags":["concerts"],"summary":"Download openapi3.yaml","operationId":"concerts#/openapi3.yaml","responses":{"200":{"description":"File downloaded"}}}}},"components":{"schemas":{"Concert":{"type":"object","properties":{"artist":{"type":"string","description":"The main performer for this concert","example":"The White Stripes","minLength":1,"maxLength":200},"date":{"type":"string","description":"The date when the concert will take place","example":"2024-12-25","format":"date"},"id":{"type":"string","description":"System-generated unique identifier","example":"550e8400-e29b-41d4-a716-446655440000","format":"uuid"},"price":{"type":"integer","description":"Base ticket price in cents (e.g., 7500 = $75.00)","example":7500,"format":"int64","minimum":0,"maximum":100000},"venue":{"type":"string","description":"The venue where the concert will be held","example":"Madison Square Garden, New York, NY","minLength":1,"maxLength":300}},"description":"Complete concert information including system-generated ID.","example":{"artist":"The White Stripes","date":"2024-12-25","id":"550e8400-e29b-41d4-a716-446655440000","price":7500,"venue":"Madison Square Garden, New York, NY"},"required":["id","artist","date","venue","price"]},"ConcertPayload":{"type":"object","properties":{"artist":{"type":"string","description":"The main performer for this concert","example":"The White Stripes","minLength":1,"maxLength":200},"date":{"type":"string","description":"The date when the concert will take place","example":"2024-12-25","format":"date"},"price":{"type":"integer","description":"Base ticket price in cents (e.g., 7500 = $75.00)","example":7500,"format":"int64","minimum":0,"maximum":100000},"venue":{"type":"string","description":"The venue where the concert will be held","example":"Madison Square Garden, New York, NY","minLength":1,"maxLength":300}},"description":"Concert information to create","example":{"artist":"The White Stripes","date":"2024-12-25","price":7500,"venue":"Madison Square Garden, New York, NY"},"required":["artist","date","venue","price"]},"Error":{"type":"object","properties":{"fault":{"type":"boolean","description":"Is the error a server-side fault?","example":false},"id":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"message":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"name":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"temporary":{"type":"boolean","description":"Is the error temporary?","example":false},"timeout":{"type":"boolean","description":"Is the error a timeout?","example":false}},"description":"Error response result type","example":{"fault":false,"id":"123abc","message":"parameter 'p' must be an integer","name":"bad_request","temporary":false,"timeout":false},"required":["name","id","message","temporary","timeout","fault"]},"UpdateRequestBody":{"type":"object","properties":{"artist":{"type":"string","description":"The main performer for this concert","example":"The White Stripes","minLength":1,"maxLength":200},"date":{"type":"string","description":"The date when the concert will take place","example":"2024-12-25","format":"date"},"price":{"type":"integer","description":"Base ticket price in cents (e.g., 7500 = $75.00)","example":7500,"format":"int64","minimum":0,"maximum":100000},"venue":{"type":"string","description":"The venue where the concert will be held","example":"Madison Square Garden, New York, NY","minLength":1,"maxLength":300}},"description":"Request body for update.","example":{"artist":"The White Stripes","date":"2024-12-25","price":7500,"venue":"Madison Square Garden, New York, NY"}}}},"tags":[{"name":"concerts","description":"The concerts service manages music concert data. It provides CRUD operations for concert information including artist details, venues, dates, and pricing."}]} \ No newline at end of file diff --git a/concerts/gen/http/openapi3.yaml b/concerts/gen/http/openapi3.yaml index 09e35c03d..5af61c1d7 100644 --- a/concerts/gen/http/openapi3.yaml +++ b/concerts/gen/http/openapi3.yaml @@ -66,6 +66,11 @@ paths: id: 550e8400-e29b-41d4-a716-446655440000 price: 7500 venue: Madison Square Garden, New York, NY + - artist: The White Stripes + date: "2024-12-25" + id: 550e8400-e29b-41d4-a716-446655440000 + price: 7500 + venue: Madison Square Garden, New York, NY example: - artist: The White Stripes date: "2024-12-25" @@ -82,6 +87,11 @@ paths: id: 550e8400-e29b-41d4-a716-446655440000 price: 7500 venue: Madison Square Garden, New York, NY + - artist: The White Stripes + date: "2024-12-25" + id: 550e8400-e29b-41d4-a716-446655440000 + price: 7500 + venue: Madison Square Garden, New York, NY post: tags: - concerts @@ -119,6 +129,13 @@ paths: application/vnd.goa.error: schema: $ref: '#/components/schemas/Error' + example: + fault: false + id: 123abc + message: parameter 'p' must be an integer + name: bad_request + temporary: false + timeout: false /concerts/{concertID}: delete: tags: @@ -146,6 +163,13 @@ paths: application/vnd.goa.error: schema: $ref: '#/components/schemas/Error' + example: + fault: false + id: 123abc + message: parameter 'p' must be an integer + name: not_found + temporary: false + timeout: false get: tags: - concerts @@ -182,6 +206,13 @@ paths: application/vnd.goa.error: schema: $ref: '#/components/schemas/Error' + example: + fault: false + id: 123abc + message: parameter 'p' must be an integer + name: not_found + temporary: false + timeout: false put: tags: - concerts @@ -230,12 +261,26 @@ paths: application/vnd.goa.error: schema: $ref: '#/components/schemas/Error' + example: + fault: false + id: 123abc + message: parameter 'p' must be an integer + name: bad_request + temporary: false + timeout: false "404": description: 'not_found: Concert with the specified ID was not found' content: application/vnd.goa.error: schema: $ref: '#/components/schemas/Error' + example: + fault: false + id: 123abc + message: parameter 'p' must be an integer + name: not_found + temporary: false + timeout: false /openapi3.json: get: tags: @@ -361,19 +406,19 @@ components: temporary: type: boolean description: Is the error temporary? - example: true + example: false timeout: type: boolean description: Is the error a timeout? - example: true - description: Invalid input data provided + example: false + description: Error response result type example: fault: false id: 123abc message: parameter 'p' must be an integer name: bad_request - temporary: true - timeout: true + temporary: false + timeout: false required: - name - id diff --git a/concerts/openapi.go b/concerts/openapi.go index d10ef83b6..364069a2a 100644 --- a/concerts/openapi.go +++ b/concerts/openapi.go @@ -1,4 +1,4 @@ -package concerts +package concertsapi import ( "embed" diff --git a/cookies/gen/http/cli/session/cli.go b/cookies/gen/http/cli/session/cli.go index a5cb781f5..0a68e9084 100644 --- a/cookies/gen/http/cli/session/cli.go +++ b/cookies/gen/http/cli/session/cli.go @@ -29,7 +29,7 @@ func UsageCommands() []string { // UsageExamples produces an example of a valid invocation of the CLI tool. func UsageExamples() string { - return os.Args[0] + " " + "session create-session --body '{\n \"name\": \"Et distinctio eos dolores quibusdam adipisci.\"\n }'" + "\n" + + return os.Args[0] + " " + "session create-session --body '{\n \"name\": \"Ea sit quis similique.\"\n }'" + "\n" + "" } @@ -162,7 +162,7 @@ func sessionCreateSessionUsage() { fmt.Fprintln(os.Stderr) fmt.Fprintln(os.Stderr, "Example:") - fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "session create-session --body '{\n \"name\": \"Et distinctio eos dolores quibusdam adipisci.\"\n }'") + fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "session create-session --body '{\n \"name\": \"Ea sit quis similique.\"\n }'") } func sessionUseSessionUsage() { @@ -180,5 +180,5 @@ func sessionUseSessionUsage() { fmt.Fprintln(os.Stderr) fmt.Fprintln(os.Stderr, "Example:") - fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "session use-session --session-id \"Porro animi illum et corporis nobis.\"") + fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "session use-session --session-id \"Et et et nam.\"") } diff --git a/cookies/gen/http/openapi.json b/cookies/gen/http/openapi.json index ed1f2d472..b163ad1b6 100644 --- a/cookies/gen/http/openapi.json +++ b/cookies/gen/http/openapi.json @@ -1 +1 @@ -{"swagger":"2.0","info":{"title":"Session service","description":"HTTP service that showcase the use of HTTP cookies in Goa services.","version":"0.0.1"},"host":"localhost:80","consumes":["application/json","application/xml","application/gob"],"produces":["application/json","application/xml","application/gob"],"paths":{"/":{"get":{"tags":["session"],"summary":"use_session session","operationId":"session#use_session","responses":{"200":{"description":"OK response.","schema":{"$ref":"#/definitions/SessionUseSessionResponseBody","required":["message"]}}},"schemes":["http"]},"post":{"tags":["session"],"summary":"create_session session","operationId":"session#create_session","parameters":[{"name":"create_session_request_body","in":"body","required":true,"schema":{"$ref":"#/definitions/SessionCreateSessionRequestBody","required":["name"]}}],"responses":{"200":{"description":"OK response.","schema":{"$ref":"#/definitions/SessionCreateSessionResponseBody","required":["message"]}}},"schemes":["http"]}}},"definitions":{"SessionCreateSessionRequestBody":{"title":"SessionCreateSessionRequestBody","type":"object","properties":{"name":{"type":"string","description":"Name of session","example":"Et distinctio eos dolores quibusdam adipisci."}},"example":{"name":"Et distinctio eos dolores quibusdam adipisci."},"required":["name"]},"SessionCreateSessionResponseBody":{"title":"SessionCreateSessionResponseBody","type":"object","properties":{"message":{"type":"string","description":"User message","example":"Voluptatem at id delectus magnam ut consequatur."}},"example":{"message":"Voluptatem at id delectus magnam ut consequatur."},"required":["message"]},"SessionUseSessionResponseBody":{"title":"SessionUseSessionResponseBody","type":"object","properties":{"message":{"type":"string","description":"User message","example":"Qui vitae in assumenda."}},"example":{"message":"Qui vitae in assumenda."},"required":["message"]}}} \ No newline at end of file +{"swagger":"2.0","info":{"title":"Session service","description":"HTTP service that showcase the use of HTTP cookies in Goa services.","version":"0.0.1"},"host":"localhost:80","consumes":["application/json","application/xml","application/gob"],"produces":["application/json","application/xml","application/gob"],"paths":{"/":{"get":{"tags":["session"],"summary":"use_session session","operationId":"session#use_session","responses":{"200":{"description":"OK response.","schema":{"$ref":"#/definitions/SessionUseSessionResponseBody","required":["message"]}}},"schemes":["http"]},"post":{"tags":["session"],"summary":"create_session session","operationId":"session#create_session","parameters":[{"name":"create_session_request_body","in":"body","required":true,"schema":{"$ref":"#/definitions/SessionCreateSessionRequestBody","required":["name"]}}],"responses":{"200":{"description":"OK response.","schema":{"$ref":"#/definitions/SessionCreateSessionResponseBody","required":["message"]}}},"schemes":["http"]}}},"definitions":{"SessionCreateSessionRequestBody":{"title":"SessionCreateSessionRequestBody","type":"object","properties":{"name":{"type":"string","description":"Name of session","example":"Ea sit quis similique."}},"example":{"name":"Ea sit quis similique."},"required":["name"]},"SessionCreateSessionResponseBody":{"title":"SessionCreateSessionResponseBody","type":"object","properties":{"message":{"type":"string","description":"User message","example":"Non veniam est officiis."}},"example":{"message":"Non veniam est officiis."},"required":["message"]},"SessionUseSessionResponseBody":{"title":"SessionUseSessionResponseBody","type":"object","properties":{"message":{"type":"string","description":"User message","example":"Consequatur ad perspiciatis ea."}},"example":{"message":"Consequatur ad perspiciatis ea."},"required":["message"]}}} \ No newline at end of file diff --git a/cookies/gen/http/openapi.yaml b/cookies/gen/http/openapi.yaml index 1cc4b1bf2..f3ed6a33e 100644 --- a/cookies/gen/http/openapi.yaml +++ b/cookies/gen/http/openapi.yaml @@ -58,9 +58,9 @@ definitions: name: type: string description: Name of session - example: Et distinctio eos dolores quibusdam adipisci. + example: Ea sit quis similique. example: - name: Et distinctio eos dolores quibusdam adipisci. + name: Ea sit quis similique. required: - name SessionCreateSessionResponseBody: @@ -70,9 +70,9 @@ definitions: message: type: string description: User message - example: Voluptatem at id delectus magnam ut consequatur. + example: Non veniam est officiis. example: - message: Voluptatem at id delectus magnam ut consequatur. + message: Non veniam est officiis. required: - message SessionUseSessionResponseBody: @@ -82,8 +82,8 @@ definitions: message: type: string description: User message - example: Qui vitae in assumenda. + example: Consequatur ad perspiciatis ea. example: - message: Qui vitae in assumenda. + message: Consequatur ad perspiciatis ea. required: - message diff --git a/cookies/gen/http/openapi3.2.json b/cookies/gen/http/openapi3.2.json index 34f9051a9..52d97e625 100644 --- a/cookies/gen/http/openapi3.2.json +++ b/cookies/gen/http/openapi3.2.json @@ -1 +1 @@ -{"openapi":"3.2.0","info":{"title":"Session service","description":"HTTP service that showcase the use of HTTP cookies in Goa services.","version":"0.0.1"},"servers":[{"url":"http://localhost:80","name":"session","description":"Default server for session"}],"paths":{"/":{"get":{"tags":["session"],"summary":"use_session session","operationId":"session#use_session","parameters":[{"name":"SID","in":"cookie","description":"Session ID","required":true,"schema":{"type":"string","description":"Session ID","example":"Porro animi illum et corporis nobis."},"example":"Laborum nihil sint adipisci quia porro."}],"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSessionResponseBody"},"example":{"message":"Qui vitae in assumenda."}}}}}},"post":{"tags":["session"],"summary":"create_session session","operationId":"session#create_session","requestBody":{"description":"Request body for create_session.","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSessionRequestBody"},"example":{"name":"Et distinctio eos dolores quibusdam adipisci."}}}},"responses":{"200":{"description":"OK response.","headers":{"Set-Cookie":{"description":"Session ID","schema":{"type":"string","description":"Session ID","example":"Repellendus suscipit."},"example":"Voluptatem quia vel vel."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSessionResponseBody"},"example":{"message":"Voluptatem at id delectus magnam ut consequatur."}}}}}}}},"components":{"schemas":{"CreateSessionRequestBody":{"type":"object","properties":{"name":{"type":"string","description":"Name of session","example":"Et distinctio eos dolores quibusdam adipisci."}},"description":"Request body for create_session.","example":{"name":"Et distinctio eos dolores quibusdam adipisci."},"required":["name"]},"CreateSessionResponseBody":{"type":"object","properties":{"message":{"type":"string","description":"User message","example":"Voluptatem at id delectus magnam ut consequatur."}},"example":{"message":"Voluptatem at id delectus magnam ut consequatur."},"required":["message"]}}},"tags":[{"name":"session","description":"The session service illustrates managing user sessions with cookies."}]} \ No newline at end of file +{"openapi":"3.2.0","info":{"title":"Session service","description":"HTTP service that showcase the use of HTTP cookies in Goa services.","version":"0.0.1"},"servers":[{"url":"http://localhost:80","name":"session","description":"Default server for session"}],"paths":{"/":{"get":{"tags":["session"],"summary":"use_session session","operationId":"session#use_session","parameters":[{"name":"SID","in":"cookie","description":"Session ID","required":true,"schema":{"type":"string","description":"Session ID","example":"Et et et nam."},"example":"Et et et nam."}],"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSessionResponseBody"},"example":{"message":"Consequatur ad perspiciatis ea."}}}}}},"post":{"tags":["session"],"summary":"create_session session","operationId":"session#create_session","requestBody":{"description":"Request body for create_session.","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSessionRequestBody"},"example":{"name":"Ea sit quis similique."}}}},"responses":{"200":{"description":"OK response.","headers":{"Set-Cookie":{"description":"Session ID","schema":{"type":"string","description":"Session ID","example":"Consequuntur temporibus iusto et est repudiandae deleniti."},"example":"Consequuntur temporibus iusto et est repudiandae deleniti."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSessionResponseBody"},"example":{"message":"Non veniam est officiis."}}}}}}}},"components":{"schemas":{"CreateSessionRequestBody":{"type":"object","properties":{"name":{"type":"string","description":"Name of session","example":"Ea sit quis similique."}},"description":"Request body for create_session.","example":{"name":"Ea sit quis similique."},"required":["name"]},"CreateSessionResponseBody":{"type":"object","properties":{"message":{"type":"string","description":"User message","example":"Non veniam est officiis."}},"example":{"message":"Non veniam est officiis."},"required":["message"]}}},"tags":[{"name":"session","description":"The session service illustrates managing user sessions with cookies."}]} \ No newline at end of file diff --git a/cookies/gen/http/openapi3.2.yaml b/cookies/gen/http/openapi3.2.yaml index 208a5a11d..de2710961 100644 --- a/cookies/gen/http/openapi3.2.yaml +++ b/cookies/gen/http/openapi3.2.yaml @@ -22,8 +22,8 @@ paths: schema: type: string description: Session ID - example: Porro animi illum et corporis nobis. - example: Laborum nihil sint adipisci quia porro. + example: Et et et nam. + example: Et et et nam. responses: "200": description: OK response. @@ -32,7 +32,7 @@ paths: schema: $ref: '#/components/schemas/CreateSessionResponseBody' example: - message: Qui vitae in assumenda. + message: Consequatur ad perspiciatis ea. post: tags: - session @@ -46,7 +46,7 @@ paths: schema: $ref: '#/components/schemas/CreateSessionRequestBody' example: - name: Et distinctio eos dolores quibusdam adipisci. + name: Ea sit quis similique. responses: "200": description: OK response. @@ -56,14 +56,14 @@ paths: schema: type: string description: Session ID - example: Repellendus suscipit. - example: Voluptatem quia vel vel. + example: Consequuntur temporibus iusto et est repudiandae deleniti. + example: Consequuntur temporibus iusto et est repudiandae deleniti. content: application/json: schema: $ref: '#/components/schemas/CreateSessionResponseBody' example: - message: Voluptatem at id delectus magnam ut consequatur. + message: Non veniam est officiis. components: schemas: CreateSessionRequestBody: @@ -72,10 +72,10 @@ components: name: type: string description: Name of session - example: Et distinctio eos dolores quibusdam adipisci. + example: Ea sit quis similique. description: Request body for create_session. example: - name: Et distinctio eos dolores quibusdam adipisci. + name: Ea sit quis similique. required: - name CreateSessionResponseBody: @@ -84,9 +84,9 @@ components: message: type: string description: User message - example: Voluptatem at id delectus magnam ut consequatur. + example: Non veniam est officiis. example: - message: Voluptatem at id delectus magnam ut consequatur. + message: Non veniam est officiis. required: - message tags: diff --git a/cookies/gen/http/openapi3.json b/cookies/gen/http/openapi3.json index 148b99b70..f96e64d2d 100644 --- a/cookies/gen/http/openapi3.json +++ b/cookies/gen/http/openapi3.json @@ -1 +1 @@ -{"openapi":"3.0.3","info":{"title":"Session service","description":"HTTP service that showcase the use of HTTP cookies in Goa services.","version":"0.0.1"},"servers":[{"url":"http://localhost:80","description":"Default server for session"}],"paths":{"/":{"get":{"tags":["session"],"summary":"use_session session","operationId":"session#use_session","parameters":[{"name":"SID","in":"cookie","description":"Session ID","required":true,"schema":{"type":"string","description":"Session ID","example":"Porro animi illum et corporis nobis."},"example":"Laborum nihil sint adipisci quia porro."}],"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSessionResponseBody"},"example":{"message":"Qui vitae in assumenda."}}}}}},"post":{"tags":["session"],"summary":"create_session session","operationId":"session#create_session","requestBody":{"description":"Request body for create_session.","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSessionRequestBody"},"example":{"name":"Et distinctio eos dolores quibusdam adipisci."}}}},"responses":{"200":{"description":"OK response.","headers":{"Set-Cookie":{"description":"Session ID","schema":{"type":"string","description":"Session ID","example":"Repellendus suscipit."},"example":"Voluptatem quia vel vel."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSessionResponseBody"},"example":{"message":"Voluptatem at id delectus magnam ut consequatur."}}}}}}}},"components":{"schemas":{"CreateSessionRequestBody":{"type":"object","properties":{"name":{"type":"string","description":"Name of session","example":"Et distinctio eos dolores quibusdam adipisci."}},"description":"Request body for create_session.","example":{"name":"Et distinctio eos dolores quibusdam adipisci."},"required":["name"]},"CreateSessionResponseBody":{"type":"object","properties":{"message":{"type":"string","description":"User message","example":"Voluptatem at id delectus magnam ut consequatur."}},"example":{"message":"Voluptatem at id delectus magnam ut consequatur."},"required":["message"]}}},"tags":[{"name":"session","description":"The session service illustrates managing user sessions with cookies."}]} \ No newline at end of file +{"openapi":"3.0.3","info":{"title":"Session service","description":"HTTP service that showcase the use of HTTP cookies in Goa services.","version":"0.0.1"},"servers":[{"url":"http://localhost:80","description":"Default server for session"}],"paths":{"/":{"get":{"tags":["session"],"summary":"use_session session","operationId":"session#use_session","parameters":[{"name":"SID","in":"cookie","description":"Session ID","required":true,"schema":{"type":"string","description":"Session ID","example":"Et et et nam."},"example":"Et et et nam."}],"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSessionResponseBody"},"example":{"message":"Consequatur ad perspiciatis ea."}}}}}},"post":{"tags":["session"],"summary":"create_session session","operationId":"session#create_session","requestBody":{"description":"Request body for create_session.","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSessionRequestBody"},"example":{"name":"Ea sit quis similique."}}}},"responses":{"200":{"description":"OK response.","headers":{"Set-Cookie":{"description":"Session ID","schema":{"type":"string","description":"Session ID","example":"Consequuntur temporibus iusto et est repudiandae deleniti."},"example":"Consequuntur temporibus iusto et est repudiandae deleniti."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSessionResponseBody"},"example":{"message":"Non veniam est officiis."}}}}}}}},"components":{"schemas":{"CreateSessionRequestBody":{"type":"object","properties":{"name":{"type":"string","description":"Name of session","example":"Ea sit quis similique."}},"description":"Request body for create_session.","example":{"name":"Ea sit quis similique."},"required":["name"]},"CreateSessionResponseBody":{"type":"object","properties":{"message":{"type":"string","description":"User message","example":"Non veniam est officiis."}},"example":{"message":"Non veniam est officiis."},"required":["message"]}}},"tags":[{"name":"session","description":"The session service illustrates managing user sessions with cookies."}]} \ No newline at end of file diff --git a/cookies/gen/http/openapi3.yaml b/cookies/gen/http/openapi3.yaml index 24a6e36c6..69be70c6d 100644 --- a/cookies/gen/http/openapi3.yaml +++ b/cookies/gen/http/openapi3.yaml @@ -21,8 +21,8 @@ paths: schema: type: string description: Session ID - example: Porro animi illum et corporis nobis. - example: Laborum nihil sint adipisci quia porro. + example: Et et et nam. + example: Et et et nam. responses: "200": description: OK response. @@ -31,7 +31,7 @@ paths: schema: $ref: '#/components/schemas/CreateSessionResponseBody' example: - message: Qui vitae in assumenda. + message: Consequatur ad perspiciatis ea. post: tags: - session @@ -45,7 +45,7 @@ paths: schema: $ref: '#/components/schemas/CreateSessionRequestBody' example: - name: Et distinctio eos dolores quibusdam adipisci. + name: Ea sit quis similique. responses: "200": description: OK response. @@ -55,14 +55,14 @@ paths: schema: type: string description: Session ID - example: Repellendus suscipit. - example: Voluptatem quia vel vel. + example: Consequuntur temporibus iusto et est repudiandae deleniti. + example: Consequuntur temporibus iusto et est repudiandae deleniti. content: application/json: schema: $ref: '#/components/schemas/CreateSessionResponseBody' example: - message: Voluptatem at id delectus magnam ut consequatur. + message: Non veniam est officiis. components: schemas: CreateSessionRequestBody: @@ -71,10 +71,10 @@ components: name: type: string description: Name of session - example: Et distinctio eos dolores quibusdam adipisci. + example: Ea sit quis similique. description: Request body for create_session. example: - name: Et distinctio eos dolores quibusdam adipisci. + name: Ea sit quis similique. required: - name CreateSessionResponseBody: @@ -83,9 +83,9 @@ components: message: type: string description: User message - example: Voluptatem at id delectus magnam ut consequatur. + example: Non veniam est officiis. example: - message: Voluptatem at id delectus magnam ut consequatur. + message: Non veniam est officiis. required: - message tags: diff --git a/cookies/gen/http/session/client/cli.go b/cookies/gen/http/session/client/cli.go index 250bce354..f2aab262c 100644 --- a/cookies/gen/http/session/client/cli.go +++ b/cookies/gen/http/session/client/cli.go @@ -22,7 +22,7 @@ func BuildCreateSessionPayload(sessionCreateSessionBody string) (*session.Create { err = json.Unmarshal([]byte(sessionCreateSessionBody), &body) if err != nil { - return nil, fmt.Errorf("invalid JSON for body, \nerror: %s, \nexample of valid JSON:\n%s", err, "'{\n \"name\": \"Et distinctio eos dolores quibusdam adipisci.\"\n }'") + return nil, fmt.Errorf("invalid JSON for body, \nerror: %s, \nexample of valid JSON:\n%s", err, "'{\n \"name\": \"Ea sit quis similique.\"\n }'") } } v := &session.CreateSessionPayload{ diff --git a/cookies/gen/http/session/client/encode_decode.go b/cookies/gen/http/session/client/encode_decode.go index 485cdc620..8fbc8055c 100644 --- a/cookies/gen/http/session/client/encode_decode.go +++ b/cookies/gen/http/session/client/encode_decode.go @@ -10,6 +10,7 @@ package client import ( "bytes" "context" + "errors" "io" "net/http" "net/url" @@ -54,18 +55,24 @@ func EncodeCreateSessionRequest(encoder func(*http.Request) goahttp.Encoder) fun // session create_session endpoint. restoreBody controls whether the response // body should be restored after having been read. func DecodeCreateSessionResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (any, error) { - return func(resp *http.Response) (any, error) { + return func(resp *http.Response) (result any, decodeErr error) { + responseBody := resp.Body if restoreBody { - b, err := io.ReadAll(resp.Body) - if err != nil { - return nil, err + b, readErr := io.ReadAll(responseBody) + closeErr := responseBody.Close() + if err := errors.Join(readErr, closeErr); err != nil { + return nil, goahttp.ErrDecodingError("session", "create_session", err) } resp.Body = io.NopCloser(bytes.NewBuffer(b)) defer func() { resp.Body = io.NopCloser(bytes.NewBuffer(b)) }() } else { - defer resp.Body.Close() + defer func() { + if err := responseBody.Close(); err != nil { + decodeErr = errors.Join(decodeErr, goahttp.ErrDecodingError("session", "create_session", err)) + } + }() } switch resp.StatusCode { case http.StatusOK: @@ -103,7 +110,10 @@ func DecodeCreateSessionResponse(decoder func(*http.Response) goahttp.Decoder, r res := NewCreateSessionResultOK(&body, sessionID) return res, nil default: - body, _ := io.ReadAll(resp.Body) + body, err := io.ReadAll(resp.Body) + if err != nil { + return nil, goahttp.ErrDecodingError("session", "create_session", err) + } return nil, goahttp.ErrInvalidResponse("session", "create_session", resp.StatusCode, string(body)) } } @@ -147,18 +157,24 @@ func EncodeUseSessionRequest(encoder func(*http.Request) goahttp.Encoder) func(* // session use_session endpoint. restoreBody controls whether the response body // should be restored after having been read. func DecodeUseSessionResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (any, error) { - return func(resp *http.Response) (any, error) { + return func(resp *http.Response) (result any, decodeErr error) { + responseBody := resp.Body if restoreBody { - b, err := io.ReadAll(resp.Body) - if err != nil { - return nil, err + b, readErr := io.ReadAll(responseBody) + closeErr := responseBody.Close() + if err := errors.Join(readErr, closeErr); err != nil { + return nil, goahttp.ErrDecodingError("session", "use_session", err) } resp.Body = io.NopCloser(bytes.NewBuffer(b)) defer func() { resp.Body = io.NopCloser(bytes.NewBuffer(b)) }() } else { - defer resp.Body.Close() + defer func() { + if err := responseBody.Close(); err != nil { + decodeErr = errors.Join(decodeErr, goahttp.ErrDecodingError("session", "use_session", err)) + } + }() } switch resp.StatusCode { case http.StatusOK: @@ -177,7 +193,10 @@ func DecodeUseSessionResponse(decoder func(*http.Response) goahttp.Decoder, rest res := NewUseSessionResultOK(&body) return res, nil default: - body, _ := io.ReadAll(resp.Body) + body, err := io.ReadAll(resp.Body) + if err != nil { + return nil, goahttp.ErrDecodingError("session", "use_session", err) + } return nil, goahttp.ErrInvalidResponse("session", "use_session", resp.StatusCode, string(body)) } } diff --git a/cookies/gen/http/session/client/types.go b/cookies/gen/http/session/client/types.go index 75e4baa5c..7e3cbec44 100644 --- a/cookies/gen/http/session/client/types.go +++ b/cookies/gen/http/session/client/types.go @@ -64,7 +64,7 @@ func NewUseSessionResultOK(body *UseSessionResponseBody) *session.UseSessionResu } // ValidateCreateSessionResponseBody runs the validations defined on -// create_session_response_body +// CreateSessionResponseBody func ValidateCreateSessionResponseBody(body *CreateSessionResponseBody) (err error) { if body.Message == nil { err = goa.MergeErrors(err, goa.MissingFieldError("message", "body")) @@ -73,7 +73,7 @@ func ValidateCreateSessionResponseBody(body *CreateSessionResponseBody) (err err } // ValidateUseSessionResponseBody runs the validations defined on -// use_session_response_body +// UseSessionResponseBody func ValidateUseSessionResponseBody(body *UseSessionResponseBody) (err error) { if body.Message == nil { err = goa.MergeErrors(err, goa.MissingFieldError("message", "body")) diff --git a/cookies/gen/http/session/server/types.go b/cookies/gen/http/session/server/types.go index 9d15621f8..b93d933db 100644 --- a/cookies/gen/http/session/server/types.go +++ b/cookies/gen/http/session/server/types.go @@ -70,7 +70,7 @@ func NewUseSessionPayload(sessionID string) *session.UseSessionPayload { } // ValidateCreateSessionRequestBody runs the validations defined on -// create_session_request_body +// CreateSessionRequestBody func ValidateCreateSessionRequestBody(body *CreateSessionRequestBody) (err error) { if body.Name == nil { err = goa.MergeErrors(err, goa.MissingFieldError("name", "body")) diff --git a/cookies/gen/session/service.go b/cookies/gen/session/service.go index 9f7e578fc..f87247bf0 100644 --- a/cookies/gen/session/service.go +++ b/cookies/gen/session/service.go @@ -7,9 +7,7 @@ package session -import ( - "context" -) +import "context" // The session service illustrates managing user sessions with cookies. type Service interface { diff --git a/encodings/cbor/gen/concat/service.go b/encodings/cbor/gen/concat/service.go index 3c85b1d91..a97632504 100644 --- a/encodings/cbor/gen/concat/service.go +++ b/encodings/cbor/gen/concat/service.go @@ -7,9 +7,7 @@ package concat -import ( - "context" -) +import "context" // The concat service performs operations on strings. diff --git a/encodings/cbor/gen/http/cli/concat/cli.go b/encodings/cbor/gen/http/cli/concat/cli.go index ffa8633ab..1e1d3a261 100644 --- a/encodings/cbor/gen/http/cli/concat/cli.go +++ b/encodings/cbor/gen/http/cli/concat/cli.go @@ -29,7 +29,7 @@ func UsageCommands() []string { // UsageExamples produces an example of a valid invocation of the CLI tool. func UsageExamples() string { - return os.Args[0] + " " + "concat concat --a \"Minus illo ducimus rerum id.\" --b \"Quod vel occaecati autem ducimus quis vel.\"" + "\n" + + return os.Args[0] + " " + "concat concat --a \"Non molestiae ipsam et possimus nesciunt.\" --b \"Commodi inventore quos.\"" + "\n" + "" } @@ -130,10 +130,9 @@ func ParseEndpoint( // concatUsage displays the usage of the concat command and its subcommands. func concatUsage() { fmt.Fprintln(os.Stderr, `The concat service performs operations on strings. - + The service uses the CBOR binary serialization standard to encode responses. - It supports reading requests encoded with CBOR, JSON, XML or GOB. - `) + It supports reading requests encoded with CBOR, JSON, XML or GOB.`) fmt.Fprintf(os.Stderr, "Usage:\n %s [globalflags] concat COMMAND [flags]\n\n", os.Args[0]) fmt.Fprintln(os.Stderr, "COMMAND:") fmt.Fprintln(os.Stderr, ` concat: Concat implements concat.`) @@ -158,5 +157,5 @@ func concatConcatUsage() { fmt.Fprintln(os.Stderr) fmt.Fprintln(os.Stderr, "Example:") - fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "concat concat --a \"Minus illo ducimus rerum id.\" --b \"Quod vel occaecati autem ducimus quis vel.\"") + fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "concat concat --a \"Non molestiae ipsam et possimus nesciunt.\" --b \"Commodi inventore quos.\"") } diff --git a/encodings/cbor/gen/http/concat/client/encode_decode.go b/encodings/cbor/gen/http/concat/client/encode_decode.go index c41191876..6f1a235cb 100644 --- a/encodings/cbor/gen/http/concat/client/encode_decode.go +++ b/encodings/cbor/gen/http/concat/client/encode_decode.go @@ -10,6 +10,7 @@ package client import ( "bytes" "context" + "errors" "io" "net/http" "net/url" @@ -49,18 +50,24 @@ func (c *Client) BuildConcatRequest(ctx context.Context, v any) (*http.Request, // concat endpoint. restoreBody controls whether the response body should be // restored after having been read. func DecodeConcatResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (any, error) { - return func(resp *http.Response) (any, error) { + return func(resp *http.Response) (result any, decodeErr error) { + responseBody := resp.Body if restoreBody { - b, err := io.ReadAll(resp.Body) - if err != nil { - return nil, err + b, readErr := io.ReadAll(responseBody) + closeErr := responseBody.Close() + if err := errors.Join(readErr, closeErr); err != nil { + return nil, goahttp.ErrDecodingError("concat", "concat", err) } resp.Body = io.NopCloser(bytes.NewBuffer(b)) defer func() { resp.Body = io.NopCloser(bytes.NewBuffer(b)) }() } else { - defer resp.Body.Close() + defer func() { + if err := responseBody.Close(); err != nil { + decodeErr = errors.Join(decodeErr, goahttp.ErrDecodingError("concat", "concat", err)) + } + }() } switch resp.StatusCode { case http.StatusOK: @@ -74,7 +81,10 @@ func DecodeConcatResponse(decoder func(*http.Response) goahttp.Decoder, restoreB } return body, nil default: - body, _ := io.ReadAll(resp.Body) + body, err := io.ReadAll(resp.Body) + if err != nil { + return nil, goahttp.ErrDecodingError("concat", "concat", err) + } return nil, goahttp.ErrInvalidResponse("concat", "concat", resp.StatusCode, string(body)) } } diff --git a/encodings/cbor/gen/http/openapi3.2.json b/encodings/cbor/gen/http/openapi3.2.json index 22e482ae9..cd2e4213d 100644 --- a/encodings/cbor/gen/http/openapi3.2.json +++ b/encodings/cbor/gen/http/openapi3.2.json @@ -1 +1 @@ -{"openapi":"3.2.0","info":{"title":"Goa API","version":"0.0.1"},"servers":[{"url":"http://localhost:80","name":"concat","description":"Default server for concat"}],"paths":{"/concat/{a}/{b}":{"get":{"tags":["concat"],"summary":"concat concat","operationId":"concat#concat","parameters":[{"name":"a","in":"path","description":"Left operand","required":true,"schema":{"type":"string","description":"Left operand","example":"Minus illo ducimus rerum id."},"example":"Necessitatibus consequatur consequatur."},{"name":"b","in":"path","description":"Right operand","required":true,"schema":{"type":"string","description":"Right operand","example":"Quod vel occaecati autem ducimus quis vel."},"example":"Provident quia eius quo."}],"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"type":"string","example":"Cupiditate odit quis possimus molestias vel magni."},"example":"Cupiditate odit quis possimus molestias vel magni."}}}}}}},"components":{},"tags":[{"name":"concat","description":"The concat service performs operations on strings.\n\nThe service uses the CBOR binary serialization standard to encode responses.\nIt supports reading requests encoded with CBOR, JSON, XML or GOB.\n"}]} \ No newline at end of file +{"openapi":"3.2.0","info":{"title":"Goa API","version":"0.0.1"},"servers":[{"url":"http://localhost:80","name":"concat","description":"Default server for concat"}],"paths":{"/concat/{a}/{b}":{"get":{"tags":["concat"],"summary":"concat concat","operationId":"concat#concat","parameters":[{"name":"a","in":"path","description":"Left operand","required":true,"schema":{"type":"string","description":"Left operand","example":"Non molestiae ipsam et possimus nesciunt."},"example":"Non molestiae ipsam et possimus nesciunt."},{"name":"b","in":"path","description":"Right operand","required":true,"schema":{"type":"string","description":"Right operand","example":"Commodi inventore quos."},"example":"Commodi inventore quos."}],"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"type":"string","example":"Atque modi odio fugiat dolor quis laboriosam."},"example":"Atque modi odio fugiat dolor quis laboriosam."}}}}}}},"components":{},"tags":[{"name":"concat","description":"The concat service performs operations on strings.\n\nThe service uses the CBOR binary serialization standard to encode responses.\nIt supports reading requests encoded with CBOR, JSON, XML or GOB.\n"}]} \ No newline at end of file diff --git a/encodings/cbor/gen/http/openapi3.2.yaml b/encodings/cbor/gen/http/openapi3.2.yaml index a902b02f1..9a78accbc 100644 --- a/encodings/cbor/gen/http/openapi3.2.yaml +++ b/encodings/cbor/gen/http/openapi3.2.yaml @@ -21,8 +21,8 @@ paths: schema: type: string description: Left operand - example: Minus illo ducimus rerum id. - example: Necessitatibus consequatur consequatur. + example: Non molestiae ipsam et possimus nesciunt. + example: Non molestiae ipsam et possimus nesciunt. - name: b in: path description: Right operand @@ -30,8 +30,8 @@ paths: schema: type: string description: Right operand - example: Quod vel occaecati autem ducimus quis vel. - example: Provident quia eius quo. + example: Commodi inventore quos. + example: Commodi inventore quos. responses: "200": description: OK response. @@ -39,8 +39,8 @@ paths: application/json: schema: type: string - example: Cupiditate odit quis possimus molestias vel magni. - example: Cupiditate odit quis possimus molestias vel magni. + example: Atque modi odio fugiat dolor quis laboriosam. + example: Atque modi odio fugiat dolor quis laboriosam. components: {} tags: - name: concat diff --git a/encodings/cbor/gen/http/openapi3.json b/encodings/cbor/gen/http/openapi3.json index 2c9b41e63..c424e20ee 100644 --- a/encodings/cbor/gen/http/openapi3.json +++ b/encodings/cbor/gen/http/openapi3.json @@ -1 +1 @@ -{"openapi":"3.0.3","info":{"title":"Goa API","version":"0.0.1"},"servers":[{"url":"http://localhost:80","description":"Default server for concat"}],"paths":{"/concat/{a}/{b}":{"get":{"tags":["concat"],"summary":"concat concat","operationId":"concat#concat","parameters":[{"name":"a","in":"path","description":"Left operand","required":true,"schema":{"type":"string","description":"Left operand","example":"Minus illo ducimus rerum id."},"example":"Necessitatibus consequatur consequatur."},{"name":"b","in":"path","description":"Right operand","required":true,"schema":{"type":"string","description":"Right operand","example":"Quod vel occaecati autem ducimus quis vel."},"example":"Provident quia eius quo."}],"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"type":"string","example":"Cupiditate odit quis possimus molestias vel magni."},"example":"Cupiditate odit quis possimus molestias vel magni."}}}}}}},"components":{},"tags":[{"name":"concat","description":"The concat service performs operations on strings.\n\nThe service uses the CBOR binary serialization standard to encode responses.\nIt supports reading requests encoded with CBOR, JSON, XML or GOB.\n"}]} \ No newline at end of file +{"openapi":"3.0.3","info":{"title":"Goa API","version":"0.0.1"},"servers":[{"url":"http://localhost:80","description":"Default server for concat"}],"paths":{"/concat/{a}/{b}":{"get":{"tags":["concat"],"summary":"concat concat","operationId":"concat#concat","parameters":[{"name":"a","in":"path","description":"Left operand","required":true,"schema":{"type":"string","description":"Left operand","example":"Non molestiae ipsam et possimus nesciunt."},"example":"Non molestiae ipsam et possimus nesciunt."},{"name":"b","in":"path","description":"Right operand","required":true,"schema":{"type":"string","description":"Right operand","example":"Commodi inventore quos."},"example":"Commodi inventore quos."}],"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"type":"string","example":"Atque modi odio fugiat dolor quis laboriosam."},"example":"Atque modi odio fugiat dolor quis laboriosam."}}}}}}},"components":{},"tags":[{"name":"concat","description":"The concat service performs operations on strings.\n\nThe service uses the CBOR binary serialization standard to encode responses.\nIt supports reading requests encoded with CBOR, JSON, XML or GOB.\n"}]} \ No newline at end of file diff --git a/encodings/cbor/gen/http/openapi3.yaml b/encodings/cbor/gen/http/openapi3.yaml index 85a9a8a3d..9cb2faaf6 100644 --- a/encodings/cbor/gen/http/openapi3.yaml +++ b/encodings/cbor/gen/http/openapi3.yaml @@ -20,8 +20,8 @@ paths: schema: type: string description: Left operand - example: Minus illo ducimus rerum id. - example: Necessitatibus consequatur consequatur. + example: Non molestiae ipsam et possimus nesciunt. + example: Non molestiae ipsam et possimus nesciunt. - name: b in: path description: Right operand @@ -29,8 +29,8 @@ paths: schema: type: string description: Right operand - example: Quod vel occaecati autem ducimus quis vel. - example: Provident quia eius quo. + example: Commodi inventore quos. + example: Commodi inventore quos. responses: "200": description: OK response. @@ -38,8 +38,8 @@ paths: application/json: schema: type: string - example: Cupiditate odit quis possimus molestias vel magni. - example: Cupiditate odit quis possimus molestias vel magni. + example: Atque modi odio fugiat dolor quis laboriosam. + example: Atque modi odio fugiat dolor quis laboriosam. components: {} tags: - name: concat diff --git a/encodings/text/gen/http/cli/text/cli.go b/encodings/text/gen/http/cli/text/cli.go index f03151fe3..f85ddf5ca 100644 --- a/encodings/text/gen/http/cli/text/cli.go +++ b/encodings/text/gen/http/cli/text/cli.go @@ -29,7 +29,7 @@ func UsageCommands() []string { // UsageExamples produces an example of a valid invocation of the CLI tool. func UsageExamples() string { - return os.Args[0] + " " + "text concatstrings --a \"Numquam unde accusantium autem tenetur.\" --b \"Odio inventore dolorem sunt in dolorem aut.\"" + "\n" + + return os.Args[0] + " " + "text concatstrings --a \"Nam ut eligendi quia laudantium non quia.\" --b \"Officia aliquid aut quis minus.\"" + "\n" + "" } @@ -190,7 +190,7 @@ func textConcatstringsUsage() { fmt.Fprintln(os.Stderr) fmt.Fprintln(os.Stderr, "Example:") - fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "text concatstrings --a \"Numquam unde accusantium autem tenetur.\" --b \"Odio inventore dolorem sunt in dolorem aut.\"") + fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "text concatstrings --a \"Nam ut eligendi quia laudantium non quia.\" --b \"Officia aliquid aut quis minus.\"") } func textConcatbytesUsage() { @@ -210,7 +210,7 @@ func textConcatbytesUsage() { fmt.Fprintln(os.Stderr) fmt.Fprintln(os.Stderr, "Example:") - fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "text concatbytes --a \"Cupiditate perferendis excepturi corrupti sint aspernatur.\" --b \"Dolorem perspiciatis officiis ipsum delectus.\"") + fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "text concatbytes --a \"Dolorum molestias sed dolorem unde numquam laudantium.\" --b \"Ut repudiandae velit qui rerum aut eaque.\"") } func textConcatstringfieldUsage() { @@ -230,7 +230,7 @@ func textConcatstringfieldUsage() { fmt.Fprintln(os.Stderr) fmt.Fprintln(os.Stderr, "Example:") - fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "text concatstringfield --a \"Qui delectus reprehenderit laudantium tempora autem.\" --b \"Sit officia repellat.\"") + fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "text concatstringfield --a \"Ipsa qui expedita consectetur et et labore.\" --b \"Fuga dolorum quaerat.\"") } func textConcatbytesfieldUsage() { @@ -250,5 +250,5 @@ func textConcatbytesfieldUsage() { fmt.Fprintln(os.Stderr) fmt.Fprintln(os.Stderr, "Example:") - fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "text concatbytesfield --a \"Vitae assumenda fugiat et sit repellendus.\" --b \"Ut tempore.\"") + fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "text concatbytesfield --a \"Quasi itaque.\" --b \"Culpa ratione.\"") } diff --git a/encodings/text/gen/http/openapi3.2.json b/encodings/text/gen/http/openapi3.2.json index 78c0c78ee..4dcad1bfb 100644 --- a/encodings/text/gen/http/openapi3.2.json +++ b/encodings/text/gen/http/openapi3.2.json @@ -1 +1 @@ -{"openapi":"3.2.0","info":{"title":"Encodings Service","description":"Encoding example service demonstrating the use of different content types","version":"0.0.1"},"servers":[{"url":"http://localhost:80","name":"text"}],"paths":{"/concatbytes/{a}/{b}":{"get":{"tags":["text"],"summary":"concatbytes text","operationId":"text#concatbytes","parameters":[{"name":"a","in":"path","description":"Left operand","required":true,"schema":{"type":"string","description":"Left operand","example":"Cupiditate perferendis excepturi corrupti sint aspernatur."},"example":"Nobis inventore nesciunt ex repellendus excepturi qui."},{"name":"b","in":"path","description":"Right operand","required":true,"schema":{"type":"string","description":"Right operand","example":"Dolorem perspiciatis officiis ipsum delectus."},"example":"Molestiae ducimus pariatur tenetur."}],"responses":{"200":{"description":"OK response.","content":{"text/html":{"schema":{"type":"string","example":"T2RpbyBzZWQgb21uaXMu","format":"binary"},"example":"T2RpbyBzZWQgb21uaXMu"}}}}}},"/concatbytesfield/{a}/{b}":{"get":{"tags":["text"],"summary":"concatbytesfield text","operationId":"text#concatbytesfield","parameters":[{"name":"a","in":"path","description":"Left operand","required":true,"schema":{"type":"string","description":"Left operand","example":"Vitae assumenda fugiat et sit repellendus."},"example":"Suscipit at et iste laudantium ullam necessitatibus."},{"name":"b","in":"path","description":"Right operand","required":true,"schema":{"type":"string","description":"Right operand","example":"Ut tempore."},"example":"Ut ut ex rem."}],"responses":{"200":{"description":"OK response.","content":{"text/html":{"schema":{"type":"string","example":"VmVuaWFtIHZvbHVwdGF0ZW0u","format":"binary"},"example":"VmVuaWFtIHZvbHVwdGF0ZW0u"}}}}}},"/concatstringfield/{a}/{b}":{"get":{"tags":["text"],"summary":"concatstringfield text","operationId":"text#concatstringfield","parameters":[{"name":"a","in":"path","description":"Left operand","required":true,"schema":{"type":"string","description":"Left operand","example":"Qui delectus reprehenderit laudantium tempora autem."},"example":"Quisquam hic adipisci qui ut nisi."},{"name":"b","in":"path","description":"Right operand","required":true,"schema":{"type":"string","description":"Right operand","example":"Sit officia repellat."},"example":"Recusandae aut."}],"responses":{"200":{"description":"OK response.","content":{"text/html":{"schema":{"type":"string","example":"Eos veritatis est repudiandae distinctio at animi."},"example":"Eos veritatis est repudiandae distinctio at animi."}}}}}},"/concatstrings/{a}/{b}":{"get":{"tags":["text"],"summary":"concatstrings text","operationId":"text#concatstrings","parameters":[{"name":"a","in":"path","description":"Left operand","required":true,"schema":{"type":"string","description":"Left operand","example":"Numquam unde accusantium autem tenetur."},"example":"Laborum amet odio in."},{"name":"b","in":"path","description":"Right operand","required":true,"schema":{"type":"string","description":"Right operand","example":"Odio inventore dolorem sunt in dolorem aut."},"example":"Magnam autem nostrum."}],"responses":{"200":{"description":"OK response.","content":{"text/html":{"schema":{"type":"string","example":"At at."},"example":"At at."}}}}}},"/swagger.json":{"get":{"tags":["text"],"summary":"Download ../../gen/http/openapi.json","operationId":"text#/swagger.json","responses":{"200":{"description":"File downloaded"}}}}},"components":{},"tags":[{"name":"text","description":"The text service performs operations on strings"}]} \ No newline at end of file +{"openapi":"3.2.0","info":{"title":"Encodings Service","description":"Encoding example service demonstrating the use of different content types","version":"0.0.1"},"servers":[{"url":"http://localhost:80","name":"text"}],"paths":{"/concatbytes/{a}/{b}":{"get":{"tags":["text"],"summary":"concatbytes text","operationId":"text#concatbytes","parameters":[{"name":"a","in":"path","description":"Left operand","required":true,"schema":{"type":"string","description":"Left operand","example":"Dolorum molestias sed dolorem unde numquam laudantium."},"example":"Dolorum molestias sed dolorem unde numquam laudantium."},{"name":"b","in":"path","description":"Right operand","required":true,"schema":{"type":"string","description":"Right operand","example":"Ut repudiandae velit qui rerum aut eaque."},"example":"Ut repudiandae velit qui rerum aut eaque."}],"responses":{"200":{"description":"OK response.","content":{"text/html":{"schema":{"type":"string","example":"SW1wZWRpdCBxdWku","format":"binary"},"example":"SW1wZWRpdCBxdWku"}}}}}},"/concatbytesfield/{a}/{b}":{"get":{"tags":["text"],"summary":"concatbytesfield text","operationId":"text#concatbytesfield","parameters":[{"name":"a","in":"path","description":"Left operand","required":true,"schema":{"type":"string","description":"Left operand","example":"Quasi itaque."},"example":"Quasi itaque."},{"name":"b","in":"path","description":"Right operand","required":true,"schema":{"type":"string","description":"Right operand","example":"Culpa ratione."},"example":"Culpa ratione."}],"responses":{"200":{"description":"OK response.","content":{"text/html":{"schema":{"type":"string","example":"RXQgZW5pbSBxdWlhLg==","format":"binary"},"example":"RXQgZW5pbSBxdWlhLg=="}}}}}},"/concatstringfield/{a}/{b}":{"get":{"tags":["text"],"summary":"concatstringfield text","operationId":"text#concatstringfield","parameters":[{"name":"a","in":"path","description":"Left operand","required":true,"schema":{"type":"string","description":"Left operand","example":"Ipsa qui expedita consectetur et et labore."},"example":"Ipsa qui expedita consectetur et et labore."},{"name":"b","in":"path","description":"Right operand","required":true,"schema":{"type":"string","description":"Right operand","example":"Fuga dolorum quaerat."},"example":"Fuga dolorum quaerat."}],"responses":{"200":{"description":"OK response.","content":{"text/html":{"schema":{"type":"string","example":"Qui exercitationem cupiditate ut ratione non consequatur."},"example":"Qui exercitationem cupiditate ut ratione non consequatur."}}}}}},"/concatstrings/{a}/{b}":{"get":{"tags":["text"],"summary":"concatstrings text","operationId":"text#concatstrings","parameters":[{"name":"a","in":"path","description":"Left operand","required":true,"schema":{"type":"string","description":"Left operand","example":"Nam ut eligendi quia laudantium non quia."},"example":"Nam ut eligendi quia laudantium non quia."},{"name":"b","in":"path","description":"Right operand","required":true,"schema":{"type":"string","description":"Right operand","example":"Officia aliquid aut quis minus."},"example":"Officia aliquid aut quis minus."}],"responses":{"200":{"description":"OK response.","content":{"text/html":{"schema":{"type":"string","example":"Non repudiandae ex velit pariatur."},"example":"Non repudiandae ex velit pariatur."}}}}}},"/swagger.json":{"get":{"tags":["text"],"summary":"Download ../../gen/http/openapi.json","operationId":"text#/swagger.json","responses":{"200":{"description":"File downloaded"}}}}},"components":{},"tags":[{"name":"text","description":"The text service performs operations on strings"}]} \ No newline at end of file diff --git a/encodings/text/gen/http/openapi3.2.yaml b/encodings/text/gen/http/openapi3.2.yaml index 61e07ba7b..958ecbf04 100644 --- a/encodings/text/gen/http/openapi3.2.yaml +++ b/encodings/text/gen/http/openapi3.2.yaml @@ -21,8 +21,8 @@ paths: schema: type: string description: Left operand - example: Cupiditate perferendis excepturi corrupti sint aspernatur. - example: Nobis inventore nesciunt ex repellendus excepturi qui. + example: Dolorum molestias sed dolorem unde numquam laudantium. + example: Dolorum molestias sed dolorem unde numquam laudantium. - name: b in: path description: Right operand @@ -30,8 +30,8 @@ paths: schema: type: string description: Right operand - example: Dolorem perspiciatis officiis ipsum delectus. - example: Molestiae ducimus pariatur tenetur. + example: Ut repudiandae velit qui rerum aut eaque. + example: Ut repudiandae velit qui rerum aut eaque. responses: "200": description: OK response. @@ -40,37 +40,31 @@ paths: schema: type: string example: - - 79 - - 100 - - 105 - - 111 - - 32 - - 115 + - 73 + - 109 + - 112 - 101 - 100 + - 105 + - 116 - 32 - - 111 - - 109 - - 110 + - 113 + - 117 - 105 - - 115 - 46 format: binary example: - - 79 - - 100 - - 105 - - 111 - - 32 - - 115 + - 73 + - 109 + - 112 - 101 - 100 + - 105 + - 116 - 32 - - 111 - - 109 - - 110 + - 113 + - 117 - 105 - - 115 - 46 /concatbytesfield/{a}/{b}: get: @@ -86,8 +80,8 @@ paths: schema: type: string description: Left operand - example: Vitae assumenda fugiat et sit repellendus. - example: Suscipit at et iste laudantium ullam necessitatibus. + example: Quasi itaque. + example: Quasi itaque. - name: b in: path description: Right operand @@ -95,8 +89,8 @@ paths: schema: type: string description: Right operand - example: Ut tempore. - example: Ut ut ex rem. + example: Culpa ratione. + example: Culpa ratione. responses: "200": description: OK response. @@ -105,43 +99,33 @@ paths: schema: type: string example: - - 86 + - 69 + - 116 + - 32 - 101 - 110 - 105 - - 97 - 109 - 32 - - 118 - - 111 - - 108 + - 113 - 117 - - 112 - - 116 + - 105 - 97 - - 116 - - 101 - - 109 - 46 format: binary example: - - 86 + - 69 + - 116 + - 32 - 101 - 110 - 105 - - 97 - 109 - 32 - - 118 - - 111 - - 108 + - 113 - 117 - - 112 - - 116 + - 105 - 97 - - 116 - - 101 - - 109 - 46 /concatstringfield/{a}/{b}: get: @@ -157,8 +141,8 @@ paths: schema: type: string description: Left operand - example: Qui delectus reprehenderit laudantium tempora autem. - example: Quisquam hic adipisci qui ut nisi. + example: Ipsa qui expedita consectetur et et labore. + example: Ipsa qui expedita consectetur et et labore. - name: b in: path description: Right operand @@ -166,8 +150,8 @@ paths: schema: type: string description: Right operand - example: Sit officia repellat. - example: Recusandae aut. + example: Fuga dolorum quaerat. + example: Fuga dolorum quaerat. responses: "200": description: OK response. @@ -175,8 +159,8 @@ paths: text/html: schema: type: string - example: Eos veritatis est repudiandae distinctio at animi. - example: Eos veritatis est repudiandae distinctio at animi. + example: Qui exercitationem cupiditate ut ratione non consequatur. + example: Qui exercitationem cupiditate ut ratione non consequatur. /concatstrings/{a}/{b}: get: tags: @@ -191,8 +175,8 @@ paths: schema: type: string description: Left operand - example: Numquam unde accusantium autem tenetur. - example: Laborum amet odio in. + example: Nam ut eligendi quia laudantium non quia. + example: Nam ut eligendi quia laudantium non quia. - name: b in: path description: Right operand @@ -200,8 +184,8 @@ paths: schema: type: string description: Right operand - example: Odio inventore dolorem sunt in dolorem aut. - example: Magnam autem nostrum. + example: Officia aliquid aut quis minus. + example: Officia aliquid aut quis minus. responses: "200": description: OK response. @@ -209,8 +193,8 @@ paths: text/html: schema: type: string - example: At at. - example: At at. + example: Non repudiandae ex velit pariatur. + example: Non repudiandae ex velit pariatur. /swagger.json: get: tags: diff --git a/encodings/text/gen/http/openapi3.json b/encodings/text/gen/http/openapi3.json index 72c017239..11aca2c98 100644 --- a/encodings/text/gen/http/openapi3.json +++ b/encodings/text/gen/http/openapi3.json @@ -1 +1 @@ -{"openapi":"3.0.3","info":{"title":"Encodings Service","description":"Encoding example service demonstrating the use of different content types","version":"0.0.1"},"servers":[{"url":"http://localhost:80"}],"paths":{"/concatbytes/{a}/{b}":{"get":{"tags":["text"],"summary":"concatbytes text","operationId":"text#concatbytes","parameters":[{"name":"a","in":"path","description":"Left operand","required":true,"schema":{"type":"string","description":"Left operand","example":"Cupiditate perferendis excepturi corrupti sint aspernatur."},"example":"Nobis inventore nesciunt ex repellendus excepturi qui."},{"name":"b","in":"path","description":"Right operand","required":true,"schema":{"type":"string","description":"Right operand","example":"Dolorem perspiciatis officiis ipsum delectus."},"example":"Molestiae ducimus pariatur tenetur."}],"responses":{"200":{"description":"OK response.","content":{"text/html":{"schema":{"type":"string","example":"T2RpbyBzZWQgb21uaXMu","format":"binary"},"example":"T2RpbyBzZWQgb21uaXMu"}}}}}},"/concatbytesfield/{a}/{b}":{"get":{"tags":["text"],"summary":"concatbytesfield text","operationId":"text#concatbytesfield","parameters":[{"name":"a","in":"path","description":"Left operand","required":true,"schema":{"type":"string","description":"Left operand","example":"Vitae assumenda fugiat et sit repellendus."},"example":"Suscipit at et iste laudantium ullam necessitatibus."},{"name":"b","in":"path","description":"Right operand","required":true,"schema":{"type":"string","description":"Right operand","example":"Ut tempore."},"example":"Ut ut ex rem."}],"responses":{"200":{"description":"OK response.","content":{"text/html":{"schema":{"type":"string","example":"VmVuaWFtIHZvbHVwdGF0ZW0u","format":"binary"},"example":"VmVuaWFtIHZvbHVwdGF0ZW0u"}}}}}},"/concatstringfield/{a}/{b}":{"get":{"tags":["text"],"summary":"concatstringfield text","operationId":"text#concatstringfield","parameters":[{"name":"a","in":"path","description":"Left operand","required":true,"schema":{"type":"string","description":"Left operand","example":"Qui delectus reprehenderit laudantium tempora autem."},"example":"Quisquam hic adipisci qui ut nisi."},{"name":"b","in":"path","description":"Right operand","required":true,"schema":{"type":"string","description":"Right operand","example":"Sit officia repellat."},"example":"Recusandae aut."}],"responses":{"200":{"description":"OK response.","content":{"text/html":{"schema":{"type":"string","example":"Eos veritatis est repudiandae distinctio at animi."},"example":"Eos veritatis est repudiandae distinctio at animi."}}}}}},"/concatstrings/{a}/{b}":{"get":{"tags":["text"],"summary":"concatstrings text","operationId":"text#concatstrings","parameters":[{"name":"a","in":"path","description":"Left operand","required":true,"schema":{"type":"string","description":"Left operand","example":"Numquam unde accusantium autem tenetur."},"example":"Laborum amet odio in."},{"name":"b","in":"path","description":"Right operand","required":true,"schema":{"type":"string","description":"Right operand","example":"Odio inventore dolorem sunt in dolorem aut."},"example":"Magnam autem nostrum."}],"responses":{"200":{"description":"OK response.","content":{"text/html":{"schema":{"type":"string","example":"At at."},"example":"At at."}}}}}},"/swagger.json":{"get":{"tags":["text"],"summary":"Download ../../gen/http/openapi.json","operationId":"text#/swagger.json","responses":{"200":{"description":"File downloaded"}}}}},"components":{},"tags":[{"name":"text","description":"The text service performs operations on strings"}]} \ No newline at end of file +{"openapi":"3.0.3","info":{"title":"Encodings Service","description":"Encoding example service demonstrating the use of different content types","version":"0.0.1"},"servers":[{"url":"http://localhost:80"}],"paths":{"/concatbytes/{a}/{b}":{"get":{"tags":["text"],"summary":"concatbytes text","operationId":"text#concatbytes","parameters":[{"name":"a","in":"path","description":"Left operand","required":true,"schema":{"type":"string","description":"Left operand","example":"Dolorum molestias sed dolorem unde numquam laudantium."},"example":"Dolorum molestias sed dolorem unde numquam laudantium."},{"name":"b","in":"path","description":"Right operand","required":true,"schema":{"type":"string","description":"Right operand","example":"Ut repudiandae velit qui rerum aut eaque."},"example":"Ut repudiandae velit qui rerum aut eaque."}],"responses":{"200":{"description":"OK response.","content":{"text/html":{"schema":{"type":"string","example":"SW1wZWRpdCBxdWku","format":"binary"},"example":"SW1wZWRpdCBxdWku"}}}}}},"/concatbytesfield/{a}/{b}":{"get":{"tags":["text"],"summary":"concatbytesfield text","operationId":"text#concatbytesfield","parameters":[{"name":"a","in":"path","description":"Left operand","required":true,"schema":{"type":"string","description":"Left operand","example":"Quasi itaque."},"example":"Quasi itaque."},{"name":"b","in":"path","description":"Right operand","required":true,"schema":{"type":"string","description":"Right operand","example":"Culpa ratione."},"example":"Culpa ratione."}],"responses":{"200":{"description":"OK response.","content":{"text/html":{"schema":{"type":"string","example":"RXQgZW5pbSBxdWlhLg==","format":"binary"},"example":"RXQgZW5pbSBxdWlhLg=="}}}}}},"/concatstringfield/{a}/{b}":{"get":{"tags":["text"],"summary":"concatstringfield text","operationId":"text#concatstringfield","parameters":[{"name":"a","in":"path","description":"Left operand","required":true,"schema":{"type":"string","description":"Left operand","example":"Ipsa qui expedita consectetur et et labore."},"example":"Ipsa qui expedita consectetur et et labore."},{"name":"b","in":"path","description":"Right operand","required":true,"schema":{"type":"string","description":"Right operand","example":"Fuga dolorum quaerat."},"example":"Fuga dolorum quaerat."}],"responses":{"200":{"description":"OK response.","content":{"text/html":{"schema":{"type":"string","example":"Qui exercitationem cupiditate ut ratione non consequatur."},"example":"Qui exercitationem cupiditate ut ratione non consequatur."}}}}}},"/concatstrings/{a}/{b}":{"get":{"tags":["text"],"summary":"concatstrings text","operationId":"text#concatstrings","parameters":[{"name":"a","in":"path","description":"Left operand","required":true,"schema":{"type":"string","description":"Left operand","example":"Nam ut eligendi quia laudantium non quia."},"example":"Nam ut eligendi quia laudantium non quia."},{"name":"b","in":"path","description":"Right operand","required":true,"schema":{"type":"string","description":"Right operand","example":"Officia aliquid aut quis minus."},"example":"Officia aliquid aut quis minus."}],"responses":{"200":{"description":"OK response.","content":{"text/html":{"schema":{"type":"string","example":"Non repudiandae ex velit pariatur."},"example":"Non repudiandae ex velit pariatur."}}}}}},"/swagger.json":{"get":{"tags":["text"],"summary":"Download ../../gen/http/openapi.json","operationId":"text#/swagger.json","responses":{"200":{"description":"File downloaded"}}}}},"components":{},"tags":[{"name":"text","description":"The text service performs operations on strings"}]} \ No newline at end of file diff --git a/encodings/text/gen/http/openapi3.yaml b/encodings/text/gen/http/openapi3.yaml index 31670f84a..09f726ced 100644 --- a/encodings/text/gen/http/openapi3.yaml +++ b/encodings/text/gen/http/openapi3.yaml @@ -20,8 +20,8 @@ paths: schema: type: string description: Left operand - example: Cupiditate perferendis excepturi corrupti sint aspernatur. - example: Nobis inventore nesciunt ex repellendus excepturi qui. + example: Dolorum molestias sed dolorem unde numquam laudantium. + example: Dolorum molestias sed dolorem unde numquam laudantium. - name: b in: path description: Right operand @@ -29,8 +29,8 @@ paths: schema: type: string description: Right operand - example: Dolorem perspiciatis officiis ipsum delectus. - example: Molestiae ducimus pariatur tenetur. + example: Ut repudiandae velit qui rerum aut eaque. + example: Ut repudiandae velit qui rerum aut eaque. responses: "200": description: OK response. @@ -39,37 +39,31 @@ paths: schema: type: string example: - - 79 - - 100 - - 105 - - 111 - - 32 - - 115 + - 73 + - 109 + - 112 - 101 - 100 + - 105 + - 116 - 32 - - 111 - - 109 - - 110 + - 113 + - 117 - 105 - - 115 - 46 format: binary example: - - 79 - - 100 - - 105 - - 111 - - 32 - - 115 + - 73 + - 109 + - 112 - 101 - 100 + - 105 + - 116 - 32 - - 111 - - 109 - - 110 + - 113 + - 117 - 105 - - 115 - 46 /concatbytesfield/{a}/{b}: get: @@ -85,8 +79,8 @@ paths: schema: type: string description: Left operand - example: Vitae assumenda fugiat et sit repellendus. - example: Suscipit at et iste laudantium ullam necessitatibus. + example: Quasi itaque. + example: Quasi itaque. - name: b in: path description: Right operand @@ -94,8 +88,8 @@ paths: schema: type: string description: Right operand - example: Ut tempore. - example: Ut ut ex rem. + example: Culpa ratione. + example: Culpa ratione. responses: "200": description: OK response. @@ -104,43 +98,33 @@ paths: schema: type: string example: - - 86 + - 69 + - 116 + - 32 - 101 - 110 - 105 - - 97 - 109 - 32 - - 118 - - 111 - - 108 + - 113 - 117 - - 112 - - 116 + - 105 - 97 - - 116 - - 101 - - 109 - 46 format: binary example: - - 86 + - 69 + - 116 + - 32 - 101 - 110 - 105 - - 97 - 109 - 32 - - 118 - - 111 - - 108 + - 113 - 117 - - 112 - - 116 + - 105 - 97 - - 116 - - 101 - - 109 - 46 /concatstringfield/{a}/{b}: get: @@ -156,8 +140,8 @@ paths: schema: type: string description: Left operand - example: Qui delectus reprehenderit laudantium tempora autem. - example: Quisquam hic adipisci qui ut nisi. + example: Ipsa qui expedita consectetur et et labore. + example: Ipsa qui expedita consectetur et et labore. - name: b in: path description: Right operand @@ -165,8 +149,8 @@ paths: schema: type: string description: Right operand - example: Sit officia repellat. - example: Recusandae aut. + example: Fuga dolorum quaerat. + example: Fuga dolorum quaerat. responses: "200": description: OK response. @@ -174,8 +158,8 @@ paths: text/html: schema: type: string - example: Eos veritatis est repudiandae distinctio at animi. - example: Eos veritatis est repudiandae distinctio at animi. + example: Qui exercitationem cupiditate ut ratione non consequatur. + example: Qui exercitationem cupiditate ut ratione non consequatur. /concatstrings/{a}/{b}: get: tags: @@ -190,8 +174,8 @@ paths: schema: type: string description: Left operand - example: Numquam unde accusantium autem tenetur. - example: Laborum amet odio in. + example: Nam ut eligendi quia laudantium non quia. + example: Nam ut eligendi quia laudantium non quia. - name: b in: path description: Right operand @@ -199,8 +183,8 @@ paths: schema: type: string description: Right operand - example: Odio inventore dolorem sunt in dolorem aut. - example: Magnam autem nostrum. + example: Officia aliquid aut quis minus. + example: Officia aliquid aut quis minus. responses: "200": description: OK response. @@ -208,8 +192,8 @@ paths: text/html: schema: type: string - example: At at. - example: At at. + example: Non repudiandae ex velit pariatur. + example: Non repudiandae ex velit pariatur. /swagger.json: get: tags: diff --git a/encodings/text/gen/http/text/client/encode_decode.go b/encodings/text/gen/http/text/client/encode_decode.go index c55859091..f5cb12c43 100644 --- a/encodings/text/gen/http/text/client/encode_decode.go +++ b/encodings/text/gen/http/text/client/encode_decode.go @@ -10,6 +10,7 @@ package client import ( "bytes" "context" + "errors" "io" "net/http" "net/url" @@ -49,18 +50,24 @@ func (c *Client) BuildConcatstringsRequest(ctx context.Context, v any) (*http.Re // text concatstrings endpoint. restoreBody controls whether the response body // should be restored after having been read. func DecodeConcatstringsResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (any, error) { - return func(resp *http.Response) (any, error) { + return func(resp *http.Response) (result any, decodeErr error) { + responseBody := resp.Body if restoreBody { - b, err := io.ReadAll(resp.Body) - if err != nil { - return nil, err + b, readErr := io.ReadAll(responseBody) + closeErr := responseBody.Close() + if err := errors.Join(readErr, closeErr); err != nil { + return nil, goahttp.ErrDecodingError("text", "concatstrings", err) } resp.Body = io.NopCloser(bytes.NewBuffer(b)) defer func() { resp.Body = io.NopCloser(bytes.NewBuffer(b)) }() } else { - defer resp.Body.Close() + defer func() { + if err := responseBody.Close(); err != nil { + decodeErr = errors.Join(decodeErr, goahttp.ErrDecodingError("text", "concatstrings", err)) + } + }() } switch resp.StatusCode { case http.StatusOK: @@ -74,7 +81,10 @@ func DecodeConcatstringsResponse(decoder func(*http.Response) goahttp.Decoder, r } return body, nil default: - body, _ := io.ReadAll(resp.Body) + body, err := io.ReadAll(resp.Body) + if err != nil { + return nil, goahttp.ErrDecodingError("text", "concatstrings", err) + } return nil, goahttp.ErrInvalidResponse("text", "concatstrings", resp.StatusCode, string(body)) } } @@ -111,18 +121,24 @@ func (c *Client) BuildConcatbytesRequest(ctx context.Context, v any) (*http.Requ // text concatbytes endpoint. restoreBody controls whether the response body // should be restored after having been read. func DecodeConcatbytesResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (any, error) { - return func(resp *http.Response) (any, error) { + return func(resp *http.Response) (result any, decodeErr error) { + responseBody := resp.Body if restoreBody { - b, err := io.ReadAll(resp.Body) - if err != nil { - return nil, err + b, readErr := io.ReadAll(responseBody) + closeErr := responseBody.Close() + if err := errors.Join(readErr, closeErr); err != nil { + return nil, goahttp.ErrDecodingError("text", "concatbytes", err) } resp.Body = io.NopCloser(bytes.NewBuffer(b)) defer func() { resp.Body = io.NopCloser(bytes.NewBuffer(b)) }() } else { - defer resp.Body.Close() + defer func() { + if err := responseBody.Close(); err != nil { + decodeErr = errors.Join(decodeErr, goahttp.ErrDecodingError("text", "concatbytes", err)) + } + }() } switch resp.StatusCode { case http.StatusOK: @@ -136,7 +152,10 @@ func DecodeConcatbytesResponse(decoder func(*http.Response) goahttp.Decoder, res } return body, nil default: - body, _ := io.ReadAll(resp.Body) + body, err := io.ReadAll(resp.Body) + if err != nil { + return nil, goahttp.ErrDecodingError("text", "concatbytes", err) + } return nil, goahttp.ErrInvalidResponse("text", "concatbytes", resp.StatusCode, string(body)) } } @@ -173,18 +192,24 @@ func (c *Client) BuildConcatstringfieldRequest(ctx context.Context, v any) (*htt // the text concatstringfield endpoint. restoreBody controls whether the // response body should be restored after having been read. func DecodeConcatstringfieldResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (any, error) { - return func(resp *http.Response) (any, error) { + return func(resp *http.Response) (result any, decodeErr error) { + responseBody := resp.Body if restoreBody { - b, err := io.ReadAll(resp.Body) - if err != nil { - return nil, err + b, readErr := io.ReadAll(responseBody) + closeErr := responseBody.Close() + if err := errors.Join(readErr, closeErr); err != nil { + return nil, goahttp.ErrDecodingError("text", "concatstringfield", err) } resp.Body = io.NopCloser(bytes.NewBuffer(b)) defer func() { resp.Body = io.NopCloser(bytes.NewBuffer(b)) }() } else { - defer resp.Body.Close() + defer func() { + if err := responseBody.Close(); err != nil { + decodeErr = errors.Join(decodeErr, goahttp.ErrDecodingError("text", "concatstringfield", err)) + } + }() } switch resp.StatusCode { case http.StatusOK: @@ -199,7 +224,10 @@ func DecodeConcatstringfieldResponse(decoder func(*http.Response) goahttp.Decode res := NewConcatstringfieldMyConcatenationOK(body) return res, nil default: - body, _ := io.ReadAll(resp.Body) + body, err := io.ReadAll(resp.Body) + if err != nil { + return nil, goahttp.ErrDecodingError("text", "concatstringfield", err) + } return nil, goahttp.ErrInvalidResponse("text", "concatstringfield", resp.StatusCode, string(body)) } } @@ -236,18 +264,24 @@ func (c *Client) BuildConcatbytesfieldRequest(ctx context.Context, v any) (*http // the text concatbytesfield endpoint. restoreBody controls whether the // response body should be restored after having been read. func DecodeConcatbytesfieldResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (any, error) { - return func(resp *http.Response) (any, error) { + return func(resp *http.Response) (result any, decodeErr error) { + responseBody := resp.Body if restoreBody { - b, err := io.ReadAll(resp.Body) - if err != nil { - return nil, err + b, readErr := io.ReadAll(responseBody) + closeErr := responseBody.Close() + if err := errors.Join(readErr, closeErr); err != nil { + return nil, goahttp.ErrDecodingError("text", "concatbytesfield", err) } resp.Body = io.NopCloser(bytes.NewBuffer(b)) defer func() { resp.Body = io.NopCloser(bytes.NewBuffer(b)) }() } else { - defer resp.Body.Close() + defer func() { + if err := responseBody.Close(); err != nil { + decodeErr = errors.Join(decodeErr, goahttp.ErrDecodingError("text", "concatbytesfield", err)) + } + }() } switch resp.StatusCode { case http.StatusOK: @@ -262,7 +296,10 @@ func DecodeConcatbytesfieldResponse(decoder func(*http.Response) goahttp.Decoder res := NewConcatbytesfieldMyConcatenationOK(body) return res, nil default: - body, _ := io.ReadAll(resp.Body) + body, err := io.ReadAll(resp.Body) + if err != nil { + return nil, goahttp.ErrDecodingError("text", "concatbytesfield", err) + } return nil, goahttp.ErrInvalidResponse("text", "concatbytesfield", resp.StatusCode, string(body)) } } diff --git a/encodings/text/gen/http/text/server/server.go b/encodings/text/gen/http/text/server/server.go index b0c08e3bf..b91198706 100644 --- a/encodings/text/gen/http/text/server/server.go +++ b/encodings/text/gen/http/text/server/server.go @@ -313,15 +313,14 @@ func NewConcatbytesfieldHandler( }) } -// appendFS is a custom implementation of fs.FS that appends a specified prefix -// to the file paths before delegating the Open call to the underlying fs.FS. +// appendFS adds a fixed directory to file paths before opening them. type appendFS struct { prefix string fs http.FileSystem } // Open opens the named file, appending the prefix to the file path before -// passing it to the underlying fs.FS. +// passing it to the underlying file system. func (s appendFS) Open(name string) (http.File, error) { switch name { case "/swagger.json": @@ -330,8 +329,7 @@ func (s appendFS) Open(name string) (http.File, error) { return s.fs.Open(path.Join(s.prefix, name)) } -// appendPrefix returns a new fs.FS that appends the specified prefix to file paths -// before delegating to the provided embed.FS. +// appendPrefix returns a file system that adds prefix before opening each path. func appendPrefix(fsys http.FileSystem, prefix string) http.FileSystem { return appendFS{prefix: prefix, fs: fsys} } diff --git a/encodings/text/gen/text/service.go b/encodings/text/gen/text/service.go index 192571514..1445a8f20 100644 --- a/encodings/text/gen/text/service.go +++ b/encodings/text/gen/text/service.go @@ -7,9 +7,7 @@ package text -import ( - "context" -) +import "context" // The text service performs operations on strings type Service interface { diff --git a/error/gen/grpc/calc/client/cli.go b/error/gen/grpc/calc/client/cli.go index 1af1edbc1..4f2c35d34 100644 --- a/error/gen/grpc/calc/client/cli.go +++ b/error/gen/grpc/calc/client/cli.go @@ -24,7 +24,7 @@ func BuildDividePayload(calcDivideMessage string) (*calc.DividePayload, error) { if calcDivideMessage != "" { err = json.Unmarshal([]byte(calcDivideMessage), &message) if err != nil { - return nil, fmt.Errorf("invalid JSON for message, \nerror: %s, \nexample of valid JSON:\n%s", err, "'{\n \"dividend\": 7044419912256284667,\n \"divisor\": 1003733810773493288\n }'") + return nil, fmt.Errorf("invalid JSON for message, \nerror: %s, \nexample of valid JSON:\n%s", err, "'{\n \"dividend\": 2120767999786333776,\n \"divisor\": 6535528958544806582\n }'") } } } diff --git a/error/gen/grpc/calc/client/types.go b/error/gen/grpc/calc/client/types.go index c5bf18f2e..c560fb2ac 100644 --- a/error/gen/grpc/calc/client/types.go +++ b/error/gen/grpc/calc/client/types.go @@ -12,8 +12,7 @@ import ( calcpb "goa.design/examples/error/gen/grpc/calc/pb" ) -// NewProtoDivideRequest builds the gRPC request type from the payload of the -// "divide" endpoint of the "calc" service. +// NewProtoDivideRequest builds *calcpb.DivideRequest from *calc.DividePayload. func NewProtoDivideRequest(payload *calc.DividePayload) *calcpb.DivideRequest { message := &calcpb.DivideRequest{ Dividend: int32(payload.Dividend), @@ -22,8 +21,7 @@ func NewProtoDivideRequest(payload *calc.DividePayload) *calcpb.DivideRequest { return message } -// NewDivideResult builds the result type of the "divide" endpoint of the -// "calc" service from the gRPC response type. +// NewDivideResult builds *calc.DivideResult from *calcpb.DivideResponse. func NewDivideResult(message *calcpb.DivideResponse) *calc.DivideResult { result := &calc.DivideResult{ Quotient: int(message.Quotient), @@ -32,8 +30,8 @@ func NewDivideResult(message *calcpb.DivideResponse) *calc.DivideResult { return result } -// NewDivideDivByZeroError builds the error type of the "divide" endpoint of -// the "calc" service from the gRPC error response type. +// NewDivideDivByZeroError builds *calc.DivByZero from +// *calcpb.DivideDivByZeroError. func NewDivideDivByZeroError(message *calcpb.DivideDivByZeroError) *calc.DivByZero { er := &calc.DivByZero{ Message: message.Message_, diff --git a/error/gen/grpc/calc/pb/goagen_error_calc.pb.go b/error/gen/grpc/calc/pb/goagen_error_calc.pb.go index 5de6a7b1d..0fbf7cdbe 100644 --- a/error/gen/grpc/calc/pb/goagen_error_calc.pb.go +++ b/error/gen/grpc/calc/pb/goagen_error_calc.pb.go @@ -7,8 +7,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.36.11 -// protoc v7.34.1 +// protoc-gen-go v1.36.12 +// protoc v7.36.0 // source: goagen_error_calc.proto package calcpb diff --git a/error/gen/grpc/calc/pb/goagen_error_calc_grpc.pb.go b/error/gen/grpc/calc/pb/goagen_error_calc_grpc.pb.go index 8e8b318ea..e12c4f6e0 100644 --- a/error/gen/grpc/calc/pb/goagen_error_calc_grpc.pb.go +++ b/error/gen/grpc/calc/pb/goagen_error_calc_grpc.pb.go @@ -8,7 +8,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.6.2 -// - protoc v7.34.1 +// - protoc v7.36.0 // source: goagen_error_calc.proto package calcpb diff --git a/error/gen/grpc/calc/server/types.go b/error/gen/grpc/calc/server/types.go index 94e81780d..1e734a24d 100644 --- a/error/gen/grpc/calc/server/types.go +++ b/error/gen/grpc/calc/server/types.go @@ -12,8 +12,7 @@ import ( calcpb "goa.design/examples/error/gen/grpc/calc/pb" ) -// NewDividePayload builds the payload of the "divide" endpoint of the "calc" -// service from the gRPC request type. +// NewDividePayload builds *calc.DividePayload from *calcpb.DivideRequest. func NewDividePayload(message *calcpb.DivideRequest) *calc.DividePayload { v := &calc.DividePayload{ Dividend: int(message.Dividend), @@ -22,8 +21,7 @@ func NewDividePayload(message *calcpb.DivideRequest) *calc.DividePayload { return v } -// NewProtoDivideResponse builds the gRPC response type from the result of the -// "divide" endpoint of the "calc" service. +// NewProtoDivideResponse builds *calcpb.DivideResponse from *calc.DivideResult. func NewProtoDivideResponse(result *calc.DivideResult) *calcpb.DivideResponse { message := &calcpb.DivideResponse{ Quotient: int32(result.Quotient), @@ -32,8 +30,8 @@ func NewProtoDivideResponse(result *calc.DivideResult) *calcpb.DivideResponse { return message } -// NewDivideDivByZeroError builds the gRPC error response type from the error -// of the "divide" endpoint of the "calc" service. +// NewDivideDivByZeroError builds *calcpb.DivideDivByZeroError from +// *calc.DivByZero. func NewDivideDivByZeroError(er *calc.DivByZero) *calcpb.DivideDivByZeroError { message := &calcpb.DivideDivByZeroError{ Message_: er.Message, diff --git a/error/gen/grpc/cli/calc/cli.go b/error/gen/grpc/cli/calc/cli.go index ffea962da..5e73a7932 100644 --- a/error/gen/grpc/cli/calc/cli.go +++ b/error/gen/grpc/cli/calc/cli.go @@ -28,7 +28,7 @@ func UsageCommands() []string { // UsageExamples produces an example of a valid invocation of the CLI tool. func UsageExamples() string { - return os.Args[0] + " " + "calc divide --message '{\n \"dividend\": 7044419912256284667,\n \"divisor\": 1003733810773493288\n }'" + "\n" + + return os.Args[0] + " " + "calc divide --message '{\n \"dividend\": 2120767999786333776,\n \"divisor\": 6535528958544806582\n }'" + "\n" + "" } @@ -147,5 +147,5 @@ func calcDivideUsage() { fmt.Fprintln(os.Stderr) fmt.Fprintln(os.Stderr, "Example:") - fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "calc divide --message '{\n \"dividend\": 7044419912256284667,\n \"divisor\": 1003733810773493288\n }'") + fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "calc divide --message '{\n \"dividend\": 2120767999786333776,\n \"divisor\": 6535528958544806582\n }'") } diff --git a/error/gen/http/calc/client/cli.go b/error/gen/http/calc/client/cli.go index 4a7619273..09aff3abf 100644 --- a/error/gen/http/calc/client/cli.go +++ b/error/gen/http/calc/client/cli.go @@ -22,7 +22,7 @@ func BuildDividePayload(calcDivideBody string) (*calc.DividePayload, error) { { err = json.Unmarshal([]byte(calcDivideBody), &body) if err != nil { - return nil, fmt.Errorf("invalid JSON for body, \nerror: %s, \nexample of valid JSON:\n%s", err, "'{\n \"dividend\": 1196350668178300830,\n \"divisor\": 5941732484439269441\n }'") + return nil, fmt.Errorf("invalid JSON for body, \nerror: %s, \nexample of valid JSON:\n%s", err, "'{\n \"dividend\": 6599615662108896380,\n \"divisor\": 6289780582187170160\n }'") } } v := &calc.DividePayload{ diff --git a/error/gen/http/calc/client/encode_decode.go b/error/gen/http/calc/client/encode_decode.go index a4134dc08..72c48aa8d 100644 --- a/error/gen/http/calc/client/encode_decode.go +++ b/error/gen/http/calc/client/encode_decode.go @@ -10,6 +10,7 @@ package client import ( "bytes" "context" + "errors" "io" "net/http" "net/url" @@ -57,18 +58,24 @@ func EncodeDivideRequest(encoder func(*http.Request) goahttp.Encoder) func(*http // - "timeout" (type *goa.ServiceError): http.StatusGatewayTimeout // - error: internal error func DecodeDivideResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (any, error) { - return func(resp *http.Response) (any, error) { + return func(resp *http.Response) (result any, decodeErr error) { + responseBody := resp.Body if restoreBody { - b, err := io.ReadAll(resp.Body) - if err != nil { - return nil, err + b, readErr := io.ReadAll(responseBody) + closeErr := responseBody.Close() + if err := errors.Join(readErr, closeErr); err != nil { + return nil, goahttp.ErrDecodingError("calc", "divide", err) } resp.Body = io.NopCloser(bytes.NewBuffer(b)) defer func() { resp.Body = io.NopCloser(bytes.NewBuffer(b)) }() } else { - defer resp.Body.Close() + defer func() { + if err := responseBody.Close(); err != nil { + decodeErr = errors.Join(decodeErr, goahttp.ErrDecodingError("calc", "divide", err)) + } + }() } switch resp.StatusCode { case http.StatusOK: @@ -115,7 +122,10 @@ func DecodeDivideResponse(decoder func(*http.Response) goahttp.Decoder, restoreB } return nil, NewDivideTimeout(&body) default: - body, _ := io.ReadAll(resp.Body) + body, err := io.ReadAll(resp.Body) + if err != nil { + return nil, goahttp.ErrDecodingError("calc", "divide", err) + } return nil, goahttp.ErrInvalidResponse("calc", "divide", resp.StatusCode, string(body)) } } diff --git a/error/gen/http/calc/client/types.go b/error/gen/http/calc/client/types.go index d0f299910..3b48e7f2c 100644 --- a/error/gen/http/calc/client/types.go +++ b/error/gen/http/calc/client/types.go @@ -107,7 +107,7 @@ func ValidateDivideResponseBody(body *DivideResponseBody) (err error) { } // ValidateDivideDivByZeroResponseBody runs the validations defined on -// divide_div_by_zero_response_body +// DivideDivByZeroResponseBody func ValidateDivideDivByZeroResponseBody(body *DivideDivByZeroResponseBody) (err error) { if body.Message == nil { err = goa.MergeErrors(err, goa.MissingFieldError("message", "body")) @@ -116,7 +116,7 @@ func ValidateDivideDivByZeroResponseBody(body *DivideDivByZeroResponseBody) (err } // ValidateDivideTimeoutResponseBody runs the validations defined on -// divide_timeout_response_body +// DivideTimeoutResponseBody func ValidateDivideTimeoutResponseBody(body *DivideTimeoutResponseBody) (err error) { if body.Name == nil { err = goa.MergeErrors(err, goa.MissingFieldError("name", "body")) diff --git a/error/gen/http/cli/calc/cli.go b/error/gen/http/cli/calc/cli.go index 70d4ec454..f565ff64c 100644 --- a/error/gen/http/cli/calc/cli.go +++ b/error/gen/http/cli/calc/cli.go @@ -29,7 +29,7 @@ func UsageCommands() []string { // UsageExamples produces an example of a valid invocation of the CLI tool. func UsageExamples() string { - return os.Args[0] + " " + "calc divide --body '{\n \"dividend\": 1196350668178300830,\n \"divisor\": 5941732484439269441\n }'" + "\n" + + return os.Args[0] + " " + "calc divide --body '{\n \"dividend\": 6599615662108896380,\n \"divisor\": 6289780582187170160\n }'" + "\n" + "" } @@ -151,5 +151,5 @@ func calcDivideUsage() { fmt.Fprintln(os.Stderr) fmt.Fprintln(os.Stderr, "Example:") - fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "calc divide --body '{\n \"dividend\": 1196350668178300830,\n \"divisor\": 5941732484439269441\n }'") + fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "calc divide --body '{\n \"dividend\": 6599615662108896380,\n \"divisor\": 6289780582187170160\n }'") } diff --git a/error/gen/http/openapi.json b/error/gen/http/openapi.json index a891d13b9..d3219628d 100644 --- a/error/gen/http/openapi.json +++ b/error/gen/http/openapi.json @@ -1 +1 @@ -{"swagger":"2.0","info":{"title":"","version":"0.0.1"},"host":"localhost:80","consumes":["application/json","application/xml","application/gob"],"produces":["application/json","application/xml","application/gob"],"paths":{"/":{"post":{"tags":["calc"],"summary":"divide calc","operationId":"calc#divide","parameters":[{"name":"DivideRequestBody","in":"body","required":true,"schema":{"$ref":"#/definitions/CalcDivideRequestBody","required":["dividend","divisor"]}}],"responses":{"200":{"description":"OK response.","schema":{"$ref":"#/definitions/CalcDivideResponseBody","required":["quotient","reminder"]}},"400":{"description":"Response used for division by zero errors","schema":{"$ref":"#/definitions/DivByZero","required":["message"]}},"504":{"description":"Operation timed out","schema":{"$ref":"#/definitions/CalcDivideTimeoutResponseBody"}}},"schemes":["http"]}}},"definitions":{"CalcDivideRequestBody":{"title":"CalcDivideRequestBody","type":"object","properties":{"dividend":{"type":"integer","example":1196350668178300830,"format":"int64"},"divisor":{"type":"integer","example":5941732484439269441,"format":"int64"}},"example":{"dividend":1196350668178300830,"divisor":5941732484439269441},"required":["dividend","divisor"]},"CalcDivideResponseBody":{"title":"CalcDivideResponseBody","type":"object","properties":{"quotient":{"type":"integer","example":3989696267411135677,"format":"int64"},"reminder":{"type":"integer","example":6133210891814429636,"format":"int64"}},"example":{"quotient":3989696267411135677,"reminder":6133210891814429636},"required":["quotient","reminder"]},"CalcDivideTimeoutResponseBody":{"title":"Mediatype identifier: application/vnd.goa.error; view=default","type":"object","properties":{"fault":{"type":"boolean","description":"Is the error a server-side fault?","example":true},"id":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"message":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"name":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"temporary":{"type":"boolean","description":"Is the error temporary?","example":false},"timeout":{"type":"boolean","description":"Is the error a timeout?","example":true}},"description":"Error response result type (default view)","example":{"fault":true,"id":"123abc","message":"parameter 'p' must be an integer","name":"bad_request","temporary":false,"timeout":true},"required":["name","id","message","temporary","timeout","fault"]},"DivByZero":{"title":"DivByZero","type":"object","properties":{"message":{"type":"string","description":"division by zero leads to infinity.","example":"Eius exercitationem nemo ipsa eveniet est."}},"description":"division by 0","example":{"message":"Eius exercitationem nemo ipsa eveniet est."},"required":["message"]}}} \ No newline at end of file +{"swagger":"2.0","info":{"title":"","version":"0.0.1"},"host":"localhost:80","consumes":["application/json","application/xml","application/gob"],"produces":["application/json","application/xml","application/gob"],"paths":{"/":{"post":{"tags":["calc"],"summary":"divide calc","operationId":"calc#divide","parameters":[{"name":"DivideRequestBody","in":"body","required":true,"schema":{"$ref":"#/definitions/CalcDivideRequestBody","required":["dividend","divisor"]}}],"responses":{"200":{"description":"OK response.","schema":{"$ref":"#/definitions/CalcDivideResponseBody","required":["quotient","reminder"]}},"400":{"description":"div_by_zero: Response used for division by zero errors","schema":{"$ref":"#/definitions/DivByZero","required":["message"]}},"504":{"description":"timeout: Operation timed out","schema":{"$ref":"#/definitions/CalcDivideTimeoutResponseBody"},"examples":{"application/vnd.goa.error":{"fault":false,"id":"123abc","message":"parameter 'p' must be an integer","name":"timeout","temporary":false,"timeout":true}}}},"schemes":["http"]}}},"definitions":{"CalcDivideRequestBody":{"title":"CalcDivideRequestBody","type":"object","properties":{"dividend":{"type":"integer","example":6599615662108896380,"format":"int64"},"divisor":{"type":"integer","example":6289780582187170160,"format":"int64"}},"example":{"dividend":6599615662108896380,"divisor":6289780582187170160},"required":["dividend","divisor"]},"CalcDivideResponseBody":{"title":"CalcDivideResponseBody","type":"object","properties":{"quotient":{"type":"integer","example":5026300794991892168,"format":"int64"},"reminder":{"type":"integer","example":3251227134896864353,"format":"int64"}},"example":{"quotient":5026300794991892168,"reminder":3251227134896864353},"required":["quotient","reminder"]},"CalcDivideTimeoutResponseBody":{"title":"Mediatype identifier: application/vnd.goa.error; view=default","type":"object","properties":{"fault":{"type":"boolean","description":"Is the error a server-side fault?","example":false},"id":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"message":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"name":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"temporary":{"type":"boolean","description":"Is the error temporary?","example":false},"timeout":{"type":"boolean","description":"Is the error a timeout?","example":true}},"description":"Error response result type (default view)","example":{"fault":false,"id":"123abc","message":"parameter 'p' must be an integer","name":"bad_request","temporary":false,"timeout":true},"required":["name","id","message","temporary","timeout","fault"]},"DivByZero":{"title":"DivByZero","type":"object","properties":{"message":{"type":"string","description":"division by zero leads to infinity.","example":"Consequatur veniam est tempora non natus."}},"description":"DivByZero is the error returned when using value 0 as divisor.","example":{"message":"Consequatur veniam est tempora non natus."},"required":["message"]}}} \ No newline at end of file diff --git a/error/gen/http/openapi.yaml b/error/gen/http/openapi.yaml index 61fb8e308..a5b440f4e 100644 --- a/error/gen/http/openapi.yaml +++ b/error/gen/http/openapi.yaml @@ -36,15 +36,23 @@ paths: - quotient - reminder "400": - description: Response used for division by zero errors + description: 'div_by_zero: Response used for division by zero errors' schema: $ref: '#/definitions/DivByZero' required: - message "504": - description: Operation timed out + description: 'timeout: Operation timed out' schema: $ref: '#/definitions/CalcDivideTimeoutResponseBody' + examples: + application/vnd.goa.error: + fault: false + id: 123abc + message: parameter 'p' must be an integer + name: timeout + temporary: false + timeout: true schemes: - http definitions: @@ -54,15 +62,15 @@ definitions: properties: dividend: type: integer - example: 1196350668178300830 + example: 6599615662108896380 format: int64 divisor: type: integer - example: 5941732484439269441 + example: 6289780582187170160 format: int64 example: - dividend: 1196350668178300830 - divisor: 5941732484439269441 + dividend: 6599615662108896380 + divisor: 6289780582187170160 required: - dividend - divisor @@ -72,15 +80,15 @@ definitions: properties: quotient: type: integer - example: 3989696267411135677 + example: 5026300794991892168 format: int64 reminder: type: integer - example: 6133210891814429636 + example: 3251227134896864353 format: int64 example: - quotient: 3989696267411135677 - reminder: 6133210891814429636 + quotient: 5026300794991892168 + reminder: 3251227134896864353 required: - quotient - reminder @@ -91,7 +99,7 @@ definitions: fault: type: boolean description: Is the error a server-side fault? - example: true + example: false id: type: string description: ID is a unique identifier for this particular occurrence of the problem. @@ -114,7 +122,7 @@ definitions: example: true description: Error response result type (default view) example: - fault: true + fault: false id: 123abc message: parameter 'p' must be an integer name: bad_request @@ -134,9 +142,9 @@ definitions: message: type: string description: division by zero leads to infinity. - example: Eius exercitationem nemo ipsa eveniet est. - description: division by 0 + example: Consequatur veniam est tempora non natus. + description: DivByZero is the error returned when using value 0 as divisor. example: - message: Eius exercitationem nemo ipsa eveniet est. + message: Consequatur veniam est tempora non natus. required: - message diff --git a/error/gen/http/openapi3.2.json b/error/gen/http/openapi3.2.json index 85e28c5aa..f68b04cb3 100644 --- a/error/gen/http/openapi3.2.json +++ b/error/gen/http/openapi3.2.json @@ -1 +1 @@ -{"openapi":"3.2.0","info":{"title":"Goa API","version":"0.0.1"},"servers":[{"url":"http://localhost:80","name":"calc","description":"Default server for calc"}],"paths":{"/":{"post":{"tags":["calc"],"summary":"divide calc","operationId":"calc#divide","requestBody":{"description":"Request body for divide.","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DivideRequestBody"},"example":{"dividend":1196350668178300830,"divisor":5941732484439269441}}}},"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DivideResponseBody"},"example":{"quotient":3989696267411135677,"reminder":6133210891814429636}}}},"400":{"description":"div_by_zero: Response used for division by zero errors","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DivByZero"},"example":{"message":"Eius exercitationem nemo ipsa eveniet est."}}}},"504":{"description":"timeout: Operation timed out","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"schemas":{"DivByZero":{"type":"object","properties":{"message":{"type":"string","description":"division by zero leads to infinity.","example":"Eius exercitationem nemo ipsa eveniet est."}},"description":"division by 0","example":{"message":"Eius exercitationem nemo ipsa eveniet est."},"required":["message"]},"DivideRequestBody":{"type":"object","properties":{"dividend":{"type":"integer","example":1196350668178300830,"format":"int64"},"divisor":{"type":"integer","example":5941732484439269441,"format":"int64"}},"description":"Request body for divide.","example":{"dividend":1196350668178300830,"divisor":5941732484439269441},"required":["dividend","divisor"]},"DivideResponseBody":{"type":"object","properties":{"quotient":{"type":"integer","example":3989696267411135677,"format":"int64"},"reminder":{"type":"integer","example":6133210891814429636,"format":"int64"}},"example":{"quotient":3989696267411135677,"reminder":6133210891814429636},"required":["quotient","reminder"]},"Error":{"type":"object","properties":{"fault":{"type":"boolean","description":"Is the error a server-side fault?","example":true},"id":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"message":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"name":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"temporary":{"type":"boolean","description":"Is the error temporary?","example":true},"timeout":{"type":"boolean","description":"Is the error a timeout?","example":true}},"description":"Error response result type","example":{"fault":true,"id":"123abc","message":"parameter 'p' must be an integer","name":"bad_request","temporary":true,"timeout":true},"required":["name","id","message","temporary","timeout","fault"]}}},"tags":[{"name":"calc"}]} \ No newline at end of file +{"openapi":"3.2.0","info":{"title":"Goa API","version":"0.0.1"},"servers":[{"url":"http://localhost:80","name":"calc","description":"Default server for calc"}],"paths":{"/":{"post":{"tags":["calc"],"summary":"divide calc","operationId":"calc#divide","requestBody":{"description":"Request body for divide.","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DivideRequestBody"},"example":{"dividend":6599615662108896380,"divisor":6289780582187170160}}}},"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DivideResponseBody"},"example":{"quotient":5026300794991892168,"reminder":3251227134896864353}}}},"400":{"description":"div_by_zero: Response used for division by zero errors","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DivByZero"},"example":{"message":"Consequatur veniam est tempora non natus."}}}},"504":{"description":"timeout: Operation timed out","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"fault":false,"id":"123abc","message":"parameter 'p' must be an integer","name":"timeout","temporary":false,"timeout":true}}}}}}}},"components":{"schemas":{"DivByZero":{"type":"object","properties":{"message":{"type":"string","description":"division by zero leads to infinity.","example":"Consequatur veniam est tempora non natus."}},"description":"DivByZero is the error returned when using value 0 as divisor.","example":{"message":"Consequatur veniam est tempora non natus."},"required":["message"]},"DivideRequestBody":{"type":"object","properties":{"dividend":{"type":"integer","example":6599615662108896380,"format":"int64"},"divisor":{"type":"integer","example":6289780582187170160,"format":"int64"}},"description":"Request body for divide.","example":{"dividend":6599615662108896380,"divisor":6289780582187170160},"required":["dividend","divisor"]},"DivideResponseBody":{"type":"object","properties":{"quotient":{"type":"integer","example":5026300794991892168,"format":"int64"},"reminder":{"type":"integer","example":3251227134896864353,"format":"int64"}},"example":{"quotient":5026300794991892168,"reminder":3251227134896864353},"required":["quotient","reminder"]},"Error":{"type":"object","properties":{"fault":{"type":"boolean","description":"Is the error a server-side fault?","example":false},"id":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"message":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"name":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"temporary":{"type":"boolean","description":"Is the error temporary?","example":false},"timeout":{"type":"boolean","description":"Is the error a timeout?","example":true}},"description":"Error response result type","example":{"fault":false,"id":"123abc","message":"parameter 'p' must be an integer","name":"bad_request","temporary":false,"timeout":true},"required":["name","id","message","temporary","timeout","fault"]}}},"tags":[{"name":"calc"}]} \ No newline at end of file diff --git a/error/gen/http/openapi3.2.yaml b/error/gen/http/openapi3.2.yaml index 3d280c424..55380510f 100644 --- a/error/gen/http/openapi3.2.yaml +++ b/error/gen/http/openapi3.2.yaml @@ -21,8 +21,8 @@ paths: schema: $ref: '#/components/schemas/DivideRequestBody' example: - dividend: 1196350668178300830 - divisor: 5941732484439269441 + dividend: 6599615662108896380 + divisor: 6289780582187170160 responses: "200": description: OK response. @@ -31,8 +31,8 @@ paths: schema: $ref: '#/components/schemas/DivideResponseBody' example: - quotient: 3989696267411135677 - reminder: 6133210891814429636 + quotient: 5026300794991892168 + reminder: 3251227134896864353 "400": description: 'div_by_zero: Response used for division by zero errors' content: @@ -40,13 +40,20 @@ paths: schema: $ref: '#/components/schemas/DivByZero' example: - message: Eius exercitationem nemo ipsa eveniet est. + message: Consequatur veniam est tempora non natus. "504": description: 'timeout: Operation timed out' content: application/vnd.goa.error: schema: $ref: '#/components/schemas/Error' + example: + fault: false + id: 123abc + message: parameter 'p' must be an integer + name: timeout + temporary: false + timeout: true components: schemas: DivByZero: @@ -55,10 +62,10 @@ components: message: type: string description: division by zero leads to infinity. - example: Eius exercitationem nemo ipsa eveniet est. - description: division by 0 + example: Consequatur veniam est tempora non natus. + description: DivByZero is the error returned when using value 0 as divisor. example: - message: Eius exercitationem nemo ipsa eveniet est. + message: Consequatur veniam est tempora non natus. required: - message DivideRequestBody: @@ -66,16 +73,16 @@ components: properties: dividend: type: integer - example: 1196350668178300830 + example: 6599615662108896380 format: int64 divisor: type: integer - example: 5941732484439269441 + example: 6289780582187170160 format: int64 description: Request body for divide. example: - dividend: 1196350668178300830 - divisor: 5941732484439269441 + dividend: 6599615662108896380 + divisor: 6289780582187170160 required: - dividend - divisor @@ -84,15 +91,15 @@ components: properties: quotient: type: integer - example: 3989696267411135677 + example: 5026300794991892168 format: int64 reminder: type: integer - example: 6133210891814429636 + example: 3251227134896864353 format: int64 example: - quotient: 3989696267411135677 - reminder: 6133210891814429636 + quotient: 5026300794991892168 + reminder: 3251227134896864353 required: - quotient - reminder @@ -102,7 +109,7 @@ components: fault: type: boolean description: Is the error a server-side fault? - example: true + example: false id: type: string description: ID is a unique identifier for this particular occurrence of the problem. @@ -118,18 +125,18 @@ components: temporary: type: boolean description: Is the error temporary? - example: true + example: false timeout: type: boolean description: Is the error a timeout? example: true description: Error response result type example: - fault: true + fault: false id: 123abc message: parameter 'p' must be an integer name: bad_request - temporary: true + temporary: false timeout: true required: - name diff --git a/error/gen/http/openapi3.json b/error/gen/http/openapi3.json index 3291c8e8c..0c906e18c 100644 --- a/error/gen/http/openapi3.json +++ b/error/gen/http/openapi3.json @@ -1 +1 @@ -{"openapi":"3.0.3","info":{"title":"Goa API","version":"0.0.1"},"servers":[{"url":"http://localhost:80","description":"Default server for calc"}],"paths":{"/":{"post":{"tags":["calc"],"summary":"divide calc","operationId":"calc#divide","requestBody":{"description":"Request body for divide.","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DivideRequestBody"},"example":{"dividend":1196350668178300830,"divisor":5941732484439269441}}}},"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DivideResponseBody"},"example":{"quotient":3989696267411135677,"reminder":6133210891814429636}}}},"400":{"description":"div_by_zero: Response used for division by zero errors","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DivByZero"},"example":{"message":"Eius exercitationem nemo ipsa eveniet est."}}}},"504":{"description":"timeout: Operation timed out","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"schemas":{"DivByZero":{"type":"object","properties":{"message":{"type":"string","description":"division by zero leads to infinity.","example":"Eius exercitationem nemo ipsa eveniet est."}},"description":"division by 0","example":{"message":"Eius exercitationem nemo ipsa eveniet est."},"required":["message"]},"DivideRequestBody":{"type":"object","properties":{"dividend":{"type":"integer","example":1196350668178300830,"format":"int64"},"divisor":{"type":"integer","example":5941732484439269441,"format":"int64"}},"description":"Request body for divide.","example":{"dividend":1196350668178300830,"divisor":5941732484439269441},"required":["dividend","divisor"]},"DivideResponseBody":{"type":"object","properties":{"quotient":{"type":"integer","example":3989696267411135677,"format":"int64"},"reminder":{"type":"integer","example":6133210891814429636,"format":"int64"}},"example":{"quotient":3989696267411135677,"reminder":6133210891814429636},"required":["quotient","reminder"]},"Error":{"type":"object","properties":{"fault":{"type":"boolean","description":"Is the error a server-side fault?","example":true},"id":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"message":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"name":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"temporary":{"type":"boolean","description":"Is the error temporary?","example":true},"timeout":{"type":"boolean","description":"Is the error a timeout?","example":true}},"description":"Error response result type","example":{"fault":true,"id":"123abc","message":"parameter 'p' must be an integer","name":"bad_request","temporary":true,"timeout":true},"required":["name","id","message","temporary","timeout","fault"]}}},"tags":[{"name":"calc"}]} \ No newline at end of file +{"openapi":"3.0.3","info":{"title":"Goa API","version":"0.0.1"},"servers":[{"url":"http://localhost:80","description":"Default server for calc"}],"paths":{"/":{"post":{"tags":["calc"],"summary":"divide calc","operationId":"calc#divide","requestBody":{"description":"Request body for divide.","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DivideRequestBody"},"example":{"dividend":6599615662108896380,"divisor":6289780582187170160}}}},"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DivideResponseBody"},"example":{"quotient":5026300794991892168,"reminder":3251227134896864353}}}},"400":{"description":"div_by_zero: Response used for division by zero errors","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DivByZero"},"example":{"message":"Consequatur veniam est tempora non natus."}}}},"504":{"description":"timeout: Operation timed out","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"fault":false,"id":"123abc","message":"parameter 'p' must be an integer","name":"timeout","temporary":false,"timeout":true}}}}}}}},"components":{"schemas":{"DivByZero":{"type":"object","properties":{"message":{"type":"string","description":"division by zero leads to infinity.","example":"Consequatur veniam est tempora non natus."}},"description":"DivByZero is the error returned when using value 0 as divisor.","example":{"message":"Consequatur veniam est tempora non natus."},"required":["message"]},"DivideRequestBody":{"type":"object","properties":{"dividend":{"type":"integer","example":6599615662108896380,"format":"int64"},"divisor":{"type":"integer","example":6289780582187170160,"format":"int64"}},"description":"Request body for divide.","example":{"dividend":6599615662108896380,"divisor":6289780582187170160},"required":["dividend","divisor"]},"DivideResponseBody":{"type":"object","properties":{"quotient":{"type":"integer","example":5026300794991892168,"format":"int64"},"reminder":{"type":"integer","example":3251227134896864353,"format":"int64"}},"example":{"quotient":5026300794991892168,"reminder":3251227134896864353},"required":["quotient","reminder"]},"Error":{"type":"object","properties":{"fault":{"type":"boolean","description":"Is the error a server-side fault?","example":false},"id":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"message":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"name":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"temporary":{"type":"boolean","description":"Is the error temporary?","example":false},"timeout":{"type":"boolean","description":"Is the error a timeout?","example":true}},"description":"Error response result type","example":{"fault":false,"id":"123abc","message":"parameter 'p' must be an integer","name":"bad_request","temporary":false,"timeout":true},"required":["name","id","message","temporary","timeout","fault"]}}},"tags":[{"name":"calc"}]} \ No newline at end of file diff --git a/error/gen/http/openapi3.yaml b/error/gen/http/openapi3.yaml index 59b14126c..4ce749734 100644 --- a/error/gen/http/openapi3.yaml +++ b/error/gen/http/openapi3.yaml @@ -20,8 +20,8 @@ paths: schema: $ref: '#/components/schemas/DivideRequestBody' example: - dividend: 1196350668178300830 - divisor: 5941732484439269441 + dividend: 6599615662108896380 + divisor: 6289780582187170160 responses: "200": description: OK response. @@ -30,8 +30,8 @@ paths: schema: $ref: '#/components/schemas/DivideResponseBody' example: - quotient: 3989696267411135677 - reminder: 6133210891814429636 + quotient: 5026300794991892168 + reminder: 3251227134896864353 "400": description: 'div_by_zero: Response used for division by zero errors' content: @@ -39,13 +39,20 @@ paths: schema: $ref: '#/components/schemas/DivByZero' example: - message: Eius exercitationem nemo ipsa eveniet est. + message: Consequatur veniam est tempora non natus. "504": description: 'timeout: Operation timed out' content: application/vnd.goa.error: schema: $ref: '#/components/schemas/Error' + example: + fault: false + id: 123abc + message: parameter 'p' must be an integer + name: timeout + temporary: false + timeout: true components: schemas: DivByZero: @@ -54,10 +61,10 @@ components: message: type: string description: division by zero leads to infinity. - example: Eius exercitationem nemo ipsa eveniet est. - description: division by 0 + example: Consequatur veniam est tempora non natus. + description: DivByZero is the error returned when using value 0 as divisor. example: - message: Eius exercitationem nemo ipsa eveniet est. + message: Consequatur veniam est tempora non natus. required: - message DivideRequestBody: @@ -65,16 +72,16 @@ components: properties: dividend: type: integer - example: 1196350668178300830 + example: 6599615662108896380 format: int64 divisor: type: integer - example: 5941732484439269441 + example: 6289780582187170160 format: int64 description: Request body for divide. example: - dividend: 1196350668178300830 - divisor: 5941732484439269441 + dividend: 6599615662108896380 + divisor: 6289780582187170160 required: - dividend - divisor @@ -83,15 +90,15 @@ components: properties: quotient: type: integer - example: 3989696267411135677 + example: 5026300794991892168 format: int64 reminder: type: integer - example: 6133210891814429636 + example: 3251227134896864353 format: int64 example: - quotient: 3989696267411135677 - reminder: 6133210891814429636 + quotient: 5026300794991892168 + reminder: 3251227134896864353 required: - quotient - reminder @@ -101,7 +108,7 @@ components: fault: type: boolean description: Is the error a server-side fault? - example: true + example: false id: type: string description: ID is a unique identifier for this particular occurrence of the problem. @@ -117,18 +124,18 @@ components: temporary: type: boolean description: Is the error temporary? - example: true + example: false timeout: type: boolean description: Is the error a timeout? example: true description: Error response result type example: - fault: true + fault: false id: 123abc message: parameter 'p' must be an integer name: bad_request - temporary: true + temporary: false timeout: true required: - name diff --git a/files/gen/http/openapi/server/server.go b/files/gen/http/openapi/server/server.go index fb868459d..b28e0ffe8 100644 --- a/files/gen/http/openapi/server/server.go +++ b/files/gen/http/openapi/server/server.go @@ -107,23 +107,21 @@ func (s *Server) Mount(mux goahttp.Muxer) { Mount(mux, s) } -// appendFS is a custom implementation of fs.FS that appends a specified prefix -// to the file paths before delegating the Open call to the underlying fs.FS. +// appendFS adds a fixed directory to file paths before opening them. type appendFS struct { prefix string fs http.FileSystem } // Open opens the named file, appending the prefix to the file path before -// passing it to the underlying fs.FS. +// passing it to the underlying file system. func (s appendFS) Open(name string) (http.File, error) { switch name { } return s.fs.Open(path.Join(s.prefix, name)) } -// appendPrefix returns a new fs.FS that appends the specified prefix to file paths -// before delegating to the provided embed.FS. +// appendPrefix returns a file system that adds prefix before opening each path. func appendPrefix(fsys http.FileSystem, prefix string) http.FileSystem { return appendFS{prefix: prefix, fs: fsys} } diff --git a/httpstatus/gen/goa.json b/httpstatus/gen/goa.json new file mode 100644 index 000000000..d279d6dad --- /dev/null +++ b/httpstatus/gen/goa.json @@ -0,0 +1,3 @@ +{ + "goa_version": "v3.30.0" +} \ No newline at end of file diff --git a/httpstatus/gen/hello/client.go b/httpstatus/gen/hello/client.go index 2727eacfc..4fe1d8d80 100644 --- a/httpstatus/gen/hello/client.go +++ b/httpstatus/gen/hello/client.go @@ -1,4 +1,4 @@ -// Code generated by goa v3.15.2, DO NOT EDIT. +// Code generated by goa, DO NOT EDIT. // // hello client // @@ -15,20 +15,20 @@ import ( // Client is the "hello" service client. type Client struct { - HelloEndpointEndpoint goa.Endpoint + HelloEndpoint goa.Endpoint } // NewClient initializes a "hello" service client given the endpoints. -func NewClient(helloEndpoint goa.Endpoint) *Client { +func NewClient(hello goa.Endpoint) *Client { return &Client{ - HelloEndpointEndpoint: helloEndpoint, + HelloEndpoint: hello, } } -// HelloEndpoint calls the "hello" endpoint of the "hello" service. -func (c *Client) HelloEndpoint(ctx context.Context, p *HelloPayload) (res *Hello, err error) { +// Hello calls the "hello" endpoint of the "hello" service. +func (c *Client) Hello(ctx context.Context, p *HelloPayload) (res *Hello, err error) { var ires any - ires, err = c.HelloEndpointEndpoint(ctx, p) + ires, err = c.HelloEndpoint(ctx, p) if err != nil { return } diff --git a/httpstatus/gen/hello/endpoints.go b/httpstatus/gen/hello/endpoints.go index e8289ed43..be03091b0 100644 --- a/httpstatus/gen/hello/endpoints.go +++ b/httpstatus/gen/hello/endpoints.go @@ -1,4 +1,4 @@ -// Code generated by goa v3.15.2, DO NOT EDIT. +// Code generated by goa, DO NOT EDIT. // // hello endpoints // @@ -10,36 +10,40 @@ package hello import ( "context" + helloviews "goa.design/examples/httpstatus/gen/hello/views" goa "goa.design/goa/v3/pkg" ) // Endpoints wraps the "hello" service endpoints. type Endpoints struct { - HelloEndpoint goa.Endpoint + Hello goa.Endpoint } // NewEndpoints wraps the methods of the "hello" service with endpoints. func NewEndpoints(s Service) *Endpoints { return &Endpoints{ - HelloEndpoint: NewHelloEndpointEndpoint(s), + Hello: NewHelloEndpoint(s), } } // Use applies the given middleware to all the "hello" service endpoints. func (e *Endpoints) Use(m func(goa.Endpoint) goa.Endpoint) { - e.HelloEndpoint = m(e.HelloEndpoint) + e.Hello = m(e.Hello) } -// NewHelloEndpointEndpoint returns an endpoint function that calls the method -// "hello" of service "hello". -func NewHelloEndpointEndpoint(s Service) goa.Endpoint { +// NewHelloEndpoint returns an endpoint function that calls the method "hello" +// of service "hello". +func NewHelloEndpoint(s Service) goa.Endpoint { return func(ctx context.Context, req any) (any, error) { p := req.(*HelloPayload) - res, err := s.HelloEndpoint(ctx, p) + res, err := s.Hello(ctx, p) if err != nil { return nil, err } vres := NewViewedHello(res, "default") + if err := helloviews.ValidateHello(vres); err != nil { + return nil, err + } return vres, nil } } diff --git a/httpstatus/gen/hello/service.go b/httpstatus/gen/hello/service.go index 893cedc36..8825876f1 100644 --- a/httpstatus/gen/hello/service.go +++ b/httpstatus/gen/hello/service.go @@ -1,4 +1,4 @@ -// Code generated by goa v3.15.2, DO NOT EDIT. +// Code generated by goa, DO NOT EDIT. // // hello service // @@ -16,7 +16,7 @@ import ( // The hello service returns greetings with various statuses. type Service interface { // Hello implements hello. - HelloEndpoint(context.Context, *HelloPayload) (res *Hello, err error) + Hello(context.Context, *HelloPayload) (res *Hello, err error) } // APIName is the name of the API as defined in the design. diff --git a/httpstatus/gen/hello/views/view.go b/httpstatus/gen/hello/views/view.go index a82a7a55e..2f7fc4500 100644 --- a/httpstatus/gen/hello/views/view.go +++ b/httpstatus/gen/hello/views/view.go @@ -1,4 +1,4 @@ -// Code generated by goa v3.15.2, DO NOT EDIT. +// Code generated by goa, DO NOT EDIT. // // hello views // @@ -7,9 +7,7 @@ package views -import ( - goa "goa.design/goa/v3/pkg" -) +import goa "goa.design/goa/v3/pkg" // Hello is the viewed result type that is projected based on a view. type Hello struct { diff --git a/httpstatus/gen/http/cli/hello/cli.go b/httpstatus/gen/http/cli/hello/cli.go index da43da0d0..dccfce824 100644 --- a/httpstatus/gen/http/cli/hello/cli.go +++ b/httpstatus/gen/http/cli/hello/cli.go @@ -1,4 +1,4 @@ -// Code generated by goa v3.15.2, DO NOT EDIT. +// Code generated by goa, DO NOT EDIT. // // hello HTTP client CLI support package // @@ -21,14 +21,15 @@ import ( // UsageCommands returns the set of commands and sub-commands using the format // // command (subcommand1|subcommand2|...) -func UsageCommands() string { - return `hello hello -` +func UsageCommands() []string { + return []string{ + "hello hello", + } } // UsageExamples produces an example of a valid invocation of the CLI tool. func UsageExamples() string { - return os.Args[0] + ` hello hello --greeting "Mollitia sint omnis modi consequatur harum."` + "\n" + + return os.Args[0] + " " + "hello hello --greeting \"Dolor minima nisi cum.\"" + "\n" + "" } @@ -113,8 +114,8 @@ func ParseEndpoint( c := helloc.NewClient(scheme, host, doer, enc, dec, restore) switch epn { case "hello": - endpoint = c.HelloEndpoint() - data, err = helloc.BuildHelloEndpointPayload(*helloHelloGreetingFlag) + endpoint = c.Hello() + data, err = helloc.BuildHelloPayload(*helloHelloGreetingFlag) } } } @@ -127,24 +128,28 @@ func ParseEndpoint( // helloUsage displays the usage of the hello command and its subcommands. func helloUsage() { - fmt.Fprintf(os.Stderr, `The hello service returns greetings with various statuses. -Usage: - %[1]s [globalflags] hello COMMAND [flags] - -COMMAND: - hello: Hello implements hello. - -Additional help: - %[1]s hello COMMAND --help -`, os.Args[0]) + fmt.Fprintln(os.Stderr, `The hello service returns greetings with various statuses.`) + fmt.Fprintf(os.Stderr, "Usage:\n %s [globalflags] hello COMMAND [flags]\n\n", os.Args[0]) + fmt.Fprintln(os.Stderr, "COMMAND:") + fmt.Fprintln(os.Stderr, ` hello: Hello implements hello.`) + fmt.Fprintln(os.Stderr) + fmt.Fprintln(os.Stderr, "Additional help:") + fmt.Fprintf(os.Stderr, " %s hello COMMAND --help\n", os.Args[0]) } func helloHelloUsage() { - fmt.Fprintf(os.Stderr, `%[1]s [flags] hello hello -greeting STRING + // Header with flags + fmt.Fprintf(os.Stderr, "%s [flags] hello hello", os.Args[0]) + fmt.Fprint(os.Stderr, " -greeting STRING") + fmt.Fprintln(os.Stderr) + + // Description + fmt.Fprintln(os.Stderr) + fmt.Fprintln(os.Stderr, `Hello implements hello.`) -Hello implements hello. - -greeting STRING: The greeting message + // Flags list + fmt.Fprintln(os.Stderr, ` -greeting STRING: The greeting message`) -Example: - %[1]s hello hello --greeting "Mollitia sint omnis modi consequatur harum." -`, os.Args[0]) + fmt.Fprintln(os.Stderr) + fmt.Fprintln(os.Stderr, "Example:") + fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "hello hello --greeting \"Dolor minima nisi cum.\"") } diff --git a/httpstatus/gen/http/hello/client/cli.go b/httpstatus/gen/http/hello/client/cli.go index 5b1c40f5e..20dad9451 100644 --- a/httpstatus/gen/http/hello/client/cli.go +++ b/httpstatus/gen/http/hello/client/cli.go @@ -1,4 +1,4 @@ -// Code generated by goa v3.15.2, DO NOT EDIT. +// Code generated by goa, DO NOT EDIT. // // hello HTTP client CLI support package // @@ -11,9 +11,9 @@ import ( hello "goa.design/examples/httpstatus/gen/hello" ) -// BuildHelloEndpointPayload builds the payload for the hello hello endpoint -// from CLI flags. -func BuildHelloEndpointPayload(helloHelloGreeting string) (*hello.HelloPayload, error) { +// BuildHelloPayload builds the payload for the hello hello endpoint from CLI +// flags. +func BuildHelloPayload(helloHelloGreeting string) (*hello.HelloPayload, error) { var greeting string { greeting = helloHelloGreeting diff --git a/httpstatus/gen/http/hello/client/client.go b/httpstatus/gen/http/hello/client/client.go index 10760741f..5f80de785 100644 --- a/httpstatus/gen/http/hello/client/client.go +++ b/httpstatus/gen/http/hello/client/client.go @@ -1,4 +1,4 @@ -// Code generated by goa v3.15.2, DO NOT EDIT. +// Code generated by goa, DO NOT EDIT. // // hello client HTTP transport // @@ -17,9 +17,8 @@ import ( // Client lists the hello service endpoint HTTP clients. type Client struct { - // HelloEndpoint Doer is the HTTP client used to make requests to the hello - // endpoint. - HelloEndpointDoer goahttp.Doer + // Hello Doer is the HTTP client used to make requests to the hello endpoint. + HelloDoer goahttp.Doer // RestoreResponseBody controls whether the response bodies are reset after // decoding so they can be read again. @@ -41,7 +40,7 @@ func NewClient( restoreBody bool, ) *Client { return &Client{ - HelloEndpointDoer: doer, + HelloDoer: doer, RestoreResponseBody: restoreBody, scheme: scheme, host: host, @@ -50,18 +49,18 @@ func NewClient( } } -// HelloEndpoint returns an endpoint that makes HTTP requests to the hello -// service hello server. -func (c *Client) HelloEndpoint() goa.Endpoint { +// Hello returns an endpoint that makes HTTP requests to the hello service +// hello server. +func (c *Client) Hello() goa.Endpoint { var ( - decodeResponse = DecodeHelloEndpointResponse(c.decoder, c.RestoreResponseBody) + decodeResponse = DecodeHelloResponse(c.decoder, c.RestoreResponseBody) ) return func(ctx context.Context, v any) (any, error) { - req, err := c.BuildHelloEndpointRequest(ctx, v) + req, err := c.BuildHelloRequest(ctx, v) if err != nil { return nil, err } - resp, err := c.HelloEndpointDoer.Do(req) + resp, err := c.HelloDoer.Do(req) if err != nil { return nil, goahttp.ErrRequestError("hello", "hello", err) } diff --git a/httpstatus/gen/http/hello/client/encode_decode.go b/httpstatus/gen/http/hello/client/encode_decode.go index fe201321d..f52b81e28 100644 --- a/httpstatus/gen/http/hello/client/encode_decode.go +++ b/httpstatus/gen/http/hello/client/encode_decode.go @@ -1,4 +1,4 @@ -// Code generated by goa v3.15.2, DO NOT EDIT. +// Code generated by goa, DO NOT EDIT. // // hello HTTP client encoders and decoders // @@ -10,6 +10,7 @@ package client import ( "bytes" "context" + "errors" "io" "net/http" "net/url" @@ -19,9 +20,9 @@ import ( goahttp "goa.design/goa/v3/http" ) -// BuildHelloEndpointRequest instantiates a HTTP request object with method and -// path set to call the "hello" service "hello" endpoint -func (c *Client) BuildHelloEndpointRequest(ctx context.Context, v any) (*http.Request, error) { +// BuildHelloRequest instantiates a HTTP request object with method and path +// set to call the "hello" service "hello" endpoint +func (c *Client) BuildHelloRequest(ctx context.Context, v any) (*http.Request, error) { var ( greeting string ) @@ -32,7 +33,7 @@ func (c *Client) BuildHelloEndpointRequest(ctx context.Context, v any) (*http.Re } greeting = p.Greeting } - u := &url.URL{Scheme: c.scheme, Host: c.host, Path: HelloEndpointHelloPath(greeting)} + u := &url.URL{Scheme: c.scheme, Host: c.host, Path: HelloHelloPath(greeting)} req, err := http.NewRequest("GET", u.String(), nil) if err != nil { return nil, goahttp.ErrInvalidURL("hello", "hello", u.String(), err) @@ -44,22 +45,28 @@ func (c *Client) BuildHelloEndpointRequest(ctx context.Context, v any) (*http.Re return req, nil } -// DecodeHelloEndpointResponse returns a decoder for responses returned by the -// hello hello endpoint. restoreBody controls whether the response body should -// be restored after having been read. -func DecodeHelloEndpointResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (any, error) { - return func(resp *http.Response) (any, error) { +// DecodeHelloResponse returns a decoder for responses returned by the hello +// hello endpoint. restoreBody controls whether the response body should be +// restored after having been read. +func DecodeHelloResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (any, error) { + return func(resp *http.Response) (result any, decodeErr error) { + responseBody := resp.Body if restoreBody { - b, err := io.ReadAll(resp.Body) - if err != nil { - return nil, err + b, readErr := io.ReadAll(responseBody) + closeErr := responseBody.Close() + if err := errors.Join(readErr, closeErr); err != nil { + return nil, goahttp.ErrDecodingError("hello", "hello", err) } resp.Body = io.NopCloser(bytes.NewBuffer(b)) defer func() { resp.Body = io.NopCloser(bytes.NewBuffer(b)) }() } else { - defer resp.Body.Close() + defer func() { + if err := responseBody.Close(); err != nil { + decodeErr = errors.Join(decodeErr, goahttp.ErrDecodingError("hello", "hello", err)) + } + }() } switch resp.StatusCode { case http.StatusCreated: @@ -71,7 +78,7 @@ func DecodeHelloEndpointResponse(decoder func(*http.Response) goahttp.Decoder, r if err != nil { return nil, goahttp.ErrDecodingError("hello", "hello", err) } - p := NewHelloViewCreated(&body) + p := NewHelloHelloCreated(&body) tmp := "created" p.Outcome = &tmp view := "default" @@ -90,7 +97,7 @@ func DecodeHelloEndpointResponse(decoder func(*http.Response) goahttp.Decoder, r if err != nil { return nil, goahttp.ErrDecodingError("hello", "hello", err) } - p := NewHelloViewAccepted(&body) + p := NewHelloHelloAccepted(&body) tmp := "accepted" p.Outcome = &tmp view := "default" @@ -109,7 +116,7 @@ func DecodeHelloEndpointResponse(decoder func(*http.Response) goahttp.Decoder, r if err != nil { return nil, goahttp.ErrDecodingError("hello", "hello", err) } - p := NewHelloViewOK(&body) + p := NewHelloHelloOK(&body) view := "default" vres := &helloviews.Hello{Projected: p, View: view} if err = helloviews.ValidateHello(vres); err != nil { @@ -118,7 +125,10 @@ func DecodeHelloEndpointResponse(decoder func(*http.Response) goahttp.Decoder, r res := hello.NewHello(vres) return res, nil default: - body, _ := io.ReadAll(resp.Body) + body, err := io.ReadAll(resp.Body) + if err != nil { + return nil, goahttp.ErrDecodingError("hello", "hello", err) + } return nil, goahttp.ErrInvalidResponse("hello", "hello", resp.StatusCode, string(body)) } } diff --git a/httpstatus/gen/http/hello/client/paths.go b/httpstatus/gen/http/hello/client/paths.go index 4328feb0d..d88adc163 100644 --- a/httpstatus/gen/http/hello/client/paths.go +++ b/httpstatus/gen/http/hello/client/paths.go @@ -1,4 +1,4 @@ -// Code generated by goa v3.15.2, DO NOT EDIT. +// Code generated by goa, DO NOT EDIT. // // HTTP request path constructors for the hello service. // @@ -11,7 +11,7 @@ import ( "fmt" ) -// HelloEndpointHelloPath returns the URL path to the hello service hello HTTP endpoint. -func HelloEndpointHelloPath(greeting string) string { +// HelloHelloPath returns the URL path to the hello service hello HTTP endpoint. +func HelloHelloPath(greeting string) string { return fmt.Sprintf("/hello/%v", greeting) } diff --git a/httpstatus/gen/http/hello/client/types.go b/httpstatus/gen/http/hello/client/types.go index 385a97a7e..7db20ff41 100644 --- a/httpstatus/gen/http/hello/client/types.go +++ b/httpstatus/gen/http/hello/client/types.go @@ -1,4 +1,4 @@ -// Code generated by goa v3.15.2, DO NOT EDIT. +// Code generated by goa, DO NOT EDIT. // // hello HTTP client types // @@ -35,9 +35,9 @@ type HelloOKResponseBody struct { Outcome *string `json:"-"` } -// NewHelloViewCreated builds a "hello" service "hello" endpoint result from a +// NewHelloHelloCreated builds a "hello" service "hello" endpoint result from a // HTTP "Created" response. -func NewHelloViewCreated(body *HelloCreatedResponseBody) *helloviews.HelloView { +func NewHelloHelloCreated(body *HelloCreatedResponseBody) *helloviews.HelloView { v := &helloviews.HelloView{ Greeting: body.Greeting, Outcome: body.Outcome, @@ -46,9 +46,9 @@ func NewHelloViewCreated(body *HelloCreatedResponseBody) *helloviews.HelloView { return v } -// NewHelloViewAccepted builds a "hello" service "hello" endpoint result from a -// HTTP "Accepted" response. -func NewHelloViewAccepted(body *HelloAcceptedResponseBody) *helloviews.HelloView { +// NewHelloHelloAccepted builds a "hello" service "hello" endpoint result from +// a HTTP "Accepted" response. +func NewHelloHelloAccepted(body *HelloAcceptedResponseBody) *helloviews.HelloView { v := &helloviews.HelloView{ Greeting: body.Greeting, Outcome: body.Outcome, @@ -57,9 +57,9 @@ func NewHelloViewAccepted(body *HelloAcceptedResponseBody) *helloviews.HelloView return v } -// NewHelloViewOK builds a "hello" service "hello" endpoint result from a HTTP +// NewHelloHelloOK builds a "hello" service "hello" endpoint result from a HTTP // "OK" response. -func NewHelloViewOK(body *HelloOKResponseBody) *helloviews.HelloView { +func NewHelloHelloOK(body *HelloOKResponseBody) *helloviews.HelloView { v := &helloviews.HelloView{ Greeting: body.Greeting, Outcome: body.Outcome, diff --git a/httpstatus/gen/http/hello/server/encode_decode.go b/httpstatus/gen/http/hello/server/encode_decode.go index 995f4cc70..3e0197d61 100644 --- a/httpstatus/gen/http/hello/server/encode_decode.go +++ b/httpstatus/gen/http/hello/server/encode_decode.go @@ -1,4 +1,4 @@ -// Code generated by goa v3.15.2, DO NOT EDIT. +// Code generated by goa, DO NOT EDIT. // // hello HTTP server encoders and decoders // @@ -11,13 +11,14 @@ import ( "context" "net/http" + hello "goa.design/examples/httpstatus/gen/hello" helloviews "goa.design/examples/httpstatus/gen/hello/views" goahttp "goa.design/goa/v3/http" ) -// EncodeHelloEndpointResponse returns an encoder for responses returned by the -// hello hello endpoint. -func EncodeHelloEndpointResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, any) error { +// EncodeHelloResponse returns an encoder for responses returned by the hello +// hello endpoint. +func EncodeHelloResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, any) error { return func(ctx context.Context, w http.ResponseWriter, v any) error { res := v.(*helloviews.Hello) if res.Projected.Outcome != nil && *res.Projected.Outcome == "created" { @@ -39,17 +40,18 @@ func EncodeHelloEndpointResponse(encoder func(context.Context, http.ResponseWrit } } -// DecodeHelloEndpointRequest returns a decoder for requests sent to the hello -// hello endpoint. -func DecodeHelloEndpointRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder) func(*http.Request) (any, error) { - return func(r *http.Request) (any, error) { +// DecodeHelloRequest returns a decoder for requests sent to the hello hello +// endpoint. +func DecodeHelloRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder) func(*http.Request) (*hello.HelloPayload, error) { + return func(r *http.Request) (*hello.HelloPayload, error) { + var payload *hello.HelloPayload var ( greeting string params = mux.Vars(r) ) greeting = params["greeting"] - payload := NewHelloPayload(greeting) + payload = NewHelloPayload(greeting) return payload, nil } diff --git a/httpstatus/gen/http/hello/server/paths.go b/httpstatus/gen/http/hello/server/paths.go index 49da16427..a27ce9c64 100644 --- a/httpstatus/gen/http/hello/server/paths.go +++ b/httpstatus/gen/http/hello/server/paths.go @@ -1,4 +1,4 @@ -// Code generated by goa v3.15.2, DO NOT EDIT. +// Code generated by goa, DO NOT EDIT. // // HTTP request path constructors for the hello service. // @@ -11,7 +11,7 @@ import ( "fmt" ) -// HelloEndpointHelloPath returns the URL path to the hello service hello HTTP endpoint. -func HelloEndpointHelloPath(greeting string) string { +// HelloHelloPath returns the URL path to the hello service hello HTTP endpoint. +func HelloHelloPath(greeting string) string { return fmt.Sprintf("/hello/%v", greeting) } diff --git a/httpstatus/gen/http/hello/server/server.go b/httpstatus/gen/http/hello/server/server.go index 179d7fa03..fe8d86453 100644 --- a/httpstatus/gen/http/hello/server/server.go +++ b/httpstatus/gen/http/hello/server/server.go @@ -1,4 +1,4 @@ -// Code generated by goa v3.15.2, DO NOT EDIT. +// Code generated by goa, DO NOT EDIT. // // hello HTTP server // @@ -18,8 +18,8 @@ import ( // Server lists the hello service endpoint HTTP handlers. type Server struct { - Mounts []*MountPoint - HelloEndpoint http.Handler + Mounts []*MountPoint + Hello http.Handler } // MountPoint holds information about the mounted endpoints. @@ -49,9 +49,9 @@ func New( ) *Server { return &Server{ Mounts: []*MountPoint{ - {"HelloEndpoint", "GET", "/hello/{greeting}"}, + {"Hello", "GET", "/hello/{greeting}"}, }, - HelloEndpoint: NewHelloEndpointHandler(e.HelloEndpoint, mux, decoder, encoder, errhandler, formatter), + Hello: NewHelloHandler(e.Hello, mux, decoder, encoder, errhandler, formatter), } } @@ -60,7 +60,7 @@ func (s *Server) Service() string { return "hello" } // Use wraps the server handlers with the given middleware. func (s *Server) Use(m func(http.Handler) http.Handler) { - s.HelloEndpoint = m(s.HelloEndpoint) + s.Hello = m(s.Hello) } // MethodNames returns the methods served. @@ -68,7 +68,7 @@ func (s *Server) MethodNames() []string { return hello.MethodNames[:] } // Mount configures the mux to serve the hello endpoints. func Mount(mux goahttp.Muxer, h *Server) { - MountHelloEndpointHandler(mux, h.HelloEndpoint) + MountHelloHandler(mux, h.Hello) } // Mount configures the mux to serve the hello endpoints. @@ -76,9 +76,9 @@ func (s *Server) Mount(mux goahttp.Muxer) { Mount(mux, s) } -// MountHelloEndpointHandler configures the mux to serve the "hello" service -// "hello" endpoint. -func MountHelloEndpointHandler(mux goahttp.Muxer, h http.Handler) { +// MountHelloHandler configures the mux to serve the "hello" service "hello" +// endpoint. +func MountHelloHandler(mux goahttp.Muxer, h http.Handler) { f, ok := h.(http.HandlerFunc) if !ok { f = func(w http.ResponseWriter, r *http.Request) { @@ -88,9 +88,9 @@ func MountHelloEndpointHandler(mux goahttp.Muxer, h http.Handler) { mux.Handle("GET", "/hello/{greeting}", f) } -// NewHelloEndpointHandler creates a HTTP handler which loads the HTTP request -// and calls the "hello" service "hello" endpoint. -func NewHelloEndpointHandler( +// NewHelloHandler creates a HTTP handler which loads the HTTP request and +// calls the "hello" service "hello" endpoint. +func NewHelloHandler( endpoint goa.Endpoint, mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder, @@ -99,8 +99,8 @@ func NewHelloEndpointHandler( formatter func(ctx context.Context, err error) goahttp.Statuser, ) http.Handler { var ( - decodeRequest = DecodeHelloEndpointRequest(mux, decoder) - encodeResponse = EncodeHelloEndpointResponse(encoder) + decodeRequest = DecodeHelloRequest(mux, decoder) + encodeResponse = EncodeHelloResponse(encoder) encodeError = goahttp.ErrorEncoder(encoder, formatter) ) return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { @@ -109,20 +109,22 @@ func NewHelloEndpointHandler( ctx = context.WithValue(ctx, goa.ServiceKey, "hello") payload, err := decodeRequest(r) if err != nil { - if err := encodeError(ctx, w, err); err != nil { + if err := encodeError(ctx, w, err); err != nil && errhandler != nil { errhandler(ctx, w, err) } return } res, err := endpoint(ctx, payload) if err != nil { - if err := encodeError(ctx, w, err); err != nil { + if err := encodeError(ctx, w, err); err != nil && errhandler != nil { errhandler(ctx, w, err) } return } if err := encodeResponse(ctx, w, res); err != nil { - errhandler(ctx, w, err) + if errhandler != nil { + errhandler(ctx, w, err) + } } }) } diff --git a/httpstatus/gen/http/hello/server/types.go b/httpstatus/gen/http/hello/server/types.go index 3ae06f5e2..0b4c5b619 100644 --- a/httpstatus/gen/http/hello/server/types.go +++ b/httpstatus/gen/http/hello/server/types.go @@ -1,4 +1,4 @@ -// Code generated by goa v3.15.2, DO NOT EDIT. +// Code generated by goa, DO NOT EDIT. // // hello HTTP server types // diff --git a/httpstatus/gen/http/openapi.json b/httpstatus/gen/http/openapi.json index eafb24b04..801f8b9b4 100644 --- a/httpstatus/gen/http/openapi.json +++ b/httpstatus/gen/http/openapi.json @@ -1 +1 @@ -{"swagger":"2.0","info":{"title":"","version":"0.0.1"},"host":"localhost:80","consumes":["application/json","application/xml","application/gob"],"produces":["application/json","application/xml","application/gob"],"paths":{"/hello/{greeting}":{"get":{"tags":["hello"],"summary":"hello hello","operationId":"hello#hello","parameters":[{"name":"greeting","in":"path","description":"The greeting message","required":true,"type":"string"}],"responses":{"200":{"description":"OK response.","schema":{"$ref":"#/definitions/HelloHelloOKResponseBody"}},"201":{"description":"Created response.","schema":{"$ref":"#/definitions/HelloHelloCreatedResponseBody"}},"202":{"description":"Accepted response.","schema":{"$ref":"#/definitions/HelloHelloAcceptedResponseBody"}}},"schemes":["http"]}}},"definitions":{"HelloHelloAcceptedResponseBody":{"title":"Mediatype identifier: application/vnd.hello; view=default","type":"object","properties":{"greeting":{"type":"string","description":"The greeting message","example":"Voluptatem voluptatibus itaque omnis."}},"description":"HelloAcceptedResponseBody result type (default view)","example":{"greeting":"Sed molestiae."},"required":["greeting"]},"HelloHelloCreatedResponseBody":{"title":"Mediatype identifier: application/vnd.hello; view=default","type":"object","properties":{"greeting":{"type":"string","description":"The greeting message","example":"Et ab soluta in."}},"description":"HelloCreatedResponseBody result type (default view)","example":{"greeting":"Aut officiis."},"required":["greeting"]},"HelloHelloOKResponseBody":{"title":"Mediatype identifier: application/vnd.hello; view=default","type":"object","properties":{"greeting":{"type":"string","description":"The greeting message","example":"Et cum autem ipsa laboriosam."}},"description":"HelloOKResponseBody result type (default view)","example":{"greeting":"Reprehenderit aut quae ad voluptas."},"required":["greeting"]}}} \ No newline at end of file +{"swagger":"2.0","info":{"title":"","version":"0.0.1"},"host":"localhost:80","consumes":["application/json","application/xml","application/gob"],"produces":["application/json","application/xml","application/gob"],"paths":{"/hello/{greeting}":{"get":{"tags":["hello"],"summary":"hello hello","operationId":"hello#hello","parameters":[{"name":"greeting","in":"path","description":"The greeting message","required":true,"type":"string"}],"responses":{"200":{"description":"OK response.","schema":{"$ref":"#/definitions/Hello"}},"201":{"description":"Created response.","schema":{"$ref":"#/definitions/Hello"}},"202":{"description":"Accepted response.","schema":{"$ref":"#/definitions/Hello"}}},"schemes":["http"]}}},"definitions":{"Hello":{"title":"Mediatype identifier: application/vnd.hello; view=default","type":"object","properties":{"greeting":{"type":"string","description":"The greeting message","example":"Ea earum recusandae."}},"description":"HelloCreatedResponseBody result type (default view)","example":{"greeting":"Ea earum recusandae."},"required":["greeting"]}}} \ No newline at end of file diff --git a/httpstatus/gen/http/openapi.yaml b/httpstatus/gen/http/openapi.yaml index 46ead559a..87fa244bb 100644 --- a/httpstatus/gen/http/openapi.yaml +++ b/httpstatus/gen/http/openapi.yaml @@ -28,54 +28,28 @@ paths: "200": description: OK response. schema: - $ref: '#/definitions/HelloHelloOKResponseBody' + $ref: '#/definitions/Hello' "201": description: Created response. schema: - $ref: '#/definitions/HelloHelloCreatedResponseBody' + $ref: '#/definitions/Hello' "202": description: Accepted response. schema: - $ref: '#/definitions/HelloHelloAcceptedResponseBody' + $ref: '#/definitions/Hello' schemes: - http definitions: - HelloHelloAcceptedResponseBody: + Hello: title: 'Mediatype identifier: application/vnd.hello; view=default' type: object properties: greeting: type: string description: The greeting message - example: Voluptatem voluptatibus itaque omnis. - description: HelloAcceptedResponseBody result type (default view) - example: - greeting: Sed molestiae. - required: - - greeting - HelloHelloCreatedResponseBody: - title: 'Mediatype identifier: application/vnd.hello; view=default' - type: object - properties: - greeting: - type: string - description: The greeting message - example: Et ab soluta in. + example: Ea earum recusandae. description: HelloCreatedResponseBody result type (default view) example: - greeting: Aut officiis. - required: - - greeting - HelloHelloOKResponseBody: - title: 'Mediatype identifier: application/vnd.hello; view=default' - type: object - properties: - greeting: - type: string - description: The greeting message - example: Et cum autem ipsa laboriosam. - description: HelloOKResponseBody result type (default view) - example: - greeting: Reprehenderit aut quae ad voluptas. + greeting: Ea earum recusandae. required: - greeting diff --git a/httpstatus/gen/http/openapi3.2.json b/httpstatus/gen/http/openapi3.2.json new file mode 100644 index 000000000..0d0ec0f5b --- /dev/null +++ b/httpstatus/gen/http/openapi3.2.json @@ -0,0 +1 @@ +{"openapi":"3.2.0","info":{"title":"Goa API","version":"0.0.1"},"servers":[{"url":"http://localhost:80","name":"hello","description":"Default server for hello"}],"paths":{"/hello/{greeting}":{"get":{"tags":["hello"],"summary":"hello hello","operationId":"hello#hello","parameters":[{"name":"greeting","in":"path","description":"The greeting message","required":true,"schema":{"type":"string","description":"The greeting message","example":"Dolor minima nisi cum."},"example":"Dolor minima nisi cum."}],"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Hello"},"example":{"greeting":"Rem tempora sed qui."}}}},"201":{"description":"Created response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Hello"},"example":{"greeting":"Ea earum recusandae."}}}},"202":{"description":"Accepted response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Hello"},"example":{"greeting":"Ex tempore iste."}}}}}}}},"components":{"schemas":{"Hello":{"type":"object","properties":{"greeting":{"type":"string","description":"The greeting message","example":"Ea earum recusandae."}},"example":{"greeting":"Ea earum recusandae."},"required":["greeting"]}}},"tags":[{"name":"hello","description":"The hello service returns greetings with various statuses."}]} \ No newline at end of file diff --git a/httpstatus/gen/http/openapi3.2.yaml b/httpstatus/gen/http/openapi3.2.yaml new file mode 100644 index 000000000..5facdb300 --- /dev/null +++ b/httpstatus/gen/http/openapi3.2.yaml @@ -0,0 +1,66 @@ +openapi: 3.2.0 +info: + title: Goa API + version: 0.0.1 +servers: + - url: http://localhost:80 + name: hello + description: Default server for hello +paths: + /hello/{greeting}: + get: + tags: + - hello + summary: hello hello + operationId: hello#hello + parameters: + - name: greeting + in: path + description: The greeting message + required: true + schema: + type: string + description: The greeting message + example: Dolor minima nisi cum. + example: Dolor minima nisi cum. + responses: + "200": + description: OK response. + content: + application/json: + schema: + $ref: '#/components/schemas/Hello' + example: + greeting: Rem tempora sed qui. + "201": + description: Created response. + content: + application/json: + schema: + $ref: '#/components/schemas/Hello' + example: + greeting: Ea earum recusandae. + "202": + description: Accepted response. + content: + application/json: + schema: + $ref: '#/components/schemas/Hello' + example: + greeting: Ex tempore iste. +components: + schemas: + Hello: + type: object + properties: + greeting: + type: string + description: The greeting message + example: Ea earum recusandae. + example: + greeting: Ea earum recusandae. + required: + - greeting +tags: + - name: hello + description: The hello service returns greetings with various statuses. diff --git a/httpstatus/gen/http/openapi3.json b/httpstatus/gen/http/openapi3.json index a6cf0e065..8f2d5509d 100644 --- a/httpstatus/gen/http/openapi3.json +++ b/httpstatus/gen/http/openapi3.json @@ -1 +1 @@ -{"openapi":"3.0.3","info":{"title":"Goa API","version":"0.0.1"},"servers":[{"url":"http://localhost:80","description":"Default server for hello"}],"paths":{"/hello/{greeting}":{"get":{"tags":["hello"],"summary":"hello hello","operationId":"hello#hello","parameters":[{"name":"greeting","in":"path","description":"The greeting message","required":true,"schema":{"type":"string","description":"The greeting message","example":"Porro quas nobis ea."},"example":"Quae est possimus eius architecto."}],"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Hello"},"example":{"greeting":"Ullam sequi quidem qui in et excepturi."}}}},"201":{"description":"Created response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Hello"},"example":{"greeting":"Aut iste labore provident incidunt aut enim."}}}},"202":{"description":"Accepted response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Hello"},"example":{"greeting":"Iste ratione voluptatum."}}}}}}}},"components":{"schemas":{"Hello":{"type":"object","properties":{"greeting":{"type":"string","description":"The greeting message","example":"Perspiciatis laboriosam voluptatem sunt maxime quae."}},"example":{"greeting":"Et molestiae."},"required":["greeting"]}}},"tags":[{"name":"hello","description":"The hello service returns greetings with various statuses."}]} \ No newline at end of file +{"openapi":"3.0.3","info":{"title":"Goa API","version":"0.0.1"},"servers":[{"url":"http://localhost:80","description":"Default server for hello"}],"paths":{"/hello/{greeting}":{"get":{"tags":["hello"],"summary":"hello hello","operationId":"hello#hello","parameters":[{"name":"greeting","in":"path","description":"The greeting message","required":true,"schema":{"type":"string","description":"The greeting message","example":"Dolor minima nisi cum."},"example":"Dolor minima nisi cum."}],"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Hello"},"example":{"greeting":"Rem tempora sed qui."}}}},"201":{"description":"Created response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Hello"},"example":{"greeting":"Ea earum recusandae."}}}},"202":{"description":"Accepted response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Hello"},"example":{"greeting":"Ex tempore iste."}}}}}}}},"components":{"schemas":{"Hello":{"type":"object","properties":{"greeting":{"type":"string","description":"The greeting message","example":"Ea earum recusandae."}},"example":{"greeting":"Ea earum recusandae."},"required":["greeting"]}}},"tags":[{"name":"hello","description":"The hello service returns greetings with various statuses."}]} \ No newline at end of file diff --git a/httpstatus/gen/http/openapi3.yaml b/httpstatus/gen/http/openapi3.yaml index 33d7e026b..2d3d2f8f9 100644 --- a/httpstatus/gen/http/openapi3.yaml +++ b/httpstatus/gen/http/openapi3.yaml @@ -20,8 +20,8 @@ paths: schema: type: string description: The greeting message - example: Porro quas nobis ea. - example: Quae est possimus eius architecto. + example: Dolor minima nisi cum. + example: Dolor minima nisi cum. responses: "200": description: OK response. @@ -30,7 +30,7 @@ paths: schema: $ref: '#/components/schemas/Hello' example: - greeting: Ullam sequi quidem qui in et excepturi. + greeting: Rem tempora sed qui. "201": description: Created response. content: @@ -38,7 +38,7 @@ paths: schema: $ref: '#/components/schemas/Hello' example: - greeting: Aut iste labore provident incidunt aut enim. + greeting: Ea earum recusandae. "202": description: Accepted response. content: @@ -46,7 +46,7 @@ paths: schema: $ref: '#/components/schemas/Hello' example: - greeting: Iste ratione voluptatum. + greeting: Ex tempore iste. components: schemas: Hello: @@ -55,9 +55,9 @@ components: greeting: type: string description: The greeting message - example: Perspiciatis laboriosam voluptatem sunt maxime quae. + example: Ea earum recusandae. example: - greeting: Et molestiae. + greeting: Ea earum recusandae. required: - greeting tags: diff --git a/httpstatus/hello.go b/httpstatus/hello.go index 10e131c76..10db02884 100644 --- a/httpstatus/hello.go +++ b/httpstatus/hello.go @@ -19,7 +19,7 @@ func NewHello(logger *log.Logger) hello.Service { } // Hello implements hello. -func (s *hellosrvc) HelloEndpoint(ctx context.Context, p *hello.HelloPayload) (*hello.Hello, error) { +func (s *hellosrvc) Hello(ctx context.Context, p *hello.HelloPayload) (*hello.Hello, error) { var res hello.Hello res.Greeting = p.Greeting switch p.Greeting { diff --git a/interceptors/gen/grpc/cli/interceptors/cli.go b/interceptors/gen/grpc/cli/interceptors/cli.go index f4edbb469..291bd462a 100644 --- a/interceptors/gen/grpc/cli/interceptors/cli.go +++ b/interceptors/gen/grpc/cli/interceptors/cli.go @@ -29,7 +29,7 @@ func UsageCommands() []string { // UsageExamples produces an example of a valid invocation of the CLI tool. func UsageExamples() string { - return os.Args[0] + " " + "interceptors get --message '{\n \"auth\": \"Doloremque in beatae illo nemo nihil id.\",\n \"recordID\": \"66c20bbb-15ff-4254-b34a-4ecbeff0ce29\",\n \"spanID\": \"66c20bbb-15ff-4254-b34a-4ecbeff0ce29\",\n \"tenantID\": \"66c20bbb-15ff-4254-b34a-4ecbeff0ce29\",\n \"traceID\": \"66c20bbb-15ff-4254-b34a-4ecbeff0ce29\"\n }'" + "\n" + + return os.Args[0] + " " + "interceptors get --message '{\n \"auth\": \"Aut dolorem nisi qui accusantium.\",\n \"recordID\": \"dd11abcb-f3b1-412f-9ede-6f80730d5a28\",\n \"spanID\": \"dd11abcb-f3b1-412f-9ede-6f80730d5a28\",\n \"tenantID\": \"dd11abcb-f3b1-412f-9ede-6f80730d5a28\",\n \"traceID\": \"dd11abcb-f3b1-412f-9ede-6f80730d5a28\"\n }'" + "\n" + "" } @@ -153,5 +153,5 @@ func interceptorsGetUsage() { fmt.Fprintln(os.Stderr) fmt.Fprintln(os.Stderr, "Example:") - fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "interceptors get --message '{\n \"auth\": \"Doloremque in beatae illo nemo nihil id.\",\n \"recordID\": \"66c20bbb-15ff-4254-b34a-4ecbeff0ce29\",\n \"spanID\": \"66c20bbb-15ff-4254-b34a-4ecbeff0ce29\",\n \"tenantID\": \"66c20bbb-15ff-4254-b34a-4ecbeff0ce29\",\n \"traceID\": \"66c20bbb-15ff-4254-b34a-4ecbeff0ce29\"\n }'") + fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "interceptors get --message '{\n \"auth\": \"Aut dolorem nisi qui accusantium.\",\n \"recordID\": \"dd11abcb-f3b1-412f-9ede-6f80730d5a28\",\n \"spanID\": \"dd11abcb-f3b1-412f-9ede-6f80730d5a28\",\n \"tenantID\": \"dd11abcb-f3b1-412f-9ede-6f80730d5a28\",\n \"traceID\": \"dd11abcb-f3b1-412f-9ede-6f80730d5a28\"\n }'") } diff --git a/interceptors/gen/grpc/interceptors/client/cli.go b/interceptors/gen/grpc/interceptors/client/cli.go index 70988e2f7..3942e198b 100644 --- a/interceptors/gen/grpc/interceptors/client/cli.go +++ b/interceptors/gen/grpc/interceptors/client/cli.go @@ -24,7 +24,7 @@ func BuildGetPayload(interceptorsGetMessage string) (*interceptors.GetPayload, e if interceptorsGetMessage != "" { err = json.Unmarshal([]byte(interceptorsGetMessage), &message) if err != nil { - return nil, fmt.Errorf("invalid JSON for message, \nerror: %s, \nexample of valid JSON:\n%s", err, "'{\n \"auth\": \"Doloremque in beatae illo nemo nihil id.\",\n \"recordID\": \"66c20bbb-15ff-4254-b34a-4ecbeff0ce29\",\n \"spanID\": \"66c20bbb-15ff-4254-b34a-4ecbeff0ce29\",\n \"tenantID\": \"66c20bbb-15ff-4254-b34a-4ecbeff0ce29\",\n \"traceID\": \"66c20bbb-15ff-4254-b34a-4ecbeff0ce29\"\n }'") + return nil, fmt.Errorf("invalid JSON for message, \nerror: %s, \nexample of valid JSON:\n%s", err, "'{\n \"auth\": \"Aut dolorem nisi qui accusantium.\",\n \"recordID\": \"dd11abcb-f3b1-412f-9ede-6f80730d5a28\",\n \"spanID\": \"dd11abcb-f3b1-412f-9ede-6f80730d5a28\",\n \"tenantID\": \"dd11abcb-f3b1-412f-9ede-6f80730d5a28\",\n \"traceID\": \"dd11abcb-f3b1-412f-9ede-6f80730d5a28\"\n }'") } } } diff --git a/interceptors/gen/grpc/interceptors/client/types.go b/interceptors/gen/grpc/interceptors/client/types.go index 06cd0e474..75ba3fafa 100644 --- a/interceptors/gen/grpc/interceptors/client/types.go +++ b/interceptors/gen/grpc/interceptors/client/types.go @@ -13,8 +13,8 @@ import ( goa "goa.design/goa/v3/pkg" ) -// NewProtoGetRequest builds the gRPC request type from the payload of the -// "get" endpoint of the "interceptors" service. +// NewProtoGetRequest builds *interceptorspb.GetRequest from +// *interceptors.GetPayload. func NewProtoGetRequest(payload *interceptors.GetPayload) *interceptorspb.GetRequest { message := &interceptorspb.GetRequest{ TenantId: string(payload.TenantID), @@ -32,8 +32,7 @@ func NewProtoGetRequest(payload *interceptors.GetPayload) *interceptorspb.GetReq return message } -// NewGetResult builds the result type of the "get" endpoint of the -// "interceptors" service from the gRPC response type. +// NewGetResult builds *interceptors.GetResult from *interceptorspb.GetResponse. func NewGetResult(message *interceptorspb.GetResponse) *interceptors.GetResult { result := &interceptors.GetResult{ ID: interceptors.UUID(message.Id), diff --git a/interceptors/gen/grpc/interceptors/pb/goagen_interceptors_interceptors.pb.go b/interceptors/gen/grpc/interceptors/pb/goagen_interceptors_interceptors.pb.go index 7bba7b23f..cfcd9d8f5 100644 --- a/interceptors/gen/grpc/interceptors/pb/goagen_interceptors_interceptors.pb.go +++ b/interceptors/gen/grpc/interceptors/pb/goagen_interceptors_interceptors.pb.go @@ -7,8 +7,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.36.11 -// protoc v7.34.1 +// protoc-gen-go v1.36.12 +// protoc v7.36.0 // source: goagen_interceptors_interceptors.proto package interceptorspb diff --git a/interceptors/gen/grpc/interceptors/pb/goagen_interceptors_interceptors_grpc.pb.go b/interceptors/gen/grpc/interceptors/pb/goagen_interceptors_interceptors_grpc.pb.go index d6692b8dd..b2294dd26 100644 --- a/interceptors/gen/grpc/interceptors/pb/goagen_interceptors_interceptors_grpc.pb.go +++ b/interceptors/gen/grpc/interceptors/pb/goagen_interceptors_interceptors_grpc.pb.go @@ -8,7 +8,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.6.2 -// - protoc v7.34.1 +// - protoc v7.36.0 // source: goagen_interceptors_interceptors.proto package interceptorspb diff --git a/interceptors/gen/grpc/interceptors/server/types.go b/interceptors/gen/grpc/interceptors/server/types.go index ec94965dd..4faa159fb 100644 --- a/interceptors/gen/grpc/interceptors/server/types.go +++ b/interceptors/gen/grpc/interceptors/server/types.go @@ -13,8 +13,8 @@ import ( goa "goa.design/goa/v3/pkg" ) -// NewGetPayload builds the payload of the "get" endpoint of the "interceptors" -// service from the gRPC request type. +// NewGetPayload builds *interceptors.GetPayload from +// *interceptorspb.GetRequest. func NewGetPayload(message *interceptorspb.GetRequest) *interceptors.GetPayload { v := &interceptors.GetPayload{ TenantID: interceptors.UUID(message.TenantId), @@ -32,8 +32,8 @@ func NewGetPayload(message *interceptorspb.GetRequest) *interceptors.GetPayload return v } -// NewProtoGetResponse builds the gRPC response type from the result of the -// "get" endpoint of the "interceptors" service. +// NewProtoGetResponse builds *interceptorspb.GetResponse from +// *interceptors.GetResult. func NewProtoGetResponse(result *interceptors.GetResult) *interceptorspb.GetResponse { message := &interceptorspb.GetResponse{ Id: string(result.ID), diff --git a/interceptors/gen/http/cli/interceptors/cli.go b/interceptors/gen/http/cli/interceptors/cli.go index 5fbf54276..a45eda352 100644 --- a/interceptors/gen/http/cli/interceptors/cli.go +++ b/interceptors/gen/http/cli/interceptors/cli.go @@ -30,7 +30,7 @@ func UsageCommands() []string { // UsageExamples produces an example of a valid invocation of the CLI tool. func UsageExamples() string { - return os.Args[0] + " " + "interceptors get --body '{\n \"spanID\": \"c2bc78f1-a675-44df-b132-1d285e204cf2\",\n \"traceID\": \"8909bcf0-fa7e-4ed1-bc3e-1ed689cc9896\"\n }' --tenant-id \"0be14847-a562-4081-b76a-5d1ece3ec1c1\" --record-id \"ca7f30e3-8945-4edd-bcb7-7cb57ca63316\" --auth \"Beatae eum.\"" + "\n" + + return os.Args[0] + " " + "interceptors get --body '{\n \"spanID\": \"dd11abcb-f3b1-412f-9ede-6f80730d5a28\",\n \"traceID\": \"dd11abcb-f3b1-412f-9ede-6f80730d5a28\"\n }' --tenant-id \"bcf776fd-733a-464e-a356-95b967aabc46\" --record-id \"b8b666e3-4262-4c26-842a-872b4f00ac2e\" --auth \"Molestiae ab ipsa fuga.\"" + "\n" + "" } @@ -195,7 +195,7 @@ func interceptorsGetUsage() { fmt.Fprintln(os.Stderr) fmt.Fprintln(os.Stderr, "Example:") - fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "interceptors get --body '{\n \"spanID\": \"c2bc78f1-a675-44df-b132-1d285e204cf2\",\n \"traceID\": \"8909bcf0-fa7e-4ed1-bc3e-1ed689cc9896\"\n }' --tenant-id \"0be14847-a562-4081-b76a-5d1ece3ec1c1\" --record-id \"ca7f30e3-8945-4edd-bcb7-7cb57ca63316\" --auth \"Beatae eum.\"") + fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "interceptors get --body '{\n \"spanID\": \"dd11abcb-f3b1-412f-9ede-6f80730d5a28\",\n \"traceID\": \"dd11abcb-f3b1-412f-9ede-6f80730d5a28\"\n }' --tenant-id \"bcf776fd-733a-464e-a356-95b967aabc46\" --record-id \"b8b666e3-4262-4c26-842a-872b4f00ac2e\" --auth \"Molestiae ab ipsa fuga.\"") } func interceptorsCreateUsage() { @@ -217,7 +217,7 @@ func interceptorsCreateUsage() { fmt.Fprintln(os.Stderr) fmt.Fprintln(os.Stderr, "Example:") - fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "interceptors create --body '{\n \"spanID\": \"7e046fe3-fa36-4f0f-b281-f8c9e1fdf010\",\n \"traceID\": \"831384a5-5a7d-43cc-94e4-5ec22455f386\",\n \"value\": \"Impedit voluptatem culpa et.\"\n }' --tenant-id \"36e02fa8-99a9-4a74-8184-5b23fc179edd\" --auth \"Voluptatum necessitatibus.\"") + fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "interceptors create --body '{\n \"spanID\": \"dd11abcb-f3b1-412f-9ede-6f80730d5a28\",\n \"traceID\": \"dd11abcb-f3b1-412f-9ede-6f80730d5a28\",\n \"value\": \"Vel dolores.\"\n }' --tenant-id \"73ce0bc2-04c1-48cd-ac98-99efcdc2b86a\" --auth \"Eaque repellendus quo blanditiis rerum harum.\"") } func interceptorsStreamUsage() { @@ -237,5 +237,5 @@ func interceptorsStreamUsage() { fmt.Fprintln(os.Stderr) fmt.Fprintln(os.Stderr, "Example:") - fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "interceptors stream --tenant-id \"2a36e0ce-eee4-4dc0-a9e8-3770a62bc0e1\" --auth \"Aliquid et dignissimos delectus facere nesciunt.\"") + fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "interceptors stream --tenant-id \"14baa1da-faa4-460a-a0b6-b283270088d1\" --auth \"Dolore repellendus sint soluta tenetur omnis.\"") } diff --git a/interceptors/gen/http/interceptors/client/cli.go b/interceptors/gen/http/interceptors/client/cli.go index d65f20ec2..eb11dce4b 100644 --- a/interceptors/gen/http/interceptors/client/cli.go +++ b/interceptors/gen/http/interceptors/client/cli.go @@ -23,7 +23,7 @@ func BuildGetPayload(interceptorsGetBody string, interceptorsGetTenantID string, { err = json.Unmarshal([]byte(interceptorsGetBody), &body) if err != nil { - return nil, fmt.Errorf("invalid JSON for body, \nerror: %s, \nexample of valid JSON:\n%s", err, "'{\n \"spanID\": \"c2bc78f1-a675-44df-b132-1d285e204cf2\",\n \"traceID\": \"8909bcf0-fa7e-4ed1-bc3e-1ed689cc9896\"\n }'") + return nil, fmt.Errorf("invalid JSON for body, \nerror: %s, \nexample of valid JSON:\n%s", err, "'{\n \"spanID\": \"dd11abcb-f3b1-412f-9ede-6f80730d5a28\",\n \"traceID\": \"dd11abcb-f3b1-412f-9ede-6f80730d5a28\"\n }'") } if body.TraceID != nil { err = goa.MergeErrors(err, goa.ValidateFormat("body.traceID", *body.TraceID, goa.FormatUUID)) @@ -79,7 +79,7 @@ func BuildCreatePayload(interceptorsCreateBody string, interceptorsCreateTenantI { err = json.Unmarshal([]byte(interceptorsCreateBody), &body) if err != nil { - return nil, fmt.Errorf("invalid JSON for body, \nerror: %s, \nexample of valid JSON:\n%s", err, "'{\n \"spanID\": \"7e046fe3-fa36-4f0f-b281-f8c9e1fdf010\",\n \"traceID\": \"831384a5-5a7d-43cc-94e4-5ec22455f386\",\n \"value\": \"Impedit voluptatem culpa et.\"\n }'") + return nil, fmt.Errorf("invalid JSON for body, \nerror: %s, \nexample of valid JSON:\n%s", err, "'{\n \"spanID\": \"dd11abcb-f3b1-412f-9ede-6f80730d5a28\",\n \"traceID\": \"dd11abcb-f3b1-412f-9ede-6f80730d5a28\",\n \"value\": \"Vel dolores.\"\n }'") } if body.TraceID != nil { err = goa.MergeErrors(err, goa.ValidateFormat("body.traceID", *body.TraceID, goa.FormatUUID)) diff --git a/interceptors/gen/http/interceptors/client/encode_decode.go b/interceptors/gen/http/interceptors/client/encode_decode.go index 798d7917b..77bf5a058 100644 --- a/interceptors/gen/http/interceptors/client/encode_decode.go +++ b/interceptors/gen/http/interceptors/client/encode_decode.go @@ -10,6 +10,7 @@ package client import ( "bytes" "context" + "errors" "io" "net/http" "net/url" @@ -73,18 +74,24 @@ func EncodeGetRequest(encoder func(*http.Request) goahttp.Encoder) func(*http.Re // - "Unavailable" (type *goa.ServiceError): http.StatusServiceUnavailable // - error: internal error func DecodeGetResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (any, error) { - return func(resp *http.Response) (any, error) { + return func(resp *http.Response) (result any, decodeErr error) { + responseBody := resp.Body if restoreBody { - b, err := io.ReadAll(resp.Body) - if err != nil { - return nil, err + b, readErr := io.ReadAll(responseBody) + closeErr := responseBody.Close() + if err := errors.Join(readErr, closeErr); err != nil { + return nil, goahttp.ErrDecodingError("interceptors", "get", err) } resp.Body = io.NopCloser(bytes.NewBuffer(b)) defer func() { resp.Body = io.NopCloser(bytes.NewBuffer(b)) }() } else { - defer resp.Body.Close() + defer func() { + if err := responseBody.Close(); err != nil { + decodeErr = errors.Join(decodeErr, goahttp.ErrDecodingError("interceptors", "get", err)) + } + }() } switch resp.StatusCode { case http.StatusOK: @@ -131,7 +138,10 @@ func DecodeGetResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody } return nil, NewGetUnavailable(&body) default: - body, _ := io.ReadAll(resp.Body) + body, err := io.ReadAll(resp.Body) + if err != nil { + return nil, goahttp.ErrDecodingError("interceptors", "get", err) + } return nil, goahttp.ErrInvalidResponse("interceptors", "get", resp.StatusCode, string(body)) } } @@ -186,18 +196,24 @@ func EncodeCreateRequest(encoder func(*http.Request) goahttp.Encoder) func(*http // interceptors create endpoint. restoreBody controls whether the response body // should be restored after having been read. func DecodeCreateResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (any, error) { - return func(resp *http.Response) (any, error) { + return func(resp *http.Response) (result any, decodeErr error) { + responseBody := resp.Body if restoreBody { - b, err := io.ReadAll(resp.Body) - if err != nil { - return nil, err + b, readErr := io.ReadAll(responseBody) + closeErr := responseBody.Close() + if err := errors.Join(readErr, closeErr); err != nil { + return nil, goahttp.ErrDecodingError("interceptors", "create", err) } resp.Body = io.NopCloser(bytes.NewBuffer(b)) defer func() { resp.Body = io.NopCloser(bytes.NewBuffer(b)) }() } else { - defer resp.Body.Close() + defer func() { + if err := responseBody.Close(); err != nil { + decodeErr = errors.Join(decodeErr, goahttp.ErrDecodingError("interceptors", "create", err)) + } + }() } switch resp.StatusCode { case http.StatusCreated: @@ -216,7 +232,10 @@ func DecodeCreateResponse(decoder func(*http.Response) goahttp.Decoder, restoreB res := NewCreateResultCreated(&body) return res, nil default: - body, _ := io.ReadAll(resp.Body) + body, err := io.ReadAll(resp.Body) + if err != nil { + return nil, goahttp.ErrDecodingError("interceptors", "create", err) + } return nil, goahttp.ErrInvalidResponse("interceptors", "create", resp.StatusCode, string(body)) } } @@ -274,18 +293,24 @@ func EncodeStreamRequest(encoder func(*http.Request) goahttp.Encoder) func(*http // interceptors stream endpoint. restoreBody controls whether the response body // should be restored after having been read. func DecodeStreamResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (any, error) { - return func(resp *http.Response) (any, error) { + return func(resp *http.Response) (result any, decodeErr error) { + responseBody := resp.Body if restoreBody { - b, err := io.ReadAll(resp.Body) - if err != nil { - return nil, err + b, readErr := io.ReadAll(responseBody) + closeErr := responseBody.Close() + if err := errors.Join(readErr, closeErr); err != nil { + return nil, goahttp.ErrDecodingError("interceptors", "stream", err) } resp.Body = io.NopCloser(bytes.NewBuffer(b)) defer func() { resp.Body = io.NopCloser(bytes.NewBuffer(b)) }() } else { - defer resp.Body.Close() + defer func() { + if err := responseBody.Close(); err != nil { + decodeErr = errors.Join(decodeErr, goahttp.ErrDecodingError("interceptors", "stream", err)) + } + }() } switch resp.StatusCode { case http.StatusOK: @@ -304,7 +329,10 @@ func DecodeStreamResponse(decoder func(*http.Response) goahttp.Decoder, restoreB res := NewStreamResultOK(&body) return res, nil default: - body, _ := io.ReadAll(resp.Body) + body, err := io.ReadAll(resp.Body) + if err != nil { + return nil, goahttp.ErrDecodingError("interceptors", "stream", err) + } return nil, goahttp.ErrInvalidResponse("interceptors", "stream", resp.StatusCode, string(body)) } } diff --git a/interceptors/gen/http/interceptors/client/types.go b/interceptors/gen/http/interceptors/client/types.go index ef41c41e3..1fde8926e 100644 --- a/interceptors/gen/http/interceptors/client/types.go +++ b/interceptors/gen/http/interceptors/client/types.go @@ -359,7 +359,7 @@ func ValidateStreamResponseBody(body *StreamResponseBody) (err error) { } // ValidateGetNotFoundResponseBody runs the validations defined on -// get_NotFound_response_body +// GetNotFoundResponseBody func ValidateGetNotFoundResponseBody(body *GetNotFoundResponseBody) (err error) { if body.Name == nil { err = goa.MergeErrors(err, goa.MissingFieldError("name", "body")) @@ -383,7 +383,7 @@ func ValidateGetNotFoundResponseBody(body *GetNotFoundResponseBody) (err error) } // ValidateGetUnavailableResponseBody runs the validations defined on -// get_Unavailable_response_body +// GetUnavailableResponseBody func ValidateGetUnavailableResponseBody(body *GetUnavailableResponseBody) (err error) { if body.Name == nil { err = goa.MergeErrors(err, goa.MissingFieldError("name", "body")) diff --git a/interceptors/gen/http/openapi.json b/interceptors/gen/http/openapi.json index 28c311a55..af20f138b 100644 --- a/interceptors/gen/http/openapi.json +++ b/interceptors/gen/http/openapi.json @@ -1 +1 @@ -{"swagger":"2.0","info":{"title":"","version":"0.0.1"},"host":"localhost:80","consumes":["application/json","application/xml","application/gob"],"produces":["application/json","application/xml","application/gob"],"paths":{"/records/{tenantID}":{"post":{"tags":["interceptors"],"summary":"create interceptors","description":"Create a new record with all interceptors in action","operationId":"interceptors#create","parameters":[{"name":"tenantID","in":"path","description":"Valid UUID representation as per RFC 4122","required":true,"type":"string","format":"uuid"},{"name":"Authorization","in":"header","description":"JWT auth token","required":true,"type":"string"},{"name":"CreateRequestBody","in":"body","required":true,"schema":{"$ref":"#/definitions/InterceptorsCreateRequestBody","required":["value"]}}],"responses":{"201":{"description":"Created response.","schema":{"$ref":"#/definitions/InterceptorsCreateResponseBody","required":["id","value","tenant","status","processedAt","duration"]}}},"schemes":["http"]}},"/records/{tenantID}/stream":{"get":{"tags":["interceptors"],"summary":"stream interceptors","description":"Stream records","operationId":"interceptors#stream","parameters":[{"name":"tenantID","in":"path","description":"Valid UUID representation as per RFC 4122","required":true,"type":"string","format":"uuid"},{"name":"Authorization","in":"header","description":"JWT auth token","required":true,"type":"string"}],"responses":{"101":{"description":"Switching Protocols response.","schema":{"$ref":"#/definitions/InterceptorsStreamResponseBody","required":["id","value","tenant","status"]}}},"schemes":["ws"]}},"/records/{tenantID}/{recordID}":{"get":{"tags":["interceptors"],"summary":"get interceptors","description":"Get retrieves a record by ID with all interceptors in action","operationId":"interceptors#get","parameters":[{"name":"tenantID","in":"path","description":"Valid UUID representation as per RFC 4122","required":true,"type":"string","format":"uuid"},{"name":"recordID","in":"path","description":"Valid UUID representation as per RFC 4122","required":true,"type":"string","format":"uuid"},{"name":"Authorization","in":"header","description":"JWT auth token","required":true,"type":"string"},{"name":"GetRequestBody","in":"body","required":true,"schema":{"$ref":"#/definitions/InterceptorsGetRequestBody"}}],"responses":{"200":{"description":"OK response.","schema":{"$ref":"#/definitions/InterceptorsGetResponseBody","required":["id","value","tenant","status","processedAt","duration"]}},"404":{"description":"Not Found response.","schema":{"$ref":"#/definitions/InterceptorsGetNotFoundResponseBody"}},"503":{"description":"Service Unavailable response.","schema":{"$ref":"#/definitions/InterceptorsGetUnavailableResponseBody"}}},"schemes":["http"]}}},"definitions":{"InterceptorsCreateRequestBody":{"title":"InterceptorsCreateRequestBody","type":"object","properties":{"spanID":{"type":"string","description":"Unique span ID for request, initialized by the TraceRequest interceptor","example":"c89c4a4e-7182-4507-864e-8c8476e91061","format":"uuid"},"traceID":{"type":"string","description":"Unique trace ID for request, initialized by the TraceRequest interceptor","example":"c89c4a4e-7182-4507-864e-8c8476e91061","format":"uuid"},"value":{"type":"string","description":"Value to store in record","example":"Impedit voluptatem culpa et."}},"example":{"spanID":"c89c4a4e-7182-4507-864e-8c8476e91061","traceID":"c89c4a4e-7182-4507-864e-8c8476e91061","value":"Impedit voluptatem culpa et."},"required":["value"]},"InterceptorsCreateResponseBody":{"title":"InterceptorsCreateResponseBody","type":"object","properties":{"duration":{"type":"integer","description":"Processing duration in ms","example":2675830902084894015,"format":"int64"},"id":{"type":"string","description":"ID of the created record","example":"7673f207-d6bd-473a-8f84-1c0b64fcfc54","format":"uuid"},"processedAt":{"type":"string","description":"Timestamp when processed","example":"Id quaerat dolores ab quo soluta modi."},"retryCount":{"type":"integer","description":"Number of retry attempts made","example":193182529652580268,"format":"int64"},"retryDuration":{"type":"integer","description":"Total time spent retrying","example":5809970416232694733,"format":"int64"},"status":{"type":"integer","description":"Response status code","example":2668736938289029744,"format":"int64"},"tenant":{"type":"string","description":"Tenant the record belongs to","example":"Sed omnis aut recusandae fuga minima."},"value":{"type":"string","description":"Value of the record","example":"Fuga quia."}},"example":{"duration":2675830902084894015,"id":"7673f207-d6bd-473a-8f84-1c0b64fcfc54","processedAt":"Id quaerat dolores ab quo soluta modi.","retryCount":193182529652580268,"retryDuration":5809970416232694733,"status":2668736938289029744,"tenant":"Sed omnis aut recusandae fuga minima.","value":"Fuga quia."},"required":["id","value","tenant","status","processedAt","duration"]},"InterceptorsGetNotFoundResponseBody":{"title":"Mediatype identifier: application/vnd.goa.error; view=default","type":"object","properties":{"fault":{"type":"boolean","description":"Is the error a server-side fault?","example":false},"id":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"message":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"name":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"temporary":{"type":"boolean","description":"Is the error temporary?","example":false},"timeout":{"type":"boolean","description":"Is the error a timeout?","example":false}},"description":"Record not found (default view)","example":{"fault":false,"id":"123abc","message":"parameter 'p' must be an integer","name":"bad_request","temporary":false,"timeout":false},"required":["name","id","message","temporary","timeout","fault"]},"InterceptorsGetRequestBody":{"title":"InterceptorsGetRequestBody","type":"object","properties":{"spanID":{"type":"string","description":"Unique span ID for request, initialized by the TraceRequest interceptor","example":"c89c4a4e-7182-4507-864e-8c8476e91061","format":"uuid"},"traceID":{"type":"string","description":"Unique trace ID for request, initialized by the TraceRequest interceptor","example":"c89c4a4e-7182-4507-864e-8c8476e91061","format":"uuid"}},"example":{"spanID":"c89c4a4e-7182-4507-864e-8c8476e91061","traceID":"c89c4a4e-7182-4507-864e-8c8476e91061"}},"InterceptorsGetResponseBody":{"title":"InterceptorsGetResponseBody","type":"object","properties":{"cachedAt":{"type":"string","description":"Time at which the record was cached, written by the Cache interceptor","example":"Aut vero voluptates."},"duration":{"type":"integer","description":"Processing duration in ms, written by the RequestAudit interceptor","example":966071656546526256,"format":"int64"},"id":{"type":"string","description":"ID of the record","example":"7673f207-d6bd-473a-8f84-1c0b64fcfc54","format":"uuid"},"processedAt":{"type":"string","description":"Timestamp when processed, written by the RequestAudit interceptor","example":"Asperiores voluptatem quisquam id necessitatibus."},"retryCount":{"type":"integer","description":"Number of retry attempts made, written client-side by the Retry interceptor","example":1538090001739738220,"format":"int64"},"retryDuration":{"type":"integer","description":"Total time spent retrying, written client-side by the Retry interceptor","example":3066832311296962951,"format":"int64"},"status":{"type":"integer","description":"Response status code","example":6370274974021655670,"format":"int64"},"tenant":{"type":"string","description":"Tenant the record belongs to","example":"Ad consequatur dolor alias."},"value":{"type":"string","description":"Value of the record","example":"Impedit officiis."}},"example":{"cachedAt":"Aut vero voluptates.","duration":966071656546526256,"id":"7673f207-d6bd-473a-8f84-1c0b64fcfc54","processedAt":"Asperiores voluptatem quisquam id necessitatibus.","retryCount":1538090001739738220,"retryDuration":3066832311296962951,"status":6370274974021655670,"tenant":"Ad consequatur dolor alias.","value":"Impedit officiis."},"required":["id","value","tenant","status","processedAt","duration"]},"InterceptorsGetUnavailableResponseBody":{"title":"Mediatype identifier: application/vnd.goa.error; view=default","type":"object","properties":{"fault":{"type":"boolean","description":"Is the error a server-side fault?","example":false},"id":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"message":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"name":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"temporary":{"type":"boolean","description":"Is the error temporary?","example":false},"timeout":{"type":"boolean","description":"Is the error a timeout?","example":false}},"description":"Temporary error (default view)","example":{"fault":false,"id":"123abc","message":"parameter 'p' must be an integer","name":"bad_request","temporary":false,"timeout":false},"required":["name","id","message","temporary","timeout","fault"]},"InterceptorsStreamResponseBody":{"title":"InterceptorsStreamResponseBody","type":"object","properties":{"id":{"type":"string","description":"ID of the created record","example":"7673f207-d6bd-473a-8f84-1c0b64fcfc54","format":"uuid"},"spanID":{"type":"string","description":"Unique span ID for request, initialized by the TraceRequest interceptor","example":"7673f207-d6bd-473a-8f84-1c0b64fcfc54","format":"uuid"},"status":{"type":"integer","description":"Response status code","example":3407397389909827570,"format":"int64"},"tenant":{"type":"string","description":"Tenant the record belongs to","example":"Repellendus eveniet sit."},"traceID":{"type":"string","description":"Unique trace ID for request, initialized by the TraceRequest interceptor","example":"7673f207-d6bd-473a-8f84-1c0b64fcfc54","format":"uuid"},"value":{"type":"string","description":"Value of the record","example":"Eos nihil."}},"example":{"id":"7673f207-d6bd-473a-8f84-1c0b64fcfc54","spanID":"7673f207-d6bd-473a-8f84-1c0b64fcfc54","status":3407397389909827570,"tenant":"Repellendus eveniet sit.","traceID":"7673f207-d6bd-473a-8f84-1c0b64fcfc54","value":"Eos nihil."},"required":["id","value","tenant","status"]}}} \ No newline at end of file +{"swagger":"2.0","info":{"title":"","version":"0.0.1"},"host":"localhost:80","consumes":["application/json","application/xml","application/gob"],"produces":["application/json","application/xml","application/gob"],"paths":{"/records/{tenantID}":{"post":{"tags":["interceptors"],"summary":"create interceptors","description":"Create a new record with all interceptors in action","operationId":"interceptors#create","parameters":[{"name":"tenantID","in":"path","description":"Valid UUID representation as per RFC 4122","required":true,"type":"string","format":"uuid"},{"name":"Authorization","in":"header","description":"JWT auth token","required":true,"type":"string"},{"name":"CreateRequestBody","in":"body","required":true,"schema":{"$ref":"#/definitions/InterceptorsCreateRequestBody","required":["value"]}}],"responses":{"201":{"description":"Created response.","schema":{"$ref":"#/definitions/InterceptorsCreateResponseBody","required":["id","value","tenant","status","processedAt","duration"]}}},"schemes":["http"]}},"/records/{tenantID}/stream":{"get":{"tags":["interceptors"],"summary":"stream interceptors","description":"Stream records","operationId":"interceptors#stream","parameters":[{"name":"tenantID","in":"path","description":"Valid UUID representation as per RFC 4122","required":true,"type":"string","format":"uuid"},{"name":"Authorization","in":"header","description":"JWT auth token","required":true,"type":"string"}],"responses":{"101":{"description":"Switching Protocols response.","schema":{"$ref":"#/definitions/InterceptorsStreamResponseBody","required":["id","value","tenant","status"]}}},"schemes":["ws"]}},"/records/{tenantID}/{recordID}":{"get":{"tags":["interceptors"],"summary":"get interceptors","description":"Get retrieves a record by ID with all interceptors in action","operationId":"interceptors#get","parameters":[{"name":"tenantID","in":"path","description":"Valid UUID representation as per RFC 4122","required":true,"type":"string","format":"uuid"},{"name":"recordID","in":"path","description":"Valid UUID representation as per RFC 4122","required":true,"type":"string","format":"uuid"},{"name":"Authorization","in":"header","description":"JWT auth token","required":true,"type":"string"},{"name":"GetRequestBody","in":"body","required":true,"schema":{"$ref":"#/definitions/InterceptorsGetRequestBody"}}],"responses":{"200":{"description":"OK response.","schema":{"$ref":"#/definitions/InterceptorsGetResponseBody","required":["id","value","tenant","status","processedAt","duration"]}},"404":{"description":"NotFound: Record not found","schema":{"$ref":"#/definitions/InterceptorsGetNotFoundResponseBody"},"examples":{"application/vnd.goa.error":{"fault":false,"id":"123abc","message":"parameter 'p' must be an integer","name":"NotFound","temporary":false,"timeout":false}}},"503":{"description":"Unavailable: Temporary error","schema":{"$ref":"#/definitions/InterceptorsGetUnavailableResponseBody"},"examples":{"application/vnd.goa.error":{"fault":false,"id":"123abc","message":"parameter 'p' must be an integer","name":"Unavailable","temporary":true,"timeout":false}}}},"schemes":["http"]}}},"definitions":{"InterceptorsCreateRequestBody":{"title":"InterceptorsCreateRequestBody","type":"object","properties":{"spanID":{"type":"string","description":"Unique span ID for request, initialized by the TraceRequest interceptor","example":"dd11abcb-f3b1-412f-9ede-6f80730d5a28","format":"uuid"},"traceID":{"type":"string","description":"Unique trace ID for request, initialized by the TraceRequest interceptor","example":"dd11abcb-f3b1-412f-9ede-6f80730d5a28","format":"uuid"},"value":{"type":"string","description":"Value to store in record","example":"Vel dolores."}},"example":{"spanID":"dd11abcb-f3b1-412f-9ede-6f80730d5a28","traceID":"dd11abcb-f3b1-412f-9ede-6f80730d5a28","value":"Vel dolores."},"required":["value"]},"InterceptorsCreateResponseBody":{"title":"InterceptorsCreateResponseBody","type":"object","properties":{"duration":{"type":"integer","description":"Processing duration in ms","example":3718795145732531204,"format":"int64"},"id":{"type":"string","description":"ID of the created record","example":"dd11abcb-f3b1-412f-9ede-6f80730d5a28","format":"uuid"},"processedAt":{"type":"string","description":"Timestamp when processed","example":"Dolor sit."},"retryCount":{"type":"integer","description":"Number of retry attempts made","example":5419496228293178792,"format":"int64"},"retryDuration":{"type":"integer","description":"Total time spent retrying","example":9203795670612989877,"format":"int64"},"status":{"type":"integer","description":"Response status code","example":4185462404774819293,"format":"int64"},"tenant":{"type":"string","description":"Tenant the record belongs to","example":"Dolores sunt non."},"value":{"type":"string","description":"Value of the record","example":"Minima eos voluptate esse dolores assumenda."}},"example":{"duration":3718795145732531204,"id":"dd11abcb-f3b1-412f-9ede-6f80730d5a28","processedAt":"Dolor sit.","retryCount":5419496228293178792,"retryDuration":9203795670612989877,"status":4185462404774819293,"tenant":"Dolores sunt non.","value":"Minima eos voluptate esse dolores assumenda."},"required":["id","value","tenant","status","processedAt","duration"]},"InterceptorsGetNotFoundResponseBody":{"title":"Mediatype identifier: application/vnd.goa.error; view=default","type":"object","properties":{"fault":{"type":"boolean","description":"Is the error a server-side fault?","example":false},"id":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"message":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"name":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"temporary":{"type":"boolean","description":"Is the error temporary?","example":true},"timeout":{"type":"boolean","description":"Is the error a timeout?","example":true}},"description":"Error response result type (default view)","example":{"fault":false,"id":"123abc","message":"parameter 'p' must be an integer","name":"bad_request","temporary":true,"timeout":true},"required":["name","id","message","temporary","timeout","fault"]},"InterceptorsGetRequestBody":{"title":"InterceptorsGetRequestBody","type":"object","properties":{"spanID":{"type":"string","description":"Unique span ID for request, initialized by the TraceRequest interceptor","example":"dd11abcb-f3b1-412f-9ede-6f80730d5a28","format":"uuid"},"traceID":{"type":"string","description":"Unique trace ID for request, initialized by the TraceRequest interceptor","example":"dd11abcb-f3b1-412f-9ede-6f80730d5a28","format":"uuid"}},"example":{"spanID":"dd11abcb-f3b1-412f-9ede-6f80730d5a28","traceID":"dd11abcb-f3b1-412f-9ede-6f80730d5a28"}},"InterceptorsGetResponseBody":{"title":"InterceptorsGetResponseBody","type":"object","properties":{"cachedAt":{"type":"string","description":"Time at which the record was cached, written by the Cache interceptor","example":"Omnis impedit sed."},"duration":{"type":"integer","description":"Processing duration in ms, written by the RequestAudit interceptor","example":178461644483448189,"format":"int64"},"id":{"type":"string","description":"ID of the record","example":"dd11abcb-f3b1-412f-9ede-6f80730d5a28","format":"uuid"},"processedAt":{"type":"string","description":"Timestamp when processed, written by the RequestAudit interceptor","example":"Eius mollitia illo quia consequatur voluptatem."},"retryCount":{"type":"integer","description":"Number of retry attempts made, written client-side by the Retry interceptor","example":5007217583026942089,"format":"int64"},"retryDuration":{"type":"integer","description":"Total time spent retrying, written client-side by the Retry interceptor","example":587659532169267737,"format":"int64"},"status":{"type":"integer","description":"Response status code","example":3494638038445428863,"format":"int64"},"tenant":{"type":"string","description":"Tenant the record belongs to","example":"Numquam est voluptates dolor."},"value":{"type":"string","description":"Value of the record","example":"Quis nesciunt maiores quia ab."}},"example":{"cachedAt":"Omnis impedit sed.","duration":178461644483448189,"id":"dd11abcb-f3b1-412f-9ede-6f80730d5a28","processedAt":"Eius mollitia illo quia consequatur voluptatem.","retryCount":5007217583026942089,"retryDuration":587659532169267737,"status":3494638038445428863,"tenant":"Numquam est voluptates dolor.","value":"Quis nesciunt maiores quia ab."},"required":["id","value","tenant","status","processedAt","duration"]},"InterceptorsGetUnavailableResponseBody":{"title":"Mediatype identifier: application/vnd.goa.error; view=default","type":"object","properties":{"fault":{"type":"boolean","description":"Is the error a server-side fault?","example":false},"id":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"message":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"name":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"temporary":{"type":"boolean","description":"Is the error temporary?","example":true},"timeout":{"type":"boolean","description":"Is the error a timeout?","example":true}},"description":"Error response result type (default view)","example":{"fault":false,"id":"123abc","message":"parameter 'p' must be an integer","name":"bad_request","temporary":true,"timeout":true},"required":["name","id","message","temporary","timeout","fault"]},"InterceptorsStreamResponseBody":{"title":"InterceptorsStreamResponseBody","type":"object","properties":{"id":{"type":"string","description":"ID of the created record","example":"dd11abcb-f3b1-412f-9ede-6f80730d5a28","format":"uuid"},"spanID":{"type":"string","description":"Unique span ID for request, initialized by the TraceRequest interceptor","example":"dd11abcb-f3b1-412f-9ede-6f80730d5a28","format":"uuid"},"status":{"type":"integer","description":"Response status code","example":3451733167122626757,"format":"int64"},"tenant":{"type":"string","description":"Tenant the record belongs to","example":"Accusantium facilis est et."},"traceID":{"type":"string","description":"Unique trace ID for request, initialized by the TraceRequest interceptor","example":"dd11abcb-f3b1-412f-9ede-6f80730d5a28","format":"uuid"},"value":{"type":"string","description":"Value of the record","example":"Et qui."}},"example":{"id":"dd11abcb-f3b1-412f-9ede-6f80730d5a28","spanID":"dd11abcb-f3b1-412f-9ede-6f80730d5a28","status":3451733167122626757,"tenant":"Accusantium facilis est et.","traceID":"dd11abcb-f3b1-412f-9ede-6f80730d5a28","value":"Et qui."},"required":["id","value","tenant","status"]}}} \ No newline at end of file diff --git a/interceptors/gen/http/openapi.yaml b/interceptors/gen/http/openapi.yaml index 865026e77..2c0e330e5 100644 --- a/interceptors/gen/http/openapi.yaml +++ b/interceptors/gen/http/openapi.yaml @@ -95,13 +95,29 @@ paths: - processedAt - duration "404": - description: Not Found response. + description: 'NotFound: Record not found' schema: $ref: '#/definitions/InterceptorsGetNotFoundResponseBody' + examples: + application/vnd.goa.error: + fault: false + id: 123abc + message: parameter 'p' must be an integer + name: NotFound + temporary: false + timeout: false "503": - description: Service Unavailable response. + description: 'Unavailable: Temporary error' schema: $ref: '#/definitions/InterceptorsGetUnavailableResponseBody' + examples: + application/vnd.goa.error: + fault: false + id: 123abc + message: parameter 'p' must be an integer + name: Unavailable + temporary: true + timeout: false schemes: - http /records/{tenantID}/stream: @@ -143,21 +159,21 @@ definitions: spanID: type: string description: Unique span ID for request, initialized by the TraceRequest interceptor - example: c89c4a4e-7182-4507-864e-8c8476e91061 + example: dd11abcb-f3b1-412f-9ede-6f80730d5a28 format: uuid traceID: type: string description: Unique trace ID for request, initialized by the TraceRequest interceptor - example: c89c4a4e-7182-4507-864e-8c8476e91061 + example: dd11abcb-f3b1-412f-9ede-6f80730d5a28 format: uuid value: type: string description: Value to store in record - example: Impedit voluptatem culpa et. + example: Vel dolores. example: - spanID: c89c4a4e-7182-4507-864e-8c8476e91061 - traceID: c89c4a4e-7182-4507-864e-8c8476e91061 - value: Impedit voluptatem culpa et. + spanID: dd11abcb-f3b1-412f-9ede-6f80730d5a28 + traceID: dd11abcb-f3b1-412f-9ede-6f80730d5a28 + value: Vel dolores. required: - value InterceptorsCreateResponseBody: @@ -167,49 +183,49 @@ definitions: duration: type: integer description: Processing duration in ms - example: 2675830902084894015 + example: 3718795145732531204 format: int64 id: type: string description: ID of the created record - example: 7673f207-d6bd-473a-8f84-1c0b64fcfc54 + example: dd11abcb-f3b1-412f-9ede-6f80730d5a28 format: uuid processedAt: type: string description: Timestamp when processed - example: Id quaerat dolores ab quo soluta modi. + example: Dolor sit. retryCount: type: integer description: Number of retry attempts made - example: 193182529652580268 + example: 5419496228293178792 format: int64 retryDuration: type: integer description: Total time spent retrying - example: 5809970416232694733 + example: 9203795670612989877 format: int64 status: type: integer description: Response status code - example: 2668736938289029744 + example: 4185462404774819293 format: int64 tenant: type: string description: Tenant the record belongs to - example: Sed omnis aut recusandae fuga minima. + example: Dolores sunt non. value: type: string description: Value of the record - example: Fuga quia. + example: Minima eos voluptate esse dolores assumenda. example: - duration: 2675830902084894015 - id: 7673f207-d6bd-473a-8f84-1c0b64fcfc54 - processedAt: Id quaerat dolores ab quo soluta modi. - retryCount: 193182529652580268 - retryDuration: 5809970416232694733 - status: 2668736938289029744 - tenant: Sed omnis aut recusandae fuga minima. - value: Fuga quia. + duration: 3718795145732531204 + id: dd11abcb-f3b1-412f-9ede-6f80730d5a28 + processedAt: Dolor sit. + retryCount: 5419496228293178792 + retryDuration: 9203795670612989877 + status: 4185462404774819293 + tenant: Dolores sunt non. + value: Minima eos voluptate esse dolores assumenda. required: - id - value @@ -240,19 +256,19 @@ definitions: temporary: type: boolean description: Is the error temporary? - example: false + example: true timeout: type: boolean description: Is the error a timeout? - example: false - description: Record not found (default view) + example: true + description: Error response result type (default view) example: fault: false id: 123abc message: parameter 'p' must be an integer name: bad_request - temporary: false - timeout: false + temporary: true + timeout: true required: - name - id @@ -267,16 +283,16 @@ definitions: spanID: type: string description: Unique span ID for request, initialized by the TraceRequest interceptor - example: c89c4a4e-7182-4507-864e-8c8476e91061 + example: dd11abcb-f3b1-412f-9ede-6f80730d5a28 format: uuid traceID: type: string description: Unique trace ID for request, initialized by the TraceRequest interceptor - example: c89c4a4e-7182-4507-864e-8c8476e91061 + example: dd11abcb-f3b1-412f-9ede-6f80730d5a28 format: uuid example: - spanID: c89c4a4e-7182-4507-864e-8c8476e91061 - traceID: c89c4a4e-7182-4507-864e-8c8476e91061 + spanID: dd11abcb-f3b1-412f-9ede-6f80730d5a28 + traceID: dd11abcb-f3b1-412f-9ede-6f80730d5a28 InterceptorsGetResponseBody: title: InterceptorsGetResponseBody type: object @@ -284,54 +300,54 @@ definitions: cachedAt: type: string description: Time at which the record was cached, written by the Cache interceptor - example: Aut vero voluptates. + example: Omnis impedit sed. duration: type: integer description: Processing duration in ms, written by the RequestAudit interceptor - example: 966071656546526256 + example: 178461644483448189 format: int64 id: type: string description: ID of the record - example: 7673f207-d6bd-473a-8f84-1c0b64fcfc54 + example: dd11abcb-f3b1-412f-9ede-6f80730d5a28 format: uuid processedAt: type: string description: Timestamp when processed, written by the RequestAudit interceptor - example: Asperiores voluptatem quisquam id necessitatibus. + example: Eius mollitia illo quia consequatur voluptatem. retryCount: type: integer description: Number of retry attempts made, written client-side by the Retry interceptor - example: 1538090001739738220 + example: 5007217583026942089 format: int64 retryDuration: type: integer description: Total time spent retrying, written client-side by the Retry interceptor - example: 3066832311296962951 + example: 587659532169267737 format: int64 status: type: integer description: Response status code - example: 6370274974021655670 + example: 3494638038445428863 format: int64 tenant: type: string description: Tenant the record belongs to - example: Ad consequatur dolor alias. + example: Numquam est voluptates dolor. value: type: string description: Value of the record - example: Impedit officiis. + example: Quis nesciunt maiores quia ab. example: - cachedAt: Aut vero voluptates. - duration: 966071656546526256 - id: 7673f207-d6bd-473a-8f84-1c0b64fcfc54 - processedAt: Asperiores voluptatem quisquam id necessitatibus. - retryCount: 1538090001739738220 - retryDuration: 3066832311296962951 - status: 6370274974021655670 - tenant: Ad consequatur dolor alias. - value: Impedit officiis. + cachedAt: Omnis impedit sed. + duration: 178461644483448189 + id: dd11abcb-f3b1-412f-9ede-6f80730d5a28 + processedAt: Eius mollitia illo quia consequatur voluptatem. + retryCount: 5007217583026942089 + retryDuration: 587659532169267737 + status: 3494638038445428863 + tenant: Numquam est voluptates dolor. + value: Quis nesciunt maiores quia ab. required: - id - value @@ -362,19 +378,19 @@ definitions: temporary: type: boolean description: Is the error temporary? - example: false + example: true timeout: type: boolean description: Is the error a timeout? - example: false - description: Temporary error (default view) + example: true + description: Error response result type (default view) example: fault: false id: 123abc message: parameter 'p' must be an integer name: bad_request - temporary: false - timeout: false + temporary: true + timeout: true required: - name - id @@ -389,38 +405,38 @@ definitions: id: type: string description: ID of the created record - example: 7673f207-d6bd-473a-8f84-1c0b64fcfc54 + example: dd11abcb-f3b1-412f-9ede-6f80730d5a28 format: uuid spanID: type: string description: Unique span ID for request, initialized by the TraceRequest interceptor - example: 7673f207-d6bd-473a-8f84-1c0b64fcfc54 + example: dd11abcb-f3b1-412f-9ede-6f80730d5a28 format: uuid status: type: integer description: Response status code - example: 3407397389909827570 + example: 3451733167122626757 format: int64 tenant: type: string description: Tenant the record belongs to - example: Repellendus eveniet sit. + example: Accusantium facilis est et. traceID: type: string description: Unique trace ID for request, initialized by the TraceRequest interceptor - example: 7673f207-d6bd-473a-8f84-1c0b64fcfc54 + example: dd11abcb-f3b1-412f-9ede-6f80730d5a28 format: uuid value: type: string description: Value of the record - example: Eos nihil. + example: Et qui. example: - id: 7673f207-d6bd-473a-8f84-1c0b64fcfc54 - spanID: 7673f207-d6bd-473a-8f84-1c0b64fcfc54 - status: 3407397389909827570 - tenant: Repellendus eveniet sit. - traceID: 7673f207-d6bd-473a-8f84-1c0b64fcfc54 - value: Eos nihil. + id: dd11abcb-f3b1-412f-9ede-6f80730d5a28 + spanID: dd11abcb-f3b1-412f-9ede-6f80730d5a28 + status: 3451733167122626757 + tenant: Accusantium facilis est et. + traceID: dd11abcb-f3b1-412f-9ede-6f80730d5a28 + value: Et qui. required: - id - value diff --git a/interceptors/gen/http/openapi3.2.json b/interceptors/gen/http/openapi3.2.json index 10e3fe1f3..57e344cc5 100644 --- a/interceptors/gen/http/openapi3.2.json +++ b/interceptors/gen/http/openapi3.2.json @@ -1 +1 @@ -{"openapi":"3.2.0","info":{"title":"Goa API","version":"0.0.1"},"servers":[{"url":"http://localhost:80","name":"interceptors","description":"Default server for interceptors"}],"paths":{"/records/{tenantID}":{"post":{"tags":["interceptors"],"summary":"create interceptors","description":"Create a new record with all interceptors in action","operationId":"interceptors#create","parameters":[{"name":"tenantID","in":"path","description":"Tenant ID for the request","required":true,"schema":{"type":"string","description":"Tenant ID for the request","example":"66c20bbb-15ff-4254-b34a-4ecbeff0ce29","format":"uuid"},"example":"66c20bbb-15ff-4254-b34a-4ecbeff0ce29"},{"name":"Authorization","in":"header","description":"JWT auth token","required":true,"schema":{"type":"string","description":"JWT auth token","example":"Voluptatum necessitatibus."},"example":"Consequatur excepturi quam quia laudantium asperiores."}],"requestBody":{"description":"Request body for create.","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateRequestBody"},"example":{"spanID":"7e046fe3-fa36-4f0f-b281-f8c9e1fdf010","traceID":"831384a5-5a7d-43cc-94e4-5ec22455f386","value":"Impedit voluptatem culpa et."}}}},"responses":{"201":{"description":"Created response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateResponseBody"},"example":{"duration":2675830902084894015,"id":"612f2f00-a808-44b9-a52d-a7f34bf838a4","processedAt":"Id quaerat dolores ab quo soluta modi.","retryCount":193182529652580268,"retryDuration":5809970416232694733,"status":2668736938289029744,"tenant":"Sed omnis aut recusandae fuga minima.","value":"Fuga quia."}}}}}}},"/records/{tenantID}/stream":{"get":{"tags":["interceptors"],"summary":"stream interceptors","description":"Stream records","operationId":"interceptors#stream","parameters":[{"name":"tenantID","in":"path","description":"Tenant ID for the request","required":true,"schema":{"type":"string","description":"Tenant ID for the request","example":"66c20bbb-15ff-4254-b34a-4ecbeff0ce29","format":"uuid"},"example":"66c20bbb-15ff-4254-b34a-4ecbeff0ce29"},{"name":"Authorization","in":"header","description":"JWT auth token","required":true,"schema":{"type":"string","description":"JWT auth token","example":"Aliquid et dignissimos delectus facere nesciunt."},"example":"Aut expedita eum id."}],"responses":{"101":{"description":"Switching Protocols response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StreamResponseBody"},"example":{"id":"1bbd1751-b7df-4308-a1c7-0a55a307585d","spanID":"baffd1d3-7d92-456b-a4f1-37f462d4c356","status":3407397389909827570,"tenant":"Repellendus eveniet sit.","traceID":"871ffc91-4efb-4fdb-a84b-8561f8f11b47","value":"Eos nihil."}}}}}}},"/records/{tenantID}/{recordID}":{"get":{"tags":["interceptors"],"summary":"get interceptors","description":"Get retrieves a record by ID with all interceptors in action","operationId":"interceptors#get","parameters":[{"name":"tenantID","in":"path","description":"Tenant ID for the request","required":true,"schema":{"type":"string","description":"Tenant ID for the request","example":"66c20bbb-15ff-4254-b34a-4ecbeff0ce29","format":"uuid"},"example":"66c20bbb-15ff-4254-b34a-4ecbeff0ce29"},{"name":"recordID","in":"path","description":"ID of the record to retrieve","required":true,"schema":{"type":"string","description":"ID of the record to retrieve","example":"66c20bbb-15ff-4254-b34a-4ecbeff0ce29","format":"uuid"},"example":"66c20bbb-15ff-4254-b34a-4ecbeff0ce29"},{"name":"Authorization","in":"header","description":"JWT auth token","required":true,"schema":{"type":"string","description":"JWT auth token","example":"Beatae eum."},"example":"Voluptate perferendis dicta commodi."}],"requestBody":{"description":"Request body for get.","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetRequestBody"},"example":{"spanID":"c2bc78f1-a675-44df-b132-1d285e204cf2","traceID":"8909bcf0-fa7e-4ed1-bc3e-1ed689cc9896"}}}},"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetResponseBody"},"example":{"cachedAt":"Aut vero voluptates.","duration":966071656546526256,"id":"f9922b04-e873-4efc-9b16-fdcb9d29ef0a","processedAt":"Asperiores voluptatem quisquam id necessitatibus.","retryCount":1538090001739738220,"retryDuration":3066832311296962951,"status":6370274974021655670,"tenant":"Ad consequatur dolor alias.","value":"Impedit officiis."}}}},"404":{"description":"NotFound: Record not found","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Unavailable: Temporary error","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"schemas":{"CreateRequestBody":{"type":"object","properties":{"spanID":{"$ref":"#/components/schemas/UUID"},"traceID":{"$ref":"#/components/schemas/UUID"},"value":{"type":"string","description":"Value to store in record","example":"Impedit voluptatem culpa et."}},"description":"Request body for create.","example":{"spanID":"c89c4a4e-7182-4507-864e-8c8476e91061","traceID":"c89c4a4e-7182-4507-864e-8c8476e91061","value":"Impedit voluptatem culpa et."},"required":["value"]},"CreateResponseBody":{"type":"object","properties":{"duration":{"type":"integer","description":"Processing duration in ms","example":2675830902084894015,"format":"int64"},"id":{"$ref":"#/components/schemas/UUID"},"processedAt":{"type":"string","description":"Timestamp when processed","example":"Id quaerat dolores ab quo soluta modi."},"retryCount":{"type":"integer","description":"Number of retry attempts made","example":193182529652580268,"format":"int64"},"retryDuration":{"type":"integer","description":"Total time spent retrying","example":5809970416232694733,"format":"int64"},"status":{"type":"integer","description":"Response status code","example":2668736938289029744,"format":"int64"},"tenant":{"type":"string","description":"Tenant the record belongs to","example":"Sed omnis aut recusandae fuga minima."},"value":{"type":"string","description":"Value of the record","example":"Fuga quia."}},"example":{"duration":2675830902084894015,"id":"7673f207-d6bd-473a-8f84-1c0b64fcfc54","processedAt":"Id quaerat dolores ab quo soluta modi.","retryCount":193182529652580268,"retryDuration":5809970416232694733,"status":2668736938289029744,"tenant":"Sed omnis aut recusandae fuga minima.","value":"Fuga quia."},"required":["id","value","tenant","status","processedAt","duration"]},"Error":{"type":"object","properties":{"fault":{"type":"boolean","description":"Is the error a server-side fault?","example":false},"id":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"message":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"name":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"temporary":{"type":"boolean","description":"Is the error temporary?","example":false},"timeout":{"type":"boolean","description":"Is the error a timeout?","example":true}},"description":"Record not found","example":{"fault":false,"id":"123abc","message":"parameter 'p' must be an integer","name":"bad_request","temporary":false,"timeout":true},"required":["name","id","message","temporary","timeout","fault"]},"GetRequestBody":{"type":"object","properties":{"spanID":{"$ref":"#/components/schemas/UUID"},"traceID":{"$ref":"#/components/schemas/UUID"}},"description":"Request body for get.","example":{"spanID":"c89c4a4e-7182-4507-864e-8c8476e91061","traceID":"c89c4a4e-7182-4507-864e-8c8476e91061"}},"GetResponseBody":{"type":"object","properties":{"cachedAt":{"type":"string","description":"Time at which the record was cached, written by the Cache interceptor","example":"Aut vero voluptates."},"duration":{"type":"integer","description":"Processing duration in ms, written by the RequestAudit interceptor","example":966071656546526256,"format":"int64"},"id":{"$ref":"#/components/schemas/UUID"},"processedAt":{"type":"string","description":"Timestamp when processed, written by the RequestAudit interceptor","example":"Asperiores voluptatem quisquam id necessitatibus."},"retryCount":{"type":"integer","description":"Number of retry attempts made, written client-side by the Retry interceptor","example":1538090001739738220,"format":"int64"},"retryDuration":{"type":"integer","description":"Total time spent retrying, written client-side by the Retry interceptor","example":3066832311296962951,"format":"int64"},"status":{"type":"integer","description":"Response status code","example":6370274974021655670,"format":"int64"},"tenant":{"type":"string","description":"Tenant the record belongs to","example":"Ad consequatur dolor alias."},"value":{"type":"string","description":"Value of the record","example":"Impedit officiis."}},"example":{"cachedAt":"Aut vero voluptates.","duration":966071656546526256,"id":"7673f207-d6bd-473a-8f84-1c0b64fcfc54","processedAt":"Asperiores voluptatem quisquam id necessitatibus.","retryCount":1538090001739738220,"retryDuration":3066832311296962951,"status":6370274974021655670,"tenant":"Ad consequatur dolor alias.","value":"Impedit officiis."},"required":["id","value","tenant","status","processedAt","duration"]},"StreamResponseBody":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/UUID"},"spanID":{"$ref":"#/components/schemas/UUID"},"status":{"type":"integer","description":"Response status code","example":3407397389909827570,"format":"int64"},"tenant":{"type":"string","description":"Tenant the record belongs to","example":"Repellendus eveniet sit."},"traceID":{"$ref":"#/components/schemas/UUID"},"value":{"type":"string","description":"Value of the record","example":"Eos nihil."}},"example":{"id":"7673f207-d6bd-473a-8f84-1c0b64fcfc54","spanID":"7673f207-d6bd-473a-8f84-1c0b64fcfc54","status":3407397389909827570,"tenant":"Repellendus eveniet sit.","traceID":"7673f207-d6bd-473a-8f84-1c0b64fcfc54","value":"Eos nihil."},"required":["id","value","tenant","status"]},"StreamStreamingBody":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/UUID"},"spanID":{"$ref":"#/components/schemas/UUID"},"traceID":{"$ref":"#/components/schemas/UUID"},"value":{"type":"string","description":"Value of the record","example":"Enim qui sint."}},"example":{"id":"4ebe4239-1377-48a0-a82d-aeb7fb4a79aa","spanID":"4ebe4239-1377-48a0-a82d-aeb7fb4a79aa","traceID":"4ebe4239-1377-48a0-a82d-aeb7fb4a79aa","value":"Enim qui sint."},"required":["id","value"]},"UUID":{"type":"string","description":"Valid UUID representation as per RFC 4122","example":"c89c4a4e-7182-4507-864e-8c8476e91061","format":"uuid"}}},"tags":[{"name":"interceptors","description":"The interceptors service demonstrates a comprehensive use of interceptors combining\nauthentication, tenant validation, caching, audit logging, and retry mechanisms. It showcases\nboth client-side and server-side interceptors working together to provide a robust service."}]} \ No newline at end of file +{"openapi":"3.2.0","info":{"title":"Goa API","version":"0.0.1"},"servers":[{"url":"http://localhost:80","name":"interceptors","description":"Default server for interceptors"}],"paths":{"/records/{tenantID}":{"post":{"tags":["interceptors"],"summary":"create interceptors","description":"Create a new record with all interceptors in action","operationId":"interceptors#create","parameters":[{"name":"tenantID","in":"path","description":"Tenant ID for the request","required":true,"schema":{"type":"string","description":"Tenant ID for the request","example":"dd11abcb-f3b1-412f-9ede-6f80730d5a28","format":"uuid"},"example":"dd11abcb-f3b1-412f-9ede-6f80730d5a28"},{"name":"Authorization","in":"header","description":"JWT auth token","required":true,"schema":{"type":"string","description":"JWT auth token","example":"Eaque repellendus quo blanditiis rerum harum."},"example":"Eaque repellendus quo blanditiis rerum harum."}],"requestBody":{"description":"Request body for create.","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateRequestBody"},"example":{"spanID":"dd11abcb-f3b1-412f-9ede-6f80730d5a28","traceID":"dd11abcb-f3b1-412f-9ede-6f80730d5a28","value":"Vel dolores."}}}},"responses":{"201":{"description":"Created response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateResponseBody"},"example":{"duration":3718795145732531204,"id":"dd11abcb-f3b1-412f-9ede-6f80730d5a28","processedAt":"Dolor sit.","retryCount":5419496228293178792,"retryDuration":9203795670612989877,"status":4185462404774819293,"tenant":"Dolores sunt non.","value":"Minima eos voluptate esse dolores assumenda."}}}}}}},"/records/{tenantID}/stream":{"get":{"tags":["interceptors"],"summary":"stream interceptors","description":"Stream records","operationId":"interceptors#stream","parameters":[{"name":"tenantID","in":"path","description":"Tenant ID for the request","required":true,"schema":{"type":"string","description":"Tenant ID for the request","example":"dd11abcb-f3b1-412f-9ede-6f80730d5a28","format":"uuid"},"example":"dd11abcb-f3b1-412f-9ede-6f80730d5a28"},{"name":"Authorization","in":"header","description":"JWT auth token","required":true,"schema":{"type":"string","description":"JWT auth token","example":"Dolore repellendus sint soluta tenetur omnis."},"example":"Dolore repellendus sint soluta tenetur omnis."}],"responses":{"101":{"description":"Switching Protocols response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StreamResponseBody"},"example":{"id":"dd11abcb-f3b1-412f-9ede-6f80730d5a28","spanID":"dd11abcb-f3b1-412f-9ede-6f80730d5a28","status":3451733167122626757,"tenant":"Accusantium facilis est et.","traceID":"dd11abcb-f3b1-412f-9ede-6f80730d5a28","value":"Et qui."}}}}}}},"/records/{tenantID}/{recordID}":{"get":{"tags":["interceptors"],"summary":"get interceptors","description":"Get retrieves a record by ID with all interceptors in action","operationId":"interceptors#get","parameters":[{"name":"tenantID","in":"path","description":"Tenant ID for the request","required":true,"schema":{"type":"string","description":"Tenant ID for the request","example":"dd11abcb-f3b1-412f-9ede-6f80730d5a28","format":"uuid"},"example":"dd11abcb-f3b1-412f-9ede-6f80730d5a28"},{"name":"recordID","in":"path","description":"ID of the record to retrieve","required":true,"schema":{"type":"string","description":"ID of the record to retrieve","example":"dd11abcb-f3b1-412f-9ede-6f80730d5a28","format":"uuid"},"example":"dd11abcb-f3b1-412f-9ede-6f80730d5a28"},{"name":"Authorization","in":"header","description":"JWT auth token","required":true,"schema":{"type":"string","description":"JWT auth token","example":"Molestiae ab ipsa fuga."},"example":"Molestiae ab ipsa fuga."}],"requestBody":{"description":"Request body for get.","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetRequestBody"},"example":{"spanID":"dd11abcb-f3b1-412f-9ede-6f80730d5a28","traceID":"dd11abcb-f3b1-412f-9ede-6f80730d5a28"}}}},"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetResponseBody"},"example":{"cachedAt":"Omnis impedit sed.","duration":178461644483448189,"id":"dd11abcb-f3b1-412f-9ede-6f80730d5a28","processedAt":"Eius mollitia illo quia consequatur voluptatem.","retryCount":5007217583026942089,"retryDuration":587659532169267737,"status":3494638038445428863,"tenant":"Numquam est voluptates dolor.","value":"Quis nesciunt maiores quia ab."}}}},"404":{"description":"NotFound: Record not found","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"fault":false,"id":"123abc","message":"parameter 'p' must be an integer","name":"NotFound","temporary":false,"timeout":false}}}},"503":{"description":"Unavailable: Temporary error","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"fault":false,"id":"123abc","message":"parameter 'p' must be an integer","name":"Unavailable","temporary":true,"timeout":false}}}}}}}},"components":{"schemas":{"CreateRequestBody":{"type":"object","properties":{"spanID":{"$ref":"#/components/schemas/UUID"},"traceID":{"$ref":"#/components/schemas/UUID"},"value":{"type":"string","description":"Value to store in record","example":"Vel dolores."}},"description":"Request body for create.","example":{"spanID":"dd11abcb-f3b1-412f-9ede-6f80730d5a28","traceID":"dd11abcb-f3b1-412f-9ede-6f80730d5a28","value":"Vel dolores."},"required":["value"]},"CreateResponseBody":{"type":"object","properties":{"duration":{"type":"integer","description":"Processing duration in ms","example":3718795145732531204,"format":"int64"},"id":{"$ref":"#/components/schemas/UUID"},"processedAt":{"type":"string","description":"Timestamp when processed","example":"Dolor sit."},"retryCount":{"type":"integer","description":"Number of retry attempts made","example":5419496228293178792,"format":"int64"},"retryDuration":{"type":"integer","description":"Total time spent retrying","example":9203795670612989877,"format":"int64"},"status":{"type":"integer","description":"Response status code","example":4185462404774819293,"format":"int64"},"tenant":{"type":"string","description":"Tenant the record belongs to","example":"Dolores sunt non."},"value":{"type":"string","description":"Value of the record","example":"Minima eos voluptate esse dolores assumenda."}},"example":{"duration":3718795145732531204,"id":"dd11abcb-f3b1-412f-9ede-6f80730d5a28","processedAt":"Dolor sit.","retryCount":5419496228293178792,"retryDuration":9203795670612989877,"status":4185462404774819293,"tenant":"Dolores sunt non.","value":"Minima eos voluptate esse dolores assumenda."},"required":["id","value","tenant","status","processedAt","duration"]},"Error":{"type":"object","properties":{"fault":{"type":"boolean","description":"Is the error a server-side fault?","example":false},"id":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"message":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"name":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"temporary":{"type":"boolean","description":"Is the error temporary?","example":true},"timeout":{"type":"boolean","description":"Is the error a timeout?","example":true}},"description":"Error response result type","example":{"fault":false,"id":"123abc","message":"parameter 'p' must be an integer","name":"bad_request","temporary":true,"timeout":true},"required":["name","id","message","temporary","timeout","fault"]},"GetRequestBody":{"type":"object","properties":{"spanID":{"$ref":"#/components/schemas/UUID"},"traceID":{"$ref":"#/components/schemas/UUID"}},"description":"Request body for get.","example":{"spanID":"dd11abcb-f3b1-412f-9ede-6f80730d5a28","traceID":"dd11abcb-f3b1-412f-9ede-6f80730d5a28"}},"GetResponseBody":{"type":"object","properties":{"cachedAt":{"type":"string","description":"Time at which the record was cached, written by the Cache interceptor","example":"Omnis impedit sed."},"duration":{"type":"integer","description":"Processing duration in ms, written by the RequestAudit interceptor","example":178461644483448189,"format":"int64"},"id":{"$ref":"#/components/schemas/UUID"},"processedAt":{"type":"string","description":"Timestamp when processed, written by the RequestAudit interceptor","example":"Eius mollitia illo quia consequatur voluptatem."},"retryCount":{"type":"integer","description":"Number of retry attempts made, written client-side by the Retry interceptor","example":5007217583026942089,"format":"int64"},"retryDuration":{"type":"integer","description":"Total time spent retrying, written client-side by the Retry interceptor","example":587659532169267737,"format":"int64"},"status":{"type":"integer","description":"Response status code","example":3494638038445428863,"format":"int64"},"tenant":{"type":"string","description":"Tenant the record belongs to","example":"Numquam est voluptates dolor."},"value":{"type":"string","description":"Value of the record","example":"Quis nesciunt maiores quia ab."}},"example":{"cachedAt":"Omnis impedit sed.","duration":178461644483448189,"id":"dd11abcb-f3b1-412f-9ede-6f80730d5a28","processedAt":"Eius mollitia illo quia consequatur voluptatem.","retryCount":5007217583026942089,"retryDuration":587659532169267737,"status":3494638038445428863,"tenant":"Numquam est voluptates dolor.","value":"Quis nesciunt maiores quia ab."},"required":["id","value","tenant","status","processedAt","duration"]},"StreamResponseBody":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/UUID"},"spanID":{"$ref":"#/components/schemas/UUID"},"status":{"type":"integer","description":"Response status code","example":3451733167122626757,"format":"int64"},"tenant":{"type":"string","description":"Tenant the record belongs to","example":"Accusantium facilis est et."},"traceID":{"$ref":"#/components/schemas/UUID"},"value":{"type":"string","description":"Value of the record","example":"Et qui."}},"example":{"id":"dd11abcb-f3b1-412f-9ede-6f80730d5a28","spanID":"dd11abcb-f3b1-412f-9ede-6f80730d5a28","status":3451733167122626757,"tenant":"Accusantium facilis est et.","traceID":"dd11abcb-f3b1-412f-9ede-6f80730d5a28","value":"Et qui."},"required":["id","value","tenant","status"]},"StreamStreamingBody":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/UUID"},"spanID":{"$ref":"#/components/schemas/UUID"},"traceID":{"$ref":"#/components/schemas/UUID"},"value":{"type":"string","description":"Value of the record","example":"Reprehenderit sunt nam veniam quibusdam."}},"example":{"id":"dd11abcb-f3b1-412f-9ede-6f80730d5a28","spanID":"dd11abcb-f3b1-412f-9ede-6f80730d5a28","traceID":"dd11abcb-f3b1-412f-9ede-6f80730d5a28","value":"Reprehenderit sunt nam veniam quibusdam."},"required":["id","value"]},"UUID":{"type":"string","description":"Valid UUID representation as per RFC 4122","example":"dd11abcb-f3b1-412f-9ede-6f80730d5a28","format":"uuid"}}},"tags":[{"name":"interceptors","description":"The interceptors service demonstrates a comprehensive use of interceptors combining\nauthentication, tenant validation, caching, audit logging, and retry mechanisms. It showcases\nboth client-side and server-side interceptors working together to provide a robust service."}]} \ No newline at end of file diff --git a/interceptors/gen/http/openapi3.2.yaml b/interceptors/gen/http/openapi3.2.yaml index f4750943a..ad25fc227 100644 --- a/interceptors/gen/http/openapi3.2.yaml +++ b/interceptors/gen/http/openapi3.2.yaml @@ -22,9 +22,9 @@ paths: schema: type: string description: Tenant ID for the request - example: 66c20bbb-15ff-4254-b34a-4ecbeff0ce29 + example: dd11abcb-f3b1-412f-9ede-6f80730d5a28 format: uuid - example: 66c20bbb-15ff-4254-b34a-4ecbeff0ce29 + example: dd11abcb-f3b1-412f-9ede-6f80730d5a28 - name: Authorization in: header description: JWT auth token @@ -32,8 +32,8 @@ paths: schema: type: string description: JWT auth token - example: Voluptatum necessitatibus. - example: Consequatur excepturi quam quia laudantium asperiores. + example: Eaque repellendus quo blanditiis rerum harum. + example: Eaque repellendus quo blanditiis rerum harum. requestBody: description: Request body for create. required: true @@ -42,9 +42,9 @@ paths: schema: $ref: '#/components/schemas/CreateRequestBody' example: - spanID: 7e046fe3-fa36-4f0f-b281-f8c9e1fdf010 - traceID: 831384a5-5a7d-43cc-94e4-5ec22455f386 - value: Impedit voluptatem culpa et. + spanID: dd11abcb-f3b1-412f-9ede-6f80730d5a28 + traceID: dd11abcb-f3b1-412f-9ede-6f80730d5a28 + value: Vel dolores. responses: "201": description: Created response. @@ -53,14 +53,14 @@ paths: schema: $ref: '#/components/schemas/CreateResponseBody' example: - duration: 2675830902084894015 - id: 612f2f00-a808-44b9-a52d-a7f34bf838a4 - processedAt: Id quaerat dolores ab quo soluta modi. - retryCount: 193182529652580268 - retryDuration: 5809970416232694733 - status: 2668736938289029744 - tenant: Sed omnis aut recusandae fuga minima. - value: Fuga quia. + duration: 3718795145732531204 + id: dd11abcb-f3b1-412f-9ede-6f80730d5a28 + processedAt: Dolor sit. + retryCount: 5419496228293178792 + retryDuration: 9203795670612989877 + status: 4185462404774819293 + tenant: Dolores sunt non. + value: Minima eos voluptate esse dolores assumenda. /records/{tenantID}/{recordID}: get: tags: @@ -76,9 +76,9 @@ paths: schema: type: string description: Tenant ID for the request - example: 66c20bbb-15ff-4254-b34a-4ecbeff0ce29 + example: dd11abcb-f3b1-412f-9ede-6f80730d5a28 format: uuid - example: 66c20bbb-15ff-4254-b34a-4ecbeff0ce29 + example: dd11abcb-f3b1-412f-9ede-6f80730d5a28 - name: recordID in: path description: ID of the record to retrieve @@ -86,9 +86,9 @@ paths: schema: type: string description: ID of the record to retrieve - example: 66c20bbb-15ff-4254-b34a-4ecbeff0ce29 + example: dd11abcb-f3b1-412f-9ede-6f80730d5a28 format: uuid - example: 66c20bbb-15ff-4254-b34a-4ecbeff0ce29 + example: dd11abcb-f3b1-412f-9ede-6f80730d5a28 - name: Authorization in: header description: JWT auth token @@ -96,8 +96,8 @@ paths: schema: type: string description: JWT auth token - example: Beatae eum. - example: Voluptate perferendis dicta commodi. + example: Molestiae ab ipsa fuga. + example: Molestiae ab ipsa fuga. requestBody: description: Request body for get. required: true @@ -106,8 +106,8 @@ paths: schema: $ref: '#/components/schemas/GetRequestBody' example: - spanID: c2bc78f1-a675-44df-b132-1d285e204cf2 - traceID: 8909bcf0-fa7e-4ed1-bc3e-1ed689cc9896 + spanID: dd11abcb-f3b1-412f-9ede-6f80730d5a28 + traceID: dd11abcb-f3b1-412f-9ede-6f80730d5a28 responses: "200": description: OK response. @@ -116,27 +116,41 @@ paths: schema: $ref: '#/components/schemas/GetResponseBody' example: - cachedAt: Aut vero voluptates. - duration: 966071656546526256 - id: f9922b04-e873-4efc-9b16-fdcb9d29ef0a - processedAt: Asperiores voluptatem quisquam id necessitatibus. - retryCount: 1538090001739738220 - retryDuration: 3066832311296962951 - status: 6370274974021655670 - tenant: Ad consequatur dolor alias. - value: Impedit officiis. + cachedAt: Omnis impedit sed. + duration: 178461644483448189 + id: dd11abcb-f3b1-412f-9ede-6f80730d5a28 + processedAt: Eius mollitia illo quia consequatur voluptatem. + retryCount: 5007217583026942089 + retryDuration: 587659532169267737 + status: 3494638038445428863 + tenant: Numquam est voluptates dolor. + value: Quis nesciunt maiores quia ab. "404": description: 'NotFound: Record not found' content: application/vnd.goa.error: schema: $ref: '#/components/schemas/Error' + example: + fault: false + id: 123abc + message: parameter 'p' must be an integer + name: NotFound + temporary: false + timeout: false "503": description: 'Unavailable: Temporary error' content: application/vnd.goa.error: schema: $ref: '#/components/schemas/Error' + example: + fault: false + id: 123abc + message: parameter 'p' must be an integer + name: Unavailable + temporary: true + timeout: false /records/{tenantID}/stream: get: tags: @@ -152,9 +166,9 @@ paths: schema: type: string description: Tenant ID for the request - example: 66c20bbb-15ff-4254-b34a-4ecbeff0ce29 + example: dd11abcb-f3b1-412f-9ede-6f80730d5a28 format: uuid - example: 66c20bbb-15ff-4254-b34a-4ecbeff0ce29 + example: dd11abcb-f3b1-412f-9ede-6f80730d5a28 - name: Authorization in: header description: JWT auth token @@ -162,8 +176,8 @@ paths: schema: type: string description: JWT auth token - example: Aliquid et dignissimos delectus facere nesciunt. - example: Aut expedita eum id. + example: Dolore repellendus sint soluta tenetur omnis. + example: Dolore repellendus sint soluta tenetur omnis. responses: "101": description: Switching Protocols response. @@ -172,12 +186,12 @@ paths: schema: $ref: '#/components/schemas/StreamResponseBody' example: - id: 1bbd1751-b7df-4308-a1c7-0a55a307585d - spanID: baffd1d3-7d92-456b-a4f1-37f462d4c356 - status: 3407397389909827570 - tenant: Repellendus eveniet sit. - traceID: 871ffc91-4efb-4fdb-a84b-8561f8f11b47 - value: Eos nihil. + id: dd11abcb-f3b1-412f-9ede-6f80730d5a28 + spanID: dd11abcb-f3b1-412f-9ede-6f80730d5a28 + status: 3451733167122626757 + tenant: Accusantium facilis est et. + traceID: dd11abcb-f3b1-412f-9ede-6f80730d5a28 + value: Et qui. components: schemas: CreateRequestBody: @@ -190,12 +204,12 @@ components: value: type: string description: Value to store in record - example: Impedit voluptatem culpa et. + example: Vel dolores. description: Request body for create. example: - spanID: c89c4a4e-7182-4507-864e-8c8476e91061 - traceID: c89c4a4e-7182-4507-864e-8c8476e91061 - value: Impedit voluptatem culpa et. + spanID: dd11abcb-f3b1-412f-9ede-6f80730d5a28 + traceID: dd11abcb-f3b1-412f-9ede-6f80730d5a28 + value: Vel dolores. required: - value CreateResponseBody: @@ -204,46 +218,46 @@ components: duration: type: integer description: Processing duration in ms - example: 2675830902084894015 + example: 3718795145732531204 format: int64 id: $ref: '#/components/schemas/UUID' processedAt: type: string description: Timestamp when processed - example: Id quaerat dolores ab quo soluta modi. + example: Dolor sit. retryCount: type: integer description: Number of retry attempts made - example: 193182529652580268 + example: 5419496228293178792 format: int64 retryDuration: type: integer description: Total time spent retrying - example: 5809970416232694733 + example: 9203795670612989877 format: int64 status: type: integer description: Response status code - example: 2668736938289029744 + example: 4185462404774819293 format: int64 tenant: type: string description: Tenant the record belongs to - example: Sed omnis aut recusandae fuga minima. + example: Dolores sunt non. value: type: string description: Value of the record - example: Fuga quia. + example: Minima eos voluptate esse dolores assumenda. example: - duration: 2675830902084894015 - id: 7673f207-d6bd-473a-8f84-1c0b64fcfc54 - processedAt: Id quaerat dolores ab quo soluta modi. - retryCount: 193182529652580268 - retryDuration: 5809970416232694733 - status: 2668736938289029744 - tenant: Sed omnis aut recusandae fuga minima. - value: Fuga quia. + duration: 3718795145732531204 + id: dd11abcb-f3b1-412f-9ede-6f80730d5a28 + processedAt: Dolor sit. + retryCount: 5419496228293178792 + retryDuration: 9203795670612989877 + status: 4185462404774819293 + tenant: Dolores sunt non. + value: Minima eos voluptate esse dolores assumenda. required: - id - value @@ -273,18 +287,18 @@ components: temporary: type: boolean description: Is the error temporary? - example: false + example: true timeout: type: boolean description: Is the error a timeout? example: true - description: Record not found + description: Error response result type example: fault: false id: 123abc message: parameter 'p' must be an integer name: bad_request - temporary: false + temporary: true timeout: true required: - name @@ -302,59 +316,59 @@ components: $ref: '#/components/schemas/UUID' description: Request body for get. example: - spanID: c89c4a4e-7182-4507-864e-8c8476e91061 - traceID: c89c4a4e-7182-4507-864e-8c8476e91061 + spanID: dd11abcb-f3b1-412f-9ede-6f80730d5a28 + traceID: dd11abcb-f3b1-412f-9ede-6f80730d5a28 GetResponseBody: type: object properties: cachedAt: type: string description: Time at which the record was cached, written by the Cache interceptor - example: Aut vero voluptates. + example: Omnis impedit sed. duration: type: integer description: Processing duration in ms, written by the RequestAudit interceptor - example: 966071656546526256 + example: 178461644483448189 format: int64 id: $ref: '#/components/schemas/UUID' processedAt: type: string description: Timestamp when processed, written by the RequestAudit interceptor - example: Asperiores voluptatem quisquam id necessitatibus. + example: Eius mollitia illo quia consequatur voluptatem. retryCount: type: integer description: Number of retry attempts made, written client-side by the Retry interceptor - example: 1538090001739738220 + example: 5007217583026942089 format: int64 retryDuration: type: integer description: Total time spent retrying, written client-side by the Retry interceptor - example: 3066832311296962951 + example: 587659532169267737 format: int64 status: type: integer description: Response status code - example: 6370274974021655670 + example: 3494638038445428863 format: int64 tenant: type: string description: Tenant the record belongs to - example: Ad consequatur dolor alias. + example: Numquam est voluptates dolor. value: type: string description: Value of the record - example: Impedit officiis. + example: Quis nesciunt maiores quia ab. example: - cachedAt: Aut vero voluptates. - duration: 966071656546526256 - id: 7673f207-d6bd-473a-8f84-1c0b64fcfc54 - processedAt: Asperiores voluptatem quisquam id necessitatibus. - retryCount: 1538090001739738220 - retryDuration: 3066832311296962951 - status: 6370274974021655670 - tenant: Ad consequatur dolor alias. - value: Impedit officiis. + cachedAt: Omnis impedit sed. + duration: 178461644483448189 + id: dd11abcb-f3b1-412f-9ede-6f80730d5a28 + processedAt: Eius mollitia illo quia consequatur voluptatem. + retryCount: 5007217583026942089 + retryDuration: 587659532169267737 + status: 3494638038445428863 + tenant: Numquam est voluptates dolor. + value: Quis nesciunt maiores quia ab. required: - id - value @@ -372,25 +386,25 @@ components: status: type: integer description: Response status code - example: 3407397389909827570 + example: 3451733167122626757 format: int64 tenant: type: string description: Tenant the record belongs to - example: Repellendus eveniet sit. + example: Accusantium facilis est et. traceID: $ref: '#/components/schemas/UUID' value: type: string description: Value of the record - example: Eos nihil. + example: Et qui. example: - id: 7673f207-d6bd-473a-8f84-1c0b64fcfc54 - spanID: 7673f207-d6bd-473a-8f84-1c0b64fcfc54 - status: 3407397389909827570 - tenant: Repellendus eveniet sit. - traceID: 7673f207-d6bd-473a-8f84-1c0b64fcfc54 - value: Eos nihil. + id: dd11abcb-f3b1-412f-9ede-6f80730d5a28 + spanID: dd11abcb-f3b1-412f-9ede-6f80730d5a28 + status: 3451733167122626757 + tenant: Accusantium facilis est et. + traceID: dd11abcb-f3b1-412f-9ede-6f80730d5a28 + value: Et qui. required: - id - value @@ -408,19 +422,19 @@ components: value: type: string description: Value of the record - example: Enim qui sint. + example: Reprehenderit sunt nam veniam quibusdam. example: - id: 4ebe4239-1377-48a0-a82d-aeb7fb4a79aa - spanID: 4ebe4239-1377-48a0-a82d-aeb7fb4a79aa - traceID: 4ebe4239-1377-48a0-a82d-aeb7fb4a79aa - value: Enim qui sint. + id: dd11abcb-f3b1-412f-9ede-6f80730d5a28 + spanID: dd11abcb-f3b1-412f-9ede-6f80730d5a28 + traceID: dd11abcb-f3b1-412f-9ede-6f80730d5a28 + value: Reprehenderit sunt nam veniam quibusdam. required: - id - value UUID: type: string description: Valid UUID representation as per RFC 4122 - example: c89c4a4e-7182-4507-864e-8c8476e91061 + example: dd11abcb-f3b1-412f-9ede-6f80730d5a28 format: uuid tags: - name: interceptors diff --git a/interceptors/gen/http/openapi3.json b/interceptors/gen/http/openapi3.json index d76a33395..1016ba127 100644 --- a/interceptors/gen/http/openapi3.json +++ b/interceptors/gen/http/openapi3.json @@ -1 +1 @@ -{"openapi":"3.0.3","info":{"title":"Goa API","version":"0.0.1"},"servers":[{"url":"http://localhost:80","description":"Default server for interceptors"}],"paths":{"/records/{tenantID}":{"post":{"tags":["interceptors"],"summary":"create interceptors","description":"Create a new record with all interceptors in action","operationId":"interceptors#create","parameters":[{"name":"tenantID","in":"path","description":"Tenant ID for the request","required":true,"schema":{"type":"string","description":"Tenant ID for the request","example":"66c20bbb-15ff-4254-b34a-4ecbeff0ce29","format":"uuid"},"example":"66c20bbb-15ff-4254-b34a-4ecbeff0ce29"},{"name":"Authorization","in":"header","description":"JWT auth token","required":true,"schema":{"type":"string","description":"JWT auth token","example":"Voluptatum necessitatibus."},"example":"Consequatur excepturi quam quia laudantium asperiores."}],"requestBody":{"description":"Request body for create.","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateRequestBody"},"example":{"spanID":"7e046fe3-fa36-4f0f-b281-f8c9e1fdf010","traceID":"831384a5-5a7d-43cc-94e4-5ec22455f386","value":"Impedit voluptatem culpa et."}}}},"responses":{"201":{"description":"Created response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateResponseBody"},"example":{"duration":2675830902084894015,"id":"612f2f00-a808-44b9-a52d-a7f34bf838a4","processedAt":"Id quaerat dolores ab quo soluta modi.","retryCount":193182529652580268,"retryDuration":5809970416232694733,"status":2668736938289029744,"tenant":"Sed omnis aut recusandae fuga minima.","value":"Fuga quia."}}}}}}},"/records/{tenantID}/stream":{"get":{"tags":["interceptors"],"summary":"stream interceptors","description":"Stream records","operationId":"interceptors#stream","parameters":[{"name":"tenantID","in":"path","description":"Tenant ID for the request","required":true,"schema":{"type":"string","description":"Tenant ID for the request","example":"66c20bbb-15ff-4254-b34a-4ecbeff0ce29","format":"uuid"},"example":"66c20bbb-15ff-4254-b34a-4ecbeff0ce29"},{"name":"Authorization","in":"header","description":"JWT auth token","required":true,"schema":{"type":"string","description":"JWT auth token","example":"Aliquid et dignissimos delectus facere nesciunt."},"example":"Aut expedita eum id."}],"responses":{"101":{"description":"Switching Protocols response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StreamResponseBody"},"example":{"id":"1bbd1751-b7df-4308-a1c7-0a55a307585d","spanID":"baffd1d3-7d92-456b-a4f1-37f462d4c356","status":3407397389909827570,"tenant":"Repellendus eveniet sit.","traceID":"871ffc91-4efb-4fdb-a84b-8561f8f11b47","value":"Eos nihil."}}}}}}},"/records/{tenantID}/{recordID}":{"get":{"tags":["interceptors"],"summary":"get interceptors","description":"Get retrieves a record by ID with all interceptors in action","operationId":"interceptors#get","parameters":[{"name":"tenantID","in":"path","description":"Tenant ID for the request","required":true,"schema":{"type":"string","description":"Tenant ID for the request","example":"66c20bbb-15ff-4254-b34a-4ecbeff0ce29","format":"uuid"},"example":"66c20bbb-15ff-4254-b34a-4ecbeff0ce29"},{"name":"recordID","in":"path","description":"ID of the record to retrieve","required":true,"schema":{"type":"string","description":"ID of the record to retrieve","example":"66c20bbb-15ff-4254-b34a-4ecbeff0ce29","format":"uuid"},"example":"66c20bbb-15ff-4254-b34a-4ecbeff0ce29"},{"name":"Authorization","in":"header","description":"JWT auth token","required":true,"schema":{"type":"string","description":"JWT auth token","example":"Beatae eum."},"example":"Voluptate perferendis dicta commodi."}],"requestBody":{"description":"Request body for get.","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetRequestBody"},"example":{"spanID":"c2bc78f1-a675-44df-b132-1d285e204cf2","traceID":"8909bcf0-fa7e-4ed1-bc3e-1ed689cc9896"}}}},"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetResponseBody"},"example":{"cachedAt":"Aut vero voluptates.","duration":966071656546526256,"id":"f9922b04-e873-4efc-9b16-fdcb9d29ef0a","processedAt":"Asperiores voluptatem quisquam id necessitatibus.","retryCount":1538090001739738220,"retryDuration":3066832311296962951,"status":6370274974021655670,"tenant":"Ad consequatur dolor alias.","value":"Impedit officiis."}}}},"404":{"description":"NotFound: Record not found","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Unavailable: Temporary error","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"schemas":{"CreateRequestBody":{"type":"object","properties":{"spanID":{"type":"string","description":"Unique span ID for request, initialized by the TraceRequest interceptor","example":"c89c4a4e-7182-4507-864e-8c8476e91061","format":"uuid"},"traceID":{"type":"string","description":"Unique trace ID for request, initialized by the TraceRequest interceptor","example":"c89c4a4e-7182-4507-864e-8c8476e91061","format":"uuid"},"value":{"type":"string","description":"Value to store in record","example":"Impedit voluptatem culpa et."}},"description":"Request body for create.","example":{"spanID":"c89c4a4e-7182-4507-864e-8c8476e91061","traceID":"c89c4a4e-7182-4507-864e-8c8476e91061","value":"Impedit voluptatem culpa et."},"required":["value"]},"CreateResponseBody":{"type":"object","properties":{"duration":{"type":"integer","description":"Processing duration in ms","example":2675830902084894015,"format":"int64"},"id":{"type":"string","description":"ID of the created record","example":"7673f207-d6bd-473a-8f84-1c0b64fcfc54","format":"uuid"},"processedAt":{"type":"string","description":"Timestamp when processed","example":"Id quaerat dolores ab quo soluta modi."},"retryCount":{"type":"integer","description":"Number of retry attempts made","example":193182529652580268,"format":"int64"},"retryDuration":{"type":"integer","description":"Total time spent retrying","example":5809970416232694733,"format":"int64"},"status":{"type":"integer","description":"Response status code","example":2668736938289029744,"format":"int64"},"tenant":{"type":"string","description":"Tenant the record belongs to","example":"Sed omnis aut recusandae fuga minima."},"value":{"type":"string","description":"Value of the record","example":"Fuga quia."}},"example":{"duration":2675830902084894015,"id":"7673f207-d6bd-473a-8f84-1c0b64fcfc54","processedAt":"Id quaerat dolores ab quo soluta modi.","retryCount":193182529652580268,"retryDuration":5809970416232694733,"status":2668736938289029744,"tenant":"Sed omnis aut recusandae fuga minima.","value":"Fuga quia."},"required":["id","value","tenant","status","processedAt","duration"]},"Error":{"type":"object","properties":{"fault":{"type":"boolean","description":"Is the error a server-side fault?","example":false},"id":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"message":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"name":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"temporary":{"type":"boolean","description":"Is the error temporary?","example":false},"timeout":{"type":"boolean","description":"Is the error a timeout?","example":true}},"description":"Record not found","example":{"fault":false,"id":"123abc","message":"parameter 'p' must be an integer","name":"bad_request","temporary":false,"timeout":true},"required":["name","id","message","temporary","timeout","fault"]},"GetRequestBody":{"type":"object","properties":{"spanID":{"type":"string","description":"Unique span ID for request, initialized by the TraceRequest interceptor","example":"c89c4a4e-7182-4507-864e-8c8476e91061","format":"uuid"},"traceID":{"type":"string","description":"Unique trace ID for request, initialized by the TraceRequest interceptor","example":"c89c4a4e-7182-4507-864e-8c8476e91061","format":"uuid"}},"description":"Request body for get.","example":{"spanID":"c89c4a4e-7182-4507-864e-8c8476e91061","traceID":"c89c4a4e-7182-4507-864e-8c8476e91061"}},"GetResponseBody":{"type":"object","properties":{"cachedAt":{"type":"string","description":"Time at which the record was cached, written by the Cache interceptor","example":"Aut vero voluptates."},"duration":{"type":"integer","description":"Processing duration in ms, written by the RequestAudit interceptor","example":966071656546526256,"format":"int64"},"id":{"type":"string","description":"ID of the record","example":"7673f207-d6bd-473a-8f84-1c0b64fcfc54","format":"uuid"},"processedAt":{"type":"string","description":"Timestamp when processed, written by the RequestAudit interceptor","example":"Asperiores voluptatem quisquam id necessitatibus."},"retryCount":{"type":"integer","description":"Number of retry attempts made, written client-side by the Retry interceptor","example":1538090001739738220,"format":"int64"},"retryDuration":{"type":"integer","description":"Total time spent retrying, written client-side by the Retry interceptor","example":3066832311296962951,"format":"int64"},"status":{"type":"integer","description":"Response status code","example":6370274974021655670,"format":"int64"},"tenant":{"type":"string","description":"Tenant the record belongs to","example":"Ad consequatur dolor alias."},"value":{"type":"string","description":"Value of the record","example":"Impedit officiis."}},"example":{"cachedAt":"Aut vero voluptates.","duration":966071656546526256,"id":"7673f207-d6bd-473a-8f84-1c0b64fcfc54","processedAt":"Asperiores voluptatem quisquam id necessitatibus.","retryCount":1538090001739738220,"retryDuration":3066832311296962951,"status":6370274974021655670,"tenant":"Ad consequatur dolor alias.","value":"Impedit officiis."},"required":["id","value","tenant","status","processedAt","duration"]},"StreamResponseBody":{"type":"object","properties":{"id":{"type":"string","description":"ID of the created record","example":"7673f207-d6bd-473a-8f84-1c0b64fcfc54","format":"uuid"},"spanID":{"type":"string","description":"Unique span ID for request, initialized by the TraceRequest interceptor","example":"7673f207-d6bd-473a-8f84-1c0b64fcfc54","format":"uuid"},"status":{"type":"integer","description":"Response status code","example":3407397389909827570,"format":"int64"},"tenant":{"type":"string","description":"Tenant the record belongs to","example":"Repellendus eveniet sit."},"traceID":{"type":"string","description":"Unique trace ID for request, initialized by the TraceRequest interceptor","example":"7673f207-d6bd-473a-8f84-1c0b64fcfc54","format":"uuid"},"value":{"type":"string","description":"Value of the record","example":"Eos nihil."}},"example":{"id":"7673f207-d6bd-473a-8f84-1c0b64fcfc54","spanID":"7673f207-d6bd-473a-8f84-1c0b64fcfc54","status":3407397389909827570,"tenant":"Repellendus eveniet sit.","traceID":"7673f207-d6bd-473a-8f84-1c0b64fcfc54","value":"Eos nihil."},"required":["id","value","tenant","status"]},"StreamStreamingBody":{"type":"object","properties":{"id":{"type":"string","description":"ID of the created record","example":"4ebe4239-1377-48a0-a82d-aeb7fb4a79aa","format":"uuid"},"spanID":{"type":"string","description":"Unique span ID for request, initialized by the TraceRequest interceptor","example":"4ebe4239-1377-48a0-a82d-aeb7fb4a79aa","format":"uuid"},"traceID":{"type":"string","description":"Unique trace ID for request, initialized by the TraceRequest interceptor","example":"4ebe4239-1377-48a0-a82d-aeb7fb4a79aa","format":"uuid"},"value":{"type":"string","description":"Value of the record","example":"Enim qui sint."}},"example":{"id":"4ebe4239-1377-48a0-a82d-aeb7fb4a79aa","spanID":"4ebe4239-1377-48a0-a82d-aeb7fb4a79aa","traceID":"4ebe4239-1377-48a0-a82d-aeb7fb4a79aa","value":"Enim qui sint."},"required":["id","value"]}}},"tags":[{"name":"interceptors","description":"The interceptors service demonstrates a comprehensive use of interceptors combining\nauthentication, tenant validation, caching, audit logging, and retry mechanisms. It showcases\nboth client-side and server-side interceptors working together to provide a robust service."}]} \ No newline at end of file +{"openapi":"3.0.3","info":{"title":"Goa API","version":"0.0.1"},"servers":[{"url":"http://localhost:80","description":"Default server for interceptors"}],"paths":{"/records/{tenantID}":{"post":{"tags":["interceptors"],"summary":"create interceptors","description":"Create a new record with all interceptors in action","operationId":"interceptors#create","parameters":[{"name":"tenantID","in":"path","description":"Tenant ID for the request","required":true,"schema":{"type":"string","description":"Tenant ID for the request","example":"dd11abcb-f3b1-412f-9ede-6f80730d5a28","format":"uuid"},"example":"dd11abcb-f3b1-412f-9ede-6f80730d5a28"},{"name":"Authorization","in":"header","description":"JWT auth token","required":true,"schema":{"type":"string","description":"JWT auth token","example":"Eaque repellendus quo blanditiis rerum harum."},"example":"Eaque repellendus quo blanditiis rerum harum."}],"requestBody":{"description":"Request body for create.","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateRequestBody"},"example":{"spanID":"dd11abcb-f3b1-412f-9ede-6f80730d5a28","traceID":"dd11abcb-f3b1-412f-9ede-6f80730d5a28","value":"Vel dolores."}}}},"responses":{"201":{"description":"Created response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateResponseBody"},"example":{"duration":3718795145732531204,"id":"dd11abcb-f3b1-412f-9ede-6f80730d5a28","processedAt":"Dolor sit.","retryCount":5419496228293178792,"retryDuration":9203795670612989877,"status":4185462404774819293,"tenant":"Dolores sunt non.","value":"Minima eos voluptate esse dolores assumenda."}}}}}}},"/records/{tenantID}/stream":{"get":{"tags":["interceptors"],"summary":"stream interceptors","description":"Stream records","operationId":"interceptors#stream","parameters":[{"name":"tenantID","in":"path","description":"Tenant ID for the request","required":true,"schema":{"type":"string","description":"Tenant ID for the request","example":"dd11abcb-f3b1-412f-9ede-6f80730d5a28","format":"uuid"},"example":"dd11abcb-f3b1-412f-9ede-6f80730d5a28"},{"name":"Authorization","in":"header","description":"JWT auth token","required":true,"schema":{"type":"string","description":"JWT auth token","example":"Dolore repellendus sint soluta tenetur omnis."},"example":"Dolore repellendus sint soluta tenetur omnis."}],"responses":{"101":{"description":"Switching Protocols response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StreamResponseBody"},"example":{"id":"dd11abcb-f3b1-412f-9ede-6f80730d5a28","spanID":"dd11abcb-f3b1-412f-9ede-6f80730d5a28","status":3451733167122626757,"tenant":"Accusantium facilis est et.","traceID":"dd11abcb-f3b1-412f-9ede-6f80730d5a28","value":"Et qui."}}}}}}},"/records/{tenantID}/{recordID}":{"get":{"tags":["interceptors"],"summary":"get interceptors","description":"Get retrieves a record by ID with all interceptors in action","operationId":"interceptors#get","parameters":[{"name":"tenantID","in":"path","description":"Tenant ID for the request","required":true,"schema":{"type":"string","description":"Tenant ID for the request","example":"dd11abcb-f3b1-412f-9ede-6f80730d5a28","format":"uuid"},"example":"dd11abcb-f3b1-412f-9ede-6f80730d5a28"},{"name":"recordID","in":"path","description":"ID of the record to retrieve","required":true,"schema":{"type":"string","description":"ID of the record to retrieve","example":"dd11abcb-f3b1-412f-9ede-6f80730d5a28","format":"uuid"},"example":"dd11abcb-f3b1-412f-9ede-6f80730d5a28"},{"name":"Authorization","in":"header","description":"JWT auth token","required":true,"schema":{"type":"string","description":"JWT auth token","example":"Molestiae ab ipsa fuga."},"example":"Molestiae ab ipsa fuga."}],"requestBody":{"description":"Request body for get.","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetRequestBody"},"example":{"spanID":"dd11abcb-f3b1-412f-9ede-6f80730d5a28","traceID":"dd11abcb-f3b1-412f-9ede-6f80730d5a28"}}}},"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetResponseBody"},"example":{"cachedAt":"Omnis impedit sed.","duration":178461644483448189,"id":"dd11abcb-f3b1-412f-9ede-6f80730d5a28","processedAt":"Eius mollitia illo quia consequatur voluptatem.","retryCount":5007217583026942089,"retryDuration":587659532169267737,"status":3494638038445428863,"tenant":"Numquam est voluptates dolor.","value":"Quis nesciunt maiores quia ab."}}}},"404":{"description":"NotFound: Record not found","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"fault":false,"id":"123abc","message":"parameter 'p' must be an integer","name":"NotFound","temporary":false,"timeout":false}}}},"503":{"description":"Unavailable: Temporary error","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"fault":false,"id":"123abc","message":"parameter 'p' must be an integer","name":"Unavailable","temporary":true,"timeout":false}}}}}}}},"components":{"schemas":{"CreateRequestBody":{"type":"object","properties":{"spanID":{"type":"string","description":"Unique span ID for request, initialized by the TraceRequest interceptor","example":"dd11abcb-f3b1-412f-9ede-6f80730d5a28","format":"uuid"},"traceID":{"type":"string","description":"Unique trace ID for request, initialized by the TraceRequest interceptor","example":"dd11abcb-f3b1-412f-9ede-6f80730d5a28","format":"uuid"},"value":{"type":"string","description":"Value to store in record","example":"Vel dolores."}},"description":"Request body for create.","example":{"spanID":"dd11abcb-f3b1-412f-9ede-6f80730d5a28","traceID":"dd11abcb-f3b1-412f-9ede-6f80730d5a28","value":"Vel dolores."},"required":["value"]},"CreateResponseBody":{"type":"object","properties":{"duration":{"type":"integer","description":"Processing duration in ms","example":3718795145732531204,"format":"int64"},"id":{"type":"string","description":"ID of the created record","example":"dd11abcb-f3b1-412f-9ede-6f80730d5a28","format":"uuid"},"processedAt":{"type":"string","description":"Timestamp when processed","example":"Dolor sit."},"retryCount":{"type":"integer","description":"Number of retry attempts made","example":5419496228293178792,"format":"int64"},"retryDuration":{"type":"integer","description":"Total time spent retrying","example":9203795670612989877,"format":"int64"},"status":{"type":"integer","description":"Response status code","example":4185462404774819293,"format":"int64"},"tenant":{"type":"string","description":"Tenant the record belongs to","example":"Dolores sunt non."},"value":{"type":"string","description":"Value of the record","example":"Minima eos voluptate esse dolores assumenda."}},"example":{"duration":3718795145732531204,"id":"dd11abcb-f3b1-412f-9ede-6f80730d5a28","processedAt":"Dolor sit.","retryCount":5419496228293178792,"retryDuration":9203795670612989877,"status":4185462404774819293,"tenant":"Dolores sunt non.","value":"Minima eos voluptate esse dolores assumenda."},"required":["id","value","tenant","status","processedAt","duration"]},"Error":{"type":"object","properties":{"fault":{"type":"boolean","description":"Is the error a server-side fault?","example":false},"id":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"message":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"name":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"temporary":{"type":"boolean","description":"Is the error temporary?","example":true},"timeout":{"type":"boolean","description":"Is the error a timeout?","example":true}},"description":"Error response result type","example":{"fault":false,"id":"123abc","message":"parameter 'p' must be an integer","name":"bad_request","temporary":true,"timeout":true},"required":["name","id","message","temporary","timeout","fault"]},"GetRequestBody":{"type":"object","properties":{"spanID":{"type":"string","description":"Unique span ID for request, initialized by the TraceRequest interceptor","example":"dd11abcb-f3b1-412f-9ede-6f80730d5a28","format":"uuid"},"traceID":{"type":"string","description":"Unique trace ID for request, initialized by the TraceRequest interceptor","example":"dd11abcb-f3b1-412f-9ede-6f80730d5a28","format":"uuid"}},"description":"Request body for get.","example":{"spanID":"dd11abcb-f3b1-412f-9ede-6f80730d5a28","traceID":"dd11abcb-f3b1-412f-9ede-6f80730d5a28"}},"GetResponseBody":{"type":"object","properties":{"cachedAt":{"type":"string","description":"Time at which the record was cached, written by the Cache interceptor","example":"Omnis impedit sed."},"duration":{"type":"integer","description":"Processing duration in ms, written by the RequestAudit interceptor","example":178461644483448189,"format":"int64"},"id":{"type":"string","description":"ID of the record","example":"dd11abcb-f3b1-412f-9ede-6f80730d5a28","format":"uuid"},"processedAt":{"type":"string","description":"Timestamp when processed, written by the RequestAudit interceptor","example":"Eius mollitia illo quia consequatur voluptatem."},"retryCount":{"type":"integer","description":"Number of retry attempts made, written client-side by the Retry interceptor","example":5007217583026942089,"format":"int64"},"retryDuration":{"type":"integer","description":"Total time spent retrying, written client-side by the Retry interceptor","example":587659532169267737,"format":"int64"},"status":{"type":"integer","description":"Response status code","example":3494638038445428863,"format":"int64"},"tenant":{"type":"string","description":"Tenant the record belongs to","example":"Numquam est voluptates dolor."},"value":{"type":"string","description":"Value of the record","example":"Quis nesciunt maiores quia ab."}},"example":{"cachedAt":"Omnis impedit sed.","duration":178461644483448189,"id":"dd11abcb-f3b1-412f-9ede-6f80730d5a28","processedAt":"Eius mollitia illo quia consequatur voluptatem.","retryCount":5007217583026942089,"retryDuration":587659532169267737,"status":3494638038445428863,"tenant":"Numquam est voluptates dolor.","value":"Quis nesciunt maiores quia ab."},"required":["id","value","tenant","status","processedAt","duration"]},"StreamResponseBody":{"type":"object","properties":{"id":{"type":"string","description":"ID of the created record","example":"dd11abcb-f3b1-412f-9ede-6f80730d5a28","format":"uuid"},"spanID":{"type":"string","description":"Unique span ID for request, initialized by the TraceRequest interceptor","example":"dd11abcb-f3b1-412f-9ede-6f80730d5a28","format":"uuid"},"status":{"type":"integer","description":"Response status code","example":3451733167122626757,"format":"int64"},"tenant":{"type":"string","description":"Tenant the record belongs to","example":"Accusantium facilis est et."},"traceID":{"type":"string","description":"Unique trace ID for request, initialized by the TraceRequest interceptor","example":"dd11abcb-f3b1-412f-9ede-6f80730d5a28","format":"uuid"},"value":{"type":"string","description":"Value of the record","example":"Et qui."}},"example":{"id":"dd11abcb-f3b1-412f-9ede-6f80730d5a28","spanID":"dd11abcb-f3b1-412f-9ede-6f80730d5a28","status":3451733167122626757,"tenant":"Accusantium facilis est et.","traceID":"dd11abcb-f3b1-412f-9ede-6f80730d5a28","value":"Et qui."},"required":["id","value","tenant","status"]},"StreamStreamingBody":{"type":"object","properties":{"id":{"type":"string","description":"ID of the created record","example":"dd11abcb-f3b1-412f-9ede-6f80730d5a28","format":"uuid"},"spanID":{"type":"string","description":"Unique span ID for request, initialized by the TraceRequest interceptor","example":"dd11abcb-f3b1-412f-9ede-6f80730d5a28","format":"uuid"},"traceID":{"type":"string","description":"Unique trace ID for request, initialized by the TraceRequest interceptor","example":"dd11abcb-f3b1-412f-9ede-6f80730d5a28","format":"uuid"},"value":{"type":"string","description":"Value of the record","example":"Reprehenderit sunt nam veniam quibusdam."}},"example":{"id":"dd11abcb-f3b1-412f-9ede-6f80730d5a28","spanID":"dd11abcb-f3b1-412f-9ede-6f80730d5a28","traceID":"dd11abcb-f3b1-412f-9ede-6f80730d5a28","value":"Reprehenderit sunt nam veniam quibusdam."},"required":["id","value"]}}},"tags":[{"name":"interceptors","description":"The interceptors service demonstrates a comprehensive use of interceptors combining\nauthentication, tenant validation, caching, audit logging, and retry mechanisms. It showcases\nboth client-side and server-side interceptors working together to provide a robust service."}]} \ No newline at end of file diff --git a/interceptors/gen/http/openapi3.yaml b/interceptors/gen/http/openapi3.yaml index 7943fabdd..82740f131 100644 --- a/interceptors/gen/http/openapi3.yaml +++ b/interceptors/gen/http/openapi3.yaml @@ -21,9 +21,9 @@ paths: schema: type: string description: Tenant ID for the request - example: 66c20bbb-15ff-4254-b34a-4ecbeff0ce29 + example: dd11abcb-f3b1-412f-9ede-6f80730d5a28 format: uuid - example: 66c20bbb-15ff-4254-b34a-4ecbeff0ce29 + example: dd11abcb-f3b1-412f-9ede-6f80730d5a28 - name: Authorization in: header description: JWT auth token @@ -31,8 +31,8 @@ paths: schema: type: string description: JWT auth token - example: Voluptatum necessitatibus. - example: Consequatur excepturi quam quia laudantium asperiores. + example: Eaque repellendus quo blanditiis rerum harum. + example: Eaque repellendus quo blanditiis rerum harum. requestBody: description: Request body for create. required: true @@ -41,9 +41,9 @@ paths: schema: $ref: '#/components/schemas/CreateRequestBody' example: - spanID: 7e046fe3-fa36-4f0f-b281-f8c9e1fdf010 - traceID: 831384a5-5a7d-43cc-94e4-5ec22455f386 - value: Impedit voluptatem culpa et. + spanID: dd11abcb-f3b1-412f-9ede-6f80730d5a28 + traceID: dd11abcb-f3b1-412f-9ede-6f80730d5a28 + value: Vel dolores. responses: "201": description: Created response. @@ -52,14 +52,14 @@ paths: schema: $ref: '#/components/schemas/CreateResponseBody' example: - duration: 2675830902084894015 - id: 612f2f00-a808-44b9-a52d-a7f34bf838a4 - processedAt: Id quaerat dolores ab quo soluta modi. - retryCount: 193182529652580268 - retryDuration: 5809970416232694733 - status: 2668736938289029744 - tenant: Sed omnis aut recusandae fuga minima. - value: Fuga quia. + duration: 3718795145732531204 + id: dd11abcb-f3b1-412f-9ede-6f80730d5a28 + processedAt: Dolor sit. + retryCount: 5419496228293178792 + retryDuration: 9203795670612989877 + status: 4185462404774819293 + tenant: Dolores sunt non. + value: Minima eos voluptate esse dolores assumenda. /records/{tenantID}/{recordID}: get: tags: @@ -75,9 +75,9 @@ paths: schema: type: string description: Tenant ID for the request - example: 66c20bbb-15ff-4254-b34a-4ecbeff0ce29 + example: dd11abcb-f3b1-412f-9ede-6f80730d5a28 format: uuid - example: 66c20bbb-15ff-4254-b34a-4ecbeff0ce29 + example: dd11abcb-f3b1-412f-9ede-6f80730d5a28 - name: recordID in: path description: ID of the record to retrieve @@ -85,9 +85,9 @@ paths: schema: type: string description: ID of the record to retrieve - example: 66c20bbb-15ff-4254-b34a-4ecbeff0ce29 + example: dd11abcb-f3b1-412f-9ede-6f80730d5a28 format: uuid - example: 66c20bbb-15ff-4254-b34a-4ecbeff0ce29 + example: dd11abcb-f3b1-412f-9ede-6f80730d5a28 - name: Authorization in: header description: JWT auth token @@ -95,8 +95,8 @@ paths: schema: type: string description: JWT auth token - example: Beatae eum. - example: Voluptate perferendis dicta commodi. + example: Molestiae ab ipsa fuga. + example: Molestiae ab ipsa fuga. requestBody: description: Request body for get. required: true @@ -105,8 +105,8 @@ paths: schema: $ref: '#/components/schemas/GetRequestBody' example: - spanID: c2bc78f1-a675-44df-b132-1d285e204cf2 - traceID: 8909bcf0-fa7e-4ed1-bc3e-1ed689cc9896 + spanID: dd11abcb-f3b1-412f-9ede-6f80730d5a28 + traceID: dd11abcb-f3b1-412f-9ede-6f80730d5a28 responses: "200": description: OK response. @@ -115,27 +115,41 @@ paths: schema: $ref: '#/components/schemas/GetResponseBody' example: - cachedAt: Aut vero voluptates. - duration: 966071656546526256 - id: f9922b04-e873-4efc-9b16-fdcb9d29ef0a - processedAt: Asperiores voluptatem quisquam id necessitatibus. - retryCount: 1538090001739738220 - retryDuration: 3066832311296962951 - status: 6370274974021655670 - tenant: Ad consequatur dolor alias. - value: Impedit officiis. + cachedAt: Omnis impedit sed. + duration: 178461644483448189 + id: dd11abcb-f3b1-412f-9ede-6f80730d5a28 + processedAt: Eius mollitia illo quia consequatur voluptatem. + retryCount: 5007217583026942089 + retryDuration: 587659532169267737 + status: 3494638038445428863 + tenant: Numquam est voluptates dolor. + value: Quis nesciunt maiores quia ab. "404": description: 'NotFound: Record not found' content: application/vnd.goa.error: schema: $ref: '#/components/schemas/Error' + example: + fault: false + id: 123abc + message: parameter 'p' must be an integer + name: NotFound + temporary: false + timeout: false "503": description: 'Unavailable: Temporary error' content: application/vnd.goa.error: schema: $ref: '#/components/schemas/Error' + example: + fault: false + id: 123abc + message: parameter 'p' must be an integer + name: Unavailable + temporary: true + timeout: false /records/{tenantID}/stream: get: tags: @@ -151,9 +165,9 @@ paths: schema: type: string description: Tenant ID for the request - example: 66c20bbb-15ff-4254-b34a-4ecbeff0ce29 + example: dd11abcb-f3b1-412f-9ede-6f80730d5a28 format: uuid - example: 66c20bbb-15ff-4254-b34a-4ecbeff0ce29 + example: dd11abcb-f3b1-412f-9ede-6f80730d5a28 - name: Authorization in: header description: JWT auth token @@ -161,8 +175,8 @@ paths: schema: type: string description: JWT auth token - example: Aliquid et dignissimos delectus facere nesciunt. - example: Aut expedita eum id. + example: Dolore repellendus sint soluta tenetur omnis. + example: Dolore repellendus sint soluta tenetur omnis. responses: "101": description: Switching Protocols response. @@ -171,12 +185,12 @@ paths: schema: $ref: '#/components/schemas/StreamResponseBody' example: - id: 1bbd1751-b7df-4308-a1c7-0a55a307585d - spanID: baffd1d3-7d92-456b-a4f1-37f462d4c356 - status: 3407397389909827570 - tenant: Repellendus eveniet sit. - traceID: 871ffc91-4efb-4fdb-a84b-8561f8f11b47 - value: Eos nihil. + id: dd11abcb-f3b1-412f-9ede-6f80730d5a28 + spanID: dd11abcb-f3b1-412f-9ede-6f80730d5a28 + status: 3451733167122626757 + tenant: Accusantium facilis est et. + traceID: dd11abcb-f3b1-412f-9ede-6f80730d5a28 + value: Et qui. components: schemas: CreateRequestBody: @@ -185,22 +199,22 @@ components: spanID: type: string description: Unique span ID for request, initialized by the TraceRequest interceptor - example: c89c4a4e-7182-4507-864e-8c8476e91061 + example: dd11abcb-f3b1-412f-9ede-6f80730d5a28 format: uuid traceID: type: string description: Unique trace ID for request, initialized by the TraceRequest interceptor - example: c89c4a4e-7182-4507-864e-8c8476e91061 + example: dd11abcb-f3b1-412f-9ede-6f80730d5a28 format: uuid value: type: string description: Value to store in record - example: Impedit voluptatem culpa et. + example: Vel dolores. description: Request body for create. example: - spanID: c89c4a4e-7182-4507-864e-8c8476e91061 - traceID: c89c4a4e-7182-4507-864e-8c8476e91061 - value: Impedit voluptatem culpa et. + spanID: dd11abcb-f3b1-412f-9ede-6f80730d5a28 + traceID: dd11abcb-f3b1-412f-9ede-6f80730d5a28 + value: Vel dolores. required: - value CreateResponseBody: @@ -209,49 +223,49 @@ components: duration: type: integer description: Processing duration in ms - example: 2675830902084894015 + example: 3718795145732531204 format: int64 id: type: string description: ID of the created record - example: 7673f207-d6bd-473a-8f84-1c0b64fcfc54 + example: dd11abcb-f3b1-412f-9ede-6f80730d5a28 format: uuid processedAt: type: string description: Timestamp when processed - example: Id quaerat dolores ab quo soluta modi. + example: Dolor sit. retryCount: type: integer description: Number of retry attempts made - example: 193182529652580268 + example: 5419496228293178792 format: int64 retryDuration: type: integer description: Total time spent retrying - example: 5809970416232694733 + example: 9203795670612989877 format: int64 status: type: integer description: Response status code - example: 2668736938289029744 + example: 4185462404774819293 format: int64 tenant: type: string description: Tenant the record belongs to - example: Sed omnis aut recusandae fuga minima. + example: Dolores sunt non. value: type: string description: Value of the record - example: Fuga quia. + example: Minima eos voluptate esse dolores assumenda. example: - duration: 2675830902084894015 - id: 7673f207-d6bd-473a-8f84-1c0b64fcfc54 - processedAt: Id quaerat dolores ab quo soluta modi. - retryCount: 193182529652580268 - retryDuration: 5809970416232694733 - status: 2668736938289029744 - tenant: Sed omnis aut recusandae fuga minima. - value: Fuga quia. + duration: 3718795145732531204 + id: dd11abcb-f3b1-412f-9ede-6f80730d5a28 + processedAt: Dolor sit. + retryCount: 5419496228293178792 + retryDuration: 9203795670612989877 + status: 4185462404774819293 + tenant: Dolores sunt non. + value: Minima eos voluptate esse dolores assumenda. required: - id - value @@ -281,18 +295,18 @@ components: temporary: type: boolean description: Is the error temporary? - example: false + example: true timeout: type: boolean description: Is the error a timeout? example: true - description: Record not found + description: Error response result type example: fault: false id: 123abc message: parameter 'p' must be an integer name: bad_request - temporary: false + temporary: true timeout: true required: - name @@ -307,71 +321,71 @@ components: spanID: type: string description: Unique span ID for request, initialized by the TraceRequest interceptor - example: c89c4a4e-7182-4507-864e-8c8476e91061 + example: dd11abcb-f3b1-412f-9ede-6f80730d5a28 format: uuid traceID: type: string description: Unique trace ID for request, initialized by the TraceRequest interceptor - example: c89c4a4e-7182-4507-864e-8c8476e91061 + example: dd11abcb-f3b1-412f-9ede-6f80730d5a28 format: uuid description: Request body for get. example: - spanID: c89c4a4e-7182-4507-864e-8c8476e91061 - traceID: c89c4a4e-7182-4507-864e-8c8476e91061 + spanID: dd11abcb-f3b1-412f-9ede-6f80730d5a28 + traceID: dd11abcb-f3b1-412f-9ede-6f80730d5a28 GetResponseBody: type: object properties: cachedAt: type: string description: Time at which the record was cached, written by the Cache interceptor - example: Aut vero voluptates. + example: Omnis impedit sed. duration: type: integer description: Processing duration in ms, written by the RequestAudit interceptor - example: 966071656546526256 + example: 178461644483448189 format: int64 id: type: string description: ID of the record - example: 7673f207-d6bd-473a-8f84-1c0b64fcfc54 + example: dd11abcb-f3b1-412f-9ede-6f80730d5a28 format: uuid processedAt: type: string description: Timestamp when processed, written by the RequestAudit interceptor - example: Asperiores voluptatem quisquam id necessitatibus. + example: Eius mollitia illo quia consequatur voluptatem. retryCount: type: integer description: Number of retry attempts made, written client-side by the Retry interceptor - example: 1538090001739738220 + example: 5007217583026942089 format: int64 retryDuration: type: integer description: Total time spent retrying, written client-side by the Retry interceptor - example: 3066832311296962951 + example: 587659532169267737 format: int64 status: type: integer description: Response status code - example: 6370274974021655670 + example: 3494638038445428863 format: int64 tenant: type: string description: Tenant the record belongs to - example: Ad consequatur dolor alias. + example: Numquam est voluptates dolor. value: type: string description: Value of the record - example: Impedit officiis. + example: Quis nesciunt maiores quia ab. example: - cachedAt: Aut vero voluptates. - duration: 966071656546526256 - id: 7673f207-d6bd-473a-8f84-1c0b64fcfc54 - processedAt: Asperiores voluptatem quisquam id necessitatibus. - retryCount: 1538090001739738220 - retryDuration: 3066832311296962951 - status: 6370274974021655670 - tenant: Ad consequatur dolor alias. - value: Impedit officiis. + cachedAt: Omnis impedit sed. + duration: 178461644483448189 + id: dd11abcb-f3b1-412f-9ede-6f80730d5a28 + processedAt: Eius mollitia illo quia consequatur voluptatem. + retryCount: 5007217583026942089 + retryDuration: 587659532169267737 + status: 3494638038445428863 + tenant: Numquam est voluptates dolor. + value: Quis nesciunt maiores quia ab. required: - id - value @@ -385,38 +399,38 @@ components: id: type: string description: ID of the created record - example: 7673f207-d6bd-473a-8f84-1c0b64fcfc54 + example: dd11abcb-f3b1-412f-9ede-6f80730d5a28 format: uuid spanID: type: string description: Unique span ID for request, initialized by the TraceRequest interceptor - example: 7673f207-d6bd-473a-8f84-1c0b64fcfc54 + example: dd11abcb-f3b1-412f-9ede-6f80730d5a28 format: uuid status: type: integer description: Response status code - example: 3407397389909827570 + example: 3451733167122626757 format: int64 tenant: type: string description: Tenant the record belongs to - example: Repellendus eveniet sit. + example: Accusantium facilis est et. traceID: type: string description: Unique trace ID for request, initialized by the TraceRequest interceptor - example: 7673f207-d6bd-473a-8f84-1c0b64fcfc54 + example: dd11abcb-f3b1-412f-9ede-6f80730d5a28 format: uuid value: type: string description: Value of the record - example: Eos nihil. + example: Et qui. example: - id: 7673f207-d6bd-473a-8f84-1c0b64fcfc54 - spanID: 7673f207-d6bd-473a-8f84-1c0b64fcfc54 - status: 3407397389909827570 - tenant: Repellendus eveniet sit. - traceID: 7673f207-d6bd-473a-8f84-1c0b64fcfc54 - value: Eos nihil. + id: dd11abcb-f3b1-412f-9ede-6f80730d5a28 + spanID: dd11abcb-f3b1-412f-9ede-6f80730d5a28 + status: 3451733167122626757 + tenant: Accusantium facilis est et. + traceID: dd11abcb-f3b1-412f-9ede-6f80730d5a28 + value: Et qui. required: - id - value @@ -428,27 +442,27 @@ components: id: type: string description: ID of the created record - example: 4ebe4239-1377-48a0-a82d-aeb7fb4a79aa + example: dd11abcb-f3b1-412f-9ede-6f80730d5a28 format: uuid spanID: type: string description: Unique span ID for request, initialized by the TraceRequest interceptor - example: 4ebe4239-1377-48a0-a82d-aeb7fb4a79aa + example: dd11abcb-f3b1-412f-9ede-6f80730d5a28 format: uuid traceID: type: string description: Unique trace ID for request, initialized by the TraceRequest interceptor - example: 4ebe4239-1377-48a0-a82d-aeb7fb4a79aa + example: dd11abcb-f3b1-412f-9ede-6f80730d5a28 format: uuid value: type: string description: Value of the record - example: Enim qui sint. + example: Reprehenderit sunt nam veniam quibusdam. example: - id: 4ebe4239-1377-48a0-a82d-aeb7fb4a79aa - spanID: 4ebe4239-1377-48a0-a82d-aeb7fb4a79aa - traceID: 4ebe4239-1377-48a0-a82d-aeb7fb4a79aa - value: Enim qui sint. + id: dd11abcb-f3b1-412f-9ede-6f80730d5a28 + spanID: dd11abcb-f3b1-412f-9ede-6f80730d5a28 + traceID: dd11abcb-f3b1-412f-9ede-6f80730d5a28 + value: Reprehenderit sunt nam veniam quibusdam. required: - id - value diff --git a/interceptors/gen/interceptors/client_interceptors.go b/interceptors/gen/interceptors/client_interceptors.go index 9c50faf05..e42bf5c66 100644 --- a/interceptors/gen/interceptors/client_interceptors.go +++ b/interceptors/gen/interceptors/client_interceptors.go @@ -20,24 +20,29 @@ import ( type ClientInterceptors interface { // Client-side interceptor which writes the tenant ID to the signed JWT // contained in the Authorization header - EncodeTenant(ctx context.Context, info *EncodeTenantInfo, next goa.Endpoint) (any, error) + EncodeTenant(ctx context.Context, info EncodeTenantInfo, next goa.Endpoint) (any, error) // Client-side interceptor which implements smart retry logic with exponential // backoff - Retry(ctx context.Context, info *RetryInfo, next goa.Endpoint) (any, error) + Retry(ctx context.Context, info RetryInfo, next goa.Endpoint) (any, error) // Server-side and client-side interceptor that adds trace context to the // bidirectional stream payload - TraceBidirectionalStream(ctx context.Context, info *TraceBidirectionalStreamInfo, next goa.Endpoint) (any, error) + TraceBidirectionalStream(ctx context.Context, info TraceBidirectionalStreamInfo, next goa.Endpoint) (any, error) } // Access interfaces for interceptor payloads and results type ( - // EncodeTenantInfo provides metadata about the current interception. - // It includes service name, method name, and access to the endpoint. - EncodeTenantInfo struct { - service string - method string - callType goa.InterceptorCallType - rawPayload any + // EncodeTenantInfo describes the service call currently passed to the interceptor. + EncodeTenantInfo interface { + // Service returns the service selected for this call. + Service() string + // Method returns the method selected for this call. + Method() string + // CallType returns whether this is an endpoint call, stream send, or stream receive. + CallType() goa.InterceptorCallType + // RawPayload returns the value passed to the interceptor. + RawPayload() any + // Payload returns the selected fields from the method payload. + Payload() EncodeTenantPayload } // EncodeTenantPayload provides type-safe access to the method payload. @@ -47,13 +52,18 @@ type ( TenantID() UUID SetAuth(string) } - // RetryInfo provides metadata about the current interception. - // It includes service name, method name, and access to the endpoint. - RetryInfo struct { - service string - method string - callType goa.InterceptorCallType - rawPayload any + // RetryInfo describes the service call currently passed to the interceptor. + RetryInfo interface { + // Service returns the service selected for this call. + Service() string + // Method returns the method selected for this call. + Method() string + // CallType returns whether this is an endpoint call, stream send, or stream receive. + CallType() goa.InterceptorCallType + // RawPayload returns the value passed to the interceptor. + RawPayload() any + // Result returns the selected fields from the method result. + Result(any) RetryResult } // RetryResult provides type-safe access to the method result. @@ -66,8 +76,38 @@ type ( } ) -// Private implementation types +// Types used to provide information about each service call type ( + encodeTenantGetInfo struct { + rawPayload any + } + encodeTenantGetClientUnaryInfo struct { + *encodeTenantGetInfo + } + encodeTenantCreateInfo struct { + rawPayload any + } + encodeTenantCreateClientUnaryInfo struct { + *encodeTenantCreateInfo + } + encodeTenantStreamInfo struct { + rawPayload any + } + encodeTenantStreamClientUnaryInfo struct { + *encodeTenantStreamInfo + } + retryGetInfo struct { + rawPayload any + } + retryGetClientUnaryInfo struct { + *retryGetInfo + } + retryCreateInfo struct { + rawPayload any + } + retryCreateClientUnaryInfo struct { + *retryCreateInfo + } encodeTenantGetPayload struct { payload *GetPayload } @@ -115,75 +155,134 @@ func WrapStreamClientEndpoint(endpoint goa.Endpoint, i ClientInterceptors) goa.E return endpoint } -// Public accessor methods for Info types +// Methods that provide information about each service call + +// Service returns the service selected for this interceptor call. +func (info *encodeTenantGetInfo) Service() string { + return "interceptors" +} + +// Method returns the method selected for this interceptor call. +func (info *encodeTenantGetInfo) Method() string { + return "Get" +} + +// RawPayload returns the payload supplied for this interceptor call. +func (info *encodeTenantGetInfo) RawPayload() any { + return info.rawPayload +} + +// CallType reports that this is a client endpoint call. +func (info *encodeTenantGetClientUnaryInfo) CallType() goa.InterceptorCallType { + return goa.InterceptorUnary +} + +// Payload returns this method's payload fields. +func (info *encodeTenantGetInfo) Payload() EncodeTenantPayload { + return &encodeTenantGetPayload{payload: info.rawPayload.(*GetPayload)} +} + +// Service returns the service selected for this interceptor call. +func (info *encodeTenantCreateInfo) Service() string { + return "interceptors" +} -// Service returns the name of the service handling the request. -func (info *EncodeTenantInfo) Service() string { - return info.service +// Method returns the method selected for this interceptor call. +func (info *encodeTenantCreateInfo) Method() string { + return "Create" +} + +// RawPayload returns the payload supplied for this interceptor call. +func (info *encodeTenantCreateInfo) RawPayload() any { + return info.rawPayload } -// Method returns the name of the method handling the request. -func (info *EncodeTenantInfo) Method() string { - return info.method +// CallType reports that this is a client endpoint call. +func (info *encodeTenantCreateClientUnaryInfo) CallType() goa.InterceptorCallType { + return goa.InterceptorUnary } -// CallType returns the type of call the interceptor is handling. -func (info *EncodeTenantInfo) CallType() goa.InterceptorCallType { - return info.callType +// Payload returns this method's payload fields. +func (info *encodeTenantCreateInfo) Payload() EncodeTenantPayload { + return &encodeTenantCreatePayload{payload: info.rawPayload.(*CreatePayload)} } -// RawPayload returns the raw payload of the request. -func (info *EncodeTenantInfo) RawPayload() any { +// Service returns the service selected for this interceptor call. +func (info *encodeTenantStreamInfo) Service() string { + return "interceptors" +} + +// Method returns the method selected for this interceptor call. +func (info *encodeTenantStreamInfo) Method() string { + return "Stream" +} + +// RawPayload returns the payload supplied for this interceptor call. +func (info *encodeTenantStreamInfo) RawPayload() any { return info.rawPayload } -// Payload returns a type-safe accessor for the method payload. -func (info *EncodeTenantInfo) Payload() EncodeTenantPayload { - switch info.Method() { - case "Get": - return &encodeTenantGetPayload{payload: info.RawPayload().(*GetPayload)} - case "Create": - return &encodeTenantCreatePayload{payload: info.RawPayload().(*CreatePayload)} - case "Stream": - return &encodeTenantStreamPayload{payload: info.RawPayload().(*StreamPayload)} - default: - return nil - } +// CallType reports that this is a client endpoint call. +func (info *encodeTenantStreamClientUnaryInfo) CallType() goa.InterceptorCallType { + return goa.InterceptorUnary } -// Service returns the name of the service handling the request. -func (info *RetryInfo) Service() string { - return info.service +// Payload returns this method's payload fields. +func (info *encodeTenantStreamInfo) Payload() EncodeTenantPayload { + return &encodeTenantStreamPayload{payload: info.rawPayload.(*StreamPayload)} } -// Method returns the name of the method handling the request. -func (info *RetryInfo) Method() string { - return info.method +// Service returns the service selected for this interceptor call. +func (info *retryGetInfo) Service() string { + return "interceptors" } -// CallType returns the type of call the interceptor is handling. -func (info *RetryInfo) CallType() goa.InterceptorCallType { - return info.callType +// Method returns the method selected for this interceptor call. +func (info *retryGetInfo) Method() string { + return "Get" } -// RawPayload returns the raw payload of the request. -func (info *RetryInfo) RawPayload() any { +// RawPayload returns the payload supplied for this interceptor call. +func (info *retryGetInfo) RawPayload() any { return info.rawPayload } -// Result returns a type-safe accessor for the method result. -func (info *RetryInfo) Result(res any) RetryResult { - switch info.Method() { - case "Get": - return &retryGetResult{result: res.(*GetResult)} - case "Create": - return &retryCreateResult{result: res.(*CreateResult)} - default: - return nil - } +// CallType reports that this is a client endpoint call. +func (info *retryGetClientUnaryInfo) CallType() goa.InterceptorCallType { + return goa.InterceptorUnary +} + +// Result returns this method's result fields. +func (info *retryGetInfo) Result(res any) RetryResult { + return &retryGetResult{result: res.(*GetResult)} +} + +// Service returns the service selected for this interceptor call. +func (info *retryCreateInfo) Service() string { + return "interceptors" +} + +// Method returns the method selected for this interceptor call. +func (info *retryCreateInfo) Method() string { + return "Create" +} + +// RawPayload returns the payload supplied for this interceptor call. +func (info *retryCreateInfo) RawPayload() any { + return info.rawPayload +} + +// CallType reports that this is a client endpoint call. +func (info *retryCreateClientUnaryInfo) CallType() goa.InterceptorCallType { + return goa.InterceptorUnary +} + +// Result returns this method's result fields. +func (info *retryCreateInfo) Result(res any) RetryResult { + return &retryCreateResult{result: res.(*CreateResult)} } -// Private implementation methods +// Methods that read and write the selected payload and result fields func (p *encodeTenantGetPayload) TenantID() UUID { return p.payload.TenantID diff --git a/interceptors/gen/interceptors/interceptor_wrappers.go b/interceptors/gen/interceptors/interceptor_wrappers.go index 5bec03a63..e8e34bf27 100644 --- a/interceptors/gen/interceptors/interceptor_wrappers.go +++ b/interceptors/gen/interceptors/interceptor_wrappers.go @@ -31,127 +31,100 @@ type wrappedStreamClientStream struct { stream StreamClientStream } -// wrapCacheGet applies the Cache server interceptor to endpoints. +// wrapGetCache applies the Cache server interceptor to endpoints. func wrapGetCache(endpoint goa.Endpoint, i ServerInterceptors) goa.Endpoint { return func(ctx context.Context, req any) (any, error) { - info := &CacheInfo{ - service: "interceptors", - method: "Get", - callType: goa.InterceptorUnary, - rawPayload: req, + info := &cacheGetServerUnaryInfo{ + cacheGetInfo: &cacheGetInfo{rawPayload: req}, } return i.Cache(ctx, info, endpoint) } } -// wrapJWTAuthGet applies the JWTAuth server interceptor to endpoints. +// wrapGetJWTAuth applies the JWTAuth server interceptor to endpoints. func wrapGetJWTAuth(endpoint goa.Endpoint, i ServerInterceptors) goa.Endpoint { return func(ctx context.Context, req any) (any, error) { - info := &JWTAuthInfo{ - service: "interceptors", - method: "Get", - callType: goa.InterceptorUnary, - rawPayload: req, + info := &jwtAuthGetServerUnaryInfo{ + jwtAuthGetInfo: &jwtAuthGetInfo{rawPayload: req}, } return i.JWTAuth(ctx, info, endpoint) } } -// wrapJWTAuthCreate applies the JWTAuth server interceptor to endpoints. +// wrapCreateJWTAuth applies the JWTAuth server interceptor to endpoints. func wrapCreateJWTAuth(endpoint goa.Endpoint, i ServerInterceptors) goa.Endpoint { return func(ctx context.Context, req any) (any, error) { - info := &JWTAuthInfo{ - service: "interceptors", - method: "Create", - callType: goa.InterceptorUnary, - rawPayload: req, + info := &jwtAuthCreateServerUnaryInfo{ + jwtAuthCreateInfo: &jwtAuthCreateInfo{rawPayload: req}, } return i.JWTAuth(ctx, info, endpoint) } } -// wrapJWTAuthStream applies the JWTAuth server interceptor to endpoints. +// wrapStreamJWTAuth applies the JWTAuth server interceptor to endpoints. func wrapStreamJWTAuth(endpoint goa.Endpoint, i ServerInterceptors) goa.Endpoint { return func(ctx context.Context, req any) (any, error) { - info := &JWTAuthInfo{ - service: "interceptors", - method: "Stream", - callType: goa.InterceptorUnary, - rawPayload: req, + info := &jwtAuthStreamServerUnaryInfo{ + jwtAuthStreamInfo: &jwtAuthStreamInfo{rawPayload: req}, } return i.JWTAuth(ctx, info, endpoint) } } -// wrapRequestAuditGet applies the RequestAudit server interceptor to endpoints. +// wrapGetRequestAudit applies the RequestAudit server interceptor to endpoints. func wrapGetRequestAudit(endpoint goa.Endpoint, i ServerInterceptors) goa.Endpoint { return func(ctx context.Context, req any) (any, error) { - info := &RequestAuditInfo{ - service: "interceptors", - method: "Get", - callType: goa.InterceptorUnary, - rawPayload: req, + info := &requestAuditGetServerUnaryInfo{ + requestAuditGetInfo: &requestAuditGetInfo{rawPayload: req}, } return i.RequestAudit(ctx, info, endpoint) } } -// wrapRequestAuditCreate applies the RequestAudit server interceptor to +// wrapCreateRequestAudit applies the RequestAudit server interceptor to // endpoints. func wrapCreateRequestAudit(endpoint goa.Endpoint, i ServerInterceptors) goa.Endpoint { return func(ctx context.Context, req any) (any, error) { - info := &RequestAuditInfo{ - service: "interceptors", - method: "Create", - callType: goa.InterceptorUnary, - rawPayload: req, + info := &requestAuditCreateServerUnaryInfo{ + requestAuditCreateInfo: &requestAuditCreateInfo{rawPayload: req}, } return i.RequestAudit(ctx, info, endpoint) } } -// wrapSetDeadlineGet applies the SetDeadline server interceptor to endpoints. +// wrapGetSetDeadline applies the SetDeadline server interceptor to endpoints. func wrapGetSetDeadline(endpoint goa.Endpoint, i ServerInterceptors) goa.Endpoint { return func(ctx context.Context, req any) (any, error) { - info := &SetDeadlineInfo{ - service: "interceptors", - method: "Get", - callType: goa.InterceptorUnary, - rawPayload: req, + info := &setDeadlineGetServerUnaryInfo{ + setDeadlineGetInfo: &setDeadlineGetInfo{rawPayload: req}, } return i.SetDeadline(ctx, info, endpoint) } } -// wrapSetDeadlineCreate applies the SetDeadline server interceptor to +// wrapCreateSetDeadline applies the SetDeadline server interceptor to // endpoints. func wrapCreateSetDeadline(endpoint goa.Endpoint, i ServerInterceptors) goa.Endpoint { return func(ctx context.Context, req any) (any, error) { - info := &SetDeadlineInfo{ - service: "interceptors", - method: "Create", - callType: goa.InterceptorUnary, - rawPayload: req, + info := &setDeadlineCreateServerUnaryInfo{ + setDeadlineCreateInfo: &setDeadlineCreateInfo{rawPayload: req}, } return i.SetDeadline(ctx, info, endpoint) } } -// wrapSetDeadlineStream applies the SetDeadline server interceptor to +// wrapStreamSetDeadline applies the SetDeadline server interceptor to // endpoints. func wrapStreamSetDeadline(endpoint goa.Endpoint, i ServerInterceptors) goa.Endpoint { return func(ctx context.Context, req any) (any, error) { - info := &SetDeadlineInfo{ - service: "interceptors", - method: "Stream", - callType: goa.InterceptorUnary, - rawPayload: req, + info := &setDeadlineStreamServerUnaryInfo{ + setDeadlineStreamInfo: &setDeadlineStreamInfo{rawPayload: req}, } return i.SetDeadline(ctx, info, endpoint) } } -// wrapTraceBidirectionalStreamStream applies the TraceBidirectionalStream +// wrapStreamTraceBidirectionalStream applies the TraceBidirectionalStream // server interceptor to endpoints. func wrapStreamTraceBidirectionalStream(endpoint goa.Endpoint, i ServerInterceptors) goa.Endpoint { return func(ctx context.Context, req any) (any, error) { @@ -159,11 +132,8 @@ func wrapStreamTraceBidirectionalStream(endpoint goa.Endpoint, i ServerIntercept req.(*StreamEndpointInput).Stream = &wrappedStreamServerStream{ ctx: ctx, sendWithContext: func(ctx context.Context, req *StreamResult) error { - info := &TraceBidirectionalStreamInfo{ - service: "interceptors", - method: "Stream", - callType: goa.InterceptorStreamingSend, - rawPayload: req, + info := &traceBidirectionalStreamStreamStreamingSendInfo{ + traceBidirectionalStreamStreamInfo: &traceBidirectionalStreamStreamInfo{rawPayload: req}, } _, err := i.TraceBidirectionalStream(ctx, info, func(ctx context.Context, req any) (any, error) { castReq, _ := req.(*StreamResult) @@ -172,10 +142,8 @@ func wrapStreamTraceBidirectionalStream(endpoint goa.Endpoint, i ServerIntercept return err }, recvWithContext: func(ctx context.Context) (*StreamStreamingPayload, error) { - info := &TraceBidirectionalStreamInfo{ - service: "interceptors", - method: "Stream", - callType: goa.InterceptorStreamingRecv, + info := &traceBidirectionalStreamStreamStreamingRecvInfo{ + traceBidirectionalStreamStreamInfo: &traceBidirectionalStreamStreamInfo{}, } res, err := i.TraceBidirectionalStream(ctx, info, func(ctx context.Context, _ any) (any, error) { return stream.RecvWithContext(ctx) @@ -189,102 +157,81 @@ func wrapStreamTraceBidirectionalStream(endpoint goa.Endpoint, i ServerIntercept } } -// wrapTraceRequestGet applies the TraceRequest server interceptor to endpoints. +// wrapGetTraceRequest applies the TraceRequest server interceptor to endpoints. func wrapGetTraceRequest(endpoint goa.Endpoint, i ServerInterceptors) goa.Endpoint { return func(ctx context.Context, req any) (any, error) { - info := &TraceRequestInfo{ - service: "interceptors", - method: "Get", - callType: goa.InterceptorUnary, - rawPayload: req, + info := &traceRequestGetServerUnaryInfo{ + traceRequestGetInfo: &traceRequestGetInfo{rawPayload: req}, } return i.TraceRequest(ctx, info, endpoint) } } -// wrapTraceRequestCreate applies the TraceRequest server interceptor to +// wrapCreateTraceRequest applies the TraceRequest server interceptor to // endpoints. func wrapCreateTraceRequest(endpoint goa.Endpoint, i ServerInterceptors) goa.Endpoint { return func(ctx context.Context, req any) (any, error) { - info := &TraceRequestInfo{ - service: "interceptors", - method: "Create", - callType: goa.InterceptorUnary, - rawPayload: req, + info := &traceRequestCreateServerUnaryInfo{ + traceRequestCreateInfo: &traceRequestCreateInfo{rawPayload: req}, } return i.TraceRequest(ctx, info, endpoint) } } -// wrapClientEncodeTenantGet applies the EncodeTenant client interceptor to +// wrapClientGetEncodeTenant applies the EncodeTenant client interceptor to // endpoints. func wrapClientGetEncodeTenant(endpoint goa.Endpoint, i ClientInterceptors) goa.Endpoint { return func(ctx context.Context, req any) (any, error) { - info := &EncodeTenantInfo{ - service: "interceptors", - method: "Get", - callType: goa.InterceptorUnary, - rawPayload: req, + info := &encodeTenantGetClientUnaryInfo{ + encodeTenantGetInfo: &encodeTenantGetInfo{rawPayload: req}, } return i.EncodeTenant(ctx, info, endpoint) } } -// wrapClientEncodeTenantCreate applies the EncodeTenant client interceptor to +// wrapClientCreateEncodeTenant applies the EncodeTenant client interceptor to // endpoints. func wrapClientCreateEncodeTenant(endpoint goa.Endpoint, i ClientInterceptors) goa.Endpoint { return func(ctx context.Context, req any) (any, error) { - info := &EncodeTenantInfo{ - service: "interceptors", - method: "Create", - callType: goa.InterceptorUnary, - rawPayload: req, + info := &encodeTenantCreateClientUnaryInfo{ + encodeTenantCreateInfo: &encodeTenantCreateInfo{rawPayload: req}, } return i.EncodeTenant(ctx, info, endpoint) } } -// wrapClientEncodeTenantStream applies the EncodeTenant client interceptor to +// wrapClientStreamEncodeTenant applies the EncodeTenant client interceptor to // endpoints. func wrapClientStreamEncodeTenant(endpoint goa.Endpoint, i ClientInterceptors) goa.Endpoint { return func(ctx context.Context, req any) (any, error) { - info := &EncodeTenantInfo{ - service: "interceptors", - method: "Stream", - callType: goa.InterceptorUnary, - rawPayload: req, + info := &encodeTenantStreamClientUnaryInfo{ + encodeTenantStreamInfo: &encodeTenantStreamInfo{rawPayload: req}, } return i.EncodeTenant(ctx, info, endpoint) } } -// wrapClientRetryGet applies the Retry client interceptor to endpoints. +// wrapClientGetRetry applies the Retry client interceptor to endpoints. func wrapClientGetRetry(endpoint goa.Endpoint, i ClientInterceptors) goa.Endpoint { return func(ctx context.Context, req any) (any, error) { - info := &RetryInfo{ - service: "interceptors", - method: "Get", - callType: goa.InterceptorUnary, - rawPayload: req, + info := &retryGetClientUnaryInfo{ + retryGetInfo: &retryGetInfo{rawPayload: req}, } return i.Retry(ctx, info, endpoint) } } -// wrapClientRetryCreate applies the Retry client interceptor to endpoints. +// wrapClientCreateRetry applies the Retry client interceptor to endpoints. func wrapClientCreateRetry(endpoint goa.Endpoint, i ClientInterceptors) goa.Endpoint { return func(ctx context.Context, req any) (any, error) { - info := &RetryInfo{ - service: "interceptors", - method: "Create", - callType: goa.InterceptorUnary, - rawPayload: req, + info := &retryCreateClientUnaryInfo{ + retryCreateInfo: &retryCreateInfo{rawPayload: req}, } return i.Retry(ctx, info, endpoint) } } -// wrapClientTraceBidirectionalStreamStream applies the +// wrapClientStreamTraceBidirectionalStream applies the // TraceBidirectionalStream client interceptor to endpoints. func wrapClientStreamTraceBidirectionalStream(endpoint goa.Endpoint, i ClientInterceptors) goa.Endpoint { return func(ctx context.Context, req any) (any, error) { @@ -296,11 +243,8 @@ func wrapClientStreamTraceBidirectionalStream(endpoint goa.Endpoint, i ClientInt return &wrappedStreamClientStream{ ctx: ctx, sendWithContext: func(ctx context.Context, req *StreamStreamingPayload) error { - info := &TraceBidirectionalStreamInfo{ - service: "interceptors", - method: "Stream", - callType: goa.InterceptorStreamingSend, - rawPayload: req, + info := &traceBidirectionalStreamStreamStreamingSendInfo{ + traceBidirectionalStreamStreamInfo: &traceBidirectionalStreamStreamInfo{rawPayload: req}, } _, err := i.TraceBidirectionalStream(ctx, info, func(ctx context.Context, req any) (any, error) { castReq, _ := req.(*StreamStreamingPayload) @@ -309,10 +253,8 @@ func wrapClientStreamTraceBidirectionalStream(endpoint goa.Endpoint, i ClientInt return err }, recvWithContext: func(ctx context.Context) (*StreamResult, error) { - info := &TraceBidirectionalStreamInfo{ - service: "interceptors", - method: "Stream", - callType: goa.InterceptorStreamingRecv, + info := &traceBidirectionalStreamStreamStreamingRecvInfo{ + traceBidirectionalStreamStreamInfo: &traceBidirectionalStreamStreamInfo{}, } res, err := i.TraceBidirectionalStream(ctx, info, func(ctx context.Context, _ any) (any, error) { return stream.RecvWithContext(ctx) diff --git a/interceptors/gen/interceptors/service_interceptors.go b/interceptors/gen/interceptors/service_interceptors.go index 3782df967..018db9bf1 100644 --- a/interceptors/gen/interceptors/service_interceptors.go +++ b/interceptors/gen/interceptors/service_interceptors.go @@ -20,30 +20,37 @@ import ( type ServerInterceptors interface { // Server-side interceptor which implements a transparent cache for loaded // records - Cache(ctx context.Context, info *CacheInfo, next goa.Endpoint) (any, error) + Cache(ctx context.Context, info CacheInfo, next goa.Endpoint) (any, error) // Server-side interceptor that validates JWT token and tenant ID - JWTAuth(ctx context.Context, info *JWTAuthInfo, next goa.Endpoint) (any, error) + JWTAuth(ctx context.Context, info JWTAuthInfo, next goa.Endpoint) (any, error) // Server-side interceptor that provides comprehensive request/response audit // logging - RequestAudit(ctx context.Context, info *RequestAuditInfo, next goa.Endpoint) (any, error) + RequestAudit(ctx context.Context, info RequestAuditInfo, next goa.Endpoint) (any, error) // Server-side interceptor which sets the context deadline for the request - SetDeadline(ctx context.Context, info *SetDeadlineInfo, next goa.Endpoint) (any, error) + SetDeadline(ctx context.Context, info SetDeadlineInfo, next goa.Endpoint) (any, error) // Server-side and client-side interceptor that adds trace context to the // bidirectional stream payload - TraceBidirectionalStream(ctx context.Context, info *TraceBidirectionalStreamInfo, next goa.Endpoint) (any, error) + TraceBidirectionalStream(ctx context.Context, info TraceBidirectionalStreamInfo, next goa.Endpoint) (any, error) // Server-side interceptor that adds trace context to the request payload - TraceRequest(ctx context.Context, info *TraceRequestInfo, next goa.Endpoint) (any, error) + TraceRequest(ctx context.Context, info TraceRequestInfo, next goa.Endpoint) (any, error) } // Access interfaces for interceptor payloads and results type ( - // CacheInfo provides metadata about the current interception. - // It includes service name, method name, and access to the endpoint. - CacheInfo struct { - service string - method string - callType goa.InterceptorCallType - rawPayload any + // CacheInfo describes the service call currently passed to the interceptor. + CacheInfo interface { + // Service returns the service selected for this call. + Service() string + // Method returns the method selected for this call. + Method() string + // CallType returns whether this is an endpoint call, stream send, or stream receive. + CallType() goa.InterceptorCallType + // RawPayload returns the value passed to the interceptor. + RawPayload() any + // Payload returns the selected fields from the method payload. + Payload() CachePayload + // Result returns the selected fields from the method result. + Result(any) CacheResult } // CachePayload provides type-safe access to the method payload. @@ -59,13 +66,18 @@ type ( CacheResult interface { SetCachedAt(string) } - // JWTAuthInfo provides metadata about the current interception. - // It includes service name, method name, and access to the endpoint. - JWTAuthInfo struct { - service string - method string - callType goa.InterceptorCallType - rawPayload any + // JWTAuthInfo describes the service call currently passed to the interceptor. + JWTAuthInfo interface { + // Service returns the service selected for this call. + Service() string + // Method returns the method selected for this call. + Method() string + // CallType returns whether this is an endpoint call, stream send, or stream receive. + CallType() goa.InterceptorCallType + // RawPayload returns the value passed to the interceptor. + RawPayload() any + // Payload returns the selected fields from the method payload. + Payload() JWTAuthPayload } // JWTAuthPayload provides type-safe access to the method payload. @@ -75,13 +87,18 @@ type ( Auth() string TenantID() UUID } - // RequestAuditInfo provides metadata about the current interception. - // It includes service name, method name, and access to the endpoint. - RequestAuditInfo struct { - service string - method string - callType goa.InterceptorCallType - rawPayload any + // RequestAuditInfo describes the service call currently passed to the interceptor. + RequestAuditInfo interface { + // Service returns the service selected for this call. + Service() string + // Method returns the method selected for this call. + Method() string + // CallType returns whether this is an endpoint call, stream send, or stream receive. + CallType() goa.InterceptorCallType + // RawPayload returns the value passed to the interceptor. + RawPayload() any + // Result returns the selected fields from the method result. + Result(any) RequestAuditResult } // RequestAuditResult provides type-safe access to the method result. @@ -92,21 +109,35 @@ type ( SetProcessedAt(string) SetDuration(int) } - // SetDeadlineInfo provides metadata about the current interception. - // It includes service name, method name, and access to the endpoint. - SetDeadlineInfo struct { - service string - method string - callType goa.InterceptorCallType - rawPayload any - } - // TraceBidirectionalStreamInfo provides metadata about the current interception. - // It includes service name, method name, and access to the endpoint. - TraceBidirectionalStreamInfo struct { - service string - method string - callType goa.InterceptorCallType - rawPayload any + // SetDeadlineInfo describes the service call currently passed to the interceptor. + SetDeadlineInfo interface { + // Service returns the service selected for this call. + Service() string + // Method returns the method selected for this call. + Method() string + // CallType returns whether this is an endpoint call, stream send, or stream receive. + CallType() goa.InterceptorCallType + // RawPayload returns the value passed to the interceptor. + RawPayload() any + } + // TraceBidirectionalStreamInfo describes the service call currently passed to the interceptor. + TraceBidirectionalStreamInfo interface { + // Service returns the service selected for this call. + Service() string + // Method returns the method selected for this call. + Method() string + // CallType returns whether this is an endpoint call, stream send, or stream receive. + CallType() goa.InterceptorCallType + // RawPayload returns the value passed to the interceptor. + RawPayload() any + // ClientStreamingPayload returns selected fields from the outgoing stream payload. + ClientStreamingPayload() TraceBidirectionalStreamStreamingPayload + // ServerStreamingPayload returns selected fields from the incoming stream payload. + ServerStreamingPayload(any) TraceBidirectionalStreamStreamingPayload + // ClientStreamingResult returns selected fields from the incoming stream result. + ClientStreamingResult(any) TraceBidirectionalStreamStreamingResult + // ServerStreamingResult returns selected fields from the outgoing stream result. + ServerStreamingResult() TraceBidirectionalStreamStreamingResult } // TraceBidirectionalStreamStreamingPayload provides type-safe access to the method streaming payload. @@ -128,13 +159,18 @@ type ( SetTraceID(UUID) SetSpanID(UUID) } - // TraceRequestInfo provides metadata about the current interception. - // It includes service name, method name, and access to the endpoint. - TraceRequestInfo struct { - service string - method string - callType goa.InterceptorCallType - rawPayload any + // TraceRequestInfo describes the service call currently passed to the interceptor. + TraceRequestInfo interface { + // Service returns the service selected for this call. + Service() string + // Method returns the method selected for this call. + Method() string + // CallType returns whether this is an endpoint call, stream send, or stream receive. + CallType() goa.InterceptorCallType + // RawPayload returns the value passed to the interceptor. + RawPayload() any + // Payload returns the selected fields from the method payload. + Payload() TraceRequestPayload } // TraceRequestPayload provides type-safe access to the method payload. @@ -146,18 +182,93 @@ type ( } ) -// Private implementation types +// Types used to provide information about each service call type ( + cacheGetInfo struct { + rawPayload any + } + cacheGetServerUnaryInfo struct { + *cacheGetInfo + } + jwtAuthGetInfo struct { + rawPayload any + } + jwtAuthGetServerUnaryInfo struct { + *jwtAuthGetInfo + } + jwtAuthCreateInfo struct { + rawPayload any + } + jwtAuthCreateServerUnaryInfo struct { + *jwtAuthCreateInfo + } + jwtAuthStreamInfo struct { + rawPayload any + } + jwtAuthStreamServerUnaryInfo struct { + *jwtAuthStreamInfo + } + requestAuditGetInfo struct { + rawPayload any + } + requestAuditGetServerUnaryInfo struct { + *requestAuditGetInfo + } + requestAuditCreateInfo struct { + rawPayload any + } + requestAuditCreateServerUnaryInfo struct { + *requestAuditCreateInfo + } + setDeadlineGetInfo struct { + rawPayload any + } + setDeadlineGetServerUnaryInfo struct { + *setDeadlineGetInfo + } + setDeadlineCreateInfo struct { + rawPayload any + } + setDeadlineCreateServerUnaryInfo struct { + *setDeadlineCreateInfo + } + setDeadlineStreamInfo struct { + rawPayload any + } + setDeadlineStreamServerUnaryInfo struct { + *setDeadlineStreamInfo + } + traceBidirectionalStreamStreamInfo struct { + rawPayload any + } + traceBidirectionalStreamStreamStreamingSendInfo struct { + *traceBidirectionalStreamStreamInfo + } + traceBidirectionalStreamStreamStreamingRecvInfo struct { + *traceBidirectionalStreamStreamInfo + } + traceRequestGetInfo struct { + rawPayload any + } + traceRequestGetServerUnaryInfo struct { + *traceRequestGetInfo + } + traceRequestCreateInfo struct { + rawPayload any + } + traceRequestCreateServerUnaryInfo struct { + *traceRequestCreateInfo + } cacheGetPayload struct { payload *GetPayload } - jWTAuthGetPayload struct { + jwtAuthGetPayload struct { payload *GetPayload } - jWTAuthCreatePayload struct { + jwtAuthCreatePayload struct { payload *CreatePayload } - jWTAuthStreamPayload struct { + jwtAuthStreamPayload struct { payload *StreamPayload } traceRequestGetPayload struct { @@ -219,202 +330,324 @@ func WrapStreamEndpoint(endpoint goa.Endpoint, i ServerInterceptors) goa.Endpoin return endpoint } -// Public accessor methods for Info types +// Methods that provide information about each service call -// Service returns the name of the service handling the request. -func (info *CacheInfo) Service() string { - return info.service +// Service returns the service selected for this interceptor call. +func (info *cacheGetInfo) Service() string { + return "interceptors" } -// Method returns the name of the method handling the request. -func (info *CacheInfo) Method() string { - return info.method +// Method returns the method selected for this interceptor call. +func (info *cacheGetInfo) Method() string { + return "Get" } -// CallType returns the type of call the interceptor is handling. -func (info *CacheInfo) CallType() goa.InterceptorCallType { - return info.callType +// RawPayload returns the payload supplied for this interceptor call. +func (info *cacheGetInfo) RawPayload() any { + return info.rawPayload } -// RawPayload returns the raw payload of the request. -func (info *CacheInfo) RawPayload() any { - return info.rawPayload +// CallType reports that this is a server endpoint call. +func (info *cacheGetServerUnaryInfo) CallType() goa.InterceptorCallType { + return goa.InterceptorUnary } -// Payload returns a type-safe accessor for the method payload. -func (info *CacheInfo) Payload() CachePayload { - return &cacheGetPayload{payload: info.RawPayload().(*GetPayload)} +// Payload returns this method's payload fields. +func (info *cacheGetInfo) Payload() CachePayload { + return &cacheGetPayload{payload: info.rawPayload.(*GetPayload)} } -// Result returns a type-safe accessor for the method result. -func (info *CacheInfo) Result(res any) CacheResult { +// Result returns this method's result fields. +func (info *cacheGetInfo) Result(res any) CacheResult { return &cacheGetResult{result: res.(*GetResult)} } -// Service returns the name of the service handling the request. -func (info *JWTAuthInfo) Service() string { - return info.service +// Service returns the service selected for this interceptor call. +func (info *jwtAuthGetInfo) Service() string { + return "interceptors" +} + +// Method returns the method selected for this interceptor call. +func (info *jwtAuthGetInfo) Method() string { + return "Get" +} + +// RawPayload returns the payload supplied for this interceptor call. +func (info *jwtAuthGetInfo) RawPayload() any { + return info.rawPayload +} + +// CallType reports that this is a server endpoint call. +func (info *jwtAuthGetServerUnaryInfo) CallType() goa.InterceptorCallType { + return goa.InterceptorUnary +} + +// Payload returns this method's payload fields. +func (info *jwtAuthGetInfo) Payload() JWTAuthPayload { + return &jwtAuthGetPayload{payload: info.rawPayload.(*GetPayload)} } -// Method returns the name of the method handling the request. -func (info *JWTAuthInfo) Method() string { - return info.method +// Service returns the service selected for this interceptor call. +func (info *jwtAuthCreateInfo) Service() string { + return "interceptors" } -// CallType returns the type of call the interceptor is handling. -func (info *JWTAuthInfo) CallType() goa.InterceptorCallType { - return info.callType +// Method returns the method selected for this interceptor call. +func (info *jwtAuthCreateInfo) Method() string { + return "Create" } -// RawPayload returns the raw payload of the request. -func (info *JWTAuthInfo) RawPayload() any { +// RawPayload returns the payload supplied for this interceptor call. +func (info *jwtAuthCreateInfo) RawPayload() any { return info.rawPayload } -// Payload returns a type-safe accessor for the method payload. -func (info *JWTAuthInfo) Payload() JWTAuthPayload { - switch info.Method() { - case "Get": - return &jWTAuthGetPayload{payload: info.RawPayload().(*GetPayload)} - case "Create": - return &jWTAuthCreatePayload{payload: info.RawPayload().(*CreatePayload)} - case "Stream": - switch pay := info.RawPayload().(type) { - case *StreamEndpointInput: - return &jWTAuthStreamPayload{payload: pay.Payload} - default: - return &jWTAuthStreamPayload{payload: pay.(*StreamPayload)} - } - default: - return nil - } +// CallType reports that this is a server endpoint call. +func (info *jwtAuthCreateServerUnaryInfo) CallType() goa.InterceptorCallType { + return goa.InterceptorUnary } -// Service returns the name of the service handling the request. -func (info *RequestAuditInfo) Service() string { - return info.service +// Payload returns this method's payload fields. +func (info *jwtAuthCreateInfo) Payload() JWTAuthPayload { + return &jwtAuthCreatePayload{payload: info.rawPayload.(*CreatePayload)} } -// Method returns the name of the method handling the request. -func (info *RequestAuditInfo) Method() string { - return info.method +// Service returns the service selected for this interceptor call. +func (info *jwtAuthStreamInfo) Service() string { + return "interceptors" } -// CallType returns the type of call the interceptor is handling. -func (info *RequestAuditInfo) CallType() goa.InterceptorCallType { - return info.callType +// Method returns the method selected for this interceptor call. +func (info *jwtAuthStreamInfo) Method() string { + return "Stream" } -// RawPayload returns the raw payload of the request. -func (info *RequestAuditInfo) RawPayload() any { +// RawPayload returns the payload supplied for this interceptor call. +func (info *jwtAuthStreamInfo) RawPayload() any { return info.rawPayload } -// Result returns a type-safe accessor for the method result. -func (info *RequestAuditInfo) Result(res any) RequestAuditResult { - switch info.Method() { - case "Get": - return &requestAuditGetResult{result: res.(*GetResult)} - case "Create": - return &requestAuditCreateResult{result: res.(*CreateResult)} - default: - return nil - } +// CallType reports that this is a server endpoint call. +func (info *jwtAuthStreamServerUnaryInfo) CallType() goa.InterceptorCallType { + return goa.InterceptorUnary } -// Service returns the name of the service handling the request. -func (info *SetDeadlineInfo) Service() string { - return info.service +// Payload returns this method's payload fields. +func (info *jwtAuthStreamInfo) Payload() JWTAuthPayload { + return &jwtAuthStreamPayload{payload: info.rawPayload.(*StreamPayload)} } -// Method returns the name of the method handling the request. -func (info *SetDeadlineInfo) Method() string { - return info.method +// Payload returns this server method's payload fields. +func (info *jwtAuthStreamServerUnaryInfo) Payload() JWTAuthPayload { + return &jwtAuthStreamPayload{payload: info.rawPayload.(*StreamEndpointInput).Payload} } -// CallType returns the type of call the interceptor is handling. -func (info *SetDeadlineInfo) CallType() goa.InterceptorCallType { - return info.callType +// Service returns the service selected for this interceptor call. +func (info *requestAuditGetInfo) Service() string { + return "interceptors" } -// RawPayload returns the raw payload of the request. -func (info *SetDeadlineInfo) RawPayload() any { +// Method returns the method selected for this interceptor call. +func (info *requestAuditGetInfo) Method() string { + return "Get" +} + +// RawPayload returns the payload supplied for this interceptor call. +func (info *requestAuditGetInfo) RawPayload() any { return info.rawPayload } -// Service returns the name of the service handling the request. -func (info *TraceBidirectionalStreamInfo) Service() string { - return info.service +// CallType reports that this is a server endpoint call. +func (info *requestAuditGetServerUnaryInfo) CallType() goa.InterceptorCallType { + return goa.InterceptorUnary +} + +// Result returns this method's result fields. +func (info *requestAuditGetInfo) Result(res any) RequestAuditResult { + return &requestAuditGetResult{result: res.(*GetResult)} } -// Method returns the name of the method handling the request. -func (info *TraceBidirectionalStreamInfo) Method() string { - return info.method +// Service returns the service selected for this interceptor call. +func (info *requestAuditCreateInfo) Service() string { + return "interceptors" } -// CallType returns the type of call the interceptor is handling. -func (info *TraceBidirectionalStreamInfo) CallType() goa.InterceptorCallType { - return info.callType +// Method returns the method selected for this interceptor call. +func (info *requestAuditCreateInfo) Method() string { + return "Create" } -// RawPayload returns the raw payload of the request. -func (info *TraceBidirectionalStreamInfo) RawPayload() any { +// RawPayload returns the payload supplied for this interceptor call. +func (info *requestAuditCreateInfo) RawPayload() any { return info.rawPayload } -// ClientStreamingPayload returns a type-safe accessor for the method streaming payload for a client-side interceptor. -func (info *TraceBidirectionalStreamInfo) ClientStreamingPayload() TraceBidirectionalStreamStreamingPayload { - return &traceBidirectionalStreamStreamStreamingPayload{payload: info.RawPayload().(*StreamStreamingPayload)} +// CallType reports that this is a server endpoint call. +func (info *requestAuditCreateServerUnaryInfo) CallType() goa.InterceptorCallType { + return goa.InterceptorUnary +} + +// Result returns this method's result fields. +func (info *requestAuditCreateInfo) Result(res any) RequestAuditResult { + return &requestAuditCreateResult{result: res.(*CreateResult)} } -// ClientStreamingResult returns a type-safe accessor for the method streaming result for a client-side interceptor. -func (info *TraceBidirectionalStreamInfo) ClientStreamingResult(res any) TraceBidirectionalStreamStreamingResult { - return &traceBidirectionalStreamStreamStreamingResult{result: res.(*StreamResult)} +// Service returns the service selected for this interceptor call. +func (info *setDeadlineGetInfo) Service() string { + return "interceptors" } -// ServerStreamingPayload returns a type-safe accessor for the method streaming payload for a server-side interceptor. -func (info *TraceBidirectionalStreamInfo) ServerStreamingPayload(pay any) TraceBidirectionalStreamStreamingPayload { - return &traceBidirectionalStreamStreamStreamingPayload{payload: pay.(*StreamStreamingPayload)} +// Method returns the method selected for this interceptor call. +func (info *setDeadlineGetInfo) Method() string { + return "Get" } -// ServerStreamingResult returns a type-safe accessor for the method streaming result for a server-side interceptor. -func (info *TraceBidirectionalStreamInfo) ServerStreamingResult() TraceBidirectionalStreamStreamingResult { - return &traceBidirectionalStreamStreamStreamingResult{result: info.RawPayload().(*StreamResult)} +// RawPayload returns the payload supplied for this interceptor call. +func (info *setDeadlineGetInfo) RawPayload() any { + return info.rawPayload } -// Service returns the name of the service handling the request. -func (info *TraceRequestInfo) Service() string { - return info.service +// CallType reports that this is a server endpoint call. +func (info *setDeadlineGetServerUnaryInfo) CallType() goa.InterceptorCallType { + return goa.InterceptorUnary } -// Method returns the name of the method handling the request. -func (info *TraceRequestInfo) Method() string { - return info.method +// Service returns the service selected for this interceptor call. +func (info *setDeadlineCreateInfo) Service() string { + return "interceptors" } -// CallType returns the type of call the interceptor is handling. -func (info *TraceRequestInfo) CallType() goa.InterceptorCallType { - return info.callType +// Method returns the method selected for this interceptor call. +func (info *setDeadlineCreateInfo) Method() string { + return "Create" } -// RawPayload returns the raw payload of the request. -func (info *TraceRequestInfo) RawPayload() any { +// RawPayload returns the payload supplied for this interceptor call. +func (info *setDeadlineCreateInfo) RawPayload() any { return info.rawPayload } -// Payload returns a type-safe accessor for the method payload. -func (info *TraceRequestInfo) Payload() TraceRequestPayload { - switch info.Method() { - case "Get": - return &traceRequestGetPayload{payload: info.RawPayload().(*GetPayload)} - case "Create": - return &traceRequestCreatePayload{payload: info.RawPayload().(*CreatePayload)} - default: - return nil - } +// CallType reports that this is a server endpoint call. +func (info *setDeadlineCreateServerUnaryInfo) CallType() goa.InterceptorCallType { + return goa.InterceptorUnary +} + +// Service returns the service selected for this interceptor call. +func (info *setDeadlineStreamInfo) Service() string { + return "interceptors" +} + +// Method returns the method selected for this interceptor call. +func (info *setDeadlineStreamInfo) Method() string { + return "Stream" +} + +// RawPayload returns the payload supplied for this interceptor call. +func (info *setDeadlineStreamInfo) RawPayload() any { + return info.rawPayload +} + +// CallType reports that this is a server endpoint call. +func (info *setDeadlineStreamServerUnaryInfo) CallType() goa.InterceptorCallType { + return goa.InterceptorUnary +} + +// Service returns the service selected for this interceptor call. +func (info *traceBidirectionalStreamStreamInfo) Service() string { + return "interceptors" +} + +// Method returns the method selected for this interceptor call. +func (info *traceBidirectionalStreamStreamInfo) Method() string { + return "Stream" +} + +// RawPayload returns the payload supplied for this interceptor call. +func (info *traceBidirectionalStreamStreamInfo) RawPayload() any { + return info.rawPayload +} + +// CallType reports that this is a stream send. +func (info *traceBidirectionalStreamStreamStreamingSendInfo) CallType() goa.InterceptorCallType { + return goa.InterceptorStreamingSend +} + +// CallType reports that this is a stream receive. +func (info *traceBidirectionalStreamStreamStreamingRecvInfo) CallType() goa.InterceptorCallType { + return goa.InterceptorStreamingRecv +} + +// ClientStreamingPayload returns this method's outgoing streaming payload fields. +func (info *traceBidirectionalStreamStreamInfo) ClientStreamingPayload() TraceBidirectionalStreamStreamingPayload { + return &traceBidirectionalStreamStreamStreamingPayload{payload: info.rawPayload.(*StreamStreamingPayload)} +} + +// ServerStreamingPayload returns this method's incoming streaming payload fields. +func (info *traceBidirectionalStreamStreamInfo) ServerStreamingPayload(payload any) TraceBidirectionalStreamStreamingPayload { + return &traceBidirectionalStreamStreamStreamingPayload{payload: payload.(*StreamStreamingPayload)} +} + +// ClientStreamingResult returns this method's incoming streaming result fields. +func (info *traceBidirectionalStreamStreamInfo) ClientStreamingResult(result any) TraceBidirectionalStreamStreamingResult { + return &traceBidirectionalStreamStreamStreamingResult{result: result.(*StreamResult)} +} + +// ServerStreamingResult returns this method's outgoing streaming result fields. +func (info *traceBidirectionalStreamStreamInfo) ServerStreamingResult() TraceBidirectionalStreamStreamingResult { + return &traceBidirectionalStreamStreamStreamingResult{result: info.rawPayload.(*StreamResult)} +} + +// Service returns the service selected for this interceptor call. +func (info *traceRequestGetInfo) Service() string { + return "interceptors" +} + +// Method returns the method selected for this interceptor call. +func (info *traceRequestGetInfo) Method() string { + return "Get" +} + +// RawPayload returns the payload supplied for this interceptor call. +func (info *traceRequestGetInfo) RawPayload() any { + return info.rawPayload +} + +// CallType reports that this is a server endpoint call. +func (info *traceRequestGetServerUnaryInfo) CallType() goa.InterceptorCallType { + return goa.InterceptorUnary +} + +// Payload returns this method's payload fields. +func (info *traceRequestGetInfo) Payload() TraceRequestPayload { + return &traceRequestGetPayload{payload: info.rawPayload.(*GetPayload)} +} + +// Service returns the service selected for this interceptor call. +func (info *traceRequestCreateInfo) Service() string { + return "interceptors" +} + +// Method returns the method selected for this interceptor call. +func (info *traceRequestCreateInfo) Method() string { + return "Create" +} + +// RawPayload returns the payload supplied for this interceptor call. +func (info *traceRequestCreateInfo) RawPayload() any { + return info.rawPayload +} + +// CallType reports that this is a server endpoint call. +func (info *traceRequestCreateServerUnaryInfo) CallType() goa.InterceptorCallType { + return goa.InterceptorUnary +} + +// Payload returns this method's payload fields. +func (info *traceRequestCreateInfo) Payload() TraceRequestPayload { + return &traceRequestCreatePayload{payload: info.rawPayload.(*CreatePayload)} } -// Private implementation methods +// Methods that read and write the selected payload and result fields func (p *cacheGetPayload) RecordID() UUID { return p.payload.RecordID @@ -423,22 +656,22 @@ func (r *cacheGetResult) SetCachedAt(v string) { r.result.CachedAt = &v } -func (p *jWTAuthGetPayload) Auth() string { +func (p *jwtAuthGetPayload) Auth() string { return p.payload.Auth } -func (p *jWTAuthGetPayload) TenantID() UUID { +func (p *jwtAuthGetPayload) TenantID() UUID { return p.payload.TenantID } -func (p *jWTAuthCreatePayload) Auth() string { +func (p *jwtAuthCreatePayload) Auth() string { return p.payload.Auth } -func (p *jWTAuthCreatePayload) TenantID() UUID { +func (p *jwtAuthCreatePayload) TenantID() UUID { return p.payload.TenantID } -func (p *jWTAuthStreamPayload) Auth() string { +func (p *jwtAuthStreamPayload) Auth() string { return p.payload.Auth } -func (p *jWTAuthStreamPayload) TenantID() UUID { +func (p *jwtAuthStreamPayload) TenantID() UUID { return p.payload.TenantID } diff --git a/interceptors/interceptors/interceptors_client.go b/interceptors/interceptors/interceptors_client.go index 6fc8c739b..990b64ef0 100644 --- a/interceptors/interceptors/interceptors_client.go +++ b/interceptors/interceptors/interceptors_client.go @@ -26,7 +26,7 @@ func NewInterceptorsClientInterceptors() *InterceptorsClientInterceptors { // Client-side interceptor which writes the tenant ID to the signed JWT // contained in the Authorization header -func (i *InterceptorsClientInterceptors) EncodeTenant(ctx context.Context, info *interceptors.EncodeTenantInfo, next goa.Endpoint) (any, error) { +func (i *InterceptorsClientInterceptors) EncodeTenant(ctx context.Context, info interceptors.EncodeTenantInfo, next goa.Endpoint) (any, error) { log.Printf(ctx, "[EncodeTenant] Sending request: %v", info.RawPayload()) resp, err := next(ctx, info.RawPayload()) if err != nil { @@ -39,7 +39,7 @@ func (i *InterceptorsClientInterceptors) EncodeTenant(ctx context.Context, info // Client-side interceptor which implements smart retry logic with exponential // backoff -func (i *InterceptorsClientInterceptors) Retry(ctx context.Context, info *interceptors.RetryInfo, next goa.Endpoint) (any, error) { +func (i *InterceptorsClientInterceptors) Retry(ctx context.Context, info interceptors.RetryInfo, next goa.Endpoint) (any, error) { log.Printf(ctx, "[Retry] Sending request: %v", info.RawPayload()) resp, err := next(ctx, info.RawPayload()) if err != nil { @@ -52,7 +52,7 @@ func (i *InterceptorsClientInterceptors) Retry(ctx context.Context, info *interc // Server-side and client-side interceptor that adds trace context to the // bidirectional stream payload -func (i *InterceptorsClientInterceptors) TraceBidirectionalStream(ctx context.Context, info *interceptors.TraceBidirectionalStreamInfo, next goa.Endpoint) (any, error) { +func (i *InterceptorsClientInterceptors) TraceBidirectionalStream(ctx context.Context, info interceptors.TraceBidirectionalStreamInfo, next goa.Endpoint) (any, error) { log.Printf(ctx, "[TraceBidirectionalStream] Sending request: %v", info.RawPayload()) resp, err := next(ctx, info.RawPayload()) if err != nil { diff --git a/interceptors/interceptors/interceptors_server.go b/interceptors/interceptors/interceptors_server.go index 72fd1dbd3..860048ef8 100644 --- a/interceptors/interceptors/interceptors_server.go +++ b/interceptors/interceptors/interceptors_server.go @@ -26,7 +26,7 @@ func NewInterceptorsServerInterceptors() *InterceptorsServerInterceptors { // Server-side interceptor which implements a transparent cache for loaded // records -func (i *InterceptorsServerInterceptors) Cache(ctx context.Context, info *interceptors.CacheInfo, next goa.Endpoint) (any, error) { +func (i *InterceptorsServerInterceptors) Cache(ctx context.Context, info interceptors.CacheInfo, next goa.Endpoint) (any, error) { log.Printf(ctx, "[Cache] Processing request: %v", info.RawPayload()) resp, err := next(ctx, info.RawPayload()) if err != nil { @@ -38,7 +38,7 @@ func (i *InterceptorsServerInterceptors) Cache(ctx context.Context, info *interc } // Server-side interceptor that validates JWT token and tenant ID -func (i *InterceptorsServerInterceptors) JWTAuth(ctx context.Context, info *interceptors.JWTAuthInfo, next goa.Endpoint) (any, error) { +func (i *InterceptorsServerInterceptors) JWTAuth(ctx context.Context, info interceptors.JWTAuthInfo, next goa.Endpoint) (any, error) { log.Printf(ctx, "[JWTAuth] Processing request: %v", info.RawPayload()) resp, err := next(ctx, info.RawPayload()) if err != nil { @@ -51,7 +51,7 @@ func (i *InterceptorsServerInterceptors) JWTAuth(ctx context.Context, info *inte // Server-side interceptor that provides comprehensive request/response audit // logging -func (i *InterceptorsServerInterceptors) RequestAudit(ctx context.Context, info *interceptors.RequestAuditInfo, next goa.Endpoint) (any, error) { +func (i *InterceptorsServerInterceptors) RequestAudit(ctx context.Context, info interceptors.RequestAuditInfo, next goa.Endpoint) (any, error) { log.Printf(ctx, "[RequestAudit] Processing request: %v", info.RawPayload()) resp, err := next(ctx, info.RawPayload()) if err != nil { @@ -63,7 +63,7 @@ func (i *InterceptorsServerInterceptors) RequestAudit(ctx context.Context, info } // Server-side interceptor which sets the context deadline for the request -func (i *InterceptorsServerInterceptors) SetDeadline(ctx context.Context, info *interceptors.SetDeadlineInfo, next goa.Endpoint) (any, error) { +func (i *InterceptorsServerInterceptors) SetDeadline(ctx context.Context, info interceptors.SetDeadlineInfo, next goa.Endpoint) (any, error) { log.Printf(ctx, "[SetDeadline] Processing request: %v", info.RawPayload()) resp, err := next(ctx, info.RawPayload()) if err != nil { @@ -76,7 +76,7 @@ func (i *InterceptorsServerInterceptors) SetDeadline(ctx context.Context, info * // Server-side and client-side interceptor that adds trace context to the // bidirectional stream payload -func (i *InterceptorsServerInterceptors) TraceBidirectionalStream(ctx context.Context, info *interceptors.TraceBidirectionalStreamInfo, next goa.Endpoint) (any, error) { +func (i *InterceptorsServerInterceptors) TraceBidirectionalStream(ctx context.Context, info interceptors.TraceBidirectionalStreamInfo, next goa.Endpoint) (any, error) { log.Printf(ctx, "[TraceBidirectionalStream] Processing request: %v", info.RawPayload()) resp, err := next(ctx, info.RawPayload()) if err != nil { @@ -88,7 +88,7 @@ func (i *InterceptorsServerInterceptors) TraceBidirectionalStream(ctx context.Co } // Server-side interceptor that adds trace context to the request payload -func (i *InterceptorsServerInterceptors) TraceRequest(ctx context.Context, info *interceptors.TraceRequestInfo, next goa.Endpoint) (any, error) { +func (i *InterceptorsServerInterceptors) TraceRequest(ctx context.Context, info interceptors.TraceRequestInfo, next goa.Endpoint) (any, error) { log.Printf(ctx, "[TraceRequest] Processing request: %v", info.RawPayload()) resp, err := next(ctx, info.RawPayload()) if err != nil { diff --git a/multipart/gen/http/cli/resume/cli.go b/multipart/gen/http/cli/resume/cli.go index 1f6b31e90..503510768 100644 --- a/multipart/gen/http/cli/resume/cli.go +++ b/multipart/gen/http/cli/resume/cli.go @@ -177,5 +177,5 @@ func resumeAddUsage() { fmt.Fprintln(os.Stderr) fmt.Fprintln(os.Stderr, "Example:") - fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "resume add --body '[\n {\n \"education\": [\n {\n \"institution\": \"Ipsum saepe quia est.\",\n \"major\": \"Fuga placeat est voluptatem sed.\"\n },\n {\n \"institution\": \"Ipsum saepe quia est.\",\n \"major\": \"Fuga placeat est voluptatem sed.\"\n },\n {\n \"institution\": \"Ipsum saepe quia est.\",\n \"major\": \"Fuga placeat est voluptatem sed.\"\n }\n ],\n \"experience\": [\n {\n \"company\": \"Saepe enim.\",\n \"duration\": 4129157726558553807,\n \"role\": \"Aut sit aut dolores sed ut ut.\"\n },\n {\n \"company\": \"Saepe enim.\",\n \"duration\": 4129157726558553807,\n \"role\": \"Aut sit aut dolores sed ut ut.\"\n }\n ],\n \"name\": \"Explicabo et eligendi expedita necessitatibus eius qui.\"\n },\n {\n \"education\": [\n {\n \"institution\": \"Ipsum saepe quia est.\",\n \"major\": \"Fuga placeat est voluptatem sed.\"\n },\n {\n \"institution\": \"Ipsum saepe quia est.\",\n \"major\": \"Fuga placeat est voluptatem sed.\"\n },\n {\n \"institution\": \"Ipsum saepe quia est.\",\n \"major\": \"Fuga placeat est voluptatem sed.\"\n }\n ],\n \"experience\": [\n {\n \"company\": \"Saepe enim.\",\n \"duration\": 4129157726558553807,\n \"role\": \"Aut sit aut dolores sed ut ut.\"\n },\n {\n \"company\": \"Saepe enim.\",\n \"duration\": 4129157726558553807,\n \"role\": \"Aut sit aut dolores sed ut ut.\"\n }\n ],\n \"name\": \"Explicabo et eligendi expedita necessitatibus eius qui.\"\n },\n {\n \"education\": [\n {\n \"institution\": \"Ipsum saepe quia est.\",\n \"major\": \"Fuga placeat est voluptatem sed.\"\n },\n {\n \"institution\": \"Ipsum saepe quia est.\",\n \"major\": \"Fuga placeat est voluptatem sed.\"\n },\n {\n \"institution\": \"Ipsum saepe quia est.\",\n \"major\": \"Fuga placeat est voluptatem sed.\"\n }\n ],\n \"experience\": [\n {\n \"company\": \"Saepe enim.\",\n \"duration\": 4129157726558553807,\n \"role\": \"Aut sit aut dolores sed ut ut.\"\n },\n {\n \"company\": \"Saepe enim.\",\n \"duration\": 4129157726558553807,\n \"role\": \"Aut sit aut dolores sed ut ut.\"\n }\n ],\n \"name\": \"Explicabo et eligendi expedita necessitatibus eius qui.\"\n },\n {\n \"education\": [\n {\n \"institution\": \"Ipsum saepe quia est.\",\n \"major\": \"Fuga placeat est voluptatem sed.\"\n },\n {\n \"institution\": \"Ipsum saepe quia est.\",\n \"major\": \"Fuga placeat est voluptatem sed.\"\n },\n {\n \"institution\": \"Ipsum saepe quia est.\",\n \"major\": \"Fuga placeat est voluptatem sed.\"\n }\n ],\n \"experience\": [\n {\n \"company\": \"Saepe enim.\",\n \"duration\": 4129157726558553807,\n \"role\": \"Aut sit aut dolores sed ut ut.\"\n },\n {\n \"company\": \"Saepe enim.\",\n \"duration\": 4129157726558553807,\n \"role\": \"Aut sit aut dolores sed ut ut.\"\n }\n ],\n \"name\": \"Explicabo et eligendi expedita necessitatibus eius qui.\"\n }\n ]'") + fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "resume add --body '[\n {\n \"education\": [\n {\n \"institution\": \"Vitae eaque autem in.\",\n \"major\": \"Qui nostrum quas velit nihil.\"\n },\n {\n \"institution\": \"Vitae eaque autem in.\",\n \"major\": \"Qui nostrum quas velit nihil.\"\n }\n ],\n \"experience\": [\n {\n \"company\": \"Dolor dicta dignissimos eius facere enim quae.\",\n \"duration\": 6839028381351029038,\n \"role\": \"Enim quia recusandae nostrum animi nam.\"\n },\n {\n \"company\": \"Dolor dicta dignissimos eius facere enim quae.\",\n \"duration\": 6839028381351029038,\n \"role\": \"Enim quia recusandae nostrum animi nam.\"\n }\n ],\n \"name\": \"Voluptas et.\"\n },\n {\n \"education\": [\n {\n \"institution\": \"Vitae eaque autem in.\",\n \"major\": \"Qui nostrum quas velit nihil.\"\n },\n {\n \"institution\": \"Vitae eaque autem in.\",\n \"major\": \"Qui nostrum quas velit nihil.\"\n }\n ],\n \"experience\": [\n {\n \"company\": \"Dolor dicta dignissimos eius facere enim quae.\",\n \"duration\": 6839028381351029038,\n \"role\": \"Enim quia recusandae nostrum animi nam.\"\n },\n {\n \"company\": \"Dolor dicta dignissimos eius facere enim quae.\",\n \"duration\": 6839028381351029038,\n \"role\": \"Enim quia recusandae nostrum animi nam.\"\n }\n ],\n \"name\": \"Voluptas et.\"\n },\n {\n \"education\": [\n {\n \"institution\": \"Vitae eaque autem in.\",\n \"major\": \"Qui nostrum quas velit nihil.\"\n },\n {\n \"institution\": \"Vitae eaque autem in.\",\n \"major\": \"Qui nostrum quas velit nihil.\"\n }\n ],\n \"experience\": [\n {\n \"company\": \"Dolor dicta dignissimos eius facere enim quae.\",\n \"duration\": 6839028381351029038,\n \"role\": \"Enim quia recusandae nostrum animi nam.\"\n },\n {\n \"company\": \"Dolor dicta dignissimos eius facere enim quae.\",\n \"duration\": 6839028381351029038,\n \"role\": \"Enim quia recusandae nostrum animi nam.\"\n }\n ],\n \"name\": \"Voluptas et.\"\n },\n {\n \"education\": [\n {\n \"institution\": \"Vitae eaque autem in.\",\n \"major\": \"Qui nostrum quas velit nihil.\"\n },\n {\n \"institution\": \"Vitae eaque autem in.\",\n \"major\": \"Qui nostrum quas velit nihil.\"\n }\n ],\n \"experience\": [\n {\n \"company\": \"Dolor dicta dignissimos eius facere enim quae.\",\n \"duration\": 6839028381351029038,\n \"role\": \"Enim quia recusandae nostrum animi nam.\"\n },\n {\n \"company\": \"Dolor dicta dignissimos eius facere enim quae.\",\n \"duration\": 6839028381351029038,\n \"role\": \"Enim quia recusandae nostrum animi nam.\"\n }\n ],\n \"name\": \"Voluptas et.\"\n }\n ]'") } diff --git a/multipart/gen/http/openapi.json b/multipart/gen/http/openapi.json index 22adfb16b..3d9b87c00 100644 --- a/multipart/gen/http/openapi.json +++ b/multipart/gen/http/openapi.json @@ -1 +1 @@ -{"swagger":"2.0","info":{"title":"","version":"0.0.1"},"host":"localhost:80","consumes":["application/json","application/xml","application/gob"],"produces":["application/json","application/xml","application/gob"],"paths":{"/resumes":{"get":{"tags":["resume"],"summary":"list resume","description":"List all stored resumes","operationId":"resume#list","responses":{"200":{"description":"OK response.","schema":{"$ref":"#/definitions/ResumeStoredResumeResponseCollection"}}},"schemes":["http"]},"post":{"tags":["resume"],"summary":"add resume","description":"Add n number of resumes and return their IDs. This is a multipart request and each part has field name 'resume' and contains the encoded resume to be added.","operationId":"resume#add","consumes":["multipart/form-data"],"parameters":[{"name":"array","in":"formData","required":true,"schema":{"type":"array","items":{"$ref":"#/definitions/Resume"}}}],"responses":{"200":{"description":"OK response.","schema":{"type":"array","items":{"type":"integer","example":5765309117005200142,"format":"int64"}}}},"schemes":["http"]}}},"definitions":{"Education":{"title":"Education","type":"object","properties":{"institution":{"type":"string","description":"Name of the institution","example":"Est enim ut odio rerum."},"major":{"type":"string","description":"Major name","example":"Explicabo sapiente est praesentium sunt et."}},"example":{"institution":"Est enim ut odio rerum.","major":"Explicabo sapiente est praesentium sunt et."},"required":["institution","major"]},"Experience":{"title":"Experience","type":"object","properties":{"company":{"type":"string","description":"Name of the company","example":"Eum ut."},"duration":{"type":"integer","description":"Duration (in years) in the company","example":7855387208056668376,"format":"int64"},"role":{"type":"string","description":"Name of the role in the company","example":"Quam minima dolorum et voluptatem velit."}},"example":{"company":"Eum ut.","duration":7855387208056668376,"role":"Quam minima dolorum et voluptatem velit."},"required":["company","role","duration"]},"Resume":{"title":"Resume","type":"object","properties":{"education":{"type":"array","items":{"$ref":"#/definitions/Education"},"description":"Education section in the resume","example":[{"institution":"Ipsum saepe quia est.","major":"Fuga placeat est voluptatem sed."},{"institution":"Ipsum saepe quia est.","major":"Fuga placeat est voluptatem sed."},{"institution":"Ipsum saepe quia est.","major":"Fuga placeat est voluptatem sed."}]},"experience":{"type":"array","items":{"$ref":"#/definitions/Experience"},"description":"Experience section in the resume","example":[{"company":"Saepe enim.","duration":4129157726558553807,"role":"Aut sit aut dolores sed ut ut."},{"company":"Saepe enim.","duration":4129157726558553807,"role":"Aut sit aut dolores sed ut ut."}]},"name":{"type":"string","description":"Name in the resume","example":"Explicabo et eligendi expedita necessitatibus eius qui."}},"example":{"education":[{"institution":"Ipsum saepe quia est.","major":"Fuga placeat est voluptatem sed."},{"institution":"Ipsum saepe quia est.","major":"Fuga placeat est voluptatem sed."},{"institution":"Ipsum saepe quia est.","major":"Fuga placeat est voluptatem sed."}],"experience":[{"company":"Saepe enim.","duration":4129157726558553807,"role":"Aut sit aut dolores sed ut ut."},{"company":"Saepe enim.","duration":4129157726558553807,"role":"Aut sit aut dolores sed ut ut."}],"name":"Explicabo et eligendi expedita necessitatibus eius qui."},"required":["name"]},"ResumeStoredResumeResponseCollection":{"title":"Mediatype identifier: application/vnd.goa.resume; type=collection; view=default","type":"array","items":{"$ref":"#/definitions/StoredResumeResponse"},"description":"ListResponseBody is the result type for an array of StoredResumeResponse (default view)","example":[{"created_at":"Eum corrupti sed ducimus non rem veniam.","education":[{"institution":"Est enim ut odio rerum.","major":"Explicabo sapiente est praesentium sunt et."},{"institution":"Est enim ut odio rerum.","major":"Explicabo sapiente est praesentium sunt et."},{"institution":"Est enim ut odio rerum.","major":"Explicabo sapiente est praesentium sunt et."}],"experience":[{"company":"Eum ut.","duration":7855387208056668376,"role":"Quam minima dolorum et voluptatem velit."},{"company":"Eum ut.","duration":7855387208056668376,"role":"Quam minima dolorum et voluptatem velit."}],"id":3129448934659270285,"name":"Neque rerum quibusdam."},{"created_at":"Eum corrupti sed ducimus non rem veniam.","education":[{"institution":"Est enim ut odio rerum.","major":"Explicabo sapiente est praesentium sunt et."},{"institution":"Est enim ut odio rerum.","major":"Explicabo sapiente est praesentium sunt et."},{"institution":"Est enim ut odio rerum.","major":"Explicabo sapiente est praesentium sunt et."}],"experience":[{"company":"Eum ut.","duration":7855387208056668376,"role":"Quam minima dolorum et voluptatem velit."},{"company":"Eum ut.","duration":7855387208056668376,"role":"Quam minima dolorum et voluptatem velit."}],"id":3129448934659270285,"name":"Neque rerum quibusdam."}]},"StoredResumeResponse":{"title":"Mediatype identifier: application/vnd.goa.resume; view=default","type":"object","properties":{"created_at":{"type":"string","description":"Time when resume was created","example":"Eum corrupti sed ducimus non rem veniam."},"education":{"type":"array","items":{"$ref":"#/definitions/Education"},"description":"Education section in the resume","example":[{"institution":"Est enim ut odio rerum.","major":"Explicabo sapiente est praesentium sunt et."},{"institution":"Est enim ut odio rerum.","major":"Explicabo sapiente est praesentium sunt et."},{"institution":"Est enim ut odio rerum.","major":"Explicabo sapiente est praesentium sunt et."}]},"experience":{"type":"array","items":{"$ref":"#/definitions/Experience"},"description":"Experience section in the resume","example":[{"company":"Eum ut.","duration":7855387208056668376,"role":"Quam minima dolorum et voluptatem velit."},{"company":"Eum ut.","duration":7855387208056668376,"role":"Quam minima dolorum et voluptatem velit."}]},"id":{"type":"integer","description":"ID of the resume","example":3129448934659270285,"format":"int64"},"name":{"type":"string","description":"Name in the resume","example":"Neque rerum quibusdam."}},"description":"StoredResumeResponse result type (default view)","example":{"created_at":"Eum corrupti sed ducimus non rem veniam.","education":[{"institution":"Est enim ut odio rerum.","major":"Explicabo sapiente est praesentium sunt et."},{"institution":"Est enim ut odio rerum.","major":"Explicabo sapiente est praesentium sunt et."},{"institution":"Est enim ut odio rerum.","major":"Explicabo sapiente est praesentium sunt et."}],"experience":[{"company":"Eum ut.","duration":7855387208056668376,"role":"Quam minima dolorum et voluptatem velit."},{"company":"Eum ut.","duration":7855387208056668376,"role":"Quam minima dolorum et voluptatem velit."}],"id":3129448934659270285,"name":"Neque rerum quibusdam."},"required":["id","name","experience","education","created_at"]}}} \ No newline at end of file +{"swagger":"2.0","info":{"title":"","version":"0.0.1"},"host":"localhost:80","consumes":["application/json","application/xml","application/gob"],"produces":["application/json","application/xml","application/gob"],"paths":{"/resumes":{"get":{"tags":["resume"],"summary":"list resume","description":"List all stored resumes","operationId":"resume#list","responses":{"200":{"description":"OK response.","schema":{"$ref":"#/definitions/ResumeStoredResumeResponseCollection"}}},"schemes":["http"]},"post":{"tags":["resume"],"summary":"add resume","description":"Add n number of resumes and return their IDs. This is a multipart request and each part has field name 'resume' and contains the encoded resume to be added.","operationId":"resume#add","consumes":["multipart/form-data"],"parameters":[{"name":"array","in":"formData","required":true,"schema":{"type":"array","items":{"$ref":"#/definitions/Resume"}}}],"responses":{"200":{"description":"OK response.","schema":{"type":"array","items":{"type":"integer","example":6256991813360998249,"format":"int64"}}}},"schemes":["http"]}}},"definitions":{"Education":{"title":"Education","type":"object","properties":{"institution":{"type":"string","description":"Name of the institution","example":"Vitae eaque autem in."},"major":{"type":"string","description":"Major name","example":"Qui nostrum quas velit nihil."}},"example":{"institution":"Vitae eaque autem in.","major":"Qui nostrum quas velit nihil."},"required":["institution","major"]},"Experience":{"title":"Experience","type":"object","properties":{"company":{"type":"string","description":"Name of the company","example":"Dolor dicta dignissimos eius facere enim quae."},"duration":{"type":"integer","description":"Duration (in years) in the company","example":6839028381351029038,"format":"int64"},"role":{"type":"string","description":"Name of the role in the company","example":"Enim quia recusandae nostrum animi nam."}},"example":{"company":"Dolor dicta dignissimos eius facere enim quae.","duration":6839028381351029038,"role":"Enim quia recusandae nostrum animi nam."},"required":["company","role","duration"]},"Resume":{"title":"Resume","type":"object","properties":{"education":{"type":"array","items":{"$ref":"#/definitions/Education"},"description":"Education section in the resume","example":[{"institution":"Vitae eaque autem in.","major":"Qui nostrum quas velit nihil."},{"institution":"Vitae eaque autem in.","major":"Qui nostrum quas velit nihil."}]},"experience":{"type":"array","items":{"$ref":"#/definitions/Experience"},"description":"Experience section in the resume","example":[{"company":"Dolor dicta dignissimos eius facere enim quae.","duration":6839028381351029038,"role":"Enim quia recusandae nostrum animi nam."},{"company":"Dolor dicta dignissimos eius facere enim quae.","duration":6839028381351029038,"role":"Enim quia recusandae nostrum animi nam."}]},"name":{"type":"string","description":"Name in the resume","example":"Voluptas et."}},"example":{"education":[{"institution":"Vitae eaque autem in.","major":"Qui nostrum quas velit nihil."},{"institution":"Vitae eaque autem in.","major":"Qui nostrum quas velit nihil."}],"experience":[{"company":"Dolor dicta dignissimos eius facere enim quae.","duration":6839028381351029038,"role":"Enim quia recusandae nostrum animi nam."},{"company":"Dolor dicta dignissimos eius facere enim quae.","duration":6839028381351029038,"role":"Enim quia recusandae nostrum animi nam."}],"name":"Voluptas et."},"required":["name"]},"ResumeStoredResumeResponseCollection":{"title":"Mediatype identifier: application/vnd.goa.resume; type=collection; view=default","type":"array","items":{"$ref":"#/definitions/StoredResumeResponse"},"description":"ListResponseBody is the result type for an array of StoredResume (default view)","example":[{"created_at":"Non sequi eos.","education":[{"institution":"Vitae eaque autem in.","major":"Qui nostrum quas velit nihil."},{"institution":"Vitae eaque autem in.","major":"Qui nostrum quas velit nihil."},{"institution":"Vitae eaque autem in.","major":"Qui nostrum quas velit nihil."}],"experience":[{"company":"Dolor dicta dignissimos eius facere enim quae.","duration":6839028381351029038,"role":"Enim quia recusandae nostrum animi nam."},{"company":"Dolor dicta dignissimos eius facere enim quae.","duration":6839028381351029038,"role":"Enim quia recusandae nostrum animi nam."},{"company":"Dolor dicta dignissimos eius facere enim quae.","duration":6839028381351029038,"role":"Enim quia recusandae nostrum animi nam."}],"id":4215431722801319674,"name":"Voluptas quae modi saepe et impedit aliquam."},{"created_at":"Non sequi eos.","education":[{"institution":"Vitae eaque autem in.","major":"Qui nostrum quas velit nihil."},{"institution":"Vitae eaque autem in.","major":"Qui nostrum quas velit nihil."},{"institution":"Vitae eaque autem in.","major":"Qui nostrum quas velit nihil."}],"experience":[{"company":"Dolor dicta dignissimos eius facere enim quae.","duration":6839028381351029038,"role":"Enim quia recusandae nostrum animi nam."},{"company":"Dolor dicta dignissimos eius facere enim quae.","duration":6839028381351029038,"role":"Enim quia recusandae nostrum animi nam."},{"company":"Dolor dicta dignissimos eius facere enim quae.","duration":6839028381351029038,"role":"Enim quia recusandae nostrum animi nam."}],"id":4215431722801319674,"name":"Voluptas quae modi saepe et impedit aliquam."}]},"StoredResumeResponse":{"title":"Mediatype identifier: application/vnd.goa.resume; view=default","type":"object","properties":{"created_at":{"type":"string","description":"Time when resume was created","example":"Non sequi eos."},"education":{"type":"array","items":{"$ref":"#/definitions/Education"},"description":"Education section in the resume","example":[{"institution":"Vitae eaque autem in.","major":"Qui nostrum quas velit nihil."},{"institution":"Vitae eaque autem in.","major":"Qui nostrum quas velit nihil."},{"institution":"Vitae eaque autem in.","major":"Qui nostrum quas velit nihil."}]},"experience":{"type":"array","items":{"$ref":"#/definitions/Experience"},"description":"Experience section in the resume","example":[{"company":"Dolor dicta dignissimos eius facere enim quae.","duration":6839028381351029038,"role":"Enim quia recusandae nostrum animi nam."},{"company":"Dolor dicta dignissimos eius facere enim quae.","duration":6839028381351029038,"role":"Enim quia recusandae nostrum animi nam."},{"company":"Dolor dicta dignissimos eius facere enim quae.","duration":6839028381351029038,"role":"Enim quia recusandae nostrum animi nam."}]},"id":{"type":"integer","description":"ID of the resume","example":4215431722801319674,"format":"int64"},"name":{"type":"string","description":"Name in the resume","example":"Voluptas quae modi saepe et impedit aliquam."}},"description":"StoredResume result type (default view)","example":{"created_at":"Non sequi eos.","education":[{"institution":"Vitae eaque autem in.","major":"Qui nostrum quas velit nihil."},{"institution":"Vitae eaque autem in.","major":"Qui nostrum quas velit nihil."},{"institution":"Vitae eaque autem in.","major":"Qui nostrum quas velit nihil."}],"experience":[{"company":"Dolor dicta dignissimos eius facere enim quae.","duration":6839028381351029038,"role":"Enim quia recusandae nostrum animi nam."},{"company":"Dolor dicta dignissimos eius facere enim quae.","duration":6839028381351029038,"role":"Enim quia recusandae nostrum animi nam."},{"company":"Dolor dicta dignissimos eius facere enim quae.","duration":6839028381351029038,"role":"Enim quia recusandae nostrum animi nam."}],"id":4215431722801319674,"name":"Voluptas quae modi saepe et impedit aliquam."},"required":["id","name","experience","education","created_at"]}}} \ No newline at end of file diff --git a/multipart/gen/http/openapi.yaml b/multipart/gen/http/openapi.yaml index 151056f52..44e2b96b4 100644 --- a/multipart/gen/http/openapi.yaml +++ b/multipart/gen/http/openapi.yaml @@ -49,7 +49,7 @@ paths: type: array items: type: integer - example: 5765309117005200142 + example: 6256991813360998249 format: int64 schemes: - http @@ -61,14 +61,14 @@ definitions: institution: type: string description: Name of the institution - example: Est enim ut odio rerum. + example: Vitae eaque autem in. major: type: string description: Major name - example: Explicabo sapiente est praesentium sunt et. + example: Qui nostrum quas velit nihil. example: - institution: Est enim ut odio rerum. - major: Explicabo sapiente est praesentium sunt et. + institution: Vitae eaque autem in. + major: Qui nostrum quas velit nihil. required: - institution - major @@ -79,20 +79,20 @@ definitions: company: type: string description: Name of the company - example: Eum ut. + example: Dolor dicta dignissimos eius facere enim quae. duration: type: integer description: Duration (in years) in the company - example: 7855387208056668376 + example: 6839028381351029038 format: int64 role: type: string description: Name of the role in the company - example: Quam minima dolorum et voluptatem velit. + example: Enim quia recusandae nostrum animi nam. example: - company: Eum ut. - duration: 7855387208056668376 - role: Quam minima dolorum et voluptatem velit. + company: Dolor dicta dignissimos eius facere enim quae. + duration: 6839028381351029038 + role: Enim quia recusandae nostrum animi nam. required: - company - role @@ -107,44 +107,40 @@ definitions: $ref: '#/definitions/Education' description: Education section in the resume example: - - institution: Ipsum saepe quia est. - major: Fuga placeat est voluptatem sed. - - institution: Ipsum saepe quia est. - major: Fuga placeat est voluptatem sed. - - institution: Ipsum saepe quia est. - major: Fuga placeat est voluptatem sed. + - institution: Vitae eaque autem in. + major: Qui nostrum quas velit nihil. + - institution: Vitae eaque autem in. + major: Qui nostrum quas velit nihil. experience: type: array items: $ref: '#/definitions/Experience' description: Experience section in the resume example: - - company: Saepe enim. - duration: 4129157726558553807 - role: Aut sit aut dolores sed ut ut. - - company: Saepe enim. - duration: 4129157726558553807 - role: Aut sit aut dolores sed ut ut. + - company: Dolor dicta dignissimos eius facere enim quae. + duration: 6839028381351029038 + role: Enim quia recusandae nostrum animi nam. + - company: Dolor dicta dignissimos eius facere enim quae. + duration: 6839028381351029038 + role: Enim quia recusandae nostrum animi nam. name: type: string description: Name in the resume - example: Explicabo et eligendi expedita necessitatibus eius qui. + example: Voluptas et. example: education: - - institution: Ipsum saepe quia est. - major: Fuga placeat est voluptatem sed. - - institution: Ipsum saepe quia est. - major: Fuga placeat est voluptatem sed. - - institution: Ipsum saepe quia est. - major: Fuga placeat est voluptatem sed. + - institution: Vitae eaque autem in. + major: Qui nostrum quas velit nihil. + - institution: Vitae eaque autem in. + major: Qui nostrum quas velit nihil. experience: - - company: Saepe enim. - duration: 4129157726558553807 - role: Aut sit aut dolores sed ut ut. - - company: Saepe enim. - duration: 4129157726558553807 - role: Aut sit aut dolores sed ut ut. - name: Explicabo et eligendi expedita necessitatibus eius qui. + - company: Dolor dicta dignissimos eius facere enim quae. + duration: 6839028381351029038 + role: Enim quia recusandae nostrum animi nam. + - company: Dolor dicta dignissimos eius facere enim quae. + duration: 6839028381351029038 + role: Enim quia recusandae nostrum animi nam. + name: Voluptas et. required: - name ResumeStoredResumeResponseCollection: @@ -152,42 +148,48 @@ definitions: type: array items: $ref: '#/definitions/StoredResumeResponse' - description: ListResponseBody is the result type for an array of StoredResumeResponse (default view) + description: ListResponseBody is the result type for an array of StoredResume (default view) example: - - created_at: Eum corrupti sed ducimus non rem veniam. + - created_at: Non sequi eos. education: - - institution: Est enim ut odio rerum. - major: Explicabo sapiente est praesentium sunt et. - - institution: Est enim ut odio rerum. - major: Explicabo sapiente est praesentium sunt et. - - institution: Est enim ut odio rerum. - major: Explicabo sapiente est praesentium sunt et. + - institution: Vitae eaque autem in. + major: Qui nostrum quas velit nihil. + - institution: Vitae eaque autem in. + major: Qui nostrum quas velit nihil. + - institution: Vitae eaque autem in. + major: Qui nostrum quas velit nihil. experience: - - company: Eum ut. - duration: 7855387208056668376 - role: Quam minima dolorum et voluptatem velit. - - company: Eum ut. - duration: 7855387208056668376 - role: Quam minima dolorum et voluptatem velit. - id: 3129448934659270285 - name: Neque rerum quibusdam. - - created_at: Eum corrupti sed ducimus non rem veniam. + - company: Dolor dicta dignissimos eius facere enim quae. + duration: 6839028381351029038 + role: Enim quia recusandae nostrum animi nam. + - company: Dolor dicta dignissimos eius facere enim quae. + duration: 6839028381351029038 + role: Enim quia recusandae nostrum animi nam. + - company: Dolor dicta dignissimos eius facere enim quae. + duration: 6839028381351029038 + role: Enim quia recusandae nostrum animi nam. + id: 4215431722801319674 + name: Voluptas quae modi saepe et impedit aliquam. + - created_at: Non sequi eos. education: - - institution: Est enim ut odio rerum. - major: Explicabo sapiente est praesentium sunt et. - - institution: Est enim ut odio rerum. - major: Explicabo sapiente est praesentium sunt et. - - institution: Est enim ut odio rerum. - major: Explicabo sapiente est praesentium sunt et. + - institution: Vitae eaque autem in. + major: Qui nostrum quas velit nihil. + - institution: Vitae eaque autem in. + major: Qui nostrum quas velit nihil. + - institution: Vitae eaque autem in. + major: Qui nostrum quas velit nihil. experience: - - company: Eum ut. - duration: 7855387208056668376 - role: Quam minima dolorum et voluptatem velit. - - company: Eum ut. - duration: 7855387208056668376 - role: Quam minima dolorum et voluptatem velit. - id: 3129448934659270285 - name: Neque rerum quibusdam. + - company: Dolor dicta dignissimos eius facere enim quae. + duration: 6839028381351029038 + role: Enim quia recusandae nostrum animi nam. + - company: Dolor dicta dignissimos eius facere enim quae. + duration: 6839028381351029038 + role: Enim quia recusandae nostrum animi nam. + - company: Dolor dicta dignissimos eius facere enim quae. + duration: 6839028381351029038 + role: Enim quia recusandae nostrum animi nam. + id: 4215431722801319674 + name: Voluptas quae modi saepe et impedit aliquam. StoredResumeResponse: title: 'Mediatype identifier: application/vnd.goa.resume; view=default' type: object @@ -195,59 +197,65 @@ definitions: created_at: type: string description: Time when resume was created - example: Eum corrupti sed ducimus non rem veniam. + example: Non sequi eos. education: type: array items: $ref: '#/definitions/Education' description: Education section in the resume example: - - institution: Est enim ut odio rerum. - major: Explicabo sapiente est praesentium sunt et. - - institution: Est enim ut odio rerum. - major: Explicabo sapiente est praesentium sunt et. - - institution: Est enim ut odio rerum. - major: Explicabo sapiente est praesentium sunt et. + - institution: Vitae eaque autem in. + major: Qui nostrum quas velit nihil. + - institution: Vitae eaque autem in. + major: Qui nostrum quas velit nihil. + - institution: Vitae eaque autem in. + major: Qui nostrum quas velit nihil. experience: type: array items: $ref: '#/definitions/Experience' description: Experience section in the resume example: - - company: Eum ut. - duration: 7855387208056668376 - role: Quam minima dolorum et voluptatem velit. - - company: Eum ut. - duration: 7855387208056668376 - role: Quam minima dolorum et voluptatem velit. + - company: Dolor dicta dignissimos eius facere enim quae. + duration: 6839028381351029038 + role: Enim quia recusandae nostrum animi nam. + - company: Dolor dicta dignissimos eius facere enim quae. + duration: 6839028381351029038 + role: Enim quia recusandae nostrum animi nam. + - company: Dolor dicta dignissimos eius facere enim quae. + duration: 6839028381351029038 + role: Enim quia recusandae nostrum animi nam. id: type: integer description: ID of the resume - example: 3129448934659270285 + example: 4215431722801319674 format: int64 name: type: string description: Name in the resume - example: Neque rerum quibusdam. - description: StoredResumeResponse result type (default view) + example: Voluptas quae modi saepe et impedit aliquam. + description: StoredResume result type (default view) example: - created_at: Eum corrupti sed ducimus non rem veniam. + created_at: Non sequi eos. education: - - institution: Est enim ut odio rerum. - major: Explicabo sapiente est praesentium sunt et. - - institution: Est enim ut odio rerum. - major: Explicabo sapiente est praesentium sunt et. - - institution: Est enim ut odio rerum. - major: Explicabo sapiente est praesentium sunt et. + - institution: Vitae eaque autem in. + major: Qui nostrum quas velit nihil. + - institution: Vitae eaque autem in. + major: Qui nostrum quas velit nihil. + - institution: Vitae eaque autem in. + major: Qui nostrum quas velit nihil. experience: - - company: Eum ut. - duration: 7855387208056668376 - role: Quam minima dolorum et voluptatem velit. - - company: Eum ut. - duration: 7855387208056668376 - role: Quam minima dolorum et voluptatem velit. - id: 3129448934659270285 - name: Neque rerum quibusdam. + - company: Dolor dicta dignissimos eius facere enim quae. + duration: 6839028381351029038 + role: Enim quia recusandae nostrum animi nam. + - company: Dolor dicta dignissimos eius facere enim quae. + duration: 6839028381351029038 + role: Enim quia recusandae nostrum animi nam. + - company: Dolor dicta dignissimos eius facere enim quae. + duration: 6839028381351029038 + role: Enim quia recusandae nostrum animi nam. + id: 4215431722801319674 + name: Voluptas quae modi saepe et impedit aliquam. required: - id - name diff --git a/multipart/gen/http/openapi3.2.json b/multipart/gen/http/openapi3.2.json index 2e37c42a0..6c0a89380 100644 --- a/multipart/gen/http/openapi3.2.json +++ b/multipart/gen/http/openapi3.2.json @@ -1 +1 @@ -{"openapi":"3.2.0","info":{"title":"Goa API","version":"0.0.1"},"servers":[{"url":"http://localhost:80","name":"resume","description":"Default server for resume"}],"paths":{"/resumes":{"get":{"tags":["resume"],"summary":"list resume","description":"List all stored resumes","operationId":"resume#list","responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StoredResumeCollection"},"example":[{"created_at":"Sit voluptate voluptates nisi asperiores repellendus dolor.","education":[{"institution":"Et quaerat ipsa reiciendis.","major":"Ad neque hic ut repudiandae quibusdam incidunt."},{"institution":"Et quaerat ipsa reiciendis.","major":"Ad neque hic ut repudiandae quibusdam incidunt."},{"institution":"Et quaerat ipsa reiciendis.","major":"Ad neque hic ut repudiandae quibusdam incidunt."}],"experience":[{"company":"Dolores odio quis atque deserunt.","duration":3945418871627614791,"role":"Voluptas animi tempora vero."},{"company":"Dolores odio quis atque deserunt.","duration":3945418871627614791,"role":"Voluptas animi tempora vero."},{"company":"Dolores odio quis atque deserunt.","duration":3945418871627614791,"role":"Voluptas animi tempora vero."},{"company":"Dolores odio quis atque deserunt.","duration":3945418871627614791,"role":"Voluptas animi tempora vero."}],"id":1462454679131059051,"name":"Aperiam exercitationem aliquam et sint praesentium."},{"created_at":"Sit voluptate voluptates nisi asperiores repellendus dolor.","education":[{"institution":"Et quaerat ipsa reiciendis.","major":"Ad neque hic ut repudiandae quibusdam incidunt."},{"institution":"Et quaerat ipsa reiciendis.","major":"Ad neque hic ut repudiandae quibusdam incidunt."},{"institution":"Et quaerat ipsa reiciendis.","major":"Ad neque hic ut repudiandae quibusdam incidunt."}],"experience":[{"company":"Dolores odio quis atque deserunt.","duration":3945418871627614791,"role":"Voluptas animi tempora vero."},{"company":"Dolores odio quis atque deserunt.","duration":3945418871627614791,"role":"Voluptas animi tempora vero."},{"company":"Dolores odio quis atque deserunt.","duration":3945418871627614791,"role":"Voluptas animi tempora vero."},{"company":"Dolores odio quis atque deserunt.","duration":3945418871627614791,"role":"Voluptas animi tempora vero."}],"id":1462454679131059051,"name":"Aperiam exercitationem aliquam et sint praesentium."},{"created_at":"Sit voluptate voluptates nisi asperiores repellendus dolor.","education":[{"institution":"Et quaerat ipsa reiciendis.","major":"Ad neque hic ut repudiandae quibusdam incidunt."},{"institution":"Et quaerat ipsa reiciendis.","major":"Ad neque hic ut repudiandae quibusdam incidunt."},{"institution":"Et quaerat ipsa reiciendis.","major":"Ad neque hic ut repudiandae quibusdam incidunt."}],"experience":[{"company":"Dolores odio quis atque deserunt.","duration":3945418871627614791,"role":"Voluptas animi tempora vero."},{"company":"Dolores odio quis atque deserunt.","duration":3945418871627614791,"role":"Voluptas animi tempora vero."},{"company":"Dolores odio quis atque deserunt.","duration":3945418871627614791,"role":"Voluptas animi tempora vero."},{"company":"Dolores odio quis atque deserunt.","duration":3945418871627614791,"role":"Voluptas animi tempora vero."}],"id":1462454679131059051,"name":"Aperiam exercitationem aliquam et sint praesentium."},{"created_at":"Sit voluptate voluptates nisi asperiores repellendus dolor.","education":[{"institution":"Et quaerat ipsa reiciendis.","major":"Ad neque hic ut repudiandae quibusdam incidunt."},{"institution":"Et quaerat ipsa reiciendis.","major":"Ad neque hic ut repudiandae quibusdam incidunt."},{"institution":"Et quaerat ipsa reiciendis.","major":"Ad neque hic ut repudiandae quibusdam incidunt."}],"experience":[{"company":"Dolores odio quis atque deserunt.","duration":3945418871627614791,"role":"Voluptas animi tempora vero."},{"company":"Dolores odio quis atque deserunt.","duration":3945418871627614791,"role":"Voluptas animi tempora vero."},{"company":"Dolores odio quis atque deserunt.","duration":3945418871627614791,"role":"Voluptas animi tempora vero."},{"company":"Dolores odio quis atque deserunt.","duration":3945418871627614791,"role":"Voluptas animi tempora vero."}],"id":1462454679131059051,"name":"Aperiam exercitationem aliquam et sint praesentium."}]}}}}},"post":{"tags":["resume"],"summary":"add resume","description":"Add n number of resumes and return their IDs. This is a multipart request and each part has field name 'resume' and contains the encoded resume to be added.","operationId":"resume#add","requestBody":{"description":"Request body for add.","required":true,"content":{"multipart/form-data":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Resume"},"example":[{"education":[{"institution":"Ipsum saepe quia est.","major":"Fuga placeat est voluptatem sed."},{"institution":"Ipsum saepe quia est.","major":"Fuga placeat est voluptatem sed."},{"institution":"Ipsum saepe quia est.","major":"Fuga placeat est voluptatem sed."}],"experience":[{"company":"Saepe enim.","duration":4129157726558553807,"role":"Aut sit aut dolores sed ut ut."},{"company":"Saepe enim.","duration":4129157726558553807,"role":"Aut sit aut dolores sed ut ut."}],"name":"Explicabo et eligendi expedita necessitatibus eius qui."},{"education":[{"institution":"Ipsum saepe quia est.","major":"Fuga placeat est voluptatem sed."},{"institution":"Ipsum saepe quia est.","major":"Fuga placeat est voluptatem sed."},{"institution":"Ipsum saepe quia est.","major":"Fuga placeat est voluptatem sed."}],"experience":[{"company":"Saepe enim.","duration":4129157726558553807,"role":"Aut sit aut dolores sed ut ut."},{"company":"Saepe enim.","duration":4129157726558553807,"role":"Aut sit aut dolores sed ut ut."}],"name":"Explicabo et eligendi expedita necessitatibus eius qui."}]},"example":[{"education":[{"institution":"Ipsum saepe quia est.","major":"Fuga placeat est voluptatem sed."},{"institution":"Ipsum saepe quia est.","major":"Fuga placeat est voluptatem sed."},{"institution":"Ipsum saepe quia est.","major":"Fuga placeat est voluptatem sed."}],"experience":[{"company":"Saepe enim.","duration":4129157726558553807,"role":"Aut sit aut dolores sed ut ut."},{"company":"Saepe enim.","duration":4129157726558553807,"role":"Aut sit aut dolores sed ut ut."}],"name":"Explicabo et eligendi expedita necessitatibus eius qui."},{"education":[{"institution":"Ipsum saepe quia est.","major":"Fuga placeat est voluptatem sed."},{"institution":"Ipsum saepe quia est.","major":"Fuga placeat est voluptatem sed."},{"institution":"Ipsum saepe quia est.","major":"Fuga placeat est voluptatem sed."}],"experience":[{"company":"Saepe enim.","duration":4129157726558553807,"role":"Aut sit aut dolores sed ut ut."},{"company":"Saepe enim.","duration":4129157726558553807,"role":"Aut sit aut dolores sed ut ut."}],"name":"Explicabo et eligendi expedita necessitatibus eius qui."}]}}},"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"type":"array","items":{"type":"integer","example":1795326025593494324,"format":"int64"},"example":[1795326025593494324,7046124531025578008]},"example":[1795326025593494324,7046124531025578008]}}}}}}},"components":{"schemas":{"Education":{"type":"object","properties":{"institution":{"type":"string","description":"Name of the institution","example":"Est enim ut odio rerum."},"major":{"type":"string","description":"Major name","example":"Explicabo sapiente est praesentium sunt et."}},"example":{"institution":"Est enim ut odio rerum.","major":"Explicabo sapiente est praesentium sunt et."},"required":["institution","major"]},"Experience":{"type":"object","properties":{"company":{"type":"string","description":"Name of the company","example":"Eum ut."},"duration":{"type":"integer","description":"Duration (in years) in the company","example":7855387208056668376,"format":"int64"},"role":{"type":"string","description":"Name of the role in the company","example":"Quam minima dolorum et voluptatem velit."}},"example":{"company":"Eum ut.","duration":7855387208056668376,"role":"Quam minima dolorum et voluptatem velit."},"required":["company","role","duration"]},"GoaResume":{"type":"object","properties":{"created_at":{"type":"string","description":"Time when resume was created","example":"Sit voluptate voluptates nisi asperiores repellendus dolor."},"education":{"type":"array","items":{"$ref":"#/components/schemas/Education"},"description":"Education section in the resume","example":[{"institution":"Est enim ut odio rerum.","major":"Explicabo sapiente est praesentium sunt et."},{"institution":"Est enim ut odio rerum.","major":"Explicabo sapiente est praesentium sunt et."},{"institution":"Est enim ut odio rerum.","major":"Explicabo sapiente est praesentium sunt et."}]},"experience":{"type":"array","items":{"$ref":"#/components/schemas/Experience"},"description":"Experience section in the resume","example":[{"company":"Eum ut.","duration":7855387208056668376,"role":"Quam minima dolorum et voluptatem velit."},{"company":"Eum ut.","duration":7855387208056668376,"role":"Quam minima dolorum et voluptatem velit."},{"company":"Eum ut.","duration":7855387208056668376,"role":"Quam minima dolorum et voluptatem velit."},{"company":"Eum ut.","duration":7855387208056668376,"role":"Quam minima dolorum et voluptatem velit."}]},"id":{"type":"integer","description":"ID of the resume","example":1462454679131059051,"format":"int64"},"name":{"type":"string","description":"Name in the resume","example":"Aperiam exercitationem aliquam et sint praesentium."}},"example":{"created_at":"Sit voluptate voluptates nisi asperiores repellendus dolor.","education":[{"institution":"Est enim ut odio rerum.","major":"Explicabo sapiente est praesentium sunt et."},{"institution":"Est enim ut odio rerum.","major":"Explicabo sapiente est praesentium sunt et."},{"institution":"Est enim ut odio rerum.","major":"Explicabo sapiente est praesentium sunt et."}],"experience":[{"company":"Eum ut.","duration":7855387208056668376,"role":"Quam minima dolorum et voluptatem velit."},{"company":"Eum ut.","duration":7855387208056668376,"role":"Quam minima dolorum et voluptatem velit."},{"company":"Eum ut.","duration":7855387208056668376,"role":"Quam minima dolorum et voluptatem velit."},{"company":"Eum ut.","duration":7855387208056668376,"role":"Quam minima dolorum et voluptatem velit."}],"id":1462454679131059051,"name":"Aperiam exercitationem aliquam et sint praesentium."},"required":["id","name","experience","education","created_at"]},"Resume":{"type":"object","properties":{"education":{"type":"array","items":{"$ref":"#/components/schemas/Education"},"description":"Education section in the resume","example":[{"institution":"Ipsum saepe quia est.","major":"Fuga placeat est voluptatem sed."},{"institution":"Ipsum saepe quia est.","major":"Fuga placeat est voluptatem sed."},{"institution":"Ipsum saepe quia est.","major":"Fuga placeat est voluptatem sed."}]},"experience":{"type":"array","items":{"$ref":"#/components/schemas/Experience"},"description":"Experience section in the resume","example":[{"company":"Saepe enim.","duration":4129157726558553807,"role":"Aut sit aut dolores sed ut ut."},{"company":"Saepe enim.","duration":4129157726558553807,"role":"Aut sit aut dolores sed ut ut."}]},"name":{"type":"string","description":"Name in the resume","example":"Explicabo et eligendi expedita necessitatibus eius qui."}},"example":{"education":[{"institution":"Ipsum saepe quia est.","major":"Fuga placeat est voluptatem sed."},{"institution":"Ipsum saepe quia est.","major":"Fuga placeat est voluptatem sed."},{"institution":"Ipsum saepe quia est.","major":"Fuga placeat est voluptatem sed."}],"experience":[{"company":"Saepe enim.","duration":4129157726558553807,"role":"Aut sit aut dolores sed ut ut."},{"company":"Saepe enim.","duration":4129157726558553807,"role":"Aut sit aut dolores sed ut ut."}],"name":"Explicabo et eligendi expedita necessitatibus eius qui."},"required":["name"]},"StoredResumeCollection":{"type":"array","items":{"$ref":"#/components/schemas/GoaResume"},"example":[{"created_at":"Sit voluptate voluptates nisi asperiores repellendus dolor.","education":[{"institution":"Et quaerat ipsa reiciendis.","major":"Ad neque hic ut repudiandae quibusdam incidunt."},{"institution":"Et quaerat ipsa reiciendis.","major":"Ad neque hic ut repudiandae quibusdam incidunt."},{"institution":"Et quaerat ipsa reiciendis.","major":"Ad neque hic ut repudiandae quibusdam incidunt."}],"experience":[{"company":"Dolores odio quis atque deserunt.","duration":3945418871627614791,"role":"Voluptas animi tempora vero."},{"company":"Dolores odio quis atque deserunt.","duration":3945418871627614791,"role":"Voluptas animi tempora vero."},{"company":"Dolores odio quis atque deserunt.","duration":3945418871627614791,"role":"Voluptas animi tempora vero."},{"company":"Dolores odio quis atque deserunt.","duration":3945418871627614791,"role":"Voluptas animi tempora vero."}],"id":1462454679131059051,"name":"Aperiam exercitationem aliquam et sint praesentium."},{"created_at":"Sit voluptate voluptates nisi asperiores repellendus dolor.","education":[{"institution":"Et quaerat ipsa reiciendis.","major":"Ad neque hic ut repudiandae quibusdam incidunt."},{"institution":"Et quaerat ipsa reiciendis.","major":"Ad neque hic ut repudiandae quibusdam incidunt."},{"institution":"Et quaerat ipsa reiciendis.","major":"Ad neque hic ut repudiandae quibusdam incidunt."}],"experience":[{"company":"Dolores odio quis atque deserunt.","duration":3945418871627614791,"role":"Voluptas animi tempora vero."},{"company":"Dolores odio quis atque deserunt.","duration":3945418871627614791,"role":"Voluptas animi tempora vero."},{"company":"Dolores odio quis atque deserunt.","duration":3945418871627614791,"role":"Voluptas animi tempora vero."},{"company":"Dolores odio quis atque deserunt.","duration":3945418871627614791,"role":"Voluptas animi tempora vero."}],"id":1462454679131059051,"name":"Aperiam exercitationem aliquam et sint praesentium."},{"created_at":"Sit voluptate voluptates nisi asperiores repellendus dolor.","education":[{"institution":"Et quaerat ipsa reiciendis.","major":"Ad neque hic ut repudiandae quibusdam incidunt."},{"institution":"Et quaerat ipsa reiciendis.","major":"Ad neque hic ut repudiandae quibusdam incidunt."},{"institution":"Et quaerat ipsa reiciendis.","major":"Ad neque hic ut repudiandae quibusdam incidunt."}],"experience":[{"company":"Dolores odio quis atque deserunt.","duration":3945418871627614791,"role":"Voluptas animi tempora vero."},{"company":"Dolores odio quis atque deserunt.","duration":3945418871627614791,"role":"Voluptas animi tempora vero."},{"company":"Dolores odio quis atque deserunt.","duration":3945418871627614791,"role":"Voluptas animi tempora vero."},{"company":"Dolores odio quis atque deserunt.","duration":3945418871627614791,"role":"Voluptas animi tempora vero."}],"id":1462454679131059051,"name":"Aperiam exercitationem aliquam et sint praesentium."},{"created_at":"Sit voluptate voluptates nisi asperiores repellendus dolor.","education":[{"institution":"Et quaerat ipsa reiciendis.","major":"Ad neque hic ut repudiandae quibusdam incidunt."},{"institution":"Et quaerat ipsa reiciendis.","major":"Ad neque hic ut repudiandae quibusdam incidunt."},{"institution":"Et quaerat ipsa reiciendis.","major":"Ad neque hic ut repudiandae quibusdam incidunt."}],"experience":[{"company":"Dolores odio quis atque deserunt.","duration":3945418871627614791,"role":"Voluptas animi tempora vero."},{"company":"Dolores odio quis atque deserunt.","duration":3945418871627614791,"role":"Voluptas animi tempora vero."},{"company":"Dolores odio quis atque deserunt.","duration":3945418871627614791,"role":"Voluptas animi tempora vero."},{"company":"Dolores odio quis atque deserunt.","duration":3945418871627614791,"role":"Voluptas animi tempora vero."}],"id":1462454679131059051,"name":"Aperiam exercitationem aliquam et sint praesentium."}]}}},"tags":[{"name":"resume","description":"The storage service makes it possible to add resumes using multipart."}]} \ No newline at end of file +{"openapi":"3.2.0","info":{"title":"Goa API","version":"0.0.1"},"servers":[{"url":"http://localhost:80","name":"resume","description":"Default server for resume"}],"paths":{"/resumes":{"get":{"tags":["resume"],"summary":"list resume","description":"List all stored resumes","operationId":"resume#list","responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StoredResumeResponseCollection"},"example":[{"created_at":"Non sequi eos.","education":[{"institution":"Vitae eaque autem in.","major":"Qui nostrum quas velit nihil."},{"institution":"Vitae eaque autem in.","major":"Qui nostrum quas velit nihil."},{"institution":"Vitae eaque autem in.","major":"Qui nostrum quas velit nihil."}],"experience":[{"company":"Dolor dicta dignissimos eius facere enim quae.","duration":6839028381351029038,"role":"Enim quia recusandae nostrum animi nam."},{"company":"Dolor dicta dignissimos eius facere enim quae.","duration":6839028381351029038,"role":"Enim quia recusandae nostrum animi nam."},{"company":"Dolor dicta dignissimos eius facere enim quae.","duration":6839028381351029038,"role":"Enim quia recusandae nostrum animi nam."}],"id":4215431722801319674,"name":"Voluptas quae modi saepe et impedit aliquam."},{"created_at":"Non sequi eos.","education":[{"institution":"Vitae eaque autem in.","major":"Qui nostrum quas velit nihil."},{"institution":"Vitae eaque autem in.","major":"Qui nostrum quas velit nihil."},{"institution":"Vitae eaque autem in.","major":"Qui nostrum quas velit nihil."}],"experience":[{"company":"Dolor dicta dignissimos eius facere enim quae.","duration":6839028381351029038,"role":"Enim quia recusandae nostrum animi nam."},{"company":"Dolor dicta dignissimos eius facere enim quae.","duration":6839028381351029038,"role":"Enim quia recusandae nostrum animi nam."},{"company":"Dolor dicta dignissimos eius facere enim quae.","duration":6839028381351029038,"role":"Enim quia recusandae nostrum animi nam."}],"id":4215431722801319674,"name":"Voluptas quae modi saepe et impedit aliquam."}]}}}}},"post":{"tags":["resume"],"summary":"add resume","description":"Add n number of resumes and return their IDs. This is a multipart request and each part has field name 'resume' and contains the encoded resume to be added.","operationId":"resume#add","requestBody":{"description":"Request body for add.","required":true,"content":{"multipart/form-data":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Resume"},"example":[{"education":[{"institution":"Vitae eaque autem in.","major":"Qui nostrum quas velit nihil."},{"institution":"Vitae eaque autem in.","major":"Qui nostrum quas velit nihil."}],"experience":[{"company":"Dolor dicta dignissimos eius facere enim quae.","duration":6839028381351029038,"role":"Enim quia recusandae nostrum animi nam."},{"company":"Dolor dicta dignissimos eius facere enim quae.","duration":6839028381351029038,"role":"Enim quia recusandae nostrum animi nam."}],"name":"Voluptas et."},{"education":[{"institution":"Vitae eaque autem in.","major":"Qui nostrum quas velit nihil."},{"institution":"Vitae eaque autem in.","major":"Qui nostrum quas velit nihil."}],"experience":[{"company":"Dolor dicta dignissimos eius facere enim quae.","duration":6839028381351029038,"role":"Enim quia recusandae nostrum animi nam."},{"company":"Dolor dicta dignissimos eius facere enim quae.","duration":6839028381351029038,"role":"Enim quia recusandae nostrum animi nam."}],"name":"Voluptas et."},{"education":[{"institution":"Vitae eaque autem in.","major":"Qui nostrum quas velit nihil."},{"institution":"Vitae eaque autem in.","major":"Qui nostrum quas velit nihil."}],"experience":[{"company":"Dolor dicta dignissimos eius facere enim quae.","duration":6839028381351029038,"role":"Enim quia recusandae nostrum animi nam."},{"company":"Dolor dicta dignissimos eius facere enim quae.","duration":6839028381351029038,"role":"Enim quia recusandae nostrum animi nam."}],"name":"Voluptas et."},{"education":[{"institution":"Vitae eaque autem in.","major":"Qui nostrum quas velit nihil."},{"institution":"Vitae eaque autem in.","major":"Qui nostrum quas velit nihil."}],"experience":[{"company":"Dolor dicta dignissimos eius facere enim quae.","duration":6839028381351029038,"role":"Enim quia recusandae nostrum animi nam."},{"company":"Dolor dicta dignissimos eius facere enim quae.","duration":6839028381351029038,"role":"Enim quia recusandae nostrum animi nam."}],"name":"Voluptas et."}]},"example":[{"education":[{"institution":"Vitae eaque autem in.","major":"Qui nostrum quas velit nihil."},{"institution":"Vitae eaque autem in.","major":"Qui nostrum quas velit nihil."}],"experience":[{"company":"Dolor dicta dignissimos eius facere enim quae.","duration":6839028381351029038,"role":"Enim quia recusandae nostrum animi nam."},{"company":"Dolor dicta dignissimos eius facere enim quae.","duration":6839028381351029038,"role":"Enim quia recusandae nostrum animi nam."}],"name":"Voluptas et."},{"education":[{"institution":"Vitae eaque autem in.","major":"Qui nostrum quas velit nihil."},{"institution":"Vitae eaque autem in.","major":"Qui nostrum quas velit nihil."}],"experience":[{"company":"Dolor dicta dignissimos eius facere enim quae.","duration":6839028381351029038,"role":"Enim quia recusandae nostrum animi nam."},{"company":"Dolor dicta dignissimos eius facere enim quae.","duration":6839028381351029038,"role":"Enim quia recusandae nostrum animi nam."}],"name":"Voluptas et."},{"education":[{"institution":"Vitae eaque autem in.","major":"Qui nostrum quas velit nihil."},{"institution":"Vitae eaque autem in.","major":"Qui nostrum quas velit nihil."}],"experience":[{"company":"Dolor dicta dignissimos eius facere enim quae.","duration":6839028381351029038,"role":"Enim quia recusandae nostrum animi nam."},{"company":"Dolor dicta dignissimos eius facere enim quae.","duration":6839028381351029038,"role":"Enim quia recusandae nostrum animi nam."}],"name":"Voluptas et."},{"education":[{"institution":"Vitae eaque autem in.","major":"Qui nostrum quas velit nihil."},{"institution":"Vitae eaque autem in.","major":"Qui nostrum quas velit nihil."}],"experience":[{"company":"Dolor dicta dignissimos eius facere enim quae.","duration":6839028381351029038,"role":"Enim quia recusandae nostrum animi nam."},{"company":"Dolor dicta dignissimos eius facere enim quae.","duration":6839028381351029038,"role":"Enim quia recusandae nostrum animi nam."}],"name":"Voluptas et."}]}}},"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"type":"array","items":{"type":"integer","example":6256991813360998249,"format":"int64"},"example":[6256991813360998249,6614178561265574431,6452993006124939418]},"example":[6256991813360998249,6614178561265574431,6452993006124939418]}}}}}}},"components":{"schemas":{"Education":{"type":"object","properties":{"institution":{"type":"string","description":"Name of the institution","example":"Vitae eaque autem in."},"major":{"type":"string","description":"Major name","example":"Qui nostrum quas velit nihil."}},"example":{"institution":"Vitae eaque autem in.","major":"Qui nostrum quas velit nihil."},"required":["institution","major"]},"Experience":{"type":"object","properties":{"company":{"type":"string","description":"Name of the company","example":"Dolor dicta dignissimos eius facere enim quae."},"duration":{"type":"integer","description":"Duration (in years) in the company","example":6839028381351029038,"format":"int64"},"role":{"type":"string","description":"Name of the role in the company","example":"Enim quia recusandae nostrum animi nam."}},"example":{"company":"Dolor dicta dignissimos eius facere enim quae.","duration":6839028381351029038,"role":"Enim quia recusandae nostrum animi nam."},"required":["company","role","duration"]},"Resume":{"type":"object","properties":{"education":{"type":"array","items":{"$ref":"#/components/schemas/Education"},"description":"Education section in the resume","example":[{"institution":"Vitae eaque autem in.","major":"Qui nostrum quas velit nihil."},{"institution":"Vitae eaque autem in.","major":"Qui nostrum quas velit nihil."}]},"experience":{"type":"array","items":{"$ref":"#/components/schemas/Experience"},"description":"Experience section in the resume","example":[{"company":"Dolor dicta dignissimos eius facere enim quae.","duration":6839028381351029038,"role":"Enim quia recusandae nostrum animi nam."},{"company":"Dolor dicta dignissimos eius facere enim quae.","duration":6839028381351029038,"role":"Enim quia recusandae nostrum animi nam."}]},"name":{"type":"string","description":"Name in the resume","example":"Voluptas et."}},"example":{"education":[{"institution":"Vitae eaque autem in.","major":"Qui nostrum quas velit nihil."},{"institution":"Vitae eaque autem in.","major":"Qui nostrum quas velit nihil."}],"experience":[{"company":"Dolor dicta dignissimos eius facere enim quae.","duration":6839028381351029038,"role":"Enim quia recusandae nostrum animi nam."},{"company":"Dolor dicta dignissimos eius facere enim quae.","duration":6839028381351029038,"role":"Enim quia recusandae nostrum animi nam."}],"name":"Voluptas et."},"required":["name"]},"StoredResumeResponse":{"type":"object","properties":{"created_at":{"type":"string","description":"Time when resume was created","example":"Non sequi eos."},"education":{"type":"array","items":{"$ref":"#/components/schemas/Education"},"description":"Education section in the resume","example":[{"institution":"Vitae eaque autem in.","major":"Qui nostrum quas velit nihil."},{"institution":"Vitae eaque autem in.","major":"Qui nostrum quas velit nihil."},{"institution":"Vitae eaque autem in.","major":"Qui nostrum quas velit nihil."}]},"experience":{"type":"array","items":{"$ref":"#/components/schemas/Experience"},"description":"Experience section in the resume","example":[{"company":"Dolor dicta dignissimos eius facere enim quae.","duration":6839028381351029038,"role":"Enim quia recusandae nostrum animi nam."},{"company":"Dolor dicta dignissimos eius facere enim quae.","duration":6839028381351029038,"role":"Enim quia recusandae nostrum animi nam."},{"company":"Dolor dicta dignissimos eius facere enim quae.","duration":6839028381351029038,"role":"Enim quia recusandae nostrum animi nam."}]},"id":{"type":"integer","description":"ID of the resume","example":4215431722801319674,"format":"int64"},"name":{"type":"string","description":"Name in the resume","example":"Voluptas quae modi saepe et impedit aliquam."}},"description":"StoredResume result type (default view)","example":{"created_at":"Non sequi eos.","education":[{"institution":"Vitae eaque autem in.","major":"Qui nostrum quas velit nihil."},{"institution":"Vitae eaque autem in.","major":"Qui nostrum quas velit nihil."},{"institution":"Vitae eaque autem in.","major":"Qui nostrum quas velit nihil."}],"experience":[{"company":"Dolor dicta dignissimos eius facere enim quae.","duration":6839028381351029038,"role":"Enim quia recusandae nostrum animi nam."},{"company":"Dolor dicta dignissimos eius facere enim quae.","duration":6839028381351029038,"role":"Enim quia recusandae nostrum animi nam."},{"company":"Dolor dicta dignissimos eius facere enim quae.","duration":6839028381351029038,"role":"Enim quia recusandae nostrum animi nam."}],"id":4215431722801319674,"name":"Voluptas quae modi saepe et impedit aliquam."},"required":["id","name","experience","education","created_at"]},"StoredResumeResponseCollection":{"type":"array","items":{"$ref":"#/components/schemas/StoredResumeResponse"},"description":"ListResponseBody is the result type for an array of StoredResume (default view)","example":[{"created_at":"Non sequi eos.","education":[{"institution":"Vitae eaque autem in.","major":"Qui nostrum quas velit nihil."},{"institution":"Vitae eaque autem in.","major":"Qui nostrum quas velit nihil."},{"institution":"Vitae eaque autem in.","major":"Qui nostrum quas velit nihil."}],"experience":[{"company":"Dolor dicta dignissimos eius facere enim quae.","duration":6839028381351029038,"role":"Enim quia recusandae nostrum animi nam."},{"company":"Dolor dicta dignissimos eius facere enim quae.","duration":6839028381351029038,"role":"Enim quia recusandae nostrum animi nam."},{"company":"Dolor dicta dignissimos eius facere enim quae.","duration":6839028381351029038,"role":"Enim quia recusandae nostrum animi nam."}],"id":4215431722801319674,"name":"Voluptas quae modi saepe et impedit aliquam."},{"created_at":"Non sequi eos.","education":[{"institution":"Vitae eaque autem in.","major":"Qui nostrum quas velit nihil."},{"institution":"Vitae eaque autem in.","major":"Qui nostrum quas velit nihil."},{"institution":"Vitae eaque autem in.","major":"Qui nostrum quas velit nihil."}],"experience":[{"company":"Dolor dicta dignissimos eius facere enim quae.","duration":6839028381351029038,"role":"Enim quia recusandae nostrum animi nam."},{"company":"Dolor dicta dignissimos eius facere enim quae.","duration":6839028381351029038,"role":"Enim quia recusandae nostrum animi nam."},{"company":"Dolor dicta dignissimos eius facere enim quae.","duration":6839028381351029038,"role":"Enim quia recusandae nostrum animi nam."}],"id":4215431722801319674,"name":"Voluptas quae modi saepe et impedit aliquam."}]}}},"tags":[{"name":"resume","description":"The storage service makes it possible to add resumes using multipart."}]} \ No newline at end of file diff --git a/multipart/gen/http/openapi3.2.yaml b/multipart/gen/http/openapi3.2.yaml index 10d0566de..2557ef358 100644 --- a/multipart/gen/http/openapi3.2.yaml +++ b/multipart/gen/http/openapi3.2.yaml @@ -20,100 +20,48 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/StoredResumeCollection' + $ref: '#/components/schemas/StoredResumeResponseCollection' example: - - created_at: Sit voluptate voluptates nisi asperiores repellendus dolor. + - created_at: Non sequi eos. education: - - institution: Et quaerat ipsa reiciendis. - major: Ad neque hic ut repudiandae quibusdam incidunt. - - institution: Et quaerat ipsa reiciendis. - major: Ad neque hic ut repudiandae quibusdam incidunt. - - institution: Et quaerat ipsa reiciendis. - major: Ad neque hic ut repudiandae quibusdam incidunt. + - institution: Vitae eaque autem in. + major: Qui nostrum quas velit nihil. + - institution: Vitae eaque autem in. + major: Qui nostrum quas velit nihil. + - institution: Vitae eaque autem in. + major: Qui nostrum quas velit nihil. experience: - - company: Dolores odio quis atque deserunt. - duration: 3945418871627614791 - role: Voluptas animi tempora vero. - - company: Dolores odio quis atque deserunt. - duration: 3945418871627614791 - role: Voluptas animi tempora vero. - - company: Dolores odio quis atque deserunt. - duration: 3945418871627614791 - role: Voluptas animi tempora vero. - - company: Dolores odio quis atque deserunt. - duration: 3945418871627614791 - role: Voluptas animi tempora vero. - id: 1462454679131059051 - name: Aperiam exercitationem aliquam et sint praesentium. - - created_at: Sit voluptate voluptates nisi asperiores repellendus dolor. + - company: Dolor dicta dignissimos eius facere enim quae. + duration: 6839028381351029038 + role: Enim quia recusandae nostrum animi nam. + - company: Dolor dicta dignissimos eius facere enim quae. + duration: 6839028381351029038 + role: Enim quia recusandae nostrum animi nam. + - company: Dolor dicta dignissimos eius facere enim quae. + duration: 6839028381351029038 + role: Enim quia recusandae nostrum animi nam. + id: 4215431722801319674 + name: Voluptas quae modi saepe et impedit aliquam. + - created_at: Non sequi eos. education: - - institution: Et quaerat ipsa reiciendis. - major: Ad neque hic ut repudiandae quibusdam incidunt. - - institution: Et quaerat ipsa reiciendis. - major: Ad neque hic ut repudiandae quibusdam incidunt. - - institution: Et quaerat ipsa reiciendis. - major: Ad neque hic ut repudiandae quibusdam incidunt. + - institution: Vitae eaque autem in. + major: Qui nostrum quas velit nihil. + - institution: Vitae eaque autem in. + major: Qui nostrum quas velit nihil. + - institution: Vitae eaque autem in. + major: Qui nostrum quas velit nihil. experience: - - company: Dolores odio quis atque deserunt. - duration: 3945418871627614791 - role: Voluptas animi tempora vero. - - company: Dolores odio quis atque deserunt. - duration: 3945418871627614791 - role: Voluptas animi tempora vero. - - company: Dolores odio quis atque deserunt. - duration: 3945418871627614791 - role: Voluptas animi tempora vero. - - company: Dolores odio quis atque deserunt. - duration: 3945418871627614791 - role: Voluptas animi tempora vero. - id: 1462454679131059051 - name: Aperiam exercitationem aliquam et sint praesentium. - - created_at: Sit voluptate voluptates nisi asperiores repellendus dolor. - education: - - institution: Et quaerat ipsa reiciendis. - major: Ad neque hic ut repudiandae quibusdam incidunt. - - institution: Et quaerat ipsa reiciendis. - major: Ad neque hic ut repudiandae quibusdam incidunt. - - institution: Et quaerat ipsa reiciendis. - major: Ad neque hic ut repudiandae quibusdam incidunt. - experience: - - company: Dolores odio quis atque deserunt. - duration: 3945418871627614791 - role: Voluptas animi tempora vero. - - company: Dolores odio quis atque deserunt. - duration: 3945418871627614791 - role: Voluptas animi tempora vero. - - company: Dolores odio quis atque deserunt. - duration: 3945418871627614791 - role: Voluptas animi tempora vero. - - company: Dolores odio quis atque deserunt. - duration: 3945418871627614791 - role: Voluptas animi tempora vero. - id: 1462454679131059051 - name: Aperiam exercitationem aliquam et sint praesentium. - - created_at: Sit voluptate voluptates nisi asperiores repellendus dolor. - education: - - institution: Et quaerat ipsa reiciendis. - major: Ad neque hic ut repudiandae quibusdam incidunt. - - institution: Et quaerat ipsa reiciendis. - major: Ad neque hic ut repudiandae quibusdam incidunt. - - institution: Et quaerat ipsa reiciendis. - major: Ad neque hic ut repudiandae quibusdam incidunt. - experience: - - company: Dolores odio quis atque deserunt. - duration: 3945418871627614791 - role: Voluptas animi tempora vero. - - company: Dolores odio quis atque deserunt. - duration: 3945418871627614791 - role: Voluptas animi tempora vero. - - company: Dolores odio quis atque deserunt. - duration: 3945418871627614791 - role: Voluptas animi tempora vero. - - company: Dolores odio quis atque deserunt. - duration: 3945418871627614791 - role: Voluptas animi tempora vero. - id: 1462454679131059051 - name: Aperiam exercitationem aliquam et sint praesentium. + - company: Dolor dicta dignissimos eius facere enim quae. + duration: 6839028381351029038 + role: Enim quia recusandae nostrum animi nam. + - company: Dolor dicta dignissimos eius facere enim quae. + duration: 6839028381351029038 + role: Enim quia recusandae nostrum animi nam. + - company: Dolor dicta dignissimos eius facere enim quae. + duration: 6839028381351029038 + role: Enim quia recusandae nostrum animi nam. + id: 4215431722801319674 + name: Voluptas quae modi saepe et impedit aliquam. post: tags: - resume @@ -131,66 +79,110 @@ paths: $ref: '#/components/schemas/Resume' example: - education: - - institution: Ipsum saepe quia est. - major: Fuga placeat est voluptatem sed. - - institution: Ipsum saepe quia est. - major: Fuga placeat est voluptatem sed. - - institution: Ipsum saepe quia est. - major: Fuga placeat est voluptatem sed. + - institution: Vitae eaque autem in. + major: Qui nostrum quas velit nihil. + - institution: Vitae eaque autem in. + major: Qui nostrum quas velit nihil. + experience: + - company: Dolor dicta dignissimos eius facere enim quae. + duration: 6839028381351029038 + role: Enim quia recusandae nostrum animi nam. + - company: Dolor dicta dignissimos eius facere enim quae. + duration: 6839028381351029038 + role: Enim quia recusandae nostrum animi nam. + name: Voluptas et. + - education: + - institution: Vitae eaque autem in. + major: Qui nostrum quas velit nihil. + - institution: Vitae eaque autem in. + major: Qui nostrum quas velit nihil. + experience: + - company: Dolor dicta dignissimos eius facere enim quae. + duration: 6839028381351029038 + role: Enim quia recusandae nostrum animi nam. + - company: Dolor dicta dignissimos eius facere enim quae. + duration: 6839028381351029038 + role: Enim quia recusandae nostrum animi nam. + name: Voluptas et. + - education: + - institution: Vitae eaque autem in. + major: Qui nostrum quas velit nihil. + - institution: Vitae eaque autem in. + major: Qui nostrum quas velit nihil. experience: - - company: Saepe enim. - duration: 4129157726558553807 - role: Aut sit aut dolores sed ut ut. - - company: Saepe enim. - duration: 4129157726558553807 - role: Aut sit aut dolores sed ut ut. - name: Explicabo et eligendi expedita necessitatibus eius qui. + - company: Dolor dicta dignissimos eius facere enim quae. + duration: 6839028381351029038 + role: Enim quia recusandae nostrum animi nam. + - company: Dolor dicta dignissimos eius facere enim quae. + duration: 6839028381351029038 + role: Enim quia recusandae nostrum animi nam. + name: Voluptas et. - education: - - institution: Ipsum saepe quia est. - major: Fuga placeat est voluptatem sed. - - institution: Ipsum saepe quia est. - major: Fuga placeat est voluptatem sed. - - institution: Ipsum saepe quia est. - major: Fuga placeat est voluptatem sed. + - institution: Vitae eaque autem in. + major: Qui nostrum quas velit nihil. + - institution: Vitae eaque autem in. + major: Qui nostrum quas velit nihil. experience: - - company: Saepe enim. - duration: 4129157726558553807 - role: Aut sit aut dolores sed ut ut. - - company: Saepe enim. - duration: 4129157726558553807 - role: Aut sit aut dolores sed ut ut. - name: Explicabo et eligendi expedita necessitatibus eius qui. + - company: Dolor dicta dignissimos eius facere enim quae. + duration: 6839028381351029038 + role: Enim quia recusandae nostrum animi nam. + - company: Dolor dicta dignissimos eius facere enim quae. + duration: 6839028381351029038 + role: Enim quia recusandae nostrum animi nam. + name: Voluptas et. example: - education: - - institution: Ipsum saepe quia est. - major: Fuga placeat est voluptatem sed. - - institution: Ipsum saepe quia est. - major: Fuga placeat est voluptatem sed. - - institution: Ipsum saepe quia est. - major: Fuga placeat est voluptatem sed. + - institution: Vitae eaque autem in. + major: Qui nostrum quas velit nihil. + - institution: Vitae eaque autem in. + major: Qui nostrum quas velit nihil. + experience: + - company: Dolor dicta dignissimos eius facere enim quae. + duration: 6839028381351029038 + role: Enim quia recusandae nostrum animi nam. + - company: Dolor dicta dignissimos eius facere enim quae. + duration: 6839028381351029038 + role: Enim quia recusandae nostrum animi nam. + name: Voluptas et. + - education: + - institution: Vitae eaque autem in. + major: Qui nostrum quas velit nihil. + - institution: Vitae eaque autem in. + major: Qui nostrum quas velit nihil. experience: - - company: Saepe enim. - duration: 4129157726558553807 - role: Aut sit aut dolores sed ut ut. - - company: Saepe enim. - duration: 4129157726558553807 - role: Aut sit aut dolores sed ut ut. - name: Explicabo et eligendi expedita necessitatibus eius qui. + - company: Dolor dicta dignissimos eius facere enim quae. + duration: 6839028381351029038 + role: Enim quia recusandae nostrum animi nam. + - company: Dolor dicta dignissimos eius facere enim quae. + duration: 6839028381351029038 + role: Enim quia recusandae nostrum animi nam. + name: Voluptas et. - education: - - institution: Ipsum saepe quia est. - major: Fuga placeat est voluptatem sed. - - institution: Ipsum saepe quia est. - major: Fuga placeat est voluptatem sed. - - institution: Ipsum saepe quia est. - major: Fuga placeat est voluptatem sed. + - institution: Vitae eaque autem in. + major: Qui nostrum quas velit nihil. + - institution: Vitae eaque autem in. + major: Qui nostrum quas velit nihil. experience: - - company: Saepe enim. - duration: 4129157726558553807 - role: Aut sit aut dolores sed ut ut. - - company: Saepe enim. - duration: 4129157726558553807 - role: Aut sit aut dolores sed ut ut. - name: Explicabo et eligendi expedita necessitatibus eius qui. + - company: Dolor dicta dignissimos eius facere enim quae. + duration: 6839028381351029038 + role: Enim quia recusandae nostrum animi nam. + - company: Dolor dicta dignissimos eius facere enim quae. + duration: 6839028381351029038 + role: Enim quia recusandae nostrum animi nam. + name: Voluptas et. + - education: + - institution: Vitae eaque autem in. + major: Qui nostrum quas velit nihil. + - institution: Vitae eaque autem in. + major: Qui nostrum quas velit nihil. + experience: + - company: Dolor dicta dignissimos eius facere enim quae. + duration: 6839028381351029038 + role: Enim quia recusandae nostrum animi nam. + - company: Dolor dicta dignissimos eius facere enim quae. + duration: 6839028381351029038 + role: Enim quia recusandae nostrum animi nam. + name: Voluptas et. responses: "200": description: OK response. @@ -200,14 +192,16 @@ paths: type: array items: type: integer - example: 1795326025593494324 + example: 6256991813360998249 format: int64 example: - - 1795326025593494324 - - 7046124531025578008 + - 6256991813360998249 + - 6614178561265574431 + - 6452993006124939418 example: - - 1795326025593494324 - - 7046124531025578008 + - 6256991813360998249 + - 6614178561265574431 + - 6452993006124939418 components: schemas: Education: @@ -216,14 +210,14 @@ components: institution: type: string description: Name of the institution - example: Est enim ut odio rerum. + example: Vitae eaque autem in. major: type: string description: Major name - example: Explicabo sapiente est praesentium sunt et. + example: Qui nostrum quas velit nihil. example: - institution: Est enim ut odio rerum. - major: Explicabo sapiente est praesentium sunt et. + institution: Vitae eaque autem in. + major: Qui nostrum quas velit nihil. required: - institution - major @@ -233,246 +227,186 @@ components: company: type: string description: Name of the company - example: Eum ut. + example: Dolor dicta dignissimos eius facere enim quae. duration: type: integer description: Duration (in years) in the company - example: 7855387208056668376 + example: 6839028381351029038 format: int64 role: type: string description: Name of the role in the company - example: Quam minima dolorum et voluptatem velit. + example: Enim quia recusandae nostrum animi nam. example: - company: Eum ut. - duration: 7855387208056668376 - role: Quam minima dolorum et voluptatem velit. + company: Dolor dicta dignissimos eius facere enim quae. + duration: 6839028381351029038 + role: Enim quia recusandae nostrum animi nam. required: - company - role - duration - GoaResume: + Resume: type: object properties: - created_at: - type: string - description: Time when resume was created - example: Sit voluptate voluptates nisi asperiores repellendus dolor. education: type: array items: $ref: '#/components/schemas/Education' description: Education section in the resume example: - - institution: Est enim ut odio rerum. - major: Explicabo sapiente est praesentium sunt et. - - institution: Est enim ut odio rerum. - major: Explicabo sapiente est praesentium sunt et. - - institution: Est enim ut odio rerum. - major: Explicabo sapiente est praesentium sunt et. + - institution: Vitae eaque autem in. + major: Qui nostrum quas velit nihil. + - institution: Vitae eaque autem in. + major: Qui nostrum quas velit nihil. experience: type: array items: $ref: '#/components/schemas/Experience' description: Experience section in the resume example: - - company: Eum ut. - duration: 7855387208056668376 - role: Quam minima dolorum et voluptatem velit. - - company: Eum ut. - duration: 7855387208056668376 - role: Quam minima dolorum et voluptatem velit. - - company: Eum ut. - duration: 7855387208056668376 - role: Quam minima dolorum et voluptatem velit. - - company: Eum ut. - duration: 7855387208056668376 - role: Quam minima dolorum et voluptatem velit. - id: - type: integer - description: ID of the resume - example: 1462454679131059051 - format: int64 + - company: Dolor dicta dignissimos eius facere enim quae. + duration: 6839028381351029038 + role: Enim quia recusandae nostrum animi nam. + - company: Dolor dicta dignissimos eius facere enim quae. + duration: 6839028381351029038 + role: Enim quia recusandae nostrum animi nam. name: type: string description: Name in the resume - example: Aperiam exercitationem aliquam et sint praesentium. + example: Voluptas et. example: - created_at: Sit voluptate voluptates nisi asperiores repellendus dolor. education: - - institution: Est enim ut odio rerum. - major: Explicabo sapiente est praesentium sunt et. - - institution: Est enim ut odio rerum. - major: Explicabo sapiente est praesentium sunt et. - - institution: Est enim ut odio rerum. - major: Explicabo sapiente est praesentium sunt et. + - institution: Vitae eaque autem in. + major: Qui nostrum quas velit nihil. + - institution: Vitae eaque autem in. + major: Qui nostrum quas velit nihil. experience: - - company: Eum ut. - duration: 7855387208056668376 - role: Quam minima dolorum et voluptatem velit. - - company: Eum ut. - duration: 7855387208056668376 - role: Quam minima dolorum et voluptatem velit. - - company: Eum ut. - duration: 7855387208056668376 - role: Quam minima dolorum et voluptatem velit. - - company: Eum ut. - duration: 7855387208056668376 - role: Quam minima dolorum et voluptatem velit. - id: 1462454679131059051 - name: Aperiam exercitationem aliquam et sint praesentium. + - company: Dolor dicta dignissimos eius facere enim quae. + duration: 6839028381351029038 + role: Enim quia recusandae nostrum animi nam. + - company: Dolor dicta dignissimos eius facere enim quae. + duration: 6839028381351029038 + role: Enim quia recusandae nostrum animi nam. + name: Voluptas et. required: - - id - name - - experience - - education - - created_at - Resume: + StoredResumeResponse: type: object properties: + created_at: + type: string + description: Time when resume was created + example: Non sequi eos. education: type: array items: $ref: '#/components/schemas/Education' description: Education section in the resume example: - - institution: Ipsum saepe quia est. - major: Fuga placeat est voluptatem sed. - - institution: Ipsum saepe quia est. - major: Fuga placeat est voluptatem sed. - - institution: Ipsum saepe quia est. - major: Fuga placeat est voluptatem sed. + - institution: Vitae eaque autem in. + major: Qui nostrum quas velit nihil. + - institution: Vitae eaque autem in. + major: Qui nostrum quas velit nihil. + - institution: Vitae eaque autem in. + major: Qui nostrum quas velit nihil. experience: type: array items: $ref: '#/components/schemas/Experience' description: Experience section in the resume example: - - company: Saepe enim. - duration: 4129157726558553807 - role: Aut sit aut dolores sed ut ut. - - company: Saepe enim. - duration: 4129157726558553807 - role: Aut sit aut dolores sed ut ut. + - company: Dolor dicta dignissimos eius facere enim quae. + duration: 6839028381351029038 + role: Enim quia recusandae nostrum animi nam. + - company: Dolor dicta dignissimos eius facere enim quae. + duration: 6839028381351029038 + role: Enim quia recusandae nostrum animi nam. + - company: Dolor dicta dignissimos eius facere enim quae. + duration: 6839028381351029038 + role: Enim quia recusandae nostrum animi nam. + id: + type: integer + description: ID of the resume + example: 4215431722801319674 + format: int64 name: type: string description: Name in the resume - example: Explicabo et eligendi expedita necessitatibus eius qui. + example: Voluptas quae modi saepe et impedit aliquam. + description: StoredResume result type (default view) example: + created_at: Non sequi eos. education: - - institution: Ipsum saepe quia est. - major: Fuga placeat est voluptatem sed. - - institution: Ipsum saepe quia est. - major: Fuga placeat est voluptatem sed. - - institution: Ipsum saepe quia est. - major: Fuga placeat est voluptatem sed. + - institution: Vitae eaque autem in. + major: Qui nostrum quas velit nihil. + - institution: Vitae eaque autem in. + major: Qui nostrum quas velit nihil. + - institution: Vitae eaque autem in. + major: Qui nostrum quas velit nihil. experience: - - company: Saepe enim. - duration: 4129157726558553807 - role: Aut sit aut dolores sed ut ut. - - company: Saepe enim. - duration: 4129157726558553807 - role: Aut sit aut dolores sed ut ut. - name: Explicabo et eligendi expedita necessitatibus eius qui. + - company: Dolor dicta dignissimos eius facere enim quae. + duration: 6839028381351029038 + role: Enim quia recusandae nostrum animi nam. + - company: Dolor dicta dignissimos eius facere enim quae. + duration: 6839028381351029038 + role: Enim quia recusandae nostrum animi nam. + - company: Dolor dicta dignissimos eius facere enim quae. + duration: 6839028381351029038 + role: Enim quia recusandae nostrum animi nam. + id: 4215431722801319674 + name: Voluptas quae modi saepe et impedit aliquam. required: + - id - name - StoredResumeCollection: + - experience + - education + - created_at + StoredResumeResponseCollection: type: array items: - $ref: '#/components/schemas/GoaResume' + $ref: '#/components/schemas/StoredResumeResponse' + description: ListResponseBody is the result type for an array of StoredResume (default view) example: - - created_at: Sit voluptate voluptates nisi asperiores repellendus dolor. - education: - - institution: Et quaerat ipsa reiciendis. - major: Ad neque hic ut repudiandae quibusdam incidunt. - - institution: Et quaerat ipsa reiciendis. - major: Ad neque hic ut repudiandae quibusdam incidunt. - - institution: Et quaerat ipsa reiciendis. - major: Ad neque hic ut repudiandae quibusdam incidunt. - experience: - - company: Dolores odio quis atque deserunt. - duration: 3945418871627614791 - role: Voluptas animi tempora vero. - - company: Dolores odio quis atque deserunt. - duration: 3945418871627614791 - role: Voluptas animi tempora vero. - - company: Dolores odio quis atque deserunt. - duration: 3945418871627614791 - role: Voluptas animi tempora vero. - - company: Dolores odio quis atque deserunt. - duration: 3945418871627614791 - role: Voluptas animi tempora vero. - id: 1462454679131059051 - name: Aperiam exercitationem aliquam et sint praesentium. - - created_at: Sit voluptate voluptates nisi asperiores repellendus dolor. - education: - - institution: Et quaerat ipsa reiciendis. - major: Ad neque hic ut repudiandae quibusdam incidunt. - - institution: Et quaerat ipsa reiciendis. - major: Ad neque hic ut repudiandae quibusdam incidunt. - - institution: Et quaerat ipsa reiciendis. - major: Ad neque hic ut repudiandae quibusdam incidunt. - experience: - - company: Dolores odio quis atque deserunt. - duration: 3945418871627614791 - role: Voluptas animi tempora vero. - - company: Dolores odio quis atque deserunt. - duration: 3945418871627614791 - role: Voluptas animi tempora vero. - - company: Dolores odio quis atque deserunt. - duration: 3945418871627614791 - role: Voluptas animi tempora vero. - - company: Dolores odio quis atque deserunt. - duration: 3945418871627614791 - role: Voluptas animi tempora vero. - id: 1462454679131059051 - name: Aperiam exercitationem aliquam et sint praesentium. - - created_at: Sit voluptate voluptates nisi asperiores repellendus dolor. + - created_at: Non sequi eos. education: - - institution: Et quaerat ipsa reiciendis. - major: Ad neque hic ut repudiandae quibusdam incidunt. - - institution: Et quaerat ipsa reiciendis. - major: Ad neque hic ut repudiandae quibusdam incidunt. - - institution: Et quaerat ipsa reiciendis. - major: Ad neque hic ut repudiandae quibusdam incidunt. + - institution: Vitae eaque autem in. + major: Qui nostrum quas velit nihil. + - institution: Vitae eaque autem in. + major: Qui nostrum quas velit nihil. + - institution: Vitae eaque autem in. + major: Qui nostrum quas velit nihil. experience: - - company: Dolores odio quis atque deserunt. - duration: 3945418871627614791 - role: Voluptas animi tempora vero. - - company: Dolores odio quis atque deserunt. - duration: 3945418871627614791 - role: Voluptas animi tempora vero. - - company: Dolores odio quis atque deserunt. - duration: 3945418871627614791 - role: Voluptas animi tempora vero. - - company: Dolores odio quis atque deserunt. - duration: 3945418871627614791 - role: Voluptas animi tempora vero. - id: 1462454679131059051 - name: Aperiam exercitationem aliquam et sint praesentium. - - created_at: Sit voluptate voluptates nisi asperiores repellendus dolor. + - company: Dolor dicta dignissimos eius facere enim quae. + duration: 6839028381351029038 + role: Enim quia recusandae nostrum animi nam. + - company: Dolor dicta dignissimos eius facere enim quae. + duration: 6839028381351029038 + role: Enim quia recusandae nostrum animi nam. + - company: Dolor dicta dignissimos eius facere enim quae. + duration: 6839028381351029038 + role: Enim quia recusandae nostrum animi nam. + id: 4215431722801319674 + name: Voluptas quae modi saepe et impedit aliquam. + - created_at: Non sequi eos. education: - - institution: Et quaerat ipsa reiciendis. - major: Ad neque hic ut repudiandae quibusdam incidunt. - - institution: Et quaerat ipsa reiciendis. - major: Ad neque hic ut repudiandae quibusdam incidunt. - - institution: Et quaerat ipsa reiciendis. - major: Ad neque hic ut repudiandae quibusdam incidunt. + - institution: Vitae eaque autem in. + major: Qui nostrum quas velit nihil. + - institution: Vitae eaque autem in. + major: Qui nostrum quas velit nihil. + - institution: Vitae eaque autem in. + major: Qui nostrum quas velit nihil. experience: - - company: Dolores odio quis atque deserunt. - duration: 3945418871627614791 - role: Voluptas animi tempora vero. - - company: Dolores odio quis atque deserunt. - duration: 3945418871627614791 - role: Voluptas animi tempora vero. - - company: Dolores odio quis atque deserunt. - duration: 3945418871627614791 - role: Voluptas animi tempora vero. - - company: Dolores odio quis atque deserunt. - duration: 3945418871627614791 - role: Voluptas animi tempora vero. - id: 1462454679131059051 - name: Aperiam exercitationem aliquam et sint praesentium. + - company: Dolor dicta dignissimos eius facere enim quae. + duration: 6839028381351029038 + role: Enim quia recusandae nostrum animi nam. + - company: Dolor dicta dignissimos eius facere enim quae. + duration: 6839028381351029038 + role: Enim quia recusandae nostrum animi nam. + - company: Dolor dicta dignissimos eius facere enim quae. + duration: 6839028381351029038 + role: Enim quia recusandae nostrum animi nam. + id: 4215431722801319674 + name: Voluptas quae modi saepe et impedit aliquam. tags: - name: resume description: The storage service makes it possible to add resumes using multipart. diff --git a/multipart/gen/http/openapi3.json b/multipart/gen/http/openapi3.json index 6718e3286..68bf51df1 100644 --- a/multipart/gen/http/openapi3.json +++ b/multipart/gen/http/openapi3.json @@ -1 +1 @@ -{"openapi":"3.0.3","info":{"title":"Goa API","version":"0.0.1"},"servers":[{"url":"http://localhost:80","description":"Default server for resume"}],"paths":{"/resumes":{"get":{"tags":["resume"],"summary":"list resume","description":"List all stored resumes","operationId":"resume#list","responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StoredResumeCollection"},"example":[{"created_at":"Sit voluptate voluptates nisi asperiores repellendus dolor.","education":[{"institution":"Et quaerat ipsa reiciendis.","major":"Ad neque hic ut repudiandae quibusdam incidunt."},{"institution":"Et quaerat ipsa reiciendis.","major":"Ad neque hic ut repudiandae quibusdam incidunt."},{"institution":"Et quaerat ipsa reiciendis.","major":"Ad neque hic ut repudiandae quibusdam incidunt."}],"experience":[{"company":"Dolores odio quis atque deserunt.","duration":3945418871627614791,"role":"Voluptas animi tempora vero."},{"company":"Dolores odio quis atque deserunt.","duration":3945418871627614791,"role":"Voluptas animi tempora vero."},{"company":"Dolores odio quis atque deserunt.","duration":3945418871627614791,"role":"Voluptas animi tempora vero."},{"company":"Dolores odio quis atque deserunt.","duration":3945418871627614791,"role":"Voluptas animi tempora vero."}],"id":1462454679131059051,"name":"Aperiam exercitationem aliquam et sint praesentium."},{"created_at":"Sit voluptate voluptates nisi asperiores repellendus dolor.","education":[{"institution":"Et quaerat ipsa reiciendis.","major":"Ad neque hic ut repudiandae quibusdam incidunt."},{"institution":"Et quaerat ipsa reiciendis.","major":"Ad neque hic ut repudiandae quibusdam incidunt."},{"institution":"Et quaerat ipsa reiciendis.","major":"Ad neque hic ut repudiandae quibusdam incidunt."}],"experience":[{"company":"Dolores odio quis atque deserunt.","duration":3945418871627614791,"role":"Voluptas animi tempora vero."},{"company":"Dolores odio quis atque deserunt.","duration":3945418871627614791,"role":"Voluptas animi tempora vero."},{"company":"Dolores odio quis atque deserunt.","duration":3945418871627614791,"role":"Voluptas animi tempora vero."},{"company":"Dolores odio quis atque deserunt.","duration":3945418871627614791,"role":"Voluptas animi tempora vero."}],"id":1462454679131059051,"name":"Aperiam exercitationem aliquam et sint praesentium."},{"created_at":"Sit voluptate voluptates nisi asperiores repellendus dolor.","education":[{"institution":"Et quaerat ipsa reiciendis.","major":"Ad neque hic ut repudiandae quibusdam incidunt."},{"institution":"Et quaerat ipsa reiciendis.","major":"Ad neque hic ut repudiandae quibusdam incidunt."},{"institution":"Et quaerat ipsa reiciendis.","major":"Ad neque hic ut repudiandae quibusdam incidunt."}],"experience":[{"company":"Dolores odio quis atque deserunt.","duration":3945418871627614791,"role":"Voluptas animi tempora vero."},{"company":"Dolores odio quis atque deserunt.","duration":3945418871627614791,"role":"Voluptas animi tempora vero."},{"company":"Dolores odio quis atque deserunt.","duration":3945418871627614791,"role":"Voluptas animi tempora vero."},{"company":"Dolores odio quis atque deserunt.","duration":3945418871627614791,"role":"Voluptas animi tempora vero."}],"id":1462454679131059051,"name":"Aperiam exercitationem aliquam et sint praesentium."},{"created_at":"Sit voluptate voluptates nisi asperiores repellendus dolor.","education":[{"institution":"Et quaerat ipsa reiciendis.","major":"Ad neque hic ut repudiandae quibusdam incidunt."},{"institution":"Et quaerat ipsa reiciendis.","major":"Ad neque hic ut repudiandae quibusdam incidunt."},{"institution":"Et quaerat ipsa reiciendis.","major":"Ad neque hic ut repudiandae quibusdam incidunt."}],"experience":[{"company":"Dolores odio quis atque deserunt.","duration":3945418871627614791,"role":"Voluptas animi tempora vero."},{"company":"Dolores odio quis atque deserunt.","duration":3945418871627614791,"role":"Voluptas animi tempora vero."},{"company":"Dolores odio quis atque deserunt.","duration":3945418871627614791,"role":"Voluptas animi tempora vero."},{"company":"Dolores odio quis atque deserunt.","duration":3945418871627614791,"role":"Voluptas animi tempora vero."}],"id":1462454679131059051,"name":"Aperiam exercitationem aliquam et sint praesentium."}]}}}}},"post":{"tags":["resume"],"summary":"add resume","description":"Add n number of resumes and return their IDs. This is a multipart request and each part has field name 'resume' and contains the encoded resume to be added.","operationId":"resume#add","requestBody":{"description":"Request body for add.","required":true,"content":{"multipart/form-data":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Resume"},"example":[{"education":[{"institution":"Ipsum saepe quia est.","major":"Fuga placeat est voluptatem sed."},{"institution":"Ipsum saepe quia est.","major":"Fuga placeat est voluptatem sed."},{"institution":"Ipsum saepe quia est.","major":"Fuga placeat est voluptatem sed."}],"experience":[{"company":"Saepe enim.","duration":4129157726558553807,"role":"Aut sit aut dolores sed ut ut."},{"company":"Saepe enim.","duration":4129157726558553807,"role":"Aut sit aut dolores sed ut ut."}],"name":"Explicabo et eligendi expedita necessitatibus eius qui."},{"education":[{"institution":"Ipsum saepe quia est.","major":"Fuga placeat est voluptatem sed."},{"institution":"Ipsum saepe quia est.","major":"Fuga placeat est voluptatem sed."},{"institution":"Ipsum saepe quia est.","major":"Fuga placeat est voluptatem sed."}],"experience":[{"company":"Saepe enim.","duration":4129157726558553807,"role":"Aut sit aut dolores sed ut ut."},{"company":"Saepe enim.","duration":4129157726558553807,"role":"Aut sit aut dolores sed ut ut."}],"name":"Explicabo et eligendi expedita necessitatibus eius qui."}]},"example":[{"education":[{"institution":"Ipsum saepe quia est.","major":"Fuga placeat est voluptatem sed."},{"institution":"Ipsum saepe quia est.","major":"Fuga placeat est voluptatem sed."},{"institution":"Ipsum saepe quia est.","major":"Fuga placeat est voluptatem sed."}],"experience":[{"company":"Saepe enim.","duration":4129157726558553807,"role":"Aut sit aut dolores sed ut ut."},{"company":"Saepe enim.","duration":4129157726558553807,"role":"Aut sit aut dolores sed ut ut."}],"name":"Explicabo et eligendi expedita necessitatibus eius qui."},{"education":[{"institution":"Ipsum saepe quia est.","major":"Fuga placeat est voluptatem sed."},{"institution":"Ipsum saepe quia est.","major":"Fuga placeat est voluptatem sed."},{"institution":"Ipsum saepe quia est.","major":"Fuga placeat est voluptatem sed."}],"experience":[{"company":"Saepe enim.","duration":4129157726558553807,"role":"Aut sit aut dolores sed ut ut."},{"company":"Saepe enim.","duration":4129157726558553807,"role":"Aut sit aut dolores sed ut ut."}],"name":"Explicabo et eligendi expedita necessitatibus eius qui."}]}}},"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"type":"array","items":{"type":"integer","example":1795326025593494324,"format":"int64"},"example":[1795326025593494324,7046124531025578008]},"example":[1795326025593494324,7046124531025578008]}}}}}}},"components":{"schemas":{"Education":{"type":"object","properties":{"institution":{"type":"string","description":"Name of the institution","example":"Est enim ut odio rerum."},"major":{"type":"string","description":"Major name","example":"Explicabo sapiente est praesentium sunt et."}},"example":{"institution":"Est enim ut odio rerum.","major":"Explicabo sapiente est praesentium sunt et."},"required":["institution","major"]},"Experience":{"type":"object","properties":{"company":{"type":"string","description":"Name of the company","example":"Eum ut."},"duration":{"type":"integer","description":"Duration (in years) in the company","example":7855387208056668376,"format":"int64"},"role":{"type":"string","description":"Name of the role in the company","example":"Quam minima dolorum et voluptatem velit."}},"example":{"company":"Eum ut.","duration":7855387208056668376,"role":"Quam minima dolorum et voluptatem velit."},"required":["company","role","duration"]},"GoaResume":{"type":"object","properties":{"created_at":{"type":"string","description":"Time when resume was created","example":"Sit voluptate voluptates nisi asperiores repellendus dolor."},"education":{"type":"array","items":{"$ref":"#/components/schemas/Education"},"description":"Education section in the resume","example":[{"institution":"Est enim ut odio rerum.","major":"Explicabo sapiente est praesentium sunt et."},{"institution":"Est enim ut odio rerum.","major":"Explicabo sapiente est praesentium sunt et."},{"institution":"Est enim ut odio rerum.","major":"Explicabo sapiente est praesentium sunt et."}]},"experience":{"type":"array","items":{"$ref":"#/components/schemas/Experience"},"description":"Experience section in the resume","example":[{"company":"Eum ut.","duration":7855387208056668376,"role":"Quam minima dolorum et voluptatem velit."},{"company":"Eum ut.","duration":7855387208056668376,"role":"Quam minima dolorum et voluptatem velit."},{"company":"Eum ut.","duration":7855387208056668376,"role":"Quam minima dolorum et voluptatem velit."},{"company":"Eum ut.","duration":7855387208056668376,"role":"Quam minima dolorum et voluptatem velit."}]},"id":{"type":"integer","description":"ID of the resume","example":1462454679131059051,"format":"int64"},"name":{"type":"string","description":"Name in the resume","example":"Aperiam exercitationem aliquam et sint praesentium."}},"example":{"created_at":"Sit voluptate voluptates nisi asperiores repellendus dolor.","education":[{"institution":"Est enim ut odio rerum.","major":"Explicabo sapiente est praesentium sunt et."},{"institution":"Est enim ut odio rerum.","major":"Explicabo sapiente est praesentium sunt et."},{"institution":"Est enim ut odio rerum.","major":"Explicabo sapiente est praesentium sunt et."}],"experience":[{"company":"Eum ut.","duration":7855387208056668376,"role":"Quam minima dolorum et voluptatem velit."},{"company":"Eum ut.","duration":7855387208056668376,"role":"Quam minima dolorum et voluptatem velit."},{"company":"Eum ut.","duration":7855387208056668376,"role":"Quam minima dolorum et voluptatem velit."},{"company":"Eum ut.","duration":7855387208056668376,"role":"Quam minima dolorum et voluptatem velit."}],"id":1462454679131059051,"name":"Aperiam exercitationem aliquam et sint praesentium."},"required":["id","name","experience","education","created_at"]},"Resume":{"type":"object","properties":{"education":{"type":"array","items":{"$ref":"#/components/schemas/Education"},"description":"Education section in the resume","example":[{"institution":"Ipsum saepe quia est.","major":"Fuga placeat est voluptatem sed."},{"institution":"Ipsum saepe quia est.","major":"Fuga placeat est voluptatem sed."},{"institution":"Ipsum saepe quia est.","major":"Fuga placeat est voluptatem sed."}]},"experience":{"type":"array","items":{"$ref":"#/components/schemas/Experience"},"description":"Experience section in the resume","example":[{"company":"Saepe enim.","duration":4129157726558553807,"role":"Aut sit aut dolores sed ut ut."},{"company":"Saepe enim.","duration":4129157726558553807,"role":"Aut sit aut dolores sed ut ut."}]},"name":{"type":"string","description":"Name in the resume","example":"Explicabo et eligendi expedita necessitatibus eius qui."}},"example":{"education":[{"institution":"Ipsum saepe quia est.","major":"Fuga placeat est voluptatem sed."},{"institution":"Ipsum saepe quia est.","major":"Fuga placeat est voluptatem sed."},{"institution":"Ipsum saepe quia est.","major":"Fuga placeat est voluptatem sed."}],"experience":[{"company":"Saepe enim.","duration":4129157726558553807,"role":"Aut sit aut dolores sed ut ut."},{"company":"Saepe enim.","duration":4129157726558553807,"role":"Aut sit aut dolores sed ut ut."}],"name":"Explicabo et eligendi expedita necessitatibus eius qui."},"required":["name"]},"StoredResumeCollection":{"type":"array","items":{"$ref":"#/components/schemas/GoaResume"},"example":[{"created_at":"Sit voluptate voluptates nisi asperiores repellendus dolor.","education":[{"institution":"Et quaerat ipsa reiciendis.","major":"Ad neque hic ut repudiandae quibusdam incidunt."},{"institution":"Et quaerat ipsa reiciendis.","major":"Ad neque hic ut repudiandae quibusdam incidunt."},{"institution":"Et quaerat ipsa reiciendis.","major":"Ad neque hic ut repudiandae quibusdam incidunt."}],"experience":[{"company":"Dolores odio quis atque deserunt.","duration":3945418871627614791,"role":"Voluptas animi tempora vero."},{"company":"Dolores odio quis atque deserunt.","duration":3945418871627614791,"role":"Voluptas animi tempora vero."},{"company":"Dolores odio quis atque deserunt.","duration":3945418871627614791,"role":"Voluptas animi tempora vero."},{"company":"Dolores odio quis atque deserunt.","duration":3945418871627614791,"role":"Voluptas animi tempora vero."}],"id":1462454679131059051,"name":"Aperiam exercitationem aliquam et sint praesentium."},{"created_at":"Sit voluptate voluptates nisi asperiores repellendus dolor.","education":[{"institution":"Et quaerat ipsa reiciendis.","major":"Ad neque hic ut repudiandae quibusdam incidunt."},{"institution":"Et quaerat ipsa reiciendis.","major":"Ad neque hic ut repudiandae quibusdam incidunt."},{"institution":"Et quaerat ipsa reiciendis.","major":"Ad neque hic ut repudiandae quibusdam incidunt."}],"experience":[{"company":"Dolores odio quis atque deserunt.","duration":3945418871627614791,"role":"Voluptas animi tempora vero."},{"company":"Dolores odio quis atque deserunt.","duration":3945418871627614791,"role":"Voluptas animi tempora vero."},{"company":"Dolores odio quis atque deserunt.","duration":3945418871627614791,"role":"Voluptas animi tempora vero."},{"company":"Dolores odio quis atque deserunt.","duration":3945418871627614791,"role":"Voluptas animi tempora vero."}],"id":1462454679131059051,"name":"Aperiam exercitationem aliquam et sint praesentium."},{"created_at":"Sit voluptate voluptates nisi asperiores repellendus dolor.","education":[{"institution":"Et quaerat ipsa reiciendis.","major":"Ad neque hic ut repudiandae quibusdam incidunt."},{"institution":"Et quaerat ipsa reiciendis.","major":"Ad neque hic ut repudiandae quibusdam incidunt."},{"institution":"Et quaerat ipsa reiciendis.","major":"Ad neque hic ut repudiandae quibusdam incidunt."}],"experience":[{"company":"Dolores odio quis atque deserunt.","duration":3945418871627614791,"role":"Voluptas animi tempora vero."},{"company":"Dolores odio quis atque deserunt.","duration":3945418871627614791,"role":"Voluptas animi tempora vero."},{"company":"Dolores odio quis atque deserunt.","duration":3945418871627614791,"role":"Voluptas animi tempora vero."},{"company":"Dolores odio quis atque deserunt.","duration":3945418871627614791,"role":"Voluptas animi tempora vero."}],"id":1462454679131059051,"name":"Aperiam exercitationem aliquam et sint praesentium."},{"created_at":"Sit voluptate voluptates nisi asperiores repellendus dolor.","education":[{"institution":"Et quaerat ipsa reiciendis.","major":"Ad neque hic ut repudiandae quibusdam incidunt."},{"institution":"Et quaerat ipsa reiciendis.","major":"Ad neque hic ut repudiandae quibusdam incidunt."},{"institution":"Et quaerat ipsa reiciendis.","major":"Ad neque hic ut repudiandae quibusdam incidunt."}],"experience":[{"company":"Dolores odio quis atque deserunt.","duration":3945418871627614791,"role":"Voluptas animi tempora vero."},{"company":"Dolores odio quis atque deserunt.","duration":3945418871627614791,"role":"Voluptas animi tempora vero."},{"company":"Dolores odio quis atque deserunt.","duration":3945418871627614791,"role":"Voluptas animi tempora vero."},{"company":"Dolores odio quis atque deserunt.","duration":3945418871627614791,"role":"Voluptas animi tempora vero."}],"id":1462454679131059051,"name":"Aperiam exercitationem aliquam et sint praesentium."}]}}},"tags":[{"name":"resume","description":"The storage service makes it possible to add resumes using multipart."}]} \ No newline at end of file +{"openapi":"3.0.3","info":{"title":"Goa API","version":"0.0.1"},"servers":[{"url":"http://localhost:80","description":"Default server for resume"}],"paths":{"/resumes":{"get":{"tags":["resume"],"summary":"list resume","description":"List all stored resumes","operationId":"resume#list","responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StoredResumeResponseCollection"},"example":[{"created_at":"Non sequi eos.","education":[{"institution":"Vitae eaque autem in.","major":"Qui nostrum quas velit nihil."},{"institution":"Vitae eaque autem in.","major":"Qui nostrum quas velit nihil."},{"institution":"Vitae eaque autem in.","major":"Qui nostrum quas velit nihil."}],"experience":[{"company":"Dolor dicta dignissimos eius facere enim quae.","duration":6839028381351029038,"role":"Enim quia recusandae nostrum animi nam."},{"company":"Dolor dicta dignissimos eius facere enim quae.","duration":6839028381351029038,"role":"Enim quia recusandae nostrum animi nam."},{"company":"Dolor dicta dignissimos eius facere enim quae.","duration":6839028381351029038,"role":"Enim quia recusandae nostrum animi nam."}],"id":4215431722801319674,"name":"Voluptas quae modi saepe et impedit aliquam."},{"created_at":"Non sequi eos.","education":[{"institution":"Vitae eaque autem in.","major":"Qui nostrum quas velit nihil."},{"institution":"Vitae eaque autem in.","major":"Qui nostrum quas velit nihil."},{"institution":"Vitae eaque autem in.","major":"Qui nostrum quas velit nihil."}],"experience":[{"company":"Dolor dicta dignissimos eius facere enim quae.","duration":6839028381351029038,"role":"Enim quia recusandae nostrum animi nam."},{"company":"Dolor dicta dignissimos eius facere enim quae.","duration":6839028381351029038,"role":"Enim quia recusandae nostrum animi nam."},{"company":"Dolor dicta dignissimos eius facere enim quae.","duration":6839028381351029038,"role":"Enim quia recusandae nostrum animi nam."}],"id":4215431722801319674,"name":"Voluptas quae modi saepe et impedit aliquam."}]}}}}},"post":{"tags":["resume"],"summary":"add resume","description":"Add n number of resumes and return their IDs. This is a multipart request and each part has field name 'resume' and contains the encoded resume to be added.","operationId":"resume#add","requestBody":{"description":"Request body for add.","required":true,"content":{"multipart/form-data":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Resume"},"example":[{"education":[{"institution":"Vitae eaque autem in.","major":"Qui nostrum quas velit nihil."},{"institution":"Vitae eaque autem in.","major":"Qui nostrum quas velit nihil."}],"experience":[{"company":"Dolor dicta dignissimos eius facere enim quae.","duration":6839028381351029038,"role":"Enim quia recusandae nostrum animi nam."},{"company":"Dolor dicta dignissimos eius facere enim quae.","duration":6839028381351029038,"role":"Enim quia recusandae nostrum animi nam."}],"name":"Voluptas et."},{"education":[{"institution":"Vitae eaque autem in.","major":"Qui nostrum quas velit nihil."},{"institution":"Vitae eaque autem in.","major":"Qui nostrum quas velit nihil."}],"experience":[{"company":"Dolor dicta dignissimos eius facere enim quae.","duration":6839028381351029038,"role":"Enim quia recusandae nostrum animi nam."},{"company":"Dolor dicta dignissimos eius facere enim quae.","duration":6839028381351029038,"role":"Enim quia recusandae nostrum animi nam."}],"name":"Voluptas et."},{"education":[{"institution":"Vitae eaque autem in.","major":"Qui nostrum quas velit nihil."},{"institution":"Vitae eaque autem in.","major":"Qui nostrum quas velit nihil."}],"experience":[{"company":"Dolor dicta dignissimos eius facere enim quae.","duration":6839028381351029038,"role":"Enim quia recusandae nostrum animi nam."},{"company":"Dolor dicta dignissimos eius facere enim quae.","duration":6839028381351029038,"role":"Enim quia recusandae nostrum animi nam."}],"name":"Voluptas et."},{"education":[{"institution":"Vitae eaque autem in.","major":"Qui nostrum quas velit nihil."},{"institution":"Vitae eaque autem in.","major":"Qui nostrum quas velit nihil."}],"experience":[{"company":"Dolor dicta dignissimos eius facere enim quae.","duration":6839028381351029038,"role":"Enim quia recusandae nostrum animi nam."},{"company":"Dolor dicta dignissimos eius facere enim quae.","duration":6839028381351029038,"role":"Enim quia recusandae nostrum animi nam."}],"name":"Voluptas et."}]},"example":[{"education":[{"institution":"Vitae eaque autem in.","major":"Qui nostrum quas velit nihil."},{"institution":"Vitae eaque autem in.","major":"Qui nostrum quas velit nihil."}],"experience":[{"company":"Dolor dicta dignissimos eius facere enim quae.","duration":6839028381351029038,"role":"Enim quia recusandae nostrum animi nam."},{"company":"Dolor dicta dignissimos eius facere enim quae.","duration":6839028381351029038,"role":"Enim quia recusandae nostrum animi nam."}],"name":"Voluptas et."},{"education":[{"institution":"Vitae eaque autem in.","major":"Qui nostrum quas velit nihil."},{"institution":"Vitae eaque autem in.","major":"Qui nostrum quas velit nihil."}],"experience":[{"company":"Dolor dicta dignissimos eius facere enim quae.","duration":6839028381351029038,"role":"Enim quia recusandae nostrum animi nam."},{"company":"Dolor dicta dignissimos eius facere enim quae.","duration":6839028381351029038,"role":"Enim quia recusandae nostrum animi nam."}],"name":"Voluptas et."},{"education":[{"institution":"Vitae eaque autem in.","major":"Qui nostrum quas velit nihil."},{"institution":"Vitae eaque autem in.","major":"Qui nostrum quas velit nihil."}],"experience":[{"company":"Dolor dicta dignissimos eius facere enim quae.","duration":6839028381351029038,"role":"Enim quia recusandae nostrum animi nam."},{"company":"Dolor dicta dignissimos eius facere enim quae.","duration":6839028381351029038,"role":"Enim quia recusandae nostrum animi nam."}],"name":"Voluptas et."},{"education":[{"institution":"Vitae eaque autem in.","major":"Qui nostrum quas velit nihil."},{"institution":"Vitae eaque autem in.","major":"Qui nostrum quas velit nihil."}],"experience":[{"company":"Dolor dicta dignissimos eius facere enim quae.","duration":6839028381351029038,"role":"Enim quia recusandae nostrum animi nam."},{"company":"Dolor dicta dignissimos eius facere enim quae.","duration":6839028381351029038,"role":"Enim quia recusandae nostrum animi nam."}],"name":"Voluptas et."}]}}},"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"type":"array","items":{"type":"integer","example":6256991813360998249,"format":"int64"},"example":[6256991813360998249,6614178561265574431,6452993006124939418]},"example":[6256991813360998249,6614178561265574431,6452993006124939418]}}}}}}},"components":{"schemas":{"Education":{"type":"object","properties":{"institution":{"type":"string","description":"Name of the institution","example":"Vitae eaque autem in."},"major":{"type":"string","description":"Major name","example":"Qui nostrum quas velit nihil."}},"example":{"institution":"Vitae eaque autem in.","major":"Qui nostrum quas velit nihil."},"required":["institution","major"]},"Experience":{"type":"object","properties":{"company":{"type":"string","description":"Name of the company","example":"Dolor dicta dignissimos eius facere enim quae."},"duration":{"type":"integer","description":"Duration (in years) in the company","example":6839028381351029038,"format":"int64"},"role":{"type":"string","description":"Name of the role in the company","example":"Enim quia recusandae nostrum animi nam."}},"example":{"company":"Dolor dicta dignissimos eius facere enim quae.","duration":6839028381351029038,"role":"Enim quia recusandae nostrum animi nam."},"required":["company","role","duration"]},"Resume":{"type":"object","properties":{"education":{"type":"array","items":{"$ref":"#/components/schemas/Education"},"description":"Education section in the resume","example":[{"institution":"Vitae eaque autem in.","major":"Qui nostrum quas velit nihil."},{"institution":"Vitae eaque autem in.","major":"Qui nostrum quas velit nihil."}]},"experience":{"type":"array","items":{"$ref":"#/components/schemas/Experience"},"description":"Experience section in the resume","example":[{"company":"Dolor dicta dignissimos eius facere enim quae.","duration":6839028381351029038,"role":"Enim quia recusandae nostrum animi nam."},{"company":"Dolor dicta dignissimos eius facere enim quae.","duration":6839028381351029038,"role":"Enim quia recusandae nostrum animi nam."}]},"name":{"type":"string","description":"Name in the resume","example":"Voluptas et."}},"example":{"education":[{"institution":"Vitae eaque autem in.","major":"Qui nostrum quas velit nihil."},{"institution":"Vitae eaque autem in.","major":"Qui nostrum quas velit nihil."}],"experience":[{"company":"Dolor dicta dignissimos eius facere enim quae.","duration":6839028381351029038,"role":"Enim quia recusandae nostrum animi nam."},{"company":"Dolor dicta dignissimos eius facere enim quae.","duration":6839028381351029038,"role":"Enim quia recusandae nostrum animi nam."}],"name":"Voluptas et."},"required":["name"]},"StoredResumeResponse":{"type":"object","properties":{"created_at":{"type":"string","description":"Time when resume was created","example":"Non sequi eos."},"education":{"type":"array","items":{"$ref":"#/components/schemas/Education"},"description":"Education section in the resume","example":[{"institution":"Vitae eaque autem in.","major":"Qui nostrum quas velit nihil."},{"institution":"Vitae eaque autem in.","major":"Qui nostrum quas velit nihil."},{"institution":"Vitae eaque autem in.","major":"Qui nostrum quas velit nihil."}]},"experience":{"type":"array","items":{"$ref":"#/components/schemas/Experience"},"description":"Experience section in the resume","example":[{"company":"Dolor dicta dignissimos eius facere enim quae.","duration":6839028381351029038,"role":"Enim quia recusandae nostrum animi nam."},{"company":"Dolor dicta dignissimos eius facere enim quae.","duration":6839028381351029038,"role":"Enim quia recusandae nostrum animi nam."},{"company":"Dolor dicta dignissimos eius facere enim quae.","duration":6839028381351029038,"role":"Enim quia recusandae nostrum animi nam."}]},"id":{"type":"integer","description":"ID of the resume","example":4215431722801319674,"format":"int64"},"name":{"type":"string","description":"Name in the resume","example":"Voluptas quae modi saepe et impedit aliquam."}},"description":"StoredResume result type (default view)","example":{"created_at":"Non sequi eos.","education":[{"institution":"Vitae eaque autem in.","major":"Qui nostrum quas velit nihil."},{"institution":"Vitae eaque autem in.","major":"Qui nostrum quas velit nihil."},{"institution":"Vitae eaque autem in.","major":"Qui nostrum quas velit nihil."}],"experience":[{"company":"Dolor dicta dignissimos eius facere enim quae.","duration":6839028381351029038,"role":"Enim quia recusandae nostrum animi nam."},{"company":"Dolor dicta dignissimos eius facere enim quae.","duration":6839028381351029038,"role":"Enim quia recusandae nostrum animi nam."},{"company":"Dolor dicta dignissimos eius facere enim quae.","duration":6839028381351029038,"role":"Enim quia recusandae nostrum animi nam."}],"id":4215431722801319674,"name":"Voluptas quae modi saepe et impedit aliquam."},"required":["id","name","experience","education","created_at"]},"StoredResumeResponseCollection":{"type":"array","items":{"$ref":"#/components/schemas/StoredResumeResponse"},"description":"ListResponseBody is the result type for an array of StoredResume (default view)","example":[{"created_at":"Non sequi eos.","education":[{"institution":"Vitae eaque autem in.","major":"Qui nostrum quas velit nihil."},{"institution":"Vitae eaque autem in.","major":"Qui nostrum quas velit nihil."},{"institution":"Vitae eaque autem in.","major":"Qui nostrum quas velit nihil."}],"experience":[{"company":"Dolor dicta dignissimos eius facere enim quae.","duration":6839028381351029038,"role":"Enim quia recusandae nostrum animi nam."},{"company":"Dolor dicta dignissimos eius facere enim quae.","duration":6839028381351029038,"role":"Enim quia recusandae nostrum animi nam."},{"company":"Dolor dicta dignissimos eius facere enim quae.","duration":6839028381351029038,"role":"Enim quia recusandae nostrum animi nam."}],"id":4215431722801319674,"name":"Voluptas quae modi saepe et impedit aliquam."},{"created_at":"Non sequi eos.","education":[{"institution":"Vitae eaque autem in.","major":"Qui nostrum quas velit nihil."},{"institution":"Vitae eaque autem in.","major":"Qui nostrum quas velit nihil."},{"institution":"Vitae eaque autem in.","major":"Qui nostrum quas velit nihil."}],"experience":[{"company":"Dolor dicta dignissimos eius facere enim quae.","duration":6839028381351029038,"role":"Enim quia recusandae nostrum animi nam."},{"company":"Dolor dicta dignissimos eius facere enim quae.","duration":6839028381351029038,"role":"Enim quia recusandae nostrum animi nam."},{"company":"Dolor dicta dignissimos eius facere enim quae.","duration":6839028381351029038,"role":"Enim quia recusandae nostrum animi nam."}],"id":4215431722801319674,"name":"Voluptas quae modi saepe et impedit aliquam."}]}}},"tags":[{"name":"resume","description":"The storage service makes it possible to add resumes using multipart."}]} \ No newline at end of file diff --git a/multipart/gen/http/openapi3.yaml b/multipart/gen/http/openapi3.yaml index f88c7585b..b1d7abec4 100644 --- a/multipart/gen/http/openapi3.yaml +++ b/multipart/gen/http/openapi3.yaml @@ -19,100 +19,48 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/StoredResumeCollection' + $ref: '#/components/schemas/StoredResumeResponseCollection' example: - - created_at: Sit voluptate voluptates nisi asperiores repellendus dolor. + - created_at: Non sequi eos. education: - - institution: Et quaerat ipsa reiciendis. - major: Ad neque hic ut repudiandae quibusdam incidunt. - - institution: Et quaerat ipsa reiciendis. - major: Ad neque hic ut repudiandae quibusdam incidunt. - - institution: Et quaerat ipsa reiciendis. - major: Ad neque hic ut repudiandae quibusdam incidunt. + - institution: Vitae eaque autem in. + major: Qui nostrum quas velit nihil. + - institution: Vitae eaque autem in. + major: Qui nostrum quas velit nihil. + - institution: Vitae eaque autem in. + major: Qui nostrum quas velit nihil. experience: - - company: Dolores odio quis atque deserunt. - duration: 3945418871627614791 - role: Voluptas animi tempora vero. - - company: Dolores odio quis atque deserunt. - duration: 3945418871627614791 - role: Voluptas animi tempora vero. - - company: Dolores odio quis atque deserunt. - duration: 3945418871627614791 - role: Voluptas animi tempora vero. - - company: Dolores odio quis atque deserunt. - duration: 3945418871627614791 - role: Voluptas animi tempora vero. - id: 1462454679131059051 - name: Aperiam exercitationem aliquam et sint praesentium. - - created_at: Sit voluptate voluptates nisi asperiores repellendus dolor. + - company: Dolor dicta dignissimos eius facere enim quae. + duration: 6839028381351029038 + role: Enim quia recusandae nostrum animi nam. + - company: Dolor dicta dignissimos eius facere enim quae. + duration: 6839028381351029038 + role: Enim quia recusandae nostrum animi nam. + - company: Dolor dicta dignissimos eius facere enim quae. + duration: 6839028381351029038 + role: Enim quia recusandae nostrum animi nam. + id: 4215431722801319674 + name: Voluptas quae modi saepe et impedit aliquam. + - created_at: Non sequi eos. education: - - institution: Et quaerat ipsa reiciendis. - major: Ad neque hic ut repudiandae quibusdam incidunt. - - institution: Et quaerat ipsa reiciendis. - major: Ad neque hic ut repudiandae quibusdam incidunt. - - institution: Et quaerat ipsa reiciendis. - major: Ad neque hic ut repudiandae quibusdam incidunt. + - institution: Vitae eaque autem in. + major: Qui nostrum quas velit nihil. + - institution: Vitae eaque autem in. + major: Qui nostrum quas velit nihil. + - institution: Vitae eaque autem in. + major: Qui nostrum quas velit nihil. experience: - - company: Dolores odio quis atque deserunt. - duration: 3945418871627614791 - role: Voluptas animi tempora vero. - - company: Dolores odio quis atque deserunt. - duration: 3945418871627614791 - role: Voluptas animi tempora vero. - - company: Dolores odio quis atque deserunt. - duration: 3945418871627614791 - role: Voluptas animi tempora vero. - - company: Dolores odio quis atque deserunt. - duration: 3945418871627614791 - role: Voluptas animi tempora vero. - id: 1462454679131059051 - name: Aperiam exercitationem aliquam et sint praesentium. - - created_at: Sit voluptate voluptates nisi asperiores repellendus dolor. - education: - - institution: Et quaerat ipsa reiciendis. - major: Ad neque hic ut repudiandae quibusdam incidunt. - - institution: Et quaerat ipsa reiciendis. - major: Ad neque hic ut repudiandae quibusdam incidunt. - - institution: Et quaerat ipsa reiciendis. - major: Ad neque hic ut repudiandae quibusdam incidunt. - experience: - - company: Dolores odio quis atque deserunt. - duration: 3945418871627614791 - role: Voluptas animi tempora vero. - - company: Dolores odio quis atque deserunt. - duration: 3945418871627614791 - role: Voluptas animi tempora vero. - - company: Dolores odio quis atque deserunt. - duration: 3945418871627614791 - role: Voluptas animi tempora vero. - - company: Dolores odio quis atque deserunt. - duration: 3945418871627614791 - role: Voluptas animi tempora vero. - id: 1462454679131059051 - name: Aperiam exercitationem aliquam et sint praesentium. - - created_at: Sit voluptate voluptates nisi asperiores repellendus dolor. - education: - - institution: Et quaerat ipsa reiciendis. - major: Ad neque hic ut repudiandae quibusdam incidunt. - - institution: Et quaerat ipsa reiciendis. - major: Ad neque hic ut repudiandae quibusdam incidunt. - - institution: Et quaerat ipsa reiciendis. - major: Ad neque hic ut repudiandae quibusdam incidunt. - experience: - - company: Dolores odio quis atque deserunt. - duration: 3945418871627614791 - role: Voluptas animi tempora vero. - - company: Dolores odio quis atque deserunt. - duration: 3945418871627614791 - role: Voluptas animi tempora vero. - - company: Dolores odio quis atque deserunt. - duration: 3945418871627614791 - role: Voluptas animi tempora vero. - - company: Dolores odio quis atque deserunt. - duration: 3945418871627614791 - role: Voluptas animi tempora vero. - id: 1462454679131059051 - name: Aperiam exercitationem aliquam et sint praesentium. + - company: Dolor dicta dignissimos eius facere enim quae. + duration: 6839028381351029038 + role: Enim quia recusandae nostrum animi nam. + - company: Dolor dicta dignissimos eius facere enim quae. + duration: 6839028381351029038 + role: Enim quia recusandae nostrum animi nam. + - company: Dolor dicta dignissimos eius facere enim quae. + duration: 6839028381351029038 + role: Enim quia recusandae nostrum animi nam. + id: 4215431722801319674 + name: Voluptas quae modi saepe et impedit aliquam. post: tags: - resume @@ -130,66 +78,110 @@ paths: $ref: '#/components/schemas/Resume' example: - education: - - institution: Ipsum saepe quia est. - major: Fuga placeat est voluptatem sed. - - institution: Ipsum saepe quia est. - major: Fuga placeat est voluptatem sed. - - institution: Ipsum saepe quia est. - major: Fuga placeat est voluptatem sed. + - institution: Vitae eaque autem in. + major: Qui nostrum quas velit nihil. + - institution: Vitae eaque autem in. + major: Qui nostrum quas velit nihil. + experience: + - company: Dolor dicta dignissimos eius facere enim quae. + duration: 6839028381351029038 + role: Enim quia recusandae nostrum animi nam. + - company: Dolor dicta dignissimos eius facere enim quae. + duration: 6839028381351029038 + role: Enim quia recusandae nostrum animi nam. + name: Voluptas et. + - education: + - institution: Vitae eaque autem in. + major: Qui nostrum quas velit nihil. + - institution: Vitae eaque autem in. + major: Qui nostrum quas velit nihil. + experience: + - company: Dolor dicta dignissimos eius facere enim quae. + duration: 6839028381351029038 + role: Enim quia recusandae nostrum animi nam. + - company: Dolor dicta dignissimos eius facere enim quae. + duration: 6839028381351029038 + role: Enim quia recusandae nostrum animi nam. + name: Voluptas et. + - education: + - institution: Vitae eaque autem in. + major: Qui nostrum quas velit nihil. + - institution: Vitae eaque autem in. + major: Qui nostrum quas velit nihil. experience: - - company: Saepe enim. - duration: 4129157726558553807 - role: Aut sit aut dolores sed ut ut. - - company: Saepe enim. - duration: 4129157726558553807 - role: Aut sit aut dolores sed ut ut. - name: Explicabo et eligendi expedita necessitatibus eius qui. + - company: Dolor dicta dignissimos eius facere enim quae. + duration: 6839028381351029038 + role: Enim quia recusandae nostrum animi nam. + - company: Dolor dicta dignissimos eius facere enim quae. + duration: 6839028381351029038 + role: Enim quia recusandae nostrum animi nam. + name: Voluptas et. - education: - - institution: Ipsum saepe quia est. - major: Fuga placeat est voluptatem sed. - - institution: Ipsum saepe quia est. - major: Fuga placeat est voluptatem sed. - - institution: Ipsum saepe quia est. - major: Fuga placeat est voluptatem sed. + - institution: Vitae eaque autem in. + major: Qui nostrum quas velit nihil. + - institution: Vitae eaque autem in. + major: Qui nostrum quas velit nihil. experience: - - company: Saepe enim. - duration: 4129157726558553807 - role: Aut sit aut dolores sed ut ut. - - company: Saepe enim. - duration: 4129157726558553807 - role: Aut sit aut dolores sed ut ut. - name: Explicabo et eligendi expedita necessitatibus eius qui. + - company: Dolor dicta dignissimos eius facere enim quae. + duration: 6839028381351029038 + role: Enim quia recusandae nostrum animi nam. + - company: Dolor dicta dignissimos eius facere enim quae. + duration: 6839028381351029038 + role: Enim quia recusandae nostrum animi nam. + name: Voluptas et. example: - education: - - institution: Ipsum saepe quia est. - major: Fuga placeat est voluptatem sed. - - institution: Ipsum saepe quia est. - major: Fuga placeat est voluptatem sed. - - institution: Ipsum saepe quia est. - major: Fuga placeat est voluptatem sed. + - institution: Vitae eaque autem in. + major: Qui nostrum quas velit nihil. + - institution: Vitae eaque autem in. + major: Qui nostrum quas velit nihil. + experience: + - company: Dolor dicta dignissimos eius facere enim quae. + duration: 6839028381351029038 + role: Enim quia recusandae nostrum animi nam. + - company: Dolor dicta dignissimos eius facere enim quae. + duration: 6839028381351029038 + role: Enim quia recusandae nostrum animi nam. + name: Voluptas et. + - education: + - institution: Vitae eaque autem in. + major: Qui nostrum quas velit nihil. + - institution: Vitae eaque autem in. + major: Qui nostrum quas velit nihil. experience: - - company: Saepe enim. - duration: 4129157726558553807 - role: Aut sit aut dolores sed ut ut. - - company: Saepe enim. - duration: 4129157726558553807 - role: Aut sit aut dolores sed ut ut. - name: Explicabo et eligendi expedita necessitatibus eius qui. + - company: Dolor dicta dignissimos eius facere enim quae. + duration: 6839028381351029038 + role: Enim quia recusandae nostrum animi nam. + - company: Dolor dicta dignissimos eius facere enim quae. + duration: 6839028381351029038 + role: Enim quia recusandae nostrum animi nam. + name: Voluptas et. - education: - - institution: Ipsum saepe quia est. - major: Fuga placeat est voluptatem sed. - - institution: Ipsum saepe quia est. - major: Fuga placeat est voluptatem sed. - - institution: Ipsum saepe quia est. - major: Fuga placeat est voluptatem sed. + - institution: Vitae eaque autem in. + major: Qui nostrum quas velit nihil. + - institution: Vitae eaque autem in. + major: Qui nostrum quas velit nihil. experience: - - company: Saepe enim. - duration: 4129157726558553807 - role: Aut sit aut dolores sed ut ut. - - company: Saepe enim. - duration: 4129157726558553807 - role: Aut sit aut dolores sed ut ut. - name: Explicabo et eligendi expedita necessitatibus eius qui. + - company: Dolor dicta dignissimos eius facere enim quae. + duration: 6839028381351029038 + role: Enim quia recusandae nostrum animi nam. + - company: Dolor dicta dignissimos eius facere enim quae. + duration: 6839028381351029038 + role: Enim quia recusandae nostrum animi nam. + name: Voluptas et. + - education: + - institution: Vitae eaque autem in. + major: Qui nostrum quas velit nihil. + - institution: Vitae eaque autem in. + major: Qui nostrum quas velit nihil. + experience: + - company: Dolor dicta dignissimos eius facere enim quae. + duration: 6839028381351029038 + role: Enim quia recusandae nostrum animi nam. + - company: Dolor dicta dignissimos eius facere enim quae. + duration: 6839028381351029038 + role: Enim quia recusandae nostrum animi nam. + name: Voluptas et. responses: "200": description: OK response. @@ -199,14 +191,16 @@ paths: type: array items: type: integer - example: 1795326025593494324 + example: 6256991813360998249 format: int64 example: - - 1795326025593494324 - - 7046124531025578008 + - 6256991813360998249 + - 6614178561265574431 + - 6452993006124939418 example: - - 1795326025593494324 - - 7046124531025578008 + - 6256991813360998249 + - 6614178561265574431 + - 6452993006124939418 components: schemas: Education: @@ -215,14 +209,14 @@ components: institution: type: string description: Name of the institution - example: Est enim ut odio rerum. + example: Vitae eaque autem in. major: type: string description: Major name - example: Explicabo sapiente est praesentium sunt et. + example: Qui nostrum quas velit nihil. example: - institution: Est enim ut odio rerum. - major: Explicabo sapiente est praesentium sunt et. + institution: Vitae eaque autem in. + major: Qui nostrum quas velit nihil. required: - institution - major @@ -232,246 +226,186 @@ components: company: type: string description: Name of the company - example: Eum ut. + example: Dolor dicta dignissimos eius facere enim quae. duration: type: integer description: Duration (in years) in the company - example: 7855387208056668376 + example: 6839028381351029038 format: int64 role: type: string description: Name of the role in the company - example: Quam minima dolorum et voluptatem velit. + example: Enim quia recusandae nostrum animi nam. example: - company: Eum ut. - duration: 7855387208056668376 - role: Quam minima dolorum et voluptatem velit. + company: Dolor dicta dignissimos eius facere enim quae. + duration: 6839028381351029038 + role: Enim quia recusandae nostrum animi nam. required: - company - role - duration - GoaResume: + Resume: type: object properties: - created_at: - type: string - description: Time when resume was created - example: Sit voluptate voluptates nisi asperiores repellendus dolor. education: type: array items: $ref: '#/components/schemas/Education' description: Education section in the resume example: - - institution: Est enim ut odio rerum. - major: Explicabo sapiente est praesentium sunt et. - - institution: Est enim ut odio rerum. - major: Explicabo sapiente est praesentium sunt et. - - institution: Est enim ut odio rerum. - major: Explicabo sapiente est praesentium sunt et. + - institution: Vitae eaque autem in. + major: Qui nostrum quas velit nihil. + - institution: Vitae eaque autem in. + major: Qui nostrum quas velit nihil. experience: type: array items: $ref: '#/components/schemas/Experience' description: Experience section in the resume example: - - company: Eum ut. - duration: 7855387208056668376 - role: Quam minima dolorum et voluptatem velit. - - company: Eum ut. - duration: 7855387208056668376 - role: Quam minima dolorum et voluptatem velit. - - company: Eum ut. - duration: 7855387208056668376 - role: Quam minima dolorum et voluptatem velit. - - company: Eum ut. - duration: 7855387208056668376 - role: Quam minima dolorum et voluptatem velit. - id: - type: integer - description: ID of the resume - example: 1462454679131059051 - format: int64 + - company: Dolor dicta dignissimos eius facere enim quae. + duration: 6839028381351029038 + role: Enim quia recusandae nostrum animi nam. + - company: Dolor dicta dignissimos eius facere enim quae. + duration: 6839028381351029038 + role: Enim quia recusandae nostrum animi nam. name: type: string description: Name in the resume - example: Aperiam exercitationem aliquam et sint praesentium. + example: Voluptas et. example: - created_at: Sit voluptate voluptates nisi asperiores repellendus dolor. education: - - institution: Est enim ut odio rerum. - major: Explicabo sapiente est praesentium sunt et. - - institution: Est enim ut odio rerum. - major: Explicabo sapiente est praesentium sunt et. - - institution: Est enim ut odio rerum. - major: Explicabo sapiente est praesentium sunt et. + - institution: Vitae eaque autem in. + major: Qui nostrum quas velit nihil. + - institution: Vitae eaque autem in. + major: Qui nostrum quas velit nihil. experience: - - company: Eum ut. - duration: 7855387208056668376 - role: Quam minima dolorum et voluptatem velit. - - company: Eum ut. - duration: 7855387208056668376 - role: Quam minima dolorum et voluptatem velit. - - company: Eum ut. - duration: 7855387208056668376 - role: Quam minima dolorum et voluptatem velit. - - company: Eum ut. - duration: 7855387208056668376 - role: Quam minima dolorum et voluptatem velit. - id: 1462454679131059051 - name: Aperiam exercitationem aliquam et sint praesentium. + - company: Dolor dicta dignissimos eius facere enim quae. + duration: 6839028381351029038 + role: Enim quia recusandae nostrum animi nam. + - company: Dolor dicta dignissimos eius facere enim quae. + duration: 6839028381351029038 + role: Enim quia recusandae nostrum animi nam. + name: Voluptas et. required: - - id - name - - experience - - education - - created_at - Resume: + StoredResumeResponse: type: object properties: + created_at: + type: string + description: Time when resume was created + example: Non sequi eos. education: type: array items: $ref: '#/components/schemas/Education' description: Education section in the resume example: - - institution: Ipsum saepe quia est. - major: Fuga placeat est voluptatem sed. - - institution: Ipsum saepe quia est. - major: Fuga placeat est voluptatem sed. - - institution: Ipsum saepe quia est. - major: Fuga placeat est voluptatem sed. + - institution: Vitae eaque autem in. + major: Qui nostrum quas velit nihil. + - institution: Vitae eaque autem in. + major: Qui nostrum quas velit nihil. + - institution: Vitae eaque autem in. + major: Qui nostrum quas velit nihil. experience: type: array items: $ref: '#/components/schemas/Experience' description: Experience section in the resume example: - - company: Saepe enim. - duration: 4129157726558553807 - role: Aut sit aut dolores sed ut ut. - - company: Saepe enim. - duration: 4129157726558553807 - role: Aut sit aut dolores sed ut ut. + - company: Dolor dicta dignissimos eius facere enim quae. + duration: 6839028381351029038 + role: Enim quia recusandae nostrum animi nam. + - company: Dolor dicta dignissimos eius facere enim quae. + duration: 6839028381351029038 + role: Enim quia recusandae nostrum animi nam. + - company: Dolor dicta dignissimos eius facere enim quae. + duration: 6839028381351029038 + role: Enim quia recusandae nostrum animi nam. + id: + type: integer + description: ID of the resume + example: 4215431722801319674 + format: int64 name: type: string description: Name in the resume - example: Explicabo et eligendi expedita necessitatibus eius qui. + example: Voluptas quae modi saepe et impedit aliquam. + description: StoredResume result type (default view) example: + created_at: Non sequi eos. education: - - institution: Ipsum saepe quia est. - major: Fuga placeat est voluptatem sed. - - institution: Ipsum saepe quia est. - major: Fuga placeat est voluptatem sed. - - institution: Ipsum saepe quia est. - major: Fuga placeat est voluptatem sed. + - institution: Vitae eaque autem in. + major: Qui nostrum quas velit nihil. + - institution: Vitae eaque autem in. + major: Qui nostrum quas velit nihil. + - institution: Vitae eaque autem in. + major: Qui nostrum quas velit nihil. experience: - - company: Saepe enim. - duration: 4129157726558553807 - role: Aut sit aut dolores sed ut ut. - - company: Saepe enim. - duration: 4129157726558553807 - role: Aut sit aut dolores sed ut ut. - name: Explicabo et eligendi expedita necessitatibus eius qui. + - company: Dolor dicta dignissimos eius facere enim quae. + duration: 6839028381351029038 + role: Enim quia recusandae nostrum animi nam. + - company: Dolor dicta dignissimos eius facere enim quae. + duration: 6839028381351029038 + role: Enim quia recusandae nostrum animi nam. + - company: Dolor dicta dignissimos eius facere enim quae. + duration: 6839028381351029038 + role: Enim quia recusandae nostrum animi nam. + id: 4215431722801319674 + name: Voluptas quae modi saepe et impedit aliquam. required: + - id - name - StoredResumeCollection: + - experience + - education + - created_at + StoredResumeResponseCollection: type: array items: - $ref: '#/components/schemas/GoaResume' + $ref: '#/components/schemas/StoredResumeResponse' + description: ListResponseBody is the result type for an array of StoredResume (default view) example: - - created_at: Sit voluptate voluptates nisi asperiores repellendus dolor. - education: - - institution: Et quaerat ipsa reiciendis. - major: Ad neque hic ut repudiandae quibusdam incidunt. - - institution: Et quaerat ipsa reiciendis. - major: Ad neque hic ut repudiandae quibusdam incidunt. - - institution: Et quaerat ipsa reiciendis. - major: Ad neque hic ut repudiandae quibusdam incidunt. - experience: - - company: Dolores odio quis atque deserunt. - duration: 3945418871627614791 - role: Voluptas animi tempora vero. - - company: Dolores odio quis atque deserunt. - duration: 3945418871627614791 - role: Voluptas animi tempora vero. - - company: Dolores odio quis atque deserunt. - duration: 3945418871627614791 - role: Voluptas animi tempora vero. - - company: Dolores odio quis atque deserunt. - duration: 3945418871627614791 - role: Voluptas animi tempora vero. - id: 1462454679131059051 - name: Aperiam exercitationem aliquam et sint praesentium. - - created_at: Sit voluptate voluptates nisi asperiores repellendus dolor. - education: - - institution: Et quaerat ipsa reiciendis. - major: Ad neque hic ut repudiandae quibusdam incidunt. - - institution: Et quaerat ipsa reiciendis. - major: Ad neque hic ut repudiandae quibusdam incidunt. - - institution: Et quaerat ipsa reiciendis. - major: Ad neque hic ut repudiandae quibusdam incidunt. - experience: - - company: Dolores odio quis atque deserunt. - duration: 3945418871627614791 - role: Voluptas animi tempora vero. - - company: Dolores odio quis atque deserunt. - duration: 3945418871627614791 - role: Voluptas animi tempora vero. - - company: Dolores odio quis atque deserunt. - duration: 3945418871627614791 - role: Voluptas animi tempora vero. - - company: Dolores odio quis atque deserunt. - duration: 3945418871627614791 - role: Voluptas animi tempora vero. - id: 1462454679131059051 - name: Aperiam exercitationem aliquam et sint praesentium. - - created_at: Sit voluptate voluptates nisi asperiores repellendus dolor. + - created_at: Non sequi eos. education: - - institution: Et quaerat ipsa reiciendis. - major: Ad neque hic ut repudiandae quibusdam incidunt. - - institution: Et quaerat ipsa reiciendis. - major: Ad neque hic ut repudiandae quibusdam incidunt. - - institution: Et quaerat ipsa reiciendis. - major: Ad neque hic ut repudiandae quibusdam incidunt. + - institution: Vitae eaque autem in. + major: Qui nostrum quas velit nihil. + - institution: Vitae eaque autem in. + major: Qui nostrum quas velit nihil. + - institution: Vitae eaque autem in. + major: Qui nostrum quas velit nihil. experience: - - company: Dolores odio quis atque deserunt. - duration: 3945418871627614791 - role: Voluptas animi tempora vero. - - company: Dolores odio quis atque deserunt. - duration: 3945418871627614791 - role: Voluptas animi tempora vero. - - company: Dolores odio quis atque deserunt. - duration: 3945418871627614791 - role: Voluptas animi tempora vero. - - company: Dolores odio quis atque deserunt. - duration: 3945418871627614791 - role: Voluptas animi tempora vero. - id: 1462454679131059051 - name: Aperiam exercitationem aliquam et sint praesentium. - - created_at: Sit voluptate voluptates nisi asperiores repellendus dolor. + - company: Dolor dicta dignissimos eius facere enim quae. + duration: 6839028381351029038 + role: Enim quia recusandae nostrum animi nam. + - company: Dolor dicta dignissimos eius facere enim quae. + duration: 6839028381351029038 + role: Enim quia recusandae nostrum animi nam. + - company: Dolor dicta dignissimos eius facere enim quae. + duration: 6839028381351029038 + role: Enim quia recusandae nostrum animi nam. + id: 4215431722801319674 + name: Voluptas quae modi saepe et impedit aliquam. + - created_at: Non sequi eos. education: - - institution: Et quaerat ipsa reiciendis. - major: Ad neque hic ut repudiandae quibusdam incidunt. - - institution: Et quaerat ipsa reiciendis. - major: Ad neque hic ut repudiandae quibusdam incidunt. - - institution: Et quaerat ipsa reiciendis. - major: Ad neque hic ut repudiandae quibusdam incidunt. + - institution: Vitae eaque autem in. + major: Qui nostrum quas velit nihil. + - institution: Vitae eaque autem in. + major: Qui nostrum quas velit nihil. + - institution: Vitae eaque autem in. + major: Qui nostrum quas velit nihil. experience: - - company: Dolores odio quis atque deserunt. - duration: 3945418871627614791 - role: Voluptas animi tempora vero. - - company: Dolores odio quis atque deserunt. - duration: 3945418871627614791 - role: Voluptas animi tempora vero. - - company: Dolores odio quis atque deserunt. - duration: 3945418871627614791 - role: Voluptas animi tempora vero. - - company: Dolores odio quis atque deserunt. - duration: 3945418871627614791 - role: Voluptas animi tempora vero. - id: 1462454679131059051 - name: Aperiam exercitationem aliquam et sint praesentium. + - company: Dolor dicta dignissimos eius facere enim quae. + duration: 6839028381351029038 + role: Enim quia recusandae nostrum animi nam. + - company: Dolor dicta dignissimos eius facere enim quae. + duration: 6839028381351029038 + role: Enim quia recusandae nostrum animi nam. + - company: Dolor dicta dignissimos eius facere enim quae. + duration: 6839028381351029038 + role: Enim quia recusandae nostrum animi nam. + id: 4215431722801319674 + name: Voluptas quae modi saepe et impedit aliquam. tags: - name: resume description: The storage service makes it possible to add resumes using multipart. diff --git a/multipart/gen/http/resume/client/cli.go b/multipart/gen/http/resume/client/cli.go index a883c383e..8a84838dd 100644 --- a/multipart/gen/http/resume/client/cli.go +++ b/multipart/gen/http/resume/client/cli.go @@ -22,7 +22,7 @@ func BuildAddPayload(resumeAddBody string) ([]*resume.Resume, error) { { err = json.Unmarshal([]byte(resumeAddBody), &body) if err != nil { - return nil, fmt.Errorf("invalid JSON for body, \nerror: %s, \nexample of valid JSON:\n%s", err, "'[\n {\n \"education\": [\n {\n \"institution\": \"Ipsum saepe quia est.\",\n \"major\": \"Fuga placeat est voluptatem sed.\"\n },\n {\n \"institution\": \"Ipsum saepe quia est.\",\n \"major\": \"Fuga placeat est voluptatem sed.\"\n },\n {\n \"institution\": \"Ipsum saepe quia est.\",\n \"major\": \"Fuga placeat est voluptatem sed.\"\n }\n ],\n \"experience\": [\n {\n \"company\": \"Saepe enim.\",\n \"duration\": 4129157726558553807,\n \"role\": \"Aut sit aut dolores sed ut ut.\"\n },\n {\n \"company\": \"Saepe enim.\",\n \"duration\": 4129157726558553807,\n \"role\": \"Aut sit aut dolores sed ut ut.\"\n }\n ],\n \"name\": \"Explicabo et eligendi expedita necessitatibus eius qui.\"\n },\n {\n \"education\": [\n {\n \"institution\": \"Ipsum saepe quia est.\",\n \"major\": \"Fuga placeat est voluptatem sed.\"\n },\n {\n \"institution\": \"Ipsum saepe quia est.\",\n \"major\": \"Fuga placeat est voluptatem sed.\"\n },\n {\n \"institution\": \"Ipsum saepe quia est.\",\n \"major\": \"Fuga placeat est voluptatem sed.\"\n }\n ],\n \"experience\": [\n {\n \"company\": \"Saepe enim.\",\n \"duration\": 4129157726558553807,\n \"role\": \"Aut sit aut dolores sed ut ut.\"\n },\n {\n \"company\": \"Saepe enim.\",\n \"duration\": 4129157726558553807,\n \"role\": \"Aut sit aut dolores sed ut ut.\"\n }\n ],\n \"name\": \"Explicabo et eligendi expedita necessitatibus eius qui.\"\n },\n {\n \"education\": [\n {\n \"institution\": \"Ipsum saepe quia est.\",\n \"major\": \"Fuga placeat est voluptatem sed.\"\n },\n {\n \"institution\": \"Ipsum saepe quia est.\",\n \"major\": \"Fuga placeat est voluptatem sed.\"\n },\n {\n \"institution\": \"Ipsum saepe quia est.\",\n \"major\": \"Fuga placeat est voluptatem sed.\"\n }\n ],\n \"experience\": [\n {\n \"company\": \"Saepe enim.\",\n \"duration\": 4129157726558553807,\n \"role\": \"Aut sit aut dolores sed ut ut.\"\n },\n {\n \"company\": \"Saepe enim.\",\n \"duration\": 4129157726558553807,\n \"role\": \"Aut sit aut dolores sed ut ut.\"\n }\n ],\n \"name\": \"Explicabo et eligendi expedita necessitatibus eius qui.\"\n },\n {\n \"education\": [\n {\n \"institution\": \"Ipsum saepe quia est.\",\n \"major\": \"Fuga placeat est voluptatem sed.\"\n },\n {\n \"institution\": \"Ipsum saepe quia est.\",\n \"major\": \"Fuga placeat est voluptatem sed.\"\n },\n {\n \"institution\": \"Ipsum saepe quia est.\",\n \"major\": \"Fuga placeat est voluptatem sed.\"\n }\n ],\n \"experience\": [\n {\n \"company\": \"Saepe enim.\",\n \"duration\": 4129157726558553807,\n \"role\": \"Aut sit aut dolores sed ut ut.\"\n },\n {\n \"company\": \"Saepe enim.\",\n \"duration\": 4129157726558553807,\n \"role\": \"Aut sit aut dolores sed ut ut.\"\n }\n ],\n \"name\": \"Explicabo et eligendi expedita necessitatibus eius qui.\"\n }\n ]'") + return nil, fmt.Errorf("invalid JSON for body, \nerror: %s, \nexample of valid JSON:\n%s", err, "'[\n {\n \"education\": [\n {\n \"institution\": \"Vitae eaque autem in.\",\n \"major\": \"Qui nostrum quas velit nihil.\"\n },\n {\n \"institution\": \"Vitae eaque autem in.\",\n \"major\": \"Qui nostrum quas velit nihil.\"\n }\n ],\n \"experience\": [\n {\n \"company\": \"Dolor dicta dignissimos eius facere enim quae.\",\n \"duration\": 6839028381351029038,\n \"role\": \"Enim quia recusandae nostrum animi nam.\"\n },\n {\n \"company\": \"Dolor dicta dignissimos eius facere enim quae.\",\n \"duration\": 6839028381351029038,\n \"role\": \"Enim quia recusandae nostrum animi nam.\"\n }\n ],\n \"name\": \"Voluptas et.\"\n },\n {\n \"education\": [\n {\n \"institution\": \"Vitae eaque autem in.\",\n \"major\": \"Qui nostrum quas velit nihil.\"\n },\n {\n \"institution\": \"Vitae eaque autem in.\",\n \"major\": \"Qui nostrum quas velit nihil.\"\n }\n ],\n \"experience\": [\n {\n \"company\": \"Dolor dicta dignissimos eius facere enim quae.\",\n \"duration\": 6839028381351029038,\n \"role\": \"Enim quia recusandae nostrum animi nam.\"\n },\n {\n \"company\": \"Dolor dicta dignissimos eius facere enim quae.\",\n \"duration\": 6839028381351029038,\n \"role\": \"Enim quia recusandae nostrum animi nam.\"\n }\n ],\n \"name\": \"Voluptas et.\"\n },\n {\n \"education\": [\n {\n \"institution\": \"Vitae eaque autem in.\",\n \"major\": \"Qui nostrum quas velit nihil.\"\n },\n {\n \"institution\": \"Vitae eaque autem in.\",\n \"major\": \"Qui nostrum quas velit nihil.\"\n }\n ],\n \"experience\": [\n {\n \"company\": \"Dolor dicta dignissimos eius facere enim quae.\",\n \"duration\": 6839028381351029038,\n \"role\": \"Enim quia recusandae nostrum animi nam.\"\n },\n {\n \"company\": \"Dolor dicta dignissimos eius facere enim quae.\",\n \"duration\": 6839028381351029038,\n \"role\": \"Enim quia recusandae nostrum animi nam.\"\n }\n ],\n \"name\": \"Voluptas et.\"\n },\n {\n \"education\": [\n {\n \"institution\": \"Vitae eaque autem in.\",\n \"major\": \"Qui nostrum quas velit nihil.\"\n },\n {\n \"institution\": \"Vitae eaque autem in.\",\n \"major\": \"Qui nostrum quas velit nihil.\"\n }\n ],\n \"experience\": [\n {\n \"company\": \"Dolor dicta dignissimos eius facere enim quae.\",\n \"duration\": 6839028381351029038,\n \"role\": \"Enim quia recusandae nostrum animi nam.\"\n },\n {\n \"company\": \"Dolor dicta dignissimos eius facere enim quae.\",\n \"duration\": 6839028381351029038,\n \"role\": \"Enim quia recusandae nostrum animi nam.\"\n }\n ],\n \"name\": \"Voluptas et.\"\n }\n ]'") } } v := make([]*resume.Resume, len(body)) diff --git a/multipart/gen/http/resume/client/encode_decode.go b/multipart/gen/http/resume/client/encode_decode.go index 629ae4066..a4ecd1696 100644 --- a/multipart/gen/http/resume/client/encode_decode.go +++ b/multipart/gen/http/resume/client/encode_decode.go @@ -10,6 +10,7 @@ package client import ( "bytes" "context" + "errors" "io" "mime/multipart" "net/http" @@ -39,18 +40,24 @@ func (c *Client) BuildListRequest(ctx context.Context, v any) (*http.Request, er // list endpoint. restoreBody controls whether the response body should be // restored after having been read. func DecodeListResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (any, error) { - return func(resp *http.Response) (any, error) { + return func(resp *http.Response) (result any, decodeErr error) { + responseBody := resp.Body if restoreBody { - b, err := io.ReadAll(resp.Body) - if err != nil { - return nil, err + b, readErr := io.ReadAll(responseBody) + closeErr := responseBody.Close() + if err := errors.Join(readErr, closeErr); err != nil { + return nil, goahttp.ErrDecodingError("resume", "list", err) } resp.Body = io.NopCloser(bytes.NewBuffer(b)) defer func() { resp.Body = io.NopCloser(bytes.NewBuffer(b)) }() } else { - defer resp.Body.Close() + defer func() { + if err := responseBody.Close(); err != nil { + decodeErr = errors.Join(decodeErr, goahttp.ErrDecodingError("resume", "list", err)) + } + }() } switch resp.StatusCode { case http.StatusOK: @@ -71,7 +78,10 @@ func DecodeListResponse(decoder func(*http.Response) goahttp.Decoder, restoreBod res := resume.NewStoredResumeCollection(vres) return res, nil default: - body, _ := io.ReadAll(resp.Body) + body, err := io.ReadAll(resp.Body) + if err != nil { + return nil, goahttp.ErrDecodingError("resume", "list", err) + } return nil, goahttp.ErrInvalidResponse("resume", "list", resp.StatusCode, string(body)) } } @@ -129,18 +139,24 @@ func NewResumeAddEncoder(encoderFn ResumeAddEncoderFunc) func(r *http.Request) g // endpoint. restoreBody controls whether the response body should be restored // after having been read. func DecodeAddResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (any, error) { - return func(resp *http.Response) (any, error) { + return func(resp *http.Response) (result any, decodeErr error) { + responseBody := resp.Body if restoreBody { - b, err := io.ReadAll(resp.Body) - if err != nil { - return nil, err + b, readErr := io.ReadAll(responseBody) + closeErr := responseBody.Close() + if err := errors.Join(readErr, closeErr); err != nil { + return nil, goahttp.ErrDecodingError("resume", "add", err) } resp.Body = io.NopCloser(bytes.NewBuffer(b)) defer func() { resp.Body = io.NopCloser(bytes.NewBuffer(b)) }() } else { - defer resp.Body.Close() + defer func() { + if err := responseBody.Close(); err != nil { + decodeErr = errors.Join(decodeErr, goahttp.ErrDecodingError("resume", "add", err)) + } + }() } switch resp.StatusCode { case http.StatusOK: @@ -154,7 +170,10 @@ func DecodeAddResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody } return body, nil default: - body, _ := io.ReadAll(resp.Body) + body, err := io.ReadAll(resp.Body) + if err != nil { + return nil, goahttp.ErrDecodingError("resume", "add", err) + } return nil, goahttp.ErrInvalidResponse("resume", "add", resp.StatusCode, string(body)) } } @@ -225,7 +244,7 @@ func marshalResumeResumeToResumeRequestBody(v *resume.Resume) *ResumeRequestBody res.Experience[i] = nil continue } - res.Experience[i] = marshalResumeExperienceToExperienceRequestBody(val) + res.Experience[i] = marshalResumeExperienceToExperienceRequestBodyOptional(val) } } if v.Education != nil { @@ -235,16 +254,16 @@ func marshalResumeResumeToResumeRequestBody(v *resume.Resume) *ResumeRequestBody res.Education[i] = nil continue } - res.Education[i] = marshalResumeEducationToEducationRequestBody(val) + res.Education[i] = marshalResumeEducationToEducationRequestBodyOptional(val) } } return res } -// marshalResumeExperienceToExperienceRequestBody builds a value of type -// *ExperienceRequestBody from a value of type *resume.Experience. -func marshalResumeExperienceToExperienceRequestBody(v *resume.Experience) *ExperienceRequestBody { +// marshalResumeExperienceToExperienceRequestBodyOptional builds a value of +// type *ExperienceRequestBody from a value of type *resume.Experience. +func marshalResumeExperienceToExperienceRequestBodyOptional(v *resume.Experience) *ExperienceRequestBody { if v == nil { return nil } @@ -257,9 +276,9 @@ func marshalResumeExperienceToExperienceRequestBody(v *resume.Experience) *Exper return res } -// marshalResumeEducationToEducationRequestBody builds a value of type +// marshalResumeEducationToEducationRequestBodyOptional builds a value of type // *EducationRequestBody from a value of type *resume.Education. -func marshalResumeEducationToEducationRequestBody(v *resume.Education) *EducationRequestBody { +func marshalResumeEducationToEducationRequestBodyOptional(v *resume.Education) *EducationRequestBody { if v == nil { return nil } @@ -284,7 +303,7 @@ func marshalResumeRequestBodyToResumeResume(v *ResumeRequestBody) *resume.Resume res.Experience[i] = nil continue } - res.Experience[i] = marshalExperienceRequestBodyToResumeExperience(val) + res.Experience[i] = marshalExperienceRequestBodyToResumeExperienceOptional(val) } } if v.Education != nil { @@ -294,16 +313,16 @@ func marshalResumeRequestBodyToResumeResume(v *ResumeRequestBody) *resume.Resume res.Education[i] = nil continue } - res.Education[i] = marshalEducationRequestBodyToResumeEducation(val) + res.Education[i] = marshalEducationRequestBodyToResumeEducationOptional(val) } } return res } -// marshalExperienceRequestBodyToResumeExperience builds a value of type -// *resume.Experience from a value of type *ExperienceRequestBody. -func marshalExperienceRequestBodyToResumeExperience(v *ExperienceRequestBody) *resume.Experience { +// marshalExperienceRequestBodyToResumeExperienceOptional builds a value of +// type *resume.Experience from a value of type *ExperienceRequestBody. +func marshalExperienceRequestBodyToResumeExperienceOptional(v *ExperienceRequestBody) *resume.Experience { if v == nil { return nil } @@ -316,9 +335,9 @@ func marshalExperienceRequestBodyToResumeExperience(v *ExperienceRequestBody) *r return res } -// marshalEducationRequestBodyToResumeEducation builds a value of type +// marshalEducationRequestBodyToResumeEducationOptional builds a value of type // *resume.Education from a value of type *EducationRequestBody. -func marshalEducationRequestBodyToResumeEducation(v *EducationRequestBody) *resume.Education { +func marshalEducationRequestBodyToResumeEducationOptional(v *EducationRequestBody) *resume.Education { if v == nil { return nil } diff --git a/multipart/gen/http/resume/client/types.go b/multipart/gen/http/resume/client/types.go index 22c871ab5..49a953a68 100644 --- a/multipart/gen/http/resume/client/types.go +++ b/multipart/gen/http/resume/client/types.go @@ -106,8 +106,7 @@ func NewListStoredResumeCollectionOK(body StoredResumeResponseCollection) resume return v } -// ValidateStoredResumeResponse runs the validations defined on -// StoredResumeResponse +// ValidateStoredResumeResponse runs the validations defined on StoredResume func ValidateStoredResumeResponse(body *StoredResumeResponse) (err error) { if body.ID == nil { err = goa.MergeErrors(err, goa.MissingFieldError("id", "body")) @@ -126,14 +125,14 @@ func ValidateStoredResumeResponse(body *StoredResumeResponse) (err error) { } for _, e := range body.Experience { if e != nil { - if err2 := ValidateExperienceResponse(e); err2 != nil { + if err2 := validateExperienceResponse(e, "body.experience[*]"); err2 != nil { err = goa.MergeErrors(err, err2) } } } for _, e := range body.Education { if e != nil { - if err2 := ValidateEducationResponse(e); err2 != nil { + if err2 := validateEducationResponse(e, "body.education[*]"); err2 != nil { err = goa.MergeErrors(err, err2) } } @@ -141,7 +140,7 @@ func ValidateStoredResumeResponse(body *StoredResumeResponse) (err error) { return } -// ValidateExperienceResponse runs the validations defined on ExperienceResponse +// ValidateExperienceResponse runs the validations defined on Experience func ValidateExperienceResponse(body *ExperienceResponse) (err error) { if body.Company == nil { err = goa.MergeErrors(err, goa.MissingFieldError("company", "body")) @@ -155,7 +154,22 @@ func ValidateExperienceResponse(body *ExperienceResponse) (err error) { return } -// ValidateEducationResponse runs the validations defined on EducationResponse +// validateExperienceResponse checks Experience and reports errors using the +// path supplied by its caller +func validateExperienceResponse(body *ExperienceResponse, path string) (err error) { + if body.Company == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("company", path)) + } + if body.Role == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("role", path)) + } + if body.Duration == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("duration", path)) + } + return +} + +// ValidateEducationResponse runs the validations defined on Education func ValidateEducationResponse(body *EducationResponse) (err error) { if body.Institution == nil { err = goa.MergeErrors(err, goa.MissingFieldError("institution", "body")) @@ -165,3 +179,15 @@ func ValidateEducationResponse(body *EducationResponse) (err error) { } return } + +// validateEducationResponse checks Education and reports errors using the path +// supplied by its caller +func validateEducationResponse(body *EducationResponse, path string) (err error) { + if body.Institution == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("institution", path)) + } + if body.Major == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("major", path)) + } + return +} diff --git a/multipart/gen/http/resume/server/encode_decode.go b/multipart/gen/http/resume/server/encode_decode.go index 2e9738326..437e012d1 100644 --- a/multipart/gen/http/resume/server/encode_decode.go +++ b/multipart/gen/http/resume/server/encode_decode.go @@ -10,6 +10,7 @@ package server import ( "context" "errors" + "io" "net/http" resume "goa.design/examples/multipart/gen/resume" @@ -47,13 +48,32 @@ func EncodeAddResponse(encoder func(context.Context, http.ResponseWriter) goahtt func DecodeAddRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder) func(*http.Request) ([]*resume.Resume, error) { return func(r *http.Request) ([]*resume.Resume, error) { var payload []*resume.Resume - if err := decoder(r).Decode(&payload); err != nil { + var ( + body []*ResumeRequestBody + err error + ) + err = decoder(r).Decode(&body) + if err != nil { + if errors.Is(err, io.EOF) { + return payload, goa.MissingPayloadError() + } var gerr *goa.ServiceError if errors.As(err, &gerr) { return payload, gerr } return payload, goa.DecodePayloadError(err.Error()) } + for _, e := range body { + if e != nil { + if err2 := validateResumeRequestBody(e, "body[*]"); err2 != nil { + err = goa.MergeErrors(err, err2) + } + } + } + if err != nil { + return payload, err + } + payload = NewAddResume(body) return payload, nil } @@ -61,15 +81,15 @@ func DecodeAddRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp.Dec // NewResumeAddDecoder returns a decoder to decode the multipart request for // the "resume" service "add" endpoint. -func NewResumeAddDecoder(mux goahttp.Muxer, resumeAddDecoderFn ResumeAddDecoderFunc) func(r *http.Request) goahttp.Decoder { +func NewResumeAddDecoder(_ goahttp.Muxer, resumeAddDecoderFn ResumeAddDecoderFunc) func(r *http.Request) goahttp.Decoder { return func(r *http.Request) goahttp.Decoder { return goahttp.EncodingFunc(func(v any) error { mr, merr := r.MultipartReader() if merr != nil { return merr } - p := v.(*[]*resume.Resume) - if err := resumeAddDecoderFn(mr, p); err != nil { + body := v.(*[]*ResumeRequestBody) + if err := resumeAddDecoderFn(mr, body); err != nil { return err } return nil @@ -150,7 +170,7 @@ func unmarshalResumeRequestBodyToResumeResume(v *ResumeRequestBody) *resume.Resu res.Experience[i] = nil continue } - res.Experience[i] = unmarshalExperienceRequestBodyToResumeExperience(val) + res.Experience[i] = unmarshalExperienceRequestBodyToResumeExperienceOptional(val) } } if v.Education != nil { @@ -160,16 +180,16 @@ func unmarshalResumeRequestBodyToResumeResume(v *ResumeRequestBody) *resume.Resu res.Education[i] = nil continue } - res.Education[i] = unmarshalEducationRequestBodyToResumeEducation(val) + res.Education[i] = unmarshalEducationRequestBodyToResumeEducationOptional(val) } } return res } -// unmarshalExperienceRequestBodyToResumeExperience builds a value of type -// *resume.Experience from a value of type *ExperienceRequestBody. -func unmarshalExperienceRequestBodyToResumeExperience(v *ExperienceRequestBody) *resume.Experience { +// unmarshalExperienceRequestBodyToResumeExperienceOptional builds a value of +// type *resume.Experience from a value of type *ExperienceRequestBody. +func unmarshalExperienceRequestBodyToResumeExperienceOptional(v *ExperienceRequestBody) *resume.Experience { if v == nil { return nil } @@ -182,9 +202,9 @@ func unmarshalExperienceRequestBodyToResumeExperience(v *ExperienceRequestBody) return res } -// unmarshalEducationRequestBodyToResumeEducation builds a value of type -// *resume.Education from a value of type *EducationRequestBody. -func unmarshalEducationRequestBodyToResumeEducation(v *EducationRequestBody) *resume.Education { +// unmarshalEducationRequestBodyToResumeEducationOptional builds a value of +// type *resume.Education from a value of type *EducationRequestBody. +func unmarshalEducationRequestBodyToResumeEducationOptional(v *EducationRequestBody) *resume.Education { if v == nil { return nil } diff --git a/multipart/gen/http/resume/server/server.go b/multipart/gen/http/resume/server/server.go index 080f90912..51cb610ef 100644 --- a/multipart/gen/http/resume/server/server.go +++ b/multipart/gen/http/resume/server/server.go @@ -37,7 +37,7 @@ type MountPoint struct { // ResumeAddDecoderFunc is the type to decode multipart request for the // "resume" service "add" endpoint. -type ResumeAddDecoderFunc func(*multipart.Reader, *[]*resume.Resume) error +type ResumeAddDecoderFunc func(*multipart.Reader, *[]*ResumeRequestBody) error // New instantiates HTTP handlers for all the resume service endpoints using // the provided encoder and decoder. The handlers are mounted on the given mux diff --git a/multipart/gen/http/resume/server/types.go b/multipart/gen/http/resume/server/types.go index 54cd13dbf..75b1bd9cd 100644 --- a/multipart/gen/http/resume/server/types.go +++ b/multipart/gen/http/resume/server/types.go @@ -104,21 +104,21 @@ func NewAddResume(body []*ResumeRequestBody) []*resume.Resume { return v } -// ValidateResumeRequestBody runs the validations defined on ResumeRequestBody +// ValidateResumeRequestBody runs the validations defined on Resume func ValidateResumeRequestBody(body *ResumeRequestBody) (err error) { if body.Name == nil { err = goa.MergeErrors(err, goa.MissingFieldError("name", "body")) } for _, e := range body.Experience { if e != nil { - if err2 := ValidateExperienceRequestBody(e); err2 != nil { + if err2 := validateExperienceRequestBody(e, "body.experience[*]"); err2 != nil { err = goa.MergeErrors(err, err2) } } } for _, e := range body.Education { if e != nil { - if err2 := ValidateEducationRequestBody(e); err2 != nil { + if err2 := validateEducationRequestBody(e, "body.education[*]"); err2 != nil { err = goa.MergeErrors(err, err2) } } @@ -126,8 +126,30 @@ func ValidateResumeRequestBody(body *ResumeRequestBody) (err error) { return } -// ValidateExperienceRequestBody runs the validations defined on -// ExperienceRequestBody +// validateResumeRequestBody checks Resume and reports errors using the path +// supplied by its caller +func validateResumeRequestBody(body *ResumeRequestBody, path string) (err error) { + if body.Name == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("name", path)) + } + for _, e := range body.Experience { + if e != nil { + if err2 := validateExperienceRequestBody(e, path+".experience[*]"); err2 != nil { + err = goa.MergeErrors(err, err2) + } + } + } + for _, e := range body.Education { + if e != nil { + if err2 := validateEducationRequestBody(e, path+".education[*]"); err2 != nil { + err = goa.MergeErrors(err, err2) + } + } + } + return +} + +// ValidateExperienceRequestBody runs the validations defined on Experience func ValidateExperienceRequestBody(body *ExperienceRequestBody) (err error) { if body.Company == nil { err = goa.MergeErrors(err, goa.MissingFieldError("company", "body")) @@ -141,8 +163,22 @@ func ValidateExperienceRequestBody(body *ExperienceRequestBody) (err error) { return } -// ValidateEducationRequestBody runs the validations defined on -// EducationRequestBody +// validateExperienceRequestBody checks Experience and reports errors using the +// path supplied by its caller +func validateExperienceRequestBody(body *ExperienceRequestBody, path string) (err error) { + if body.Company == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("company", path)) + } + if body.Role == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("role", path)) + } + if body.Duration == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("duration", path)) + } + return +} + +// ValidateEducationRequestBody runs the validations defined on Education func ValidateEducationRequestBody(body *EducationRequestBody) (err error) { if body.Institution == nil { err = goa.MergeErrors(err, goa.MissingFieldError("institution", "body")) @@ -152,3 +188,15 @@ func ValidateEducationRequestBody(body *EducationRequestBody) (err error) { } return } + +// validateEducationRequestBody checks Education and reports errors using the +// path supplied by its caller +func validateEducationRequestBody(body *EducationRequestBody, path string) (err error) { + if body.Institution == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("institution", path)) + } + if body.Major == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("major", path)) + } + return +} diff --git a/multipart/gen/resume/endpoints.go b/multipart/gen/resume/endpoints.go index e7308f25b..ea4dcdf96 100644 --- a/multipart/gen/resume/endpoints.go +++ b/multipart/gen/resume/endpoints.go @@ -10,6 +10,7 @@ package resume import ( "context" + resumeviews "goa.design/examples/multipart/gen/resume/views" goa "goa.design/goa/v3/pkg" ) @@ -42,6 +43,9 @@ func NewListEndpoint(s Service) goa.Endpoint { return nil, err } vres := NewViewedStoredResumeCollection(res, "default") + if err := resumeviews.ValidateStoredResumeCollection(vres); err != nil { + return nil, err + } return vres, nil } } diff --git a/multipart/gen/resume/views/view.go b/multipart/gen/resume/views/view.go index c386abeec..e2eab4f40 100644 --- a/multipart/gen/resume/views/view.go +++ b/multipart/gen/resume/views/view.go @@ -7,9 +7,7 @@ package views -import ( - goa "goa.design/goa/v3/pkg" -) +import goa "goa.design/goa/v3/pkg" // StoredResumeCollection is the viewed result type that is projected based on // a view. diff --git a/multipart/multipart.go b/multipart/multipart.go index 1f7d8eae5..9e22d8c62 100644 --- a/multipart/multipart.go +++ b/multipart/multipart.go @@ -12,8 +12,9 @@ import ( ) // ResumeAddDecoderFunc implements the multipart decoder for service "resume" -// endpoint "add". The decoder must populate the argument p after encoding. -func ResumeAddDecoderFunc(mr *multipart.Reader, p *[]*resume.Resume) error { +// endpoint "add". The decoder must populate the argument p after decoding the +// request parts. +func ResumeAddDecoderFunc(mr *multipart.Reader, p *[]*server.ResumeRequestBody) error { var resumes []*server.ResumeRequestBody for { part, err := mr.NextPart() @@ -30,7 +31,7 @@ func ResumeAddDecoderFunc(mr *multipart.Reader, p *[]*resume.Resume) error { } resumes = append(resumes, &r) } - *p = server.NewAddResume(resumes) + *p = resumes return nil } diff --git a/retry/gen/grpc/cli/retry/cli.go b/retry/gen/grpc/cli/retry/cli.go index 352907f5a..e39d6e404 100644 --- a/retry/gen/grpc/cli/retry/cli.go +++ b/retry/gen/grpc/cli/retry/cli.go @@ -28,7 +28,7 @@ func UsageCommands() []string { // UsageExamples produces an example of a valid invocation of the CLI tool. func UsageExamples() string { - return os.Args[0] + " " + "retry get-message --message '{\n \"id\": \"Impedit omnis unde.\"\n }'" + "\n" + + return os.Args[0] + " " + "retry get-message --message '{\n \"id\": \"Dolores asperiores ipsam.\"\n }'" + "\n" + "" } @@ -147,5 +147,5 @@ func retryGetMessageUsage() { fmt.Fprintln(os.Stderr) fmt.Fprintln(os.Stderr, "Example:") - fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "retry get-message --message '{\n \"id\": \"Impedit omnis unde.\"\n }'") + fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "retry get-message --message '{\n \"id\": \"Dolores asperiores ipsam.\"\n }'") } diff --git a/retry/gen/grpc/retry/client/cli.go b/retry/gen/grpc/retry/client/cli.go index b2325c4b8..1bca102f0 100644 --- a/retry/gen/grpc/retry/client/cli.go +++ b/retry/gen/grpc/retry/client/cli.go @@ -24,7 +24,7 @@ func BuildGetMessagePayload(retryGetMessageMessage string) (*retry.GetMessagePay if retryGetMessageMessage != "" { err = json.Unmarshal([]byte(retryGetMessageMessage), &message) if err != nil { - return nil, fmt.Errorf("invalid JSON for message, \nerror: %s, \nexample of valid JSON:\n%s", err, "'{\n \"id\": \"Impedit omnis unde.\"\n }'") + return nil, fmt.Errorf("invalid JSON for message, \nerror: %s, \nexample of valid JSON:\n%s", err, "'{\n \"id\": \"Dolores asperiores ipsam.\"\n }'") } } } diff --git a/retry/gen/grpc/retry/client/types.go b/retry/gen/grpc/retry/client/types.go index e44e15b52..422d1d6c6 100644 --- a/retry/gen/grpc/retry/client/types.go +++ b/retry/gen/grpc/retry/client/types.go @@ -12,8 +12,8 @@ import ( retry "goa.design/examples/retry/gen/retry" ) -// NewProtoGetMessageRequest builds the gRPC request type from the payload of -// the "get_message" endpoint of the "retry" service. +// NewProtoGetMessageRequest builds *retrypb.GetMessageRequest from +// *retry.GetMessagePayload. func NewProtoGetMessageRequest(payload *retry.GetMessagePayload) *retrypb.GetMessageRequest { message := &retrypb.GetMessageRequest{ Id: payload.ID, @@ -21,8 +21,8 @@ func NewProtoGetMessageRequest(payload *retry.GetMessagePayload) *retrypb.GetMes return message } -// NewGetMessageResult builds the result type of the "get_message" endpoint of -// the "retry" service from the gRPC response type. +// NewGetMessageResult builds *retry.GetMessageResult from +// *retrypb.GetMessageResponse. func NewGetMessageResult(message *retrypb.GetMessageResponse) *retry.GetMessageResult { result := &retry.GetMessageResult{ Message: message.Message_, diff --git a/retry/gen/grpc/retry/pb/goagen_retry_retry.pb.go b/retry/gen/grpc/retry/pb/goagen_retry_retry.pb.go index 56b5bc444..7b60a2748 100644 --- a/retry/gen/grpc/retry/pb/goagen_retry_retry.pb.go +++ b/retry/gen/grpc/retry/pb/goagen_retry_retry.pb.go @@ -7,8 +7,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.36.11 -// protoc v7.34.1 +// protoc-gen-go v1.36.12 +// protoc v7.36.0 // source: goagen_retry_retry.proto package retrypb diff --git a/retry/gen/grpc/retry/pb/goagen_retry_retry_grpc.pb.go b/retry/gen/grpc/retry/pb/goagen_retry_retry_grpc.pb.go index cdefbfe95..4a0a4e164 100644 --- a/retry/gen/grpc/retry/pb/goagen_retry_retry_grpc.pb.go +++ b/retry/gen/grpc/retry/pb/goagen_retry_retry_grpc.pb.go @@ -8,7 +8,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.6.2 -// - protoc v7.34.1 +// - protoc v7.36.0 // source: goagen_retry_retry.proto package retrypb diff --git a/retry/gen/grpc/retry/server/types.go b/retry/gen/grpc/retry/server/types.go index c098c0dd1..2e1188dc0 100644 --- a/retry/gen/grpc/retry/server/types.go +++ b/retry/gen/grpc/retry/server/types.go @@ -12,8 +12,8 @@ import ( retry "goa.design/examples/retry/gen/retry" ) -// NewGetMessagePayload builds the payload of the "get_message" endpoint of the -// "retry" service from the gRPC request type. +// NewGetMessagePayload builds *retry.GetMessagePayload from +// *retrypb.GetMessageRequest. func NewGetMessagePayload(message *retrypb.GetMessageRequest) *retry.GetMessagePayload { v := &retry.GetMessagePayload{ ID: message.Id, @@ -21,8 +21,8 @@ func NewGetMessagePayload(message *retrypb.GetMessageRequest) *retry.GetMessageP return v } -// NewProtoGetMessageResponse builds the gRPC response type from the result of -// the "get_message" endpoint of the "retry" service. +// NewProtoGetMessageResponse builds *retrypb.GetMessageResponse from +// *retry.GetMessageResult. func NewProtoGetMessageResponse(result *retry.GetMessageResult) *retrypb.GetMessageResponse { message := &retrypb.GetMessageResponse{ Message_: result.Message, diff --git a/retry/gen/http/cli/retry/cli.go b/retry/gen/http/cli/retry/cli.go index cc790d09c..ea8374395 100644 --- a/retry/gen/http/cli/retry/cli.go +++ b/retry/gen/http/cli/retry/cli.go @@ -29,7 +29,7 @@ func UsageCommands() []string { // UsageExamples produces an example of a valid invocation of the CLI tool. func UsageExamples() string { - return os.Args[0] + " " + "retry get-message --id \"Omnis eius maiores aut et rerum veritatis.\"" + "\n" + + return os.Args[0] + " " + "retry get-message --id \"Dolore assumenda ratione maiores.\"" + "\n" + "" } @@ -151,5 +151,5 @@ func retryGetMessageUsage() { fmt.Fprintln(os.Stderr) fmt.Fprintln(os.Stderr, "Example:") - fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "retry get-message --id \"Omnis eius maiores aut et rerum veritatis.\"") + fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "retry get-message --id \"Dolore assumenda ratione maiores.\"") } diff --git a/retry/gen/http/openapi.json b/retry/gen/http/openapi.json index 544054de1..7aa60f503 100644 --- a/retry/gen/http/openapi.json +++ b/retry/gen/http/openapi.json @@ -1 +1 @@ -{"swagger":"2.0","info":{"title":"Retry Service","description":"Demonstrates transport-independent retries for an idempotent method.","version":"0.0.1"},"host":"localhost:18080","consumes":["application/json","application/xml","application/gob"],"produces":["application/json","application/xml","application/gob"],"paths":{"/messages/{id}":{"get":{"description":"Returns a stable message after a temporary first-attempt failure.","operationId":"retry#get_message","parameters":[{"description":"Identifies one demonstration request.","in":"path","name":"id","required":true,"type":"string"}],"responses":{"200":{"description":"OK response.","schema":{"$ref":"#/definitions/RetryGetMessageResponseBody","required":["message"]}},"503":{"description":"Service Unavailable response.","schema":{"$ref":"#/definitions/RetryGetMessageUnavailableResponseBody"}}},"schemes":["http"],"summary":"get_message retry","tags":["retry"],"x-goa-idempotent":true}}},"definitions":{"RetryGetMessageResponseBody":{"title":"RetryGetMessageResponseBody","type":"object","properties":{"message":{"type":"string","description":"Message returned after the retry succeeds.","example":"Quaerat cum fugiat fugiat aut quia qui."}},"example":{"message":"Quaerat cum fugiat fugiat aut quia qui."},"required":["message"]},"RetryGetMessageUnavailableResponseBody":{"title":"Mediatype identifier: application/vnd.goa.error; view=default","type":"object","properties":{"fault":{"type":"boolean","description":"Is the error a server-side fault?","example":true},"id":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"message":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"name":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"temporary":{"type":"boolean","description":"Is the error temporary?","example":false},"timeout":{"type":"boolean","description":"Is the error a timeout?","example":false}},"description":"The message is temporarily unavailable. (default view)","example":{"fault":true,"id":"123abc","message":"parameter 'p' must be an integer","name":"bad_request","temporary":false,"timeout":false},"required":["name","id","message","temporary","timeout","fault"]}}} \ No newline at end of file +{"swagger":"2.0","info":{"title":"Retry Service","description":"Demonstrates transport-independent retries for an idempotent method.","version":"0.0.1"},"host":"localhost:18080","consumes":["application/json","application/xml","application/gob"],"produces":["application/json","application/xml","application/gob"],"paths":{"/messages/{id}":{"get":{"description":"Returns a stable message after a temporary first-attempt failure.","operationId":"retry#get_message","parameters":[{"description":"Identifies one demonstration request.","in":"path","name":"id","required":true,"type":"string"}],"responses":{"200":{"description":"OK response.","schema":{"$ref":"#/definitions/RetryGetMessageResponseBody","required":["message"]}},"503":{"description":"unavailable: The message is temporarily unavailable.","examples":{"application/vnd.goa.error":{"fault":false,"id":"123abc","message":"parameter 'p' must be an integer","name":"unavailable","temporary":true,"timeout":false}},"schema":{"$ref":"#/definitions/RetryGetMessageUnavailableResponseBody"}}},"schemes":["http"],"summary":"get_message retry","tags":["retry"],"x-goa-idempotent":true}}},"definitions":{"RetryGetMessageResponseBody":{"title":"RetryGetMessageResponseBody","type":"object","properties":{"message":{"type":"string","description":"Message returned after the retry succeeds.","example":"Dolor quos eligendi quibusdam asperiores provident."}},"example":{"message":"Dolor quos eligendi quibusdam asperiores provident."},"required":["message"]},"RetryGetMessageUnavailableResponseBody":{"title":"Mediatype identifier: application/vnd.goa.error; view=default","type":"object","properties":{"fault":{"type":"boolean","description":"Is the error a server-side fault?","example":true},"id":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"message":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"name":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"temporary":{"type":"boolean","description":"Is the error temporary?","example":true},"timeout":{"type":"boolean","description":"Is the error a timeout?","example":true}},"description":"Error response result type (default view)","example":{"fault":true,"id":"123abc","message":"parameter 'p' must be an integer","name":"bad_request","temporary":true,"timeout":true},"required":["name","id","message","temporary","timeout","fault"]}}} \ No newline at end of file diff --git a/retry/gen/http/openapi.yaml b/retry/gen/http/openapi.yaml index 4227070ba..44a22871b 100644 --- a/retry/gen/http/openapi.yaml +++ b/retry/gen/http/openapi.yaml @@ -31,7 +31,15 @@ paths: required: - message "503": - description: Service Unavailable response. + description: 'unavailable: The message is temporarily unavailable.' + examples: + application/vnd.goa.error: + fault: false + id: 123abc + message: parameter 'p' must be an integer + name: unavailable + temporary: true + timeout: false schema: $ref: '#/definitions/RetryGetMessageUnavailableResponseBody' schemes: @@ -48,9 +56,9 @@ definitions: message: type: string description: Message returned after the retry succeeds. - example: Quaerat cum fugiat fugiat aut quia qui. + example: Dolor quos eligendi quibusdam asperiores provident. example: - message: Quaerat cum fugiat fugiat aut quia qui. + message: Dolor quos eligendi quibusdam asperiores provident. required: - message RetryGetMessageUnavailableResponseBody: @@ -76,19 +84,19 @@ definitions: temporary: type: boolean description: Is the error temporary? - example: false + example: true timeout: type: boolean description: Is the error a timeout? - example: false - description: The message is temporarily unavailable. (default view) + example: true + description: Error response result type (default view) example: fault: true id: 123abc message: parameter 'p' must be an integer name: bad_request - temporary: false - timeout: false + temporary: true + timeout: true required: - name - id diff --git a/retry/gen/http/openapi3.2.json b/retry/gen/http/openapi3.2.json index 7c2b06098..530456c4b 100644 --- a/retry/gen/http/openapi3.2.json +++ b/retry/gen/http/openapi3.2.json @@ -1 +1 @@ -{"openapi":"3.2.0","info":{"title":"Retry Service","description":"Demonstrates transport-independent retries for an idempotent method.","version":"0.0.1"},"servers":[{"url":"http://localhost:18080","name":"retry","description":"retry hosts the retry example service."}],"paths":{"/messages/{id}":{"get":{"description":"Returns a stable message after a temporary first-attempt failure.","operationId":"retry#get_message","parameters":[{"description":"Identifies one demonstration request.","example":"Nemo qui atque iure.","in":"path","name":"id","required":true,"schema":{"description":"Identifies one demonstration request.","example":"Omnis eius maiores aut et rerum veritatis.","type":"string"}}],"responses":{"200":{"content":{"application/json":{"example":{"message":"Quaerat cum fugiat fugiat aut quia qui."},"schema":{"$ref":"#/components/schemas/GetMessageResponseBody"}}},"description":"OK response."},"503":{"content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unavailable: The message is temporarily unavailable."}},"summary":"get_message retry","tags":["retry"],"x-goa-idempotent":true}}},"components":{"schemas":{"Error":{"type":"object","properties":{"fault":{"type":"boolean","description":"Is the error a server-side fault?","example":true},"id":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"message":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"name":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"temporary":{"type":"boolean","description":"Is the error temporary?","example":false},"timeout":{"type":"boolean","description":"Is the error a timeout?","example":false}},"description":"The message is temporarily unavailable.","example":{"fault":true,"id":"123abc","message":"parameter 'p' must be an integer","name":"bad_request","temporary":false,"timeout":false},"required":["name","id","message","temporary","timeout","fault"]},"GetMessageResponseBody":{"type":"object","properties":{"message":{"type":"string","description":"Message returned after the retry succeeds.","example":"Quaerat cum fugiat fugiat aut quia qui."}},"example":{"message":"Quaerat cum fugiat fugiat aut quia qui."},"required":["message"]}}},"tags":[{"name":"retry","description":"Returns a message after demonstrating one safe retry."}]} \ No newline at end of file +{"openapi":"3.2.0","info":{"title":"Retry Service","description":"Demonstrates transport-independent retries for an idempotent method.","version":"0.0.1"},"servers":[{"url":"http://localhost:18080","name":"retry","description":"retry hosts the retry example service."}],"paths":{"/messages/{id}":{"get":{"description":"Returns a stable message after a temporary first-attempt failure.","operationId":"retry#get_message","parameters":[{"description":"Identifies one demonstration request.","example":"Dolore assumenda ratione maiores.","in":"path","name":"id","required":true,"schema":{"description":"Identifies one demonstration request.","example":"Dolore assumenda ratione maiores.","type":"string"}}],"responses":{"200":{"content":{"application/json":{"example":{"message":"Dolor quos eligendi quibusdam asperiores provident."},"schema":{"$ref":"#/components/schemas/GetMessageResponseBody"}}},"description":"OK response."},"503":{"content":{"application/vnd.goa.error":{"example":{"fault":false,"id":"123abc","message":"parameter 'p' must be an integer","name":"unavailable","temporary":true,"timeout":false},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unavailable: The message is temporarily unavailable."}},"summary":"get_message retry","tags":["retry"],"x-goa-idempotent":true}}},"components":{"schemas":{"Error":{"type":"object","properties":{"fault":{"type":"boolean","description":"Is the error a server-side fault?","example":true},"id":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"message":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"name":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"temporary":{"type":"boolean","description":"Is the error temporary?","example":true},"timeout":{"type":"boolean","description":"Is the error a timeout?","example":true}},"description":"Error response result type","example":{"fault":true,"id":"123abc","message":"parameter 'p' must be an integer","name":"bad_request","temporary":true,"timeout":true},"required":["name","id","message","temporary","timeout","fault"]},"GetMessageResponseBody":{"type":"object","properties":{"message":{"type":"string","description":"Message returned after the retry succeeds.","example":"Dolor quos eligendi quibusdam asperiores provident."}},"example":{"message":"Dolor quos eligendi quibusdam asperiores provident."},"required":["message"]}}},"tags":[{"name":"retry","description":"Returns a message after demonstrating one safe retry."}]} \ No newline at end of file diff --git a/retry/gen/http/openapi3.2.yaml b/retry/gen/http/openapi3.2.yaml index 1829e9591..b6105de4d 100644 --- a/retry/gen/http/openapi3.2.yaml +++ b/retry/gen/http/openapi3.2.yaml @@ -14,26 +14,33 @@ paths: operationId: retry#get_message parameters: - description: Identifies one demonstration request. - example: Nemo qui atque iure. + example: Dolore assumenda ratione maiores. in: path name: id required: true schema: description: Identifies one demonstration request. - example: Omnis eius maiores aut et rerum veritatis. + example: Dolore assumenda ratione maiores. type: string responses: "200": content: application/json: example: - message: Quaerat cum fugiat fugiat aut quia qui. + message: Dolor quos eligendi quibusdam asperiores provident. schema: $ref: '#/components/schemas/GetMessageResponseBody' description: OK response. "503": content: application/vnd.goa.error: + example: + fault: false + id: 123abc + message: parameter 'p' must be an integer + name: unavailable + temporary: true + timeout: false schema: $ref: '#/components/schemas/Error' description: 'unavailable: The message is temporarily unavailable.' @@ -65,19 +72,19 @@ components: temporary: type: boolean description: Is the error temporary? - example: false + example: true timeout: type: boolean description: Is the error a timeout? - example: false - description: The message is temporarily unavailable. + example: true + description: Error response result type example: fault: true id: 123abc message: parameter 'p' must be an integer name: bad_request - temporary: false - timeout: false + temporary: true + timeout: true required: - name - id @@ -91,9 +98,9 @@ components: message: type: string description: Message returned after the retry succeeds. - example: Quaerat cum fugiat fugiat aut quia qui. + example: Dolor quos eligendi quibusdam asperiores provident. example: - message: Quaerat cum fugiat fugiat aut quia qui. + message: Dolor quos eligendi quibusdam asperiores provident. required: - message tags: diff --git a/retry/gen/http/openapi3.json b/retry/gen/http/openapi3.json index 6b7f7fcca..a9d732220 100644 --- a/retry/gen/http/openapi3.json +++ b/retry/gen/http/openapi3.json @@ -1 +1 @@ -{"openapi":"3.0.3","info":{"title":"Retry Service","description":"Demonstrates transport-independent retries for an idempotent method.","version":"0.0.1"},"servers":[{"url":"http://localhost:18080","description":"retry hosts the retry example service."}],"paths":{"/messages/{id}":{"get":{"description":"Returns a stable message after a temporary first-attempt failure.","operationId":"retry#get_message","parameters":[{"description":"Identifies one demonstration request.","example":"Nemo qui atque iure.","in":"path","name":"id","required":true,"schema":{"description":"Identifies one demonstration request.","example":"Omnis eius maiores aut et rerum veritatis.","type":"string"}}],"responses":{"200":{"content":{"application/json":{"example":{"message":"Quaerat cum fugiat fugiat aut quia qui."},"schema":{"$ref":"#/components/schemas/GetMessageResponseBody"}}},"description":"OK response."},"503":{"content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unavailable: The message is temporarily unavailable."}},"summary":"get_message retry","tags":["retry"],"x-goa-idempotent":true}}},"components":{"schemas":{"Error":{"type":"object","properties":{"fault":{"type":"boolean","description":"Is the error a server-side fault?","example":true},"id":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"message":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"name":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"temporary":{"type":"boolean","description":"Is the error temporary?","example":false},"timeout":{"type":"boolean","description":"Is the error a timeout?","example":false}},"description":"The message is temporarily unavailable.","example":{"fault":true,"id":"123abc","message":"parameter 'p' must be an integer","name":"bad_request","temporary":false,"timeout":false},"required":["name","id","message","temporary","timeout","fault"]},"GetMessageResponseBody":{"type":"object","properties":{"message":{"type":"string","description":"Message returned after the retry succeeds.","example":"Quaerat cum fugiat fugiat aut quia qui."}},"example":{"message":"Quaerat cum fugiat fugiat aut quia qui."},"required":["message"]}}},"tags":[{"name":"retry","description":"Returns a message after demonstrating one safe retry."}]} \ No newline at end of file +{"openapi":"3.0.3","info":{"title":"Retry Service","description":"Demonstrates transport-independent retries for an idempotent method.","version":"0.0.1"},"servers":[{"url":"http://localhost:18080","description":"retry hosts the retry example service."}],"paths":{"/messages/{id}":{"get":{"description":"Returns a stable message after a temporary first-attempt failure.","operationId":"retry#get_message","parameters":[{"description":"Identifies one demonstration request.","example":"Dolore assumenda ratione maiores.","in":"path","name":"id","required":true,"schema":{"description":"Identifies one demonstration request.","example":"Dolore assumenda ratione maiores.","type":"string"}}],"responses":{"200":{"content":{"application/json":{"example":{"message":"Dolor quos eligendi quibusdam asperiores provident."},"schema":{"$ref":"#/components/schemas/GetMessageResponseBody"}}},"description":"OK response."},"503":{"content":{"application/vnd.goa.error":{"example":{"fault":false,"id":"123abc","message":"parameter 'p' must be an integer","name":"unavailable","temporary":true,"timeout":false},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unavailable: The message is temporarily unavailable."}},"summary":"get_message retry","tags":["retry"],"x-goa-idempotent":true}}},"components":{"schemas":{"Error":{"type":"object","properties":{"fault":{"type":"boolean","description":"Is the error a server-side fault?","example":true},"id":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"message":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"name":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"temporary":{"type":"boolean","description":"Is the error temporary?","example":true},"timeout":{"type":"boolean","description":"Is the error a timeout?","example":true}},"description":"Error response result type","example":{"fault":true,"id":"123abc","message":"parameter 'p' must be an integer","name":"bad_request","temporary":true,"timeout":true},"required":["name","id","message","temporary","timeout","fault"]},"GetMessageResponseBody":{"type":"object","properties":{"message":{"type":"string","description":"Message returned after the retry succeeds.","example":"Dolor quos eligendi quibusdam asperiores provident."}},"example":{"message":"Dolor quos eligendi quibusdam asperiores provident."},"required":["message"]}}},"tags":[{"name":"retry","description":"Returns a message after demonstrating one safe retry."}]} \ No newline at end of file diff --git a/retry/gen/http/openapi3.yaml b/retry/gen/http/openapi3.yaml index f397d1335..976ffeca9 100644 --- a/retry/gen/http/openapi3.yaml +++ b/retry/gen/http/openapi3.yaml @@ -13,26 +13,33 @@ paths: operationId: retry#get_message parameters: - description: Identifies one demonstration request. - example: Nemo qui atque iure. + example: Dolore assumenda ratione maiores. in: path name: id required: true schema: description: Identifies one demonstration request. - example: Omnis eius maiores aut et rerum veritatis. + example: Dolore assumenda ratione maiores. type: string responses: "200": content: application/json: example: - message: Quaerat cum fugiat fugiat aut quia qui. + message: Dolor quos eligendi quibusdam asperiores provident. schema: $ref: '#/components/schemas/GetMessageResponseBody' description: OK response. "503": content: application/vnd.goa.error: + example: + fault: false + id: 123abc + message: parameter 'p' must be an integer + name: unavailable + temporary: true + timeout: false schema: $ref: '#/components/schemas/Error' description: 'unavailable: The message is temporarily unavailable.' @@ -64,19 +71,19 @@ components: temporary: type: boolean description: Is the error temporary? - example: false + example: true timeout: type: boolean description: Is the error a timeout? - example: false - description: The message is temporarily unavailable. + example: true + description: Error response result type example: fault: true id: 123abc message: parameter 'p' must be an integer name: bad_request - temporary: false - timeout: false + temporary: true + timeout: true required: - name - id @@ -90,9 +97,9 @@ components: message: type: string description: Message returned after the retry succeeds. - example: Quaerat cum fugiat fugiat aut quia qui. + example: Dolor quos eligendi quibusdam asperiores provident. example: - message: Quaerat cum fugiat fugiat aut quia qui. + message: Dolor quos eligendi quibusdam asperiores provident. required: - message tags: diff --git a/retry/gen/http/retry/client/encode_decode.go b/retry/gen/http/retry/client/encode_decode.go index 09d27bbf6..cdc091837 100644 --- a/retry/gen/http/retry/client/encode_decode.go +++ b/retry/gen/http/retry/client/encode_decode.go @@ -10,6 +10,7 @@ package client import ( "bytes" "context" + "errors" "io" "net/http" "net/url" @@ -50,18 +51,24 @@ func (c *Client) BuildGetMessageRequest(ctx context.Context, v any) (*http.Reque // - "unavailable" (type *goa.ServiceError): http.StatusServiceUnavailable // - error: internal error func DecodeGetMessageResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (any, error) { - return func(resp *http.Response) (any, error) { + return func(resp *http.Response) (result any, decodeErr error) { + responseBody := resp.Body if restoreBody { - b, err := io.ReadAll(resp.Body) - if err != nil { - return nil, err + b, readErr := io.ReadAll(responseBody) + closeErr := responseBody.Close() + if err := errors.Join(readErr, closeErr); err != nil { + return nil, goahttp.ErrDecodingError("retry", "get_message", err) } resp.Body = io.NopCloser(bytes.NewBuffer(b)) defer func() { resp.Body = io.NopCloser(bytes.NewBuffer(b)) }() } else { - defer resp.Body.Close() + defer func() { + if err := responseBody.Close(); err != nil { + decodeErr = errors.Join(decodeErr, goahttp.ErrDecodingError("retry", "get_message", err)) + } + }() } switch resp.StatusCode { case http.StatusOK: @@ -94,7 +101,10 @@ func DecodeGetMessageResponse(decoder func(*http.Response) goahttp.Decoder, rest } return nil, NewGetMessageUnavailable(&body) default: - body, _ := io.ReadAll(resp.Body) + body, err := io.ReadAll(resp.Body) + if err != nil { + return nil, goahttp.ErrDecodingError("retry", "get_message", err) + } return nil, goahttp.ErrInvalidResponse("retry", "get_message", resp.StatusCode, string(body)) } } diff --git a/retry/gen/http/retry/client/types.go b/retry/gen/http/retry/client/types.go index e91cd6110..c60bd0ce7 100644 --- a/retry/gen/http/retry/client/types.go +++ b/retry/gen/http/retry/client/types.go @@ -63,7 +63,7 @@ func NewGetMessageUnavailable(body *GetMessageUnavailableResponseBody) *goa.Serv } // ValidateGetMessageResponseBody runs the validations defined on -// get_message_response_body +// GetMessageResponseBody func ValidateGetMessageResponseBody(body *GetMessageResponseBody) (err error) { if body.Message == nil { err = goa.MergeErrors(err, goa.MissingFieldError("message", "body")) @@ -72,7 +72,7 @@ func ValidateGetMessageResponseBody(body *GetMessageResponseBody) (err error) { } // ValidateGetMessageUnavailableResponseBody runs the validations defined on -// get_message_unavailable_response_body +// GetMessageUnavailableResponseBody func ValidateGetMessageUnavailableResponseBody(body *GetMessageUnavailableResponseBody) (err error) { if body.Name == nil { err = goa.MergeErrors(err, goa.MissingFieldError("name", "body")) diff --git a/security/hierarchy/gen/http/api_key_service/client/encode_decode.go b/security/hierarchy/gen/http/api_key_service/client/encode_decode.go index 711c922df..bd01ce422 100644 --- a/security/hierarchy/gen/http/api_key_service/client/encode_decode.go +++ b/security/hierarchy/gen/http/api_key_service/client/encode_decode.go @@ -10,6 +10,7 @@ package client import ( "bytes" "context" + "errors" "io" "net/http" "net/url" @@ -54,24 +55,33 @@ func EncodeDefaultRequest(encoder func(*http.Request) goahttp.Encoder) func(*htt // api_key_service default endpoint. restoreBody controls whether the response // body should be restored after having been read. func DecodeDefaultResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (any, error) { - return func(resp *http.Response) (any, error) { + return func(resp *http.Response) (result any, decodeErr error) { + responseBody := resp.Body if restoreBody { - b, err := io.ReadAll(resp.Body) - if err != nil { - return nil, err + b, readErr := io.ReadAll(responseBody) + closeErr := responseBody.Close() + if err := errors.Join(readErr, closeErr); err != nil { + return nil, goahttp.ErrDecodingError("api_key_service", "default", err) } resp.Body = io.NopCloser(bytes.NewBuffer(b)) defer func() { resp.Body = io.NopCloser(bytes.NewBuffer(b)) }() } else { - defer resp.Body.Close() + defer func() { + if err := responseBody.Close(); err != nil { + decodeErr = errors.Join(decodeErr, goahttp.ErrDecodingError("api_key_service", "default", err)) + } + }() } switch resp.StatusCode { case http.StatusNoContent: return nil, nil default: - body, _ := io.ReadAll(resp.Body) + body, err := io.ReadAll(resp.Body) + if err != nil { + return nil, goahttp.ErrDecodingError("api_key_service", "default", err) + } return nil, goahttp.ErrInvalidResponse("api_key_service", "default", resp.StatusCode, string(body)) } } @@ -116,24 +126,33 @@ func EncodeSecureRequest(encoder func(*http.Request) goahttp.Encoder) func(*http // api_key_service secure endpoint. restoreBody controls whether the response // body should be restored after having been read. func DecodeSecureResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (any, error) { - return func(resp *http.Response) (any, error) { + return func(resp *http.Response) (result any, decodeErr error) { + responseBody := resp.Body if restoreBody { - b, err := io.ReadAll(resp.Body) - if err != nil { - return nil, err + b, readErr := io.ReadAll(responseBody) + closeErr := responseBody.Close() + if err := errors.Join(readErr, closeErr); err != nil { + return nil, goahttp.ErrDecodingError("api_key_service", "secure", err) } resp.Body = io.NopCloser(bytes.NewBuffer(b)) defer func() { resp.Body = io.NopCloser(bytes.NewBuffer(b)) }() } else { - defer resp.Body.Close() + defer func() { + if err := responseBody.Close(); err != nil { + decodeErr = errors.Join(decodeErr, goahttp.ErrDecodingError("api_key_service", "secure", err)) + } + }() } switch resp.StatusCode { case http.StatusNoContent: return nil, nil default: - body, _ := io.ReadAll(resp.Body) + body, err := io.ReadAll(resp.Body) + if err != nil { + return nil, goahttp.ErrDecodingError("api_key_service", "secure", err) + } return nil, goahttp.ErrInvalidResponse("api_key_service", "secure", resp.StatusCode, string(body)) } } diff --git a/security/hierarchy/gen/http/cli/hierarchy/cli.go b/security/hierarchy/gen/http/cli/hierarchy/cli.go index b1ac14098..661ce7df8 100644 --- a/security/hierarchy/gen/http/cli/hierarchy/cli.go +++ b/security/hierarchy/gen/http/cli/hierarchy/cli.go @@ -31,8 +31,8 @@ func UsageCommands() []string { // UsageExamples produces an example of a valid invocation of the CLI tool. func UsageExamples() string { - return os.Args[0] + " " + "default-service default --username \"Consectetur qui fugit qui voluptatibus deleniti et.\" --password \"Cupiditate est aut dolores hic numquam.\"" + "\n" + - os.Args[0] + " " + "api-key-service default --key \"Et ipsam velit illum repellat.\"" + "\n" + + return os.Args[0] + " " + "default-service default --username \"Incidunt in quo vel.\" --password \"Quis accusantium.\"" + "\n" + + os.Args[0] + " " + "api-key-service default --key \"Laudantium et voluptatem.\"" + "\n" + "" } @@ -192,7 +192,7 @@ func defaultServiceDefaultUsage() { fmt.Fprintln(os.Stderr) fmt.Fprintln(os.Stderr, "Example:") - fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "default-service default --username \"Consectetur qui fugit qui voluptatibus deleniti et.\" --password \"Cupiditate est aut dolores hic numquam.\"") + fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "default-service default --username \"Incidunt in quo vel.\" --password \"Quis accusantium.\"") } // apiKeyServiceUsage displays the usage of the api-key-service command and its @@ -222,7 +222,7 @@ func apiKeyServiceDefaultUsage() { fmt.Fprintln(os.Stderr) fmt.Fprintln(os.Stderr, "Example:") - fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "api-key-service default --key \"Et ipsam velit illum repellat.\"") + fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "api-key-service default --key \"Laudantium et voluptatem.\"") } func apiKeyServiceSecureUsage() { @@ -240,5 +240,5 @@ func apiKeyServiceSecureUsage() { fmt.Fprintln(os.Stderr) fmt.Fprintln(os.Stderr, "Example:") - fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "api-key-service secure --token \"Dolorem et deleniti voluptate enim.\"") + fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "api-key-service secure --token \"Nihil quam a repudiandae voluptatibus id.\"") } diff --git a/security/hierarchy/gen/http/default_service/client/encode_decode.go b/security/hierarchy/gen/http/default_service/client/encode_decode.go index 9567da9d9..24195d8c8 100644 --- a/security/hierarchy/gen/http/default_service/client/encode_decode.go +++ b/security/hierarchy/gen/http/default_service/client/encode_decode.go @@ -10,6 +10,7 @@ package client import ( "bytes" "context" + "errors" "io" "net/http" "net/url" @@ -50,24 +51,33 @@ func EncodeDefaultRequest(encoder func(*http.Request) goahttp.Encoder) func(*htt // default_service default endpoint. restoreBody controls whether the response // body should be restored after having been read. func DecodeDefaultResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (any, error) { - return func(resp *http.Response) (any, error) { + return func(resp *http.Response) (result any, decodeErr error) { + responseBody := resp.Body if restoreBody { - b, err := io.ReadAll(resp.Body) - if err != nil { - return nil, err + b, readErr := io.ReadAll(responseBody) + closeErr := responseBody.Close() + if err := errors.Join(readErr, closeErr); err != nil { + return nil, goahttp.ErrDecodingError("default_service", "default", err) } resp.Body = io.NopCloser(bytes.NewBuffer(b)) defer func() { resp.Body = io.NopCloser(bytes.NewBuffer(b)) }() } else { - defer resp.Body.Close() + defer func() { + if err := responseBody.Close(); err != nil { + decodeErr = errors.Join(decodeErr, goahttp.ErrDecodingError("default_service", "default", err)) + } + }() } switch resp.StatusCode { case http.StatusNoContent: return nil, nil default: - body, _ := io.ReadAll(resp.Body) + body, err := io.ReadAll(resp.Body) + if err != nil { + return nil, goahttp.ErrDecodingError("default_service", "default", err) + } return nil, goahttp.ErrInvalidResponse("default_service", "default", resp.StatusCode, string(body)) } } diff --git a/security/multiauth/gen/grpc/cli/multi_auth/cli.go b/security/multiauth/gen/grpc/cli/multi_auth/cli.go index fc1e93ff7..416e5f254 100644 --- a/security/multiauth/gen/grpc/cli/multi_auth/cli.go +++ b/security/multiauth/gen/grpc/cli/multi_auth/cli.go @@ -208,7 +208,7 @@ func securedServiceSecureUsage() { fmt.Fprintln(os.Stderr) fmt.Fprintln(os.Stderr, "Example:") - fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "secured-service secure --message '{\n \"fail\": true\n }' --token \"Et omnis consequatur ut.\"") + fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "secured-service secure --message '{\n \"fail\": false\n }' --token \"Impedit impedit sed eos aut.\"") } func securedServiceDoublySecureUsage() { @@ -250,5 +250,5 @@ func securedServiceAlsoDoublySecureUsage() { fmt.Fprintln(os.Stderr) fmt.Fprintln(os.Stderr, "Example:") - fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "secured-service also-doubly-secure --message '{\n \"key\": \"abcdef12345\",\n \"password\": \"password\",\n \"username\": \"user\"\n }' --oauth-token \"Fugiat molestiae molestiae.\" --token \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiYWRtaW4iOnRydWV9.TJVA95OrM7E2cBab30RMHrHDcEfxjoYZgeFONFh7HgQ\"") + fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "secured-service also-doubly-secure --message '{\n \"key\": \"abcdef12345\",\n \"password\": \"password\",\n \"username\": \"user\"\n }' --oauth-token \"Dicta explicabo dolore est.\" --token \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiYWRtaW4iOnRydWV9.TJVA95OrM7E2cBab30RMHrHDcEfxjoYZgeFONFh7HgQ\"") } diff --git a/security/multiauth/gen/grpc/secured_service/client/cli.go b/security/multiauth/gen/grpc/secured_service/client/cli.go index 7ce070753..7c09430b6 100644 --- a/security/multiauth/gen/grpc/secured_service/client/cli.go +++ b/security/multiauth/gen/grpc/secured_service/client/cli.go @@ -42,7 +42,7 @@ func BuildSecurePayload(securedServiceSecureMessage string, securedServiceSecure if securedServiceSecureMessage != "" { err = json.Unmarshal([]byte(securedServiceSecureMessage), &message) if err != nil { - return nil, fmt.Errorf("invalid JSON for message, \nerror: %s, \nexample of valid JSON:\n%s", err, "'{\n \"fail\": true\n }'") + return nil, fmt.Errorf("invalid JSON for message, \nerror: %s, \nexample of valid JSON:\n%s", err, "'{\n \"fail\": false\n }'") } } } diff --git a/security/multiauth/gen/grpc/secured_service/client/encode_decode.go b/security/multiauth/gen/grpc/secured_service/client/encode_decode.go index e49f8aaa4..a59790c12 100644 --- a/security/multiauth/gen/grpc/secured_service/client/encode_decode.go +++ b/security/multiauth/gen/grpc/secured_service/client/encode_decode.go @@ -37,8 +37,10 @@ func EncodeSigninRequest(ctx context.Context, v any, md *metadata.MD) (any, erro if !ok { return nil, goagrpc.ErrInvalidType("secured_service", "signin", "*securedservice.SigninPayload", v) } - (*md).Append("username", payload.Username) - (*md).Append("password", payload.Password) + usernameWire := payload.Username + (*md).Append("username", usernameWire) + passwordWire := payload.Password + (*md).Append("password", passwordWire) return NewProtoSigninRequest(), nil } @@ -73,7 +75,8 @@ func EncodeSecureRequest(ctx context.Context, v any, md *metadata.MD) (any, erro if !ok { return nil, goagrpc.ErrInvalidType("secured_service", "secure", "*securedservice.SecurePayload", v) } - (*md).Append("authorization", payload.Token) + tokenWire := payload.Token + (*md).Append("authorization", tokenWire) return NewProtoSecureRequest(payload), nil } @@ -109,7 +112,8 @@ func EncodeDoublySecureRequest(ctx context.Context, v any, md *metadata.MD) (any if !ok { return nil, goagrpc.ErrInvalidType("secured_service", "doubly_secure", "*securedservice.DoublySecurePayload", v) } - (*md).Append("authorization", payload.Token) + tokenWire := payload.Token + (*md).Append("authorization", tokenWire) return NewProtoDoublySecureRequest(payload), nil } @@ -146,10 +150,12 @@ func EncodeAlsoDoublySecureRequest(ctx context.Context, v any, md *metadata.MD) return nil, goagrpc.ErrInvalidType("secured_service", "also_doubly_secure", "*securedservice.AlsoDoublySecurePayload", v) } if payload.OauthToken != nil { - (*md).Append("oauth", *payload.OauthToken) + oauthTokenWire := *payload.OauthToken + (*md).Append("oauth", oauthTokenWire) } if payload.Token != nil { - (*md).Append("authorization", *payload.Token) + tokenWire := *payload.Token + (*md).Append("authorization", tokenWire) } return NewProtoAlsoDoublySecureRequest(payload), nil } diff --git a/security/multiauth/gen/grpc/secured_service/client/types.go b/security/multiauth/gen/grpc/secured_service/client/types.go index 038d5e51b..671ce1e52 100644 --- a/security/multiauth/gen/grpc/secured_service/client/types.go +++ b/security/multiauth/gen/grpc/secured_service/client/types.go @@ -12,15 +12,15 @@ import ( securedservice "goa.design/examples/security/multiauth/gen/secured_service" ) -// NewProtoSigninRequest builds the gRPC request type from the payload of the -// "signin" endpoint of the "secured_service" service. +// NewProtoSigninRequest builds *secured_servicepb.SigninRequest from +// *securedservice.SigninPayload. func NewProtoSigninRequest() *secured_servicepb.SigninRequest { message := &secured_servicepb.SigninRequest{} return message } -// NewSigninResult builds the result type of the "signin" endpoint of the -// "secured_service" service from the gRPC response type. +// NewSigninResult builds *securedservice.Creds from +// *secured_servicepb.SigninResponse. func NewSigninResult(message *secured_servicepb.SigninResponse) *securedservice.Creds { result := &securedservice.Creds{ JWT: message.Jwt, @@ -30,8 +30,8 @@ func NewSigninResult(message *secured_servicepb.SigninResponse) *securedservice. return result } -// NewProtoSecureRequest builds the gRPC request type from the payload of the -// "secure" endpoint of the "secured_service" service. +// NewProtoSecureRequest builds *secured_servicepb.SecureRequest from +// *securedservice.SecurePayload. func NewProtoSecureRequest(payload *securedservice.SecurePayload) *secured_servicepb.SecureRequest { message := &secured_servicepb.SecureRequest{ Fail: payload.Fail, @@ -39,15 +39,14 @@ func NewProtoSecureRequest(payload *securedservice.SecurePayload) *secured_servi return message } -// NewSecureResult builds the result type of the "secure" endpoint of the -// "secured_service" service from the gRPC response type. +// NewSecureResult builds string from *secured_servicepb.SecureResponse. func NewSecureResult(message *secured_servicepb.SecureResponse) string { result := message.Field return result } -// NewProtoDoublySecureRequest builds the gRPC request type from the payload of -// the "doubly_secure" endpoint of the "secured_service" service. +// NewProtoDoublySecureRequest builds *secured_servicepb.DoublySecureRequest +// from *securedservice.DoublySecurePayload. func NewProtoDoublySecureRequest(payload *securedservice.DoublySecurePayload) *secured_servicepb.DoublySecureRequest { message := &secured_servicepb.DoublySecureRequest{ Key: payload.Key, @@ -55,16 +54,16 @@ func NewProtoDoublySecureRequest(payload *securedservice.DoublySecurePayload) *s return message } -// NewDoublySecureResult builds the result type of the "doubly_secure" endpoint -// of the "secured_service" service from the gRPC response type. +// NewDoublySecureResult builds string from +// *secured_servicepb.DoublySecureResponse. func NewDoublySecureResult(message *secured_servicepb.DoublySecureResponse) string { result := message.Field return result } -// NewProtoAlsoDoublySecureRequest builds the gRPC request type from the -// payload of the "also_doubly_secure" endpoint of the "secured_service" -// service. +// NewProtoAlsoDoublySecureRequest builds +// *secured_servicepb.AlsoDoublySecureRequest from +// *securedservice.AlsoDoublySecurePayload. func NewProtoAlsoDoublySecureRequest(payload *securedservice.AlsoDoublySecurePayload) *secured_servicepb.AlsoDoublySecureRequest { message := &secured_servicepb.AlsoDoublySecureRequest{ Username: payload.Username, @@ -74,8 +73,8 @@ func NewProtoAlsoDoublySecureRequest(payload *securedservice.AlsoDoublySecurePay return message } -// NewAlsoDoublySecureResult builds the result type of the "also_doubly_secure" -// endpoint of the "secured_service" service from the gRPC response type. +// NewAlsoDoublySecureResult builds string from +// *secured_servicepb.AlsoDoublySecureResponse. func NewAlsoDoublySecureResult(message *secured_servicepb.AlsoDoublySecureResponse) string { result := message.Field return result diff --git a/security/multiauth/gen/grpc/secured_service/pb/goagen_multiauth_secured_service.pb.go b/security/multiauth/gen/grpc/secured_service/pb/goagen_multiauth_secured_service.pb.go index b4d6df280..de28baadf 100644 --- a/security/multiauth/gen/grpc/secured_service/pb/goagen_multiauth_secured_service.pb.go +++ b/security/multiauth/gen/grpc/secured_service/pb/goagen_multiauth_secured_service.pb.go @@ -7,8 +7,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.36.11 -// protoc v7.34.1 +// protoc-gen-go v1.36.12 +// protoc v7.36.0 // source: goagen_multiauth_secured_service.proto package secured_servicepb diff --git a/security/multiauth/gen/grpc/secured_service/pb/goagen_multiauth_secured_service_grpc.pb.go b/security/multiauth/gen/grpc/secured_service/pb/goagen_multiauth_secured_service_grpc.pb.go index 4ef920f2f..5b156141a 100644 --- a/security/multiauth/gen/grpc/secured_service/pb/goagen_multiauth_secured_service_grpc.pb.go +++ b/security/multiauth/gen/grpc/secured_service/pb/goagen_multiauth_secured_service_grpc.pb.go @@ -8,7 +8,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.6.2 -// - protoc v7.34.1 +// - protoc v7.36.0 // source: goagen_multiauth_secured_service.proto package secured_servicepb diff --git a/security/multiauth/gen/grpc/secured_service/server/types.go b/security/multiauth/gen/grpc/secured_service/server/types.go index 7d45d899d..f7ef06f23 100644 --- a/security/multiauth/gen/grpc/secured_service/server/types.go +++ b/security/multiauth/gen/grpc/secured_service/server/types.go @@ -12,8 +12,7 @@ import ( securedservice "goa.design/examples/security/multiauth/gen/secured_service" ) -// NewSigninPayload builds the payload of the "signin" endpoint of the -// "secured_service" service from the gRPC request type. +// NewSigninPayload builds *securedservice.SigninPayload from metadata values. func NewSigninPayload(username string, password string) *securedservice.SigninPayload { v := &securedservice.SigninPayload{} v.Username = username @@ -21,8 +20,8 @@ func NewSigninPayload(username string, password string) *securedservice.SigninPa return v } -// NewProtoSigninResponse builds the gRPC response type from the result of the -// "signin" endpoint of the "secured_service" service. +// NewProtoSigninResponse builds *secured_servicepb.SigninResponse from +// *securedservice.Creds. func NewProtoSigninResponse(result *securedservice.Creds) *secured_servicepb.SigninResponse { message := &secured_servicepb.SigninResponse{ Jwt: result.JWT, @@ -32,8 +31,8 @@ func NewProtoSigninResponse(result *securedservice.Creds) *secured_servicepb.Sig return message } -// NewSecurePayload builds the payload of the "secure" endpoint of the -// "secured_service" service from the gRPC request type. +// NewSecurePayload builds *securedservice.SecurePayload from +// *secured_servicepb.SecureRequest. func NewSecurePayload(message *secured_servicepb.SecureRequest, token string) *securedservice.SecurePayload { v := &securedservice.SecurePayload{ Fail: message.Fail, @@ -42,16 +41,15 @@ func NewSecurePayload(message *secured_servicepb.SecureRequest, token string) *s return v } -// NewProtoSecureResponse builds the gRPC response type from the result of the -// "secure" endpoint of the "secured_service" service. +// NewProtoSecureResponse builds *secured_servicepb.SecureResponse from string. func NewProtoSecureResponse(result string) *secured_servicepb.SecureResponse { message := &secured_servicepb.SecureResponse{} message.Field = result return message } -// NewDoublySecurePayload builds the payload of the "doubly_secure" endpoint of -// the "secured_service" service from the gRPC request type. +// NewDoublySecurePayload builds *securedservice.DoublySecurePayload from +// *secured_servicepb.DoublySecureRequest. func NewDoublySecurePayload(message *secured_servicepb.DoublySecureRequest, token string) *securedservice.DoublySecurePayload { v := &securedservice.DoublySecurePayload{ Key: message.Key, @@ -60,29 +58,37 @@ func NewDoublySecurePayload(message *secured_servicepb.DoublySecureRequest, toke return v } -// NewProtoDoublySecureResponse builds the gRPC response type from the result -// of the "doubly_secure" endpoint of the "secured_service" service. +// NewProtoDoublySecureResponse builds *secured_servicepb.DoublySecureResponse +// from string. func NewProtoDoublySecureResponse(result string) *secured_servicepb.DoublySecureResponse { message := &secured_servicepb.DoublySecureResponse{} message.Field = result return message } -// NewAlsoDoublySecurePayload builds the payload of the "also_doubly_secure" -// endpoint of the "secured_service" service from the gRPC request type. +// NewAlsoDoublySecurePayload builds *securedservice.AlsoDoublySecurePayload +// from *secured_servicepb.AlsoDoublySecureRequest. func NewAlsoDoublySecurePayload(message *secured_servicepb.AlsoDoublySecureRequest, oauthToken *string, token *string) *securedservice.AlsoDoublySecurePayload { v := &securedservice.AlsoDoublySecurePayload{ Username: message.Username, Password: message.Password, Key: message.Key, } - v.OauthToken = oauthToken - v.Token = token + if oauthToken != nil { + oauthTokenService := *oauthToken + v.OauthToken = &oauthTokenService + } + + if token != nil { + tokenService := *token + v.Token = &tokenService + } + return v } -// NewProtoAlsoDoublySecureResponse builds the gRPC response type from the -// result of the "also_doubly_secure" endpoint of the "secured_service" service. +// NewProtoAlsoDoublySecureResponse builds +// *secured_servicepb.AlsoDoublySecureResponse from string. func NewProtoAlsoDoublySecureResponse(result string) *secured_servicepb.AlsoDoublySecureResponse { message := &secured_servicepb.AlsoDoublySecureResponse{} message.Field = result diff --git a/security/multiauth/gen/http/cli/multi_auth/cli.go b/security/multiauth/gen/http/cli/multi_auth/cli.go index 1f6e846fa..1af4cfbb8 100644 --- a/security/multiauth/gen/http/cli/multi_auth/cli.go +++ b/security/multiauth/gen/http/cli/multi_auth/cli.go @@ -214,7 +214,7 @@ func securedServiceSecureUsage() { fmt.Fprintln(os.Stderr) fmt.Fprintln(os.Stderr, "Example:") - fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "secured-service secure --fail true --token \"Et omnis consequatur ut.\"") + fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "secured-service secure --fail false --token \"Impedit impedit sed eos aut.\"") } func securedServiceDoublySecureUsage() { @@ -260,5 +260,5 @@ func securedServiceAlsoDoublySecureUsage() { fmt.Fprintln(os.Stderr) fmt.Fprintln(os.Stderr, "Example:") - fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "secured-service also-doubly-secure --key \"abcdef12345\" --oauth-token \"Fugiat molestiae molestiae.\" --token \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiYWRtaW4iOnRydWV9.TJVA95OrM7E2cBab30RMHrHDcEfxjoYZgeFONFh7HgQ\" --username \"user\" --password \"password\"") + fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "secured-service also-doubly-secure --key \"abcdef12345\" --oauth-token \"Dicta explicabo dolore est.\" --token \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiYWRtaW4iOnRydWV9.TJVA95OrM7E2cBab30RMHrHDcEfxjoYZgeFONFh7HgQ\" --username \"user\" --password \"password\"") } diff --git a/security/multiauth/gen/http/openapi.json b/security/multiauth/gen/http/openapi.json index aad996b71..40dee1556 100644 --- a/security/multiauth/gen/http/openapi.json +++ b/security/multiauth/gen/http/openapi.json @@ -1 +1 @@ -{"swagger":"2.0","info":{"title":"Security Example API","description":"This API demonstrates the use of the goa security DSL","version":"0.0.1"},"host":"localhost:80","consumes":["application/json","application/xml","application/gob"],"produces":["application/json","application/xml","application/gob"],"paths":{"/secure":{"get":{"tags":["secured_service"],"summary":"secure secured_service","description":"This action is secured with the jwt scheme\n\n**Required security scopes for jwt**:\n * `api:read`","operationId":"secured_service#secure","parameters":[{"name":"fail","in":"query","description":"Whether to force auth failure even with a valid JWT","required":false,"type":"boolean"}],"responses":{"200":{"description":"OK response.","schema":{"type":"string"}},"401":{"description":"Unauthorized response.","schema":{"type":"string"}},"403":{"description":"Forbidden response.","schema":{"type":"string"}}},"schemes":["http"],"security":[{"jwt_header_Authorization":null}]},"put":{"tags":["secured_service"],"summary":"doubly_secure secured_service","description":"This action is secured with the jwt scheme and also requires an API key query string.\n\n**Required security scopes for jwt**:\n * `api:read`\n * `api:write`\n\n**Required security scopes for api_key**:\n * `api:read`\n * `api:write`","operationId":"secured_service#doubly_secure","responses":{"200":{"description":"OK response.","schema":{"type":"string"}},"401":{"description":"Unauthorized response.","schema":{"type":"string"}},"403":{"description":"Forbidden response.","schema":{"type":"string"}}},"schemes":["http"],"security":[{"api_key_query_k":null,"jwt_header_Authorization":null}]},"post":{"tags":["secured_service"],"summary":"also_doubly_secure secured_service","description":"This action is secured with the jwt scheme and also requires an API key header.\n\n**Required security scopes for jwt**:\n * `api:read`\n * `api:write`\n\n**Required security scopes for api_key**:\n * `api:read`\n * `api:write`\n\n**Required security scopes for basic**:\n * `api:read`\n * `api:write`","operationId":"secured_service#also_doubly_secure","responses":{"200":{"description":"OK response.","schema":{"type":"string"}},"401":{"description":"Unauthorized response.","schema":{"type":"string"}},"403":{"description":"Forbidden response.","schema":{"type":"string"}}},"schemes":["http"],"security":[{"api_key_query_k":null,"jwt_header_X-Authorization":null},{"basic_header_Authorization":null,"oauth2_query_oauth":["api:read","api:write"]}]}},"/signin":{"post":{"tags":["secured_service"],"summary":"signin secured_service","description":"Creates a valid JWT","operationId":"secured_service#signin","responses":{"200":{"description":"OK response.","schema":{"$ref":"#/definitions/Creds","required":["jwt","api_key","oauth_token"]}},"401":{"description":"Unauthorized response.","schema":{"type":"string"}}},"schemes":["http"],"security":[{"basic_header_Authorization":null}]}}},"definitions":{"Creds":{"title":"Creds","type":"object","properties":{"api_key":{"type":"string","description":"API Key","example":"abcdef12345"},"jwt":{"type":"string","description":"JWT token","example":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiYWRtaW4iOnRydWV9.TJVA95OrM7E2cBab30RMHrHDcEfxjoYZgeFONFh7HgQ"},"oauth_token":{"type":"string","description":"OAuth2 token","example":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiYWRtaW4iOnRydWV9.TJVA95OrM7E2cBab30RMHrHDcEfxjoYZgeFONFh7HgQ"}},"example":{"api_key":"abcdef12345","jwt":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiYWRtaW4iOnRydWV9.TJVA95OrM7E2cBab30RMHrHDcEfxjoYZgeFONFh7HgQ","oauth_token":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiYWRtaW4iOnRydWV9.TJVA95OrM7E2cBab30RMHrHDcEfxjoYZgeFONFh7HgQ"},"required":["jwt","api_key","oauth_token"]}},"securityDefinitions":{"api_key_query_k":{"type":"apiKey","description":"Secures endpoint by requiring an API key.","name":"k","in":"query"},"basic_header_Authorization":{"type":"basic","description":"Basic authentication used to authenticate security principal during signin\n\n**Security Scopes**:\n * `api:read`: Read-only access"},"jwt_header_Authorization":{"type":"apiKey","description":"Secures endpoint by requiring a valid JWT token retrieved via the signin endpoint. Supports scopes \"api:read\" and \"api:write\".\n\n**Security Scopes**:\n * `api:read`: Read-only access\n * `api:write`: Read and write access","name":"Authorization","in":"header"},"jwt_header_X-Authorization":{"type":"apiKey","description":"Secures endpoint by requiring a valid JWT token retrieved via the signin endpoint. Supports scopes \"api:read\" and \"api:write\".\n\n**Security Scopes**:\n * `api:read`: Read-only access\n * `api:write`: Read and write access","name":"X-Authorization","in":"header"},"oauth2_query_oauth":{"type":"oauth2","description":"Secures endpoint by requiring a valid OAuth2 token retrieved via the signin endpoint. Supports scopes \"api:read\" and \"api:write\".","flow":"accessCode","authorizationUrl":"http://goa.design/authorization","tokenUrl":"http://goa.design/token","scopes":{"api:read":"Read-only access","api:write":"Read and write access"}}},"externalDocs":{"description":"Security example README","url":"https://github.com/goadesign/goa/tree/master/example/security/README.md"}} \ No newline at end of file +{"swagger":"2.0","info":{"title":"Security Example API","description":"This API demonstrates the use of the goa security DSL","version":"0.0.1"},"host":"localhost:80","consumes":["application/json","application/xml","application/gob"],"produces":["application/json","application/xml","application/gob"],"paths":{"/secure":{"get":{"tags":["secured_service"],"summary":"secure secured_service","description":"This action is secured with the jwt scheme\n\n**Required security scopes for jwt**:\n * `api:read`","operationId":"secured_service#secure","parameters":[{"name":"fail","in":"query","description":"Whether to force auth failure even with a valid JWT","required":false,"type":"boolean"}],"responses":{"200":{"description":"OK response.","schema":{"type":"string"}},"401":{"description":"unauthorized: Unauthorized response.","schema":{"type":"string"}},"403":{"description":"invalid-scopes: Forbidden response.","schema":{"type":"string"}}},"schemes":["http"],"security":[{"jwt_header_Authorization":null}]},"put":{"tags":["secured_service"],"summary":"doubly_secure secured_service","description":"This action is secured with the jwt scheme and also requires an API key query string.\n\n**Required security scopes for jwt**:\n * `api:read`\n * `api:write`\n\n**Required security scopes for api_key**:\n * `api:read`\n * `api:write`","operationId":"secured_service#doubly_secure","responses":{"200":{"description":"OK response.","schema":{"type":"string"}},"401":{"description":"unauthorized: Unauthorized response.","schema":{"type":"string"}},"403":{"description":"invalid-scopes: Forbidden response.","schema":{"type":"string"}}},"schemes":["http"],"security":[{"api_key_query_k":null,"jwt_header_Authorization":null}]},"post":{"tags":["secured_service"],"summary":"also_doubly_secure secured_service","description":"This action is secured with the jwt scheme and also requires an API key header.\n\n**Required security scopes for jwt**:\n * `api:read`\n * `api:write`\n\n**Required security scopes for api_key**:\n * `api:read`\n * `api:write`\n\n**Required security scopes for basic**:\n * `api:read`\n * `api:write`","operationId":"secured_service#also_doubly_secure","responses":{"200":{"description":"OK response.","schema":{"type":"string"}},"401":{"description":"unauthorized: Unauthorized response.","schema":{"type":"string"}},"403":{"description":"invalid-scopes: Forbidden response.","schema":{"type":"string"}}},"schemes":["http"],"security":[{"api_key_query_k":null,"jwt_header_X-Authorization":null},{"basic_header_Authorization":null,"oauth2_query_oauth":["api:read","api:write"]}]}},"/signin":{"post":{"tags":["secured_service"],"summary":"signin secured_service","description":"Creates a valid JWT","operationId":"secured_service#signin","responses":{"200":{"description":"OK response.","schema":{"$ref":"#/definitions/Creds","required":["jwt","api_key","oauth_token"]}},"401":{"description":"unauthorized: Unauthorized response.","schema":{"type":"string"}}},"schemes":["http"],"security":[{"basic_header_Authorization":null}]}}},"definitions":{"Creds":{"title":"Creds","type":"object","properties":{"api_key":{"type":"string","description":"API Key","example":"abcdef12345"},"jwt":{"type":"string","description":"JWT token","example":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiYWRtaW4iOnRydWV9.TJVA95OrM7E2cBab30RMHrHDcEfxjoYZgeFONFh7HgQ"},"oauth_token":{"type":"string","description":"OAuth2 token","example":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiYWRtaW4iOnRydWV9.TJVA95OrM7E2cBab30RMHrHDcEfxjoYZgeFONFh7HgQ"}},"example":{"api_key":"abcdef12345","jwt":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiYWRtaW4iOnRydWV9.TJVA95OrM7E2cBab30RMHrHDcEfxjoYZgeFONFh7HgQ","oauth_token":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiYWRtaW4iOnRydWV9.TJVA95OrM7E2cBab30RMHrHDcEfxjoYZgeFONFh7HgQ"},"required":["jwt","api_key","oauth_token"]}},"securityDefinitions":{"api_key_query_k":{"type":"apiKey","description":"Secures endpoint by requiring an API key.","name":"k","in":"query"},"basic_header_Authorization":{"type":"basic","description":"Basic authentication used to authenticate security principal during signin\n\n**Security Scopes**:\n * `api:read`: Read-only access"},"jwt_header_Authorization":{"type":"apiKey","description":"Secures endpoint by requiring a valid JWT token retrieved via the signin endpoint. Supports scopes \"api:read\" and \"api:write\".\n\n**Security Scopes**:\n * `api:read`: Read-only access\n * `api:write`: Read and write access","name":"Authorization","in":"header"},"jwt_header_X-Authorization":{"type":"apiKey","description":"Secures endpoint by requiring a valid JWT token retrieved via the signin endpoint. Supports scopes \"api:read\" and \"api:write\".\n\n**Security Scopes**:\n * `api:read`: Read-only access\n * `api:write`: Read and write access","name":"X-Authorization","in":"header"},"oauth2_query_oauth":{"type":"oauth2","description":"Secures endpoint by requiring a valid OAuth2 token retrieved via the signin endpoint. Supports scopes \"api:read\" and \"api:write\".","flow":"accessCode","authorizationUrl":"http://goa.design/authorization","tokenUrl":"http://goa.design/token","scopes":{"api:read":"Read-only access","api:write":"Read and write access"}}},"externalDocs":{"description":"Security example README","url":"https://github.com/goadesign/goa/tree/master/example/security/README.md"}} \ No newline at end of file diff --git a/security/multiauth/gen/http/openapi.yaml b/security/multiauth/gen/http/openapi.yaml index cf24d65c3..37b638ac7 100644 --- a/security/multiauth/gen/http/openapi.yaml +++ b/security/multiauth/gen/http/openapi.yaml @@ -36,11 +36,11 @@ paths: schema: type: string "401": - description: Unauthorized response. + description: 'unauthorized: Unauthorized response.' schema: type: string "403": - description: Forbidden response. + description: 'invalid-scopes: Forbidden response.' schema: type: string schemes: @@ -68,11 +68,11 @@ paths: schema: type: string "401": - description: Unauthorized response. + description: 'unauthorized: Unauthorized response.' schema: type: string "403": - description: Forbidden response. + description: 'invalid-scopes: Forbidden response.' schema: type: string schemes: @@ -105,11 +105,11 @@ paths: schema: type: string "401": - description: Unauthorized response. + description: 'unauthorized: Unauthorized response.' schema: type: string "403": - description: Forbidden response. + description: 'invalid-scopes: Forbidden response.' schema: type: string schemes: @@ -138,7 +138,7 @@ paths: - api_key - oauth_token "401": - description: Unauthorized response. + description: 'unauthorized: Unauthorized response.' schema: type: string schemes: diff --git a/security/multiauth/gen/http/openapi3.2.json b/security/multiauth/gen/http/openapi3.2.json index 3e0c09fd0..ef88119cd 100644 --- a/security/multiauth/gen/http/openapi3.2.json +++ b/security/multiauth/gen/http/openapi3.2.json @@ -1 +1 @@ -{"openapi":"3.2.0","info":{"title":"Security Example API","description":"This API demonstrates the use of the goa security DSL","version":"0.0.1"},"servers":[{"url":"http://localhost:80","name":"multi_auth","description":"Default server for multi_auth"}],"paths":{"/secure":{"get":{"tags":["secured_service"],"summary":"secure secured_service","description":"This action is secured with the jwt scheme","operationId":"secured_service#secure","parameters":[{"name":"fail","in":"query","description":"Whether to force auth failure even with a valid JWT","allowEmptyValue":true,"schema":{"type":"boolean","description":"Whether to force auth failure even with a valid JWT","example":true},"example":true}],"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"type":"string","example":"Quaerat animi vel distinctio est."},"example":"Quaerat animi vel distinctio est."}}},"401":{"description":"unauthorized: Unauthorized response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"},"example":"Cupiditate sunt ut esse ut perspiciatis."}}},"403":{"description":"invalid-scopes: Forbidden response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"},"example":"Saepe sit."}}}},"security":[{"jwt_header_Authorization":[]}]},"post":{"tags":["secured_service"],"summary":"also_doubly_secure secured_service","description":"This action is secured with the jwt scheme and also requires an API key header.","operationId":"secured_service#also_doubly_secure","responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"type":"string","example":"Neque qui commodi nihil."},"example":"Neque qui commodi nihil."}}},"401":{"description":"unauthorized: Unauthorized response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"},"example":"Officiis vel possimus consequuntur ratione provident culpa."}}},"403":{"description":"invalid-scopes: Forbidden response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"},"example":"Molestias impedit vitae fugit ex."}}}},"security":[{"api_key_query_k":[],"jwt_header_X-Authorization":[]},{"basic_header_Authorization":[],"oauth2_query_oauth":["api:read","api:write"]}]},"put":{"tags":["secured_service"],"summary":"doubly_secure secured_service","description":"This action is secured with the jwt scheme and also requires an API key query string.","operationId":"secured_service#doubly_secure","responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"type":"string","example":"Qui praesentium."},"example":"Qui praesentium."}}},"401":{"description":"unauthorized: Unauthorized response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"},"example":"Dolor nobis expedita id non dolorem ipsum."}}},"403":{"description":"invalid-scopes: Forbidden response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"},"example":"Culpa a error aut quas impedit qui."}}}},"security":[{"api_key_query_k":[],"jwt_header_Authorization":[]}]}},"/signin":{"post":{"tags":["secured_service"],"summary":"signin secured_service","description":"Creates a valid JWT","operationId":"secured_service#signin","responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Creds"},"example":{"api_key":"abcdef12345","jwt":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiYWRtaW4iOnRydWV9.TJVA95OrM7E2cBab30RMHrHDcEfxjoYZgeFONFh7HgQ","oauth_token":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiYWRtaW4iOnRydWV9.TJVA95OrM7E2cBab30RMHrHDcEfxjoYZgeFONFh7HgQ"}}}},"401":{"description":"unauthorized: Unauthorized response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"},"example":"Tempore dolorem ipsa."}}}},"security":[{"basic_header_Authorization":[]}]}}},"components":{"schemas":{"Creds":{"type":"object","properties":{"api_key":{"type":"string","description":"API Key","example":"abcdef12345"},"jwt":{"type":"string","description":"JWT token","example":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiYWRtaW4iOnRydWV9.TJVA95OrM7E2cBab30RMHrHDcEfxjoYZgeFONFh7HgQ"},"oauth_token":{"type":"string","description":"OAuth2 token","example":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiYWRtaW4iOnRydWV9.TJVA95OrM7E2cBab30RMHrHDcEfxjoYZgeFONFh7HgQ"}},"example":{"api_key":"abcdef12345","jwt":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiYWRtaW4iOnRydWV9.TJVA95OrM7E2cBab30RMHrHDcEfxjoYZgeFONFh7HgQ","oauth_token":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiYWRtaW4iOnRydWV9.TJVA95OrM7E2cBab30RMHrHDcEfxjoYZgeFONFh7HgQ"},"required":["jwt","api_key","oauth_token"]},"Unauthorized":{"type":"string","description":"Credentials are invalid","example":"Tempore dolorem ipsa."}},"securitySchemes":{"api_key_query_k":{"type":"apiKey","description":"Secures endpoint by requiring an API key.","name":"k","in":"query"},"basic_header_Authorization":{"type":"http","description":"Basic authentication used to authenticate security principal during signin","scheme":"basic"},"jwt_header_Authorization":{"type":"http","description":"Secures endpoint by requiring a valid JWT token retrieved via the signin endpoint. Supports scopes \"api:read\" and \"api:write\".","scheme":"bearer","bearerFormat":"JWT"},"jwt_header_X-Authorization":{"type":"http","description":"Secures endpoint by requiring a valid JWT token retrieved via the signin endpoint. Supports scopes \"api:read\" and \"api:write\".","scheme":"bearer","bearerFormat":"JWT"},"oauth2_query_oauth":{"type":"oauth2","description":"Secures endpoint by requiring a valid OAuth2 token retrieved via the signin endpoint. Supports scopes \"api:read\" and \"api:write\".","flows":{"authorizationCode":{"authorizationUrl":"http://goa.design/authorization","tokenUrl":"http://goa.design/token","refreshUrl":"http://goa.design/refresh","scopes":{"api:read":"Read-only access","api:write":"Read and write access"}}}}}},"tags":[{"name":"secured_service","description":"The secured service exposes endpoints that require valid authorization credentials."}]} \ No newline at end of file +{"openapi":"3.2.0","info":{"title":"Security Example API","description":"This API demonstrates the use of the goa security DSL","version":"0.0.1"},"servers":[{"url":"http://localhost:80","name":"multi_auth","description":"Default server for multi_auth"}],"paths":{"/secure":{"get":{"tags":["secured_service"],"summary":"secure secured_service","description":"This action is secured with the jwt scheme","operationId":"secured_service#secure","parameters":[{"name":"fail","in":"query","description":"Whether to force auth failure even with a valid JWT","allowEmptyValue":true,"schema":{"type":"boolean","description":"Whether to force auth failure even with a valid JWT","example":false},"example":false}],"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"type":"string","example":"Dolores et earum enim quo et."},"example":"Dolores et earum enim quo et."}}},"401":{"description":"unauthorized: Unauthorized response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"},"example":"Inventore quo non ad."}}},"403":{"description":"invalid-scopes: Forbidden response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"},"example":"Nemo tenetur totam commodi nisi possimus sapiente."}}}},"security":[{"jwt_header_Authorization":[]}]},"post":{"tags":["secured_service"],"summary":"also_doubly_secure secured_service","description":"This action is secured with the jwt scheme and also requires an API key header.","operationId":"secured_service#also_doubly_secure","responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"type":"string","example":"Inventore et ad voluptas sint."},"example":"Inventore et ad voluptas sint."}}},"401":{"description":"unauthorized: Unauthorized response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"},"example":"Veniam eum quos."}}},"403":{"description":"invalid-scopes: Forbidden response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"},"example":"Est illum illo laudantium iste."}}}},"security":[{"api_key_query_k":[],"jwt_header_X-Authorization":[]},{"basic_header_Authorization":[],"oauth2_query_oauth":["api:read","api:write"]}]},"put":{"tags":["secured_service"],"summary":"doubly_secure secured_service","description":"This action is secured with the jwt scheme and also requires an API key query string.","operationId":"secured_service#doubly_secure","responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"type":"string","example":"Est molestiae voluptatem dicta iure aliquid."},"example":"Est molestiae voluptatem dicta iure aliquid."}}},"401":{"description":"unauthorized: Unauthorized response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"},"example":"Quo fugit est nesciunt beatae voluptatem."}}},"403":{"description":"invalid-scopes: Forbidden response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"},"example":"Qui omnis quaerat sapiente."}}}},"security":[{"api_key_query_k":[],"jwt_header_Authorization":[]}]}},"/signin":{"post":{"tags":["secured_service"],"summary":"signin secured_service","description":"Creates a valid JWT","operationId":"secured_service#signin","responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Creds"},"example":{"api_key":"abcdef12345","jwt":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiYWRtaW4iOnRydWV9.TJVA95OrM7E2cBab30RMHrHDcEfxjoYZgeFONFh7HgQ","oauth_token":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiYWRtaW4iOnRydWV9.TJVA95OrM7E2cBab30RMHrHDcEfxjoYZgeFONFh7HgQ"}}}},"401":{"description":"unauthorized: Unauthorized response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"},"example":"Quia at aut perferendis voluptatem occaecati."}}}},"security":[{"basic_header_Authorization":[]}]}}},"components":{"schemas":{"Creds":{"type":"object","properties":{"api_key":{"type":"string","description":"API Key","example":"abcdef12345"},"jwt":{"type":"string","description":"JWT token","example":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiYWRtaW4iOnRydWV9.TJVA95OrM7E2cBab30RMHrHDcEfxjoYZgeFONFh7HgQ"},"oauth_token":{"type":"string","description":"OAuth2 token","example":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiYWRtaW4iOnRydWV9.TJVA95OrM7E2cBab30RMHrHDcEfxjoYZgeFONFh7HgQ"}},"example":{"api_key":"abcdef12345","jwt":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiYWRtaW4iOnRydWV9.TJVA95OrM7E2cBab30RMHrHDcEfxjoYZgeFONFh7HgQ","oauth_token":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiYWRtaW4iOnRydWV9.TJVA95OrM7E2cBab30RMHrHDcEfxjoYZgeFONFh7HgQ"},"required":["jwt","api_key","oauth_token"]},"Unauthorized":{"type":"string","description":"Credentials are invalid","example":"Quia at aut perferendis voluptatem occaecati."}},"securitySchemes":{"api_key_query_k":{"type":"apiKey","description":"Secures endpoint by requiring an API key.","name":"k","in":"query"},"basic_header_Authorization":{"type":"http","description":"Basic authentication used to authenticate security principal during signin","scheme":"basic"},"jwt_header_Authorization":{"type":"http","description":"Secures endpoint by requiring a valid JWT token retrieved via the signin endpoint. Supports scopes \"api:read\" and \"api:write\".","scheme":"bearer","bearerFormat":"JWT"},"jwt_header_X-Authorization":{"type":"http","description":"Secures endpoint by requiring a valid JWT token retrieved via the signin endpoint. Supports scopes \"api:read\" and \"api:write\".","scheme":"bearer","bearerFormat":"JWT"},"oauth2_query_oauth":{"type":"oauth2","description":"Secures endpoint by requiring a valid OAuth2 token retrieved via the signin endpoint. Supports scopes \"api:read\" and \"api:write\".","flows":{"authorizationCode":{"authorizationUrl":"http://goa.design/authorization","tokenUrl":"http://goa.design/token","refreshUrl":"http://goa.design/refresh","scopes":{"api:read":"Read-only access","api:write":"Read and write access"}}}}}},"tags":[{"name":"secured_service","description":"The secured service exposes endpoints that require valid authorization credentials."}]} \ No newline at end of file diff --git a/security/multiauth/gen/http/openapi3.2.yaml b/security/multiauth/gen/http/openapi3.2.yaml index de5f93874..698e6c013 100644 --- a/security/multiauth/gen/http/openapi3.2.yaml +++ b/security/multiauth/gen/http/openapi3.2.yaml @@ -23,8 +23,8 @@ paths: schema: type: boolean description: Whether to force auth failure even with a valid JWT - example: true - example: true + example: false + example: false responses: "200": description: OK response. @@ -32,22 +32,22 @@ paths: application/json: schema: type: string - example: Quaerat animi vel distinctio est. - example: Quaerat animi vel distinctio est. + example: Dolores et earum enim quo et. + example: Dolores et earum enim quo et. "401": description: 'unauthorized: Unauthorized response.' content: application/json: schema: $ref: '#/components/schemas/Unauthorized' - example: Cupiditate sunt ut esse ut perspiciatis. + example: Inventore quo non ad. "403": description: 'invalid-scopes: Forbidden response.' content: application/json: schema: $ref: '#/components/schemas/Unauthorized' - example: Saepe sit. + example: Nemo tenetur totam commodi nisi possimus sapiente. security: - jwt_header_Authorization: [] post: @@ -63,22 +63,22 @@ paths: application/json: schema: type: string - example: Neque qui commodi nihil. - example: Neque qui commodi nihil. + example: Inventore et ad voluptas sint. + example: Inventore et ad voluptas sint. "401": description: 'unauthorized: Unauthorized response.' content: application/json: schema: $ref: '#/components/schemas/Unauthorized' - example: Officiis vel possimus consequuntur ratione provident culpa. + example: Veniam eum quos. "403": description: 'invalid-scopes: Forbidden response.' content: application/json: schema: $ref: '#/components/schemas/Unauthorized' - example: Molestias impedit vitae fugit ex. + example: Est illum illo laudantium iste. security: - api_key_query_k: [] jwt_header_X-Authorization: [] @@ -99,22 +99,22 @@ paths: application/json: schema: type: string - example: Qui praesentium. - example: Qui praesentium. + example: Est molestiae voluptatem dicta iure aliquid. + example: Est molestiae voluptatem dicta iure aliquid. "401": description: 'unauthorized: Unauthorized response.' content: application/json: schema: $ref: '#/components/schemas/Unauthorized' - example: Dolor nobis expedita id non dolorem ipsum. + example: Quo fugit est nesciunt beatae voluptatem. "403": description: 'invalid-scopes: Forbidden response.' content: application/json: schema: $ref: '#/components/schemas/Unauthorized' - example: Culpa a error aut quas impedit qui. + example: Qui omnis quaerat sapiente. security: - api_key_query_k: [] jwt_header_Authorization: [] @@ -142,7 +142,7 @@ paths: application/json: schema: $ref: '#/components/schemas/Unauthorized' - example: Tempore dolorem ipsa. + example: Quia at aut perferendis voluptatem occaecati. security: - basic_header_Authorization: [] components: @@ -173,7 +173,7 @@ components: Unauthorized: type: string description: Credentials are invalid - example: Tempore dolorem ipsa. + example: Quia at aut perferendis voluptatem occaecati. securitySchemes: api_key_query_k: type: apiKey diff --git a/security/multiauth/gen/http/openapi3.json b/security/multiauth/gen/http/openapi3.json index 1e3fb2c0e..a36521ac3 100644 --- a/security/multiauth/gen/http/openapi3.json +++ b/security/multiauth/gen/http/openapi3.json @@ -1 +1 @@ -{"openapi":"3.0.3","info":{"title":"Security Example API","description":"This API demonstrates the use of the goa security DSL","version":"0.0.1"},"servers":[{"url":"http://localhost:80","description":"Default server for multi_auth"}],"paths":{"/secure":{"get":{"tags":["secured_service"],"summary":"secure secured_service","description":"This action is secured with the jwt scheme","operationId":"secured_service#secure","parameters":[{"name":"fail","in":"query","description":"Whether to force auth failure even with a valid JWT","allowEmptyValue":true,"schema":{"type":"boolean","description":"Whether to force auth failure even with a valid JWT","example":true},"example":true}],"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"type":"string","example":"Quaerat animi vel distinctio est."},"example":"Quaerat animi vel distinctio est."}}},"401":{"description":"unauthorized: Unauthorized response.","content":{"application/json":{"schema":{"type":"string","description":"Credentials are invalid","example":"Cupiditate sunt ut esse ut perspiciatis."},"example":"Cupiditate sunt ut esse ut perspiciatis."}}},"403":{"description":"invalid-scopes: Forbidden response.","content":{"application/json":{"schema":{"type":"string","description":"Token scopes are invalid","example":"Saepe sit."},"example":"Saepe sit."}}}},"security":[{"jwt_header_Authorization":[]}]},"post":{"tags":["secured_service"],"summary":"also_doubly_secure secured_service","description":"This action is secured with the jwt scheme and also requires an API key header.","operationId":"secured_service#also_doubly_secure","responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"type":"string","example":"Neque qui commodi nihil."},"example":"Neque qui commodi nihil."}}},"401":{"description":"unauthorized: Unauthorized response.","content":{"application/json":{"schema":{"type":"string","description":"Credentials are invalid","example":"Officiis vel possimus consequuntur ratione provident culpa."},"example":"Officiis vel possimus consequuntur ratione provident culpa."}}},"403":{"description":"invalid-scopes: Forbidden response.","content":{"application/json":{"schema":{"type":"string","description":"Token scopes are invalid","example":"Molestias impedit vitae fugit ex."},"example":"Molestias impedit vitae fugit ex."}}}},"security":[{"api_key_query_k":[],"jwt_header_X-Authorization":[]},{"basic_header_Authorization":[],"oauth2_query_oauth":["api:read","api:write"]}]},"put":{"tags":["secured_service"],"summary":"doubly_secure secured_service","description":"This action is secured with the jwt scheme and also requires an API key query string.","operationId":"secured_service#doubly_secure","responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"type":"string","example":"Qui praesentium."},"example":"Qui praesentium."}}},"401":{"description":"unauthorized: Unauthorized response.","content":{"application/json":{"schema":{"type":"string","description":"Credentials are invalid","example":"Dolor nobis expedita id non dolorem ipsum."},"example":"Dolor nobis expedita id non dolorem ipsum."}}},"403":{"description":"invalid-scopes: Forbidden response.","content":{"application/json":{"schema":{"type":"string","description":"Token scopes are invalid","example":"Culpa a error aut quas impedit qui."},"example":"Culpa a error aut quas impedit qui."}}}},"security":[{"api_key_query_k":[],"jwt_header_Authorization":[]}]}},"/signin":{"post":{"tags":["secured_service"],"summary":"signin secured_service","description":"Creates a valid JWT","operationId":"secured_service#signin","responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Creds"},"example":{"api_key":"abcdef12345","jwt":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiYWRtaW4iOnRydWV9.TJVA95OrM7E2cBab30RMHrHDcEfxjoYZgeFONFh7HgQ","oauth_token":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiYWRtaW4iOnRydWV9.TJVA95OrM7E2cBab30RMHrHDcEfxjoYZgeFONFh7HgQ"}}}},"401":{"description":"unauthorized: Unauthorized response.","content":{"application/json":{"schema":{"type":"string","description":"Credentials are invalid","example":"Tempore dolorem ipsa."},"example":"Tempore dolorem ipsa."}}}},"security":[{"basic_header_Authorization":[]}]}}},"components":{"schemas":{"Creds":{"type":"object","properties":{"api_key":{"type":"string","description":"API Key","example":"abcdef12345"},"jwt":{"type":"string","description":"JWT token","example":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiYWRtaW4iOnRydWV9.TJVA95OrM7E2cBab30RMHrHDcEfxjoYZgeFONFh7HgQ"},"oauth_token":{"type":"string","description":"OAuth2 token","example":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiYWRtaW4iOnRydWV9.TJVA95OrM7E2cBab30RMHrHDcEfxjoYZgeFONFh7HgQ"}},"example":{"api_key":"abcdef12345","jwt":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiYWRtaW4iOnRydWV9.TJVA95OrM7E2cBab30RMHrHDcEfxjoYZgeFONFh7HgQ","oauth_token":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiYWRtaW4iOnRydWV9.TJVA95OrM7E2cBab30RMHrHDcEfxjoYZgeFONFh7HgQ"},"required":["jwt","api_key","oauth_token"]}},"securitySchemes":{"api_key_query_k":{"type":"apiKey","description":"Secures endpoint by requiring an API key.","name":"k","in":"query"},"basic_header_Authorization":{"type":"http","description":"Basic authentication used to authenticate security principal during signin","scheme":"basic"},"jwt_header_Authorization":{"type":"http","description":"Secures endpoint by requiring a valid JWT token retrieved via the signin endpoint. Supports scopes \"api:read\" and \"api:write\".","scheme":"bearer","bearerFormat":"JWT"},"jwt_header_X-Authorization":{"type":"http","description":"Secures endpoint by requiring a valid JWT token retrieved via the signin endpoint. Supports scopes \"api:read\" and \"api:write\".","scheme":"bearer","bearerFormat":"JWT"},"oauth2_query_oauth":{"type":"oauth2","description":"Secures endpoint by requiring a valid OAuth2 token retrieved via the signin endpoint. Supports scopes \"api:read\" and \"api:write\".","flows":{"authorizationCode":{"authorizationUrl":"http://goa.design/authorization","tokenUrl":"http://goa.design/token","refreshUrl":"http://goa.design/refresh","scopes":{"api:read":"Read-only access","api:write":"Read and write access"}}}}}},"tags":[{"name":"secured_service","description":"The secured service exposes endpoints that require valid authorization credentials."}]} \ No newline at end of file +{"openapi":"3.0.3","info":{"title":"Security Example API","description":"This API demonstrates the use of the goa security DSL","version":"0.0.1"},"servers":[{"url":"http://localhost:80","description":"Default server for multi_auth"}],"paths":{"/secure":{"get":{"tags":["secured_service"],"summary":"secure secured_service","description":"This action is secured with the jwt scheme","operationId":"secured_service#secure","parameters":[{"name":"fail","in":"query","description":"Whether to force auth failure even with a valid JWT","allowEmptyValue":true,"schema":{"type":"boolean","description":"Whether to force auth failure even with a valid JWT","example":false},"example":false}],"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"type":"string","example":"Dolores et earum enim quo et."},"example":"Dolores et earum enim quo et."}}},"401":{"description":"unauthorized: Unauthorized response.","content":{"application/json":{"schema":{"type":"string","description":"Credentials are invalid","example":"Inventore quo non ad."},"example":"Inventore quo non ad."}}},"403":{"description":"invalid-scopes: Forbidden response.","content":{"application/json":{"schema":{"type":"string","description":"Token scopes are invalid","example":"Nemo tenetur totam commodi nisi possimus sapiente."},"example":"Nemo tenetur totam commodi nisi possimus sapiente."}}}},"security":[{"jwt_header_Authorization":[]}]},"post":{"tags":["secured_service"],"summary":"also_doubly_secure secured_service","description":"This action is secured with the jwt scheme and also requires an API key header.","operationId":"secured_service#also_doubly_secure","responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"type":"string","example":"Inventore et ad voluptas sint."},"example":"Inventore et ad voluptas sint."}}},"401":{"description":"unauthorized: Unauthorized response.","content":{"application/json":{"schema":{"type":"string","description":"Credentials are invalid","example":"Veniam eum quos."},"example":"Veniam eum quos."}}},"403":{"description":"invalid-scopes: Forbidden response.","content":{"application/json":{"schema":{"type":"string","description":"Token scopes are invalid","example":"Est illum illo laudantium iste."},"example":"Est illum illo laudantium iste."}}}},"security":[{"api_key_query_k":[],"jwt_header_X-Authorization":[]},{"basic_header_Authorization":[],"oauth2_query_oauth":["api:read","api:write"]}]},"put":{"tags":["secured_service"],"summary":"doubly_secure secured_service","description":"This action is secured with the jwt scheme and also requires an API key query string.","operationId":"secured_service#doubly_secure","responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"type":"string","example":"Est molestiae voluptatem dicta iure aliquid."},"example":"Est molestiae voluptatem dicta iure aliquid."}}},"401":{"description":"unauthorized: Unauthorized response.","content":{"application/json":{"schema":{"type":"string","description":"Credentials are invalid","example":"Quo fugit est nesciunt beatae voluptatem."},"example":"Quo fugit est nesciunt beatae voluptatem."}}},"403":{"description":"invalid-scopes: Forbidden response.","content":{"application/json":{"schema":{"type":"string","description":"Token scopes are invalid","example":"Qui omnis quaerat sapiente."},"example":"Qui omnis quaerat sapiente."}}}},"security":[{"api_key_query_k":[],"jwt_header_Authorization":[]}]}},"/signin":{"post":{"tags":["secured_service"],"summary":"signin secured_service","description":"Creates a valid JWT","operationId":"secured_service#signin","responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Creds"},"example":{"api_key":"abcdef12345","jwt":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiYWRtaW4iOnRydWV9.TJVA95OrM7E2cBab30RMHrHDcEfxjoYZgeFONFh7HgQ","oauth_token":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiYWRtaW4iOnRydWV9.TJVA95OrM7E2cBab30RMHrHDcEfxjoYZgeFONFh7HgQ"}}}},"401":{"description":"unauthorized: Unauthorized response.","content":{"application/json":{"schema":{"type":"string","description":"Credentials are invalid","example":"Quia at aut perferendis voluptatem occaecati."},"example":"Quia at aut perferendis voluptatem occaecati."}}}},"security":[{"basic_header_Authorization":[]}]}}},"components":{"schemas":{"Creds":{"type":"object","properties":{"api_key":{"type":"string","description":"API Key","example":"abcdef12345"},"jwt":{"type":"string","description":"JWT token","example":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiYWRtaW4iOnRydWV9.TJVA95OrM7E2cBab30RMHrHDcEfxjoYZgeFONFh7HgQ"},"oauth_token":{"type":"string","description":"OAuth2 token","example":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiYWRtaW4iOnRydWV9.TJVA95OrM7E2cBab30RMHrHDcEfxjoYZgeFONFh7HgQ"}},"example":{"api_key":"abcdef12345","jwt":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiYWRtaW4iOnRydWV9.TJVA95OrM7E2cBab30RMHrHDcEfxjoYZgeFONFh7HgQ","oauth_token":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiYWRtaW4iOnRydWV9.TJVA95OrM7E2cBab30RMHrHDcEfxjoYZgeFONFh7HgQ"},"required":["jwt","api_key","oauth_token"]}},"securitySchemes":{"api_key_query_k":{"type":"apiKey","description":"Secures endpoint by requiring an API key.","name":"k","in":"query"},"basic_header_Authorization":{"type":"http","description":"Basic authentication used to authenticate security principal during signin","scheme":"basic"},"jwt_header_Authorization":{"type":"http","description":"Secures endpoint by requiring a valid JWT token retrieved via the signin endpoint. Supports scopes \"api:read\" and \"api:write\".","scheme":"bearer","bearerFormat":"JWT"},"jwt_header_X-Authorization":{"type":"http","description":"Secures endpoint by requiring a valid JWT token retrieved via the signin endpoint. Supports scopes \"api:read\" and \"api:write\".","scheme":"bearer","bearerFormat":"JWT"},"oauth2_query_oauth":{"type":"oauth2","description":"Secures endpoint by requiring a valid OAuth2 token retrieved via the signin endpoint. Supports scopes \"api:read\" and \"api:write\".","flows":{"authorizationCode":{"authorizationUrl":"http://goa.design/authorization","tokenUrl":"http://goa.design/token","refreshUrl":"http://goa.design/refresh","scopes":{"api:read":"Read-only access","api:write":"Read and write access"}}}}}},"tags":[{"name":"secured_service","description":"The secured service exposes endpoints that require valid authorization credentials."}]} \ No newline at end of file diff --git a/security/multiauth/gen/http/openapi3.yaml b/security/multiauth/gen/http/openapi3.yaml index 97cda0f14..fcef7a50c 100644 --- a/security/multiauth/gen/http/openapi3.yaml +++ b/security/multiauth/gen/http/openapi3.yaml @@ -22,8 +22,8 @@ paths: schema: type: boolean description: Whether to force auth failure even with a valid JWT - example: true - example: true + example: false + example: false responses: "200": description: OK response. @@ -31,8 +31,8 @@ paths: application/json: schema: type: string - example: Quaerat animi vel distinctio est. - example: Quaerat animi vel distinctio est. + example: Dolores et earum enim quo et. + example: Dolores et earum enim quo et. "401": description: 'unauthorized: Unauthorized response.' content: @@ -40,8 +40,8 @@ paths: schema: type: string description: Credentials are invalid - example: Cupiditate sunt ut esse ut perspiciatis. - example: Cupiditate sunt ut esse ut perspiciatis. + example: Inventore quo non ad. + example: Inventore quo non ad. "403": description: 'invalid-scopes: Forbidden response.' content: @@ -49,8 +49,8 @@ paths: schema: type: string description: Token scopes are invalid - example: Saepe sit. - example: Saepe sit. + example: Nemo tenetur totam commodi nisi possimus sapiente. + example: Nemo tenetur totam commodi nisi possimus sapiente. security: - jwt_header_Authorization: [] post: @@ -66,8 +66,8 @@ paths: application/json: schema: type: string - example: Neque qui commodi nihil. - example: Neque qui commodi nihil. + example: Inventore et ad voluptas sint. + example: Inventore et ad voluptas sint. "401": description: 'unauthorized: Unauthorized response.' content: @@ -75,8 +75,8 @@ paths: schema: type: string description: Credentials are invalid - example: Officiis vel possimus consequuntur ratione provident culpa. - example: Officiis vel possimus consequuntur ratione provident culpa. + example: Veniam eum quos. + example: Veniam eum quos. "403": description: 'invalid-scopes: Forbidden response.' content: @@ -84,8 +84,8 @@ paths: schema: type: string description: Token scopes are invalid - example: Molestias impedit vitae fugit ex. - example: Molestias impedit vitae fugit ex. + example: Est illum illo laudantium iste. + example: Est illum illo laudantium iste. security: - api_key_query_k: [] jwt_header_X-Authorization: [] @@ -106,8 +106,8 @@ paths: application/json: schema: type: string - example: Qui praesentium. - example: Qui praesentium. + example: Est molestiae voluptatem dicta iure aliquid. + example: Est molestiae voluptatem dicta iure aliquid. "401": description: 'unauthorized: Unauthorized response.' content: @@ -115,8 +115,8 @@ paths: schema: type: string description: Credentials are invalid - example: Dolor nobis expedita id non dolorem ipsum. - example: Dolor nobis expedita id non dolorem ipsum. + example: Quo fugit est nesciunt beatae voluptatem. + example: Quo fugit est nesciunt beatae voluptatem. "403": description: 'invalid-scopes: Forbidden response.' content: @@ -124,8 +124,8 @@ paths: schema: type: string description: Token scopes are invalid - example: Culpa a error aut quas impedit qui. - example: Culpa a error aut quas impedit qui. + example: Qui omnis quaerat sapiente. + example: Qui omnis quaerat sapiente. security: - api_key_query_k: [] jwt_header_Authorization: [] @@ -154,8 +154,8 @@ paths: schema: type: string description: Credentials are invalid - example: Tempore dolorem ipsa. - example: Tempore dolorem ipsa. + example: Quia at aut perferendis voluptatem occaecati. + example: Quia at aut perferendis voluptatem occaecati. security: - basic_header_Authorization: [] components: diff --git a/security/multiauth/gen/http/secured_service/client/encode_decode.go b/security/multiauth/gen/http/secured_service/client/encode_decode.go index 0f1e85162..fa92af671 100644 --- a/security/multiauth/gen/http/secured_service/client/encode_decode.go +++ b/security/multiauth/gen/http/secured_service/client/encode_decode.go @@ -10,10 +10,11 @@ package client import ( "bytes" "context" - "fmt" + "errors" "io" "net/http" "net/url" + "strconv" "strings" securedservice "goa.design/examples/security/multiauth/gen/secured_service" @@ -55,18 +56,24 @@ func EncodeSigninRequest(encoder func(*http.Request) goahttp.Encoder) func(*http // - "unauthorized" (type securedservice.Unauthorized): http.StatusUnauthorized // - error: internal error func DecodeSigninResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (any, error) { - return func(resp *http.Response) (any, error) { + return func(resp *http.Response) (result any, decodeErr error) { + responseBody := resp.Body if restoreBody { - b, err := io.ReadAll(resp.Body) - if err != nil { - return nil, err + b, readErr := io.ReadAll(responseBody) + closeErr := responseBody.Close() + if err := errors.Join(readErr, closeErr); err != nil { + return nil, goahttp.ErrDecodingError("secured_service", "signin", err) } resp.Body = io.NopCloser(bytes.NewBuffer(b)) defer func() { resp.Body = io.NopCloser(bytes.NewBuffer(b)) }() } else { - defer resp.Body.Close() + defer func() { + if err := responseBody.Close(); err != nil { + decodeErr = errors.Join(decodeErr, goahttp.ErrDecodingError("secured_service", "signin", err)) + } + }() } switch resp.StatusCode { case http.StatusOK: @@ -95,7 +102,10 @@ func DecodeSigninResponse(decoder func(*http.Response) goahttp.Decoder, restoreB } return nil, NewSigninUnauthorized(body) default: - body, _ := io.ReadAll(resp.Body) + body, err := io.ReadAll(resp.Body) + if err != nil { + return nil, goahttp.ErrDecodingError("secured_service", "signin", err) + } return nil, goahttp.ErrInvalidResponse("secured_service", "signin", resp.StatusCode, string(body)) } } @@ -134,7 +144,7 @@ func EncodeSecureRequest(encoder func(*http.Request) goahttp.Encoder) func(*http } values := req.URL.Query() if p.Fail != nil { - values.Add("fail", fmt.Sprintf("%v", *p.Fail)) + values.Add("fail", strconv.FormatBool(*p.Fail)) } req.URL.RawQuery = values.Encode() return nil @@ -149,18 +159,24 @@ func EncodeSecureRequest(encoder func(*http.Request) goahttp.Encoder) func(*http // - "unauthorized" (type securedservice.Unauthorized): http.StatusUnauthorized // - error: internal error func DecodeSecureResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (any, error) { - return func(resp *http.Response) (any, error) { + return func(resp *http.Response) (result any, decodeErr error) { + responseBody := resp.Body if restoreBody { - b, err := io.ReadAll(resp.Body) - if err != nil { - return nil, err + b, readErr := io.ReadAll(responseBody) + closeErr := responseBody.Close() + if err := errors.Join(readErr, closeErr); err != nil { + return nil, goahttp.ErrDecodingError("secured_service", "secure", err) } resp.Body = io.NopCloser(bytes.NewBuffer(b)) defer func() { resp.Body = io.NopCloser(bytes.NewBuffer(b)) }() } else { - defer resp.Body.Close() + defer func() { + if err := responseBody.Close(); err != nil { + decodeErr = errors.Join(decodeErr, goahttp.ErrDecodingError("secured_service", "secure", err)) + } + }() } switch resp.StatusCode { case http.StatusOK: @@ -194,7 +210,10 @@ func DecodeSecureResponse(decoder func(*http.Response) goahttp.Decoder, restoreB } return nil, NewSecureUnauthorized(body) default: - body, _ := io.ReadAll(resp.Body) + body, err := io.ReadAll(resp.Body) + if err != nil { + return nil, goahttp.ErrDecodingError("secured_service", "secure", err) + } return nil, goahttp.ErrInvalidResponse("secured_service", "secure", resp.StatusCode, string(body)) } } @@ -246,18 +265,24 @@ func EncodeDoublySecureRequest(encoder func(*http.Request) goahttp.Encoder) func // - "unauthorized" (type securedservice.Unauthorized): http.StatusUnauthorized // - error: internal error func DecodeDoublySecureResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (any, error) { - return func(resp *http.Response) (any, error) { + return func(resp *http.Response) (result any, decodeErr error) { + responseBody := resp.Body if restoreBody { - b, err := io.ReadAll(resp.Body) - if err != nil { - return nil, err + b, readErr := io.ReadAll(responseBody) + closeErr := responseBody.Close() + if err := errors.Join(readErr, closeErr); err != nil { + return nil, goahttp.ErrDecodingError("secured_service", "doubly_secure", err) } resp.Body = io.NopCloser(bytes.NewBuffer(b)) defer func() { resp.Body = io.NopCloser(bytes.NewBuffer(b)) }() } else { - defer resp.Body.Close() + defer func() { + if err := responseBody.Close(); err != nil { + decodeErr = errors.Join(decodeErr, goahttp.ErrDecodingError("secured_service", "doubly_secure", err)) + } + }() } switch resp.StatusCode { case http.StatusOK: @@ -291,7 +316,10 @@ func DecodeDoublySecureResponse(decoder func(*http.Response) goahttp.Decoder, re } return nil, NewDoublySecureUnauthorized(body) default: - body, _ := io.ReadAll(resp.Body) + body, err := io.ReadAll(resp.Body) + if err != nil { + return nil, goahttp.ErrDecodingError("secured_service", "doubly_secure", err) + } return nil, goahttp.ErrInvalidResponse("secured_service", "doubly_secure", resp.StatusCode, string(body)) } } @@ -350,18 +378,24 @@ func EncodeAlsoDoublySecureRequest(encoder func(*http.Request) goahttp.Encoder) // - "unauthorized" (type securedservice.Unauthorized): http.StatusUnauthorized // - error: internal error func DecodeAlsoDoublySecureResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (any, error) { - return func(resp *http.Response) (any, error) { + return func(resp *http.Response) (result any, decodeErr error) { + responseBody := resp.Body if restoreBody { - b, err := io.ReadAll(resp.Body) - if err != nil { - return nil, err + b, readErr := io.ReadAll(responseBody) + closeErr := responseBody.Close() + if err := errors.Join(readErr, closeErr); err != nil { + return nil, goahttp.ErrDecodingError("secured_service", "also_doubly_secure", err) } resp.Body = io.NopCloser(bytes.NewBuffer(b)) defer func() { resp.Body = io.NopCloser(bytes.NewBuffer(b)) }() } else { - defer resp.Body.Close() + defer func() { + if err := responseBody.Close(); err != nil { + decodeErr = errors.Join(decodeErr, goahttp.ErrDecodingError("secured_service", "also_doubly_secure", err)) + } + }() } switch resp.StatusCode { case http.StatusOK: @@ -395,7 +429,10 @@ func DecodeAlsoDoublySecureResponse(decoder func(*http.Response) goahttp.Decoder } return nil, NewAlsoDoublySecureUnauthorized(body) default: - body, _ := io.ReadAll(resp.Body) + body, err := io.ReadAll(resp.Body) + if err != nil { + return nil, goahttp.ErrDecodingError("secured_service", "also_doubly_secure", err) + } return nil, goahttp.ErrInvalidResponse("secured_service", "also_doubly_secure", resp.StatusCode, string(body)) } } diff --git a/sse/README.md b/sse/README.md index 6e36850bf..8021e6c65 100644 --- a/sse/README.md +++ b/sse/README.md @@ -75,7 +75,7 @@ go build -o ./cmd/monitor-cli/monitor-cli goa.design/examples/sse/cmd/monitor-cl #### Connect to the SSE Endpoint ```bash -./cmd/monitor-cli/monitor-cli monitor monitor --url http://localhost:8080 +./cmd/monitor-cli/monitor-cli --url http://localhost:8080 monitor monitor ``` You should see a stream of JSON objects representing CPU and memory usage, @@ -236,4 +236,4 @@ monitorsvr.Mount(mux, monitorServer) The Goa-generated `Mount` function connects both the API endpoint and the static file handler to the HTTP mux. The static handler uses the embedded `public` directory, so all static assets are served seamlessly alongside the -API. \ No newline at end of file +API. diff --git a/sse/gen/http/monitor/client/client.go b/sse/gen/http/monitor/client/client.go index 406cc5230..865ef379c 100644 --- a/sse/gen/http/monitor/client/client.go +++ b/sse/gen/http/monitor/client/client.go @@ -9,6 +9,7 @@ package client import ( "context" + "errors" "fmt" "net/http" "strings" @@ -76,8 +77,11 @@ func (c *Client) Monitor() goa.Endpoint { contentType := resp.Header.Get("Content-Type") if contentType != "" && !strings.HasPrefix(contentType, "text/event-stream") { - resp.Body.Close() - return nil, fmt.Errorf("unexpected content type: %s (expected text/event-stream)", contentType) + contentTypeErr := fmt.Errorf("unexpected content type: %s (expected text/event-stream)", contentType) + if err := resp.Body.Close(); err != nil { + return nil, errors.Join(contentTypeErr, goahttp.ErrDecodingError("monitor", "monitor", err)) + } + return nil, contentTypeErr } return NewMonitorStream(resp, c.decoder), nil diff --git a/sse/gen/http/monitor/client/encode_decode.go b/sse/gen/http/monitor/client/encode_decode.go index d7dec24cb..40ccb5db0 100644 --- a/sse/gen/http/monitor/client/encode_decode.go +++ b/sse/gen/http/monitor/client/encode_decode.go @@ -10,6 +10,7 @@ package client import ( "bytes" "context" + "errors" "io" "net/http" "net/url" @@ -36,18 +37,24 @@ func (c *Client) BuildMonitorRequest(ctx context.Context, v any) (*http.Request, // monitor monitor endpoint. restoreBody controls whether the response body // should be restored after having been read. func DecodeMonitorResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (any, error) { - return func(resp *http.Response) (any, error) { + return func(resp *http.Response) (result any, decodeErr error) { + responseBody := resp.Body if restoreBody { - b, err := io.ReadAll(resp.Body) - if err != nil { - return nil, err + b, readErr := io.ReadAll(responseBody) + closeErr := responseBody.Close() + if err := errors.Join(readErr, closeErr); err != nil { + return nil, goahttp.ErrDecodingError("monitor", "monitor", err) } resp.Body = io.NopCloser(bytes.NewBuffer(b)) defer func() { resp.Body = io.NopCloser(bytes.NewBuffer(b)) }() } else { - defer resp.Body.Close() + defer func() { + if err := responseBody.Close(); err != nil { + decodeErr = errors.Join(decodeErr, goahttp.ErrDecodingError("monitor", "monitor", err)) + } + }() } switch resp.StatusCode { case http.StatusOK: @@ -66,7 +73,10 @@ func DecodeMonitorResponse(decoder func(*http.Response) goahttp.Decoder, restore res := NewMonitorUsageOK(&body) return res, nil default: - body, _ := io.ReadAll(resp.Body) + body, err := io.ReadAll(resp.Body) + if err != nil { + return nil, goahttp.ErrDecodingError("monitor", "monitor", err) + } return nil, goahttp.ErrInvalidResponse("monitor", "monitor", resp.StatusCode, string(body)) } } diff --git a/sse/gen/http/monitor/client/sse.go b/sse/gen/http/monitor/client/sse.go index 01be9f74a..6f9a48e6c 100644 --- a/sse/gen/http/monitor/client/sse.go +++ b/sse/gen/http/monitor/client/sse.go @@ -220,13 +220,13 @@ func (s *MonitorStreamImpl) processEvent(eventData []byte) (event *monitor.Usage continue } if bytes.HasPrefix(line, []byte("data:")) { - dataLines = append(dataLines, s.trimHeader(len("data:"), line)) + dataLines = append(dataLines, s.trimHeader(line[len("data:"):])) continue } } if len(dataLines) > 0 { dataContent := strings.Join(dataLines, "\n") - // Decode JSON into the struct pointer directly + // Decode the event data into the result value returned by Recv. respBody := &http.Response{ StatusCode: http.StatusOK, Body: io.NopCloser(bytes.NewReader([]byte(dataContent))), @@ -239,12 +239,8 @@ func (s *MonitorStreamImpl) processEvent(eventData []byte) (event *monitor.Usage return } -// trimHeader removes the header prefix and optional leading space -func (s *MonitorStreamImpl) trimHeader(size int, data []byte) string { - if len(data) < size { - return string(data) - } - data = data[size:] +// trimHeader removes the optional space after an SSE field name. +func (s *MonitorStreamImpl) trimHeader(data []byte) string { if len(data) > 0 && data[0] == ' ' { data = data[1:] } diff --git a/sse/gen/http/monitor/server/server.go b/sse/gen/http/monitor/server/server.go index d2596d9a4..3a5074899 100644 --- a/sse/gen/http/monitor/server/server.go +++ b/sse/gen/http/monitor/server/server.go @@ -124,6 +124,13 @@ func NewMonitorHandler( } _, err = endpoint(ctx, v) if err != nil { + stream := v.Stream.(*MonitorServerStream) + if stream.attempted { + if errhandler != nil { + errhandler(ctx, w, err) + } + return + } if err := encodeError(ctx, w, err); err != nil && errhandler != nil { errhandler(ctx, w, err) } @@ -132,23 +139,21 @@ func NewMonitorHandler( }) } -// appendFS is a custom implementation of fs.FS that appends a specified prefix -// to the file paths before delegating the Open call to the underlying fs.FS. +// appendFS adds a fixed directory to file paths before opening them. type appendFS struct { prefix string fs http.FileSystem } // Open opens the named file, appending the prefix to the file path before -// passing it to the underlying fs.FS. +// passing it to the underlying file system. func (s appendFS) Open(name string) (http.File, error) { switch name { } return s.fs.Open(path.Join(s.prefix, name)) } -// appendPrefix returns a new fs.FS that appends the specified prefix to file paths -// before delegating to the provided embed.FS. +// appendPrefix returns a file system that adds prefix before opening each path. func appendPrefix(fsys http.FileSystem, prefix string) http.FileSystem { return appendFS{prefix: prefix, fs: fsys} } diff --git a/sse/gen/http/monitor/server/sse.go b/sse/gen/http/monitor/server/sse.go index 3712d2453..091753dc6 100644 --- a/sse/gen/http/monitor/server/sse.go +++ b/sse/gen/http/monitor/server/sse.go @@ -26,6 +26,8 @@ type MonitorServerStream struct { w http.ResponseWriter // r is the HTTP request. r *http.Request + // attempted is true after this stream writes the HTTP success status. + attempted bool } // Send Send streams instances of "monitor.Usage" to the "monitor" endpoint SSE @@ -37,6 +39,16 @@ func (s *MonitorServerStream) Send(v *monitor.Usage) error { // SendWithContext SendWithContext streams instances of "monitor.Usage" to the // "monitor" endpoint SSE connection with context. func (s *MonitorServerStream) SendWithContext(ctx context.Context, v *monitor.Usage) error { + res := v + + var data string + body := NewMonitorResponseBody(res) + + byts, err := json.Marshal(body) + if err != nil { + return err + } + data = string(byts) s.once.Do(func() { header := s.w.Header() if header.Get("Content-Type") == "" { @@ -49,65 +61,21 @@ func (s *MonitorServerStream) SendWithContext(ctx context.Context, v *monitor.Us header.Set("Connection", "keep-alive") } s.w.WriteHeader(http.StatusOK) + s.attempted = true }) - res := v - var data string - var payload any - body := NewMonitorResponseBody(res) - payload = body - switch v := payload.(type) { - case nil: - data = "null" - case string: - data = v - case []byte: - data = string(v) - case bool: - if v { - data = "true" - } else { - data = "false" - } - case int: - data = fmt.Sprintf("%d", v) - case int8: - data = fmt.Sprintf("%d", v) - case int16: - data = fmt.Sprintf("%d", v) - case int32: - data = fmt.Sprintf("%d", v) - case int64: - data = fmt.Sprintf("%d", v) - case uint: - data = fmt.Sprintf("%d", v) - case uint8: - data = fmt.Sprintf("%d", v) - case uint16: - data = fmt.Sprintf("%d", v) - case uint32: - data = fmt.Sprintf("%d", v) - case uint64: - data = fmt.Sprintf("%d", v) - case float32: - data = fmt.Sprintf("%g", v) - case float64: - data = fmt.Sprintf("%g", v) - default: - byts, err := json.Marshal(payload) - if err != nil { - return err - } - data = string(byts) + if _, err := fmt.Fprintf(s.w, "data: %s\n\n", data); err != nil { + return err } - fmt.Fprintf(s.w, "data: %s\n\n", data) - http.NewResponseController(s.w).Flush() + if err := http.NewResponseController(s.w).Flush(); err != nil { + return err + } return nil } -// Close is a no-op for SSE. We keep the method for compatibility with other -// stream types. +// Close does nothing because an SSE stream closes with its HTTP response. The +// common stream interface still requires this method. func (s *MonitorServerStream) Close() error { return nil } diff --git a/sse/gen/http/openapi.json b/sse/gen/http/openapi.json index 74c1496ee..e27a083b9 100644 --- a/sse/gen/http/openapi.json +++ b/sse/gen/http/openapi.json @@ -1 +1 @@ -{"swagger":"2.0","info":{"title":"","version":"0.0.1"},"host":"localhost:80","consumes":["application/json","application/xml","application/gob"],"produces":["application/json","application/xml","application/gob"],"paths":{"/monitor":{"get":{"tags":["monitor"],"summary":"monitor monitor","description":"Monitor CPU and memory usage via Server-Sent Events","operationId":"monitor#monitor","responses":{"200":{"description":"OK response.","schema":{"$ref":"#/definitions/Usage","required":["timestamp","cpu","memory"]}}},"schemes":["http"]}},"/{filepath}":{"get":{"tags":["monitor"],"summary":"Download public","operationId":"monitor#/{*filepath}","parameters":[{"name":"filepath","in":"path","description":"Relative file path","required":true,"type":"string"}],"responses":{"200":{"description":"File downloaded","schema":{"type":"file"}},"404":{"description":"File not found","schema":{"$ref":"#/definitions/Error"}}},"schemes":["http"]}}},"definitions":{"Error":{"title":"Mediatype identifier: application/vnd.goa.error; view=default","type":"object","properties":{"fault":{"type":"boolean","description":"Is the error a server-side fault?","example":true},"id":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"message":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"name":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"temporary":{"type":"boolean","description":"Is the error temporary?","example":true},"timeout":{"type":"boolean","description":"Is the error a timeout?","example":true}},"description":"Error response result type (default view)","example":{"fault":true,"id":"123abc","message":"parameter 'p' must be an integer","name":"bad_request","temporary":true,"timeout":true},"required":["name","id","message","temporary","timeout","fault"]},"Usage":{"title":"Usage","type":"object","properties":{"cpu":{"type":"integer","description":"CPU usage percentage","example":50,"format":"int64"},"memory":{"type":"integer","description":"Memory usage percentage","example":30,"format":"int64"},"timestamp":{"type":"string","description":"Timestamp of the usage report","example":"1988-01-09T02:12:36Z","format":"date-time"}},"example":{"cpu":50,"memory":30,"timestamp":"1988-01-09T02:12:36Z"},"required":["timestamp","cpu","memory"]}}} \ No newline at end of file +{"swagger":"2.0","info":{"title":"","version":"0.0.1"},"host":"localhost:80","consumes":["application/json","application/xml","application/gob"],"produces":["application/json","application/xml","application/gob"],"paths":{"/monitor":{"get":{"tags":["monitor"],"summary":"monitor monitor","description":"Monitor CPU and memory usage via Server-Sent Events","operationId":"monitor#monitor","responses":{"200":{"description":"OK response.","schema":{"$ref":"#/definitions/Usage","required":["timestamp","cpu","memory"]}}},"schemes":["http"]}},"/{filepath}":{"get":{"tags":["monitor"],"summary":"Download public","operationId":"monitor#/{*filepath}","parameters":[{"name":"filepath","in":"path","description":"Relative file path","required":true,"type":"string"}],"responses":{"200":{"description":"File downloaded","schema":{"type":"file"}},"404":{"description":"File not found","schema":{"$ref":"#/definitions/Error"}}},"schemes":["http"]}}},"definitions":{"Error":{"title":"Mediatype identifier: application/vnd.goa.error; view=default","type":"object","properties":{"fault":{"type":"boolean","description":"Is the error a server-side fault?","example":true},"id":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"message":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"name":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"temporary":{"type":"boolean","description":"Is the error temporary?","example":true},"timeout":{"type":"boolean","description":"Is the error a timeout?","example":true}},"description":"Error response result type (default view)","example":{"fault":true,"id":"123abc","message":"parameter 'p' must be an integer","name":"bad_request","temporary":true,"timeout":true},"required":["name","id","message","temporary","timeout","fault"]},"Usage":{"title":"Usage","type":"object","properties":{"cpu":{"type":"integer","description":"CPU usage percentage","example":50,"format":"int64"},"memory":{"type":"integer","description":"Memory usage percentage","example":30,"format":"int64"},"timestamp":{"type":"string","description":"Timestamp of the usage report","example":"1987-11-07T01:47:47Z","format":"date-time"}},"example":{"cpu":50,"memory":30,"timestamp":"1987-11-07T01:47:47Z"},"required":["timestamp","cpu","memory"]}}} \ No newline at end of file diff --git a/sse/gen/http/openapi.yaml b/sse/gen/http/openapi.yaml index c334bd51b..e9e6f3493 100644 --- a/sse/gen/http/openapi.yaml +++ b/sse/gen/http/openapi.yaml @@ -114,12 +114,12 @@ definitions: timestamp: type: string description: Timestamp of the usage report - example: "1988-01-09T02:12:36Z" + example: "1987-11-07T01:47:47Z" format: date-time example: cpu: 50 memory: 30 - timestamp: "1988-01-09T02:12:36Z" + timestamp: "1987-11-07T01:47:47Z" required: - timestamp - cpu diff --git a/sse/gen/http/openapi3.2.json b/sse/gen/http/openapi3.2.json index d6d2fd4b8..bf59000d2 100644 --- a/sse/gen/http/openapi3.2.json +++ b/sse/gen/http/openapi3.2.json @@ -1 +1 @@ -{"openapi":"3.2.0","info":{"title":"Goa API","version":"0.0.1"},"servers":[{"url":"http://localhost:80","name":"monitor","description":"Default server for monitor"}],"paths":{"/monitor":{"get":{"tags":["monitor"],"summary":"monitor monitor","description":"Monitor CPU and memory usage via Server-Sent Events","operationId":"monitor#monitor","responses":{"200":{"description":"OK response.","content":{"text/event-stream":{"itemSchema":{"type":"object","properties":{"data":{"type":"string","contentMediaType":"application/json","contentSchema":{"$ref":"#/components/schemas/Usage"}}},"required":["data"]}}}}}}},"/{filepath}":{"get":{"tags":["monitor"],"summary":"Download public","operationId":"monitor#/{filepath}","parameters":[{"name":"filepath","in":"path","description":"Relative file path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"File downloaded"},"404":{"description":"File not found"}}}}},"components":{"schemas":{"Usage":{"type":"object","properties":{"cpu":{"type":"integer","description":"CPU usage percentage","example":50,"format":"int64"},"memory":{"type":"integer","description":"Memory usage percentage","example":30,"format":"int64"},"timestamp":{"type":"string","description":"Timestamp of the usage report","example":"1988-01-09T02:12:36Z","format":"date-time"}},"example":{"cpu":50,"memory":30,"timestamp":"1988-01-09T02:12:36Z"},"required":["timestamp","cpu","memory"]}}},"tags":[{"name":"monitor","description":"The monitor service provides real-time system monitoring via SSE"}]} \ No newline at end of file +{"openapi":"3.2.0","info":{"title":"Goa API","version":"0.0.1"},"servers":[{"url":"http://localhost:80","name":"monitor","description":"Default server for monitor"}],"paths":{"/monitor":{"get":{"tags":["monitor"],"summary":"monitor monitor","description":"Monitor CPU and memory usage via Server-Sent Events","operationId":"monitor#monitor","responses":{"200":{"description":"OK response.","content":{"text/event-stream":{"itemSchema":{"type":"object","properties":{"data":{"type":"string","contentMediaType":"application/json","contentSchema":{"$ref":"#/components/schemas/Usage"}}},"required":["data"]}}}}}}},"/{filepath}":{"get":{"tags":["monitor"],"summary":"Download public","operationId":"monitor#/{filepath}","parameters":[{"name":"filepath","in":"path","description":"Relative file path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"File downloaded"},"404":{"description":"File not found"}}}}},"components":{"schemas":{"Usage":{"type":"object","properties":{"cpu":{"type":"integer","description":"CPU usage percentage","example":50,"format":"int64"},"memory":{"type":"integer","description":"Memory usage percentage","example":30,"format":"int64"},"timestamp":{"type":"string","description":"Timestamp of the usage report","example":"1987-11-07T01:47:47Z","format":"date-time"}},"example":{"cpu":50,"memory":30,"timestamp":"1987-11-07T01:47:47Z"},"required":["timestamp","cpu","memory"]}}},"tags":[{"name":"monitor","description":"The monitor service provides real-time system monitoring via SSE"}]} \ No newline at end of file diff --git a/sse/gen/http/openapi3.2.yaml b/sse/gen/http/openapi3.2.yaml index ce0abada9..e16f775ab 100644 --- a/sse/gen/http/openapi3.2.yaml +++ b/sse/gen/http/openapi3.2.yaml @@ -65,12 +65,12 @@ components: timestamp: type: string description: Timestamp of the usage report - example: "1988-01-09T02:12:36Z" + example: "1987-11-07T01:47:47Z" format: date-time example: cpu: 50 memory: 30 - timestamp: "1988-01-09T02:12:36Z" + timestamp: "1987-11-07T01:47:47Z" required: - timestamp - cpu diff --git a/sse/gen/http/openapi3.json b/sse/gen/http/openapi3.json index 3c09de86a..2d7663a9b 100644 --- a/sse/gen/http/openapi3.json +++ b/sse/gen/http/openapi3.json @@ -1 +1 @@ -{"openapi":"3.0.3","info":{"title":"Goa API","version":"0.0.1"},"servers":[{"url":"http://localhost:80","description":"Default server for monitor"}],"paths":{"/monitor":{"get":{"tags":["monitor"],"summary":"monitor monitor","description":"Monitor CPU and memory usage via Server-Sent Events","operationId":"monitor#monitor","responses":{"200":{"description":"OK response.","content":{"text/event-stream":{"schema":{"$ref":"#/components/schemas/Usage"},"example":{"cpu":50,"memory":30,"timestamp":"1988-01-09T02:12:36Z"}}}}}}},"/{filepath}":{"get":{"tags":["monitor"],"summary":"Download public","operationId":"monitor#/{filepath}","parameters":[{"name":"filepath","in":"path","description":"Relative file path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"File downloaded"},"404":{"description":"File not found"}}}}},"components":{"schemas":{"Usage":{"type":"object","properties":{"cpu":{"type":"integer","description":"CPU usage percentage","example":50,"format":"int64"},"memory":{"type":"integer","description":"Memory usage percentage","example":30,"format":"int64"},"timestamp":{"type":"string","description":"Timestamp of the usage report","example":"1988-01-09T02:12:36Z","format":"date-time"}},"example":{"cpu":50,"memory":30,"timestamp":"1988-01-09T02:12:36Z"},"required":["timestamp","cpu","memory"]}}},"tags":[{"name":"monitor","description":"The monitor service provides real-time system monitoring via SSE"}]} \ No newline at end of file +{"openapi":"3.0.3","info":{"title":"Goa API","version":"0.0.1"},"servers":[{"url":"http://localhost:80","description":"Default server for monitor"}],"paths":{"/monitor":{"get":{"tags":["monitor"],"summary":"monitor monitor","description":"Monitor CPU and memory usage via Server-Sent Events","operationId":"monitor#monitor","responses":{"200":{"description":"OK response.","content":{"text/event-stream":{"schema":{"$ref":"#/components/schemas/Usage"},"example":{"cpu":50,"memory":30,"timestamp":"1987-11-07T01:47:47Z"}}}}}}},"/{filepath}":{"get":{"tags":["monitor"],"summary":"Download public","operationId":"monitor#/{filepath}","parameters":[{"name":"filepath","in":"path","description":"Relative file path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"File downloaded"},"404":{"description":"File not found"}}}}},"components":{"schemas":{"Usage":{"type":"object","properties":{"cpu":{"type":"integer","description":"CPU usage percentage","example":50,"format":"int64"},"memory":{"type":"integer","description":"Memory usage percentage","example":30,"format":"int64"},"timestamp":{"type":"string","description":"Timestamp of the usage report","example":"1987-11-07T01:47:47Z","format":"date-time"}},"example":{"cpu":50,"memory":30,"timestamp":"1987-11-07T01:47:47Z"},"required":["timestamp","cpu","memory"]}}},"tags":[{"name":"monitor","description":"The monitor service provides real-time system monitoring via SSE"}]} \ No newline at end of file diff --git a/sse/gen/http/openapi3.yaml b/sse/gen/http/openapi3.yaml index ab17277c6..380f81487 100644 --- a/sse/gen/http/openapi3.yaml +++ b/sse/gen/http/openapi3.yaml @@ -41,7 +41,7 @@ paths: example: cpu: 50 memory: 30 - timestamp: "1988-01-09T02:12:36Z" + timestamp: "1987-11-07T01:47:47Z" components: schemas: Usage: @@ -60,12 +60,12 @@ components: timestamp: type: string description: Timestamp of the usage report - example: "1988-01-09T02:12:36Z" + example: "1987-11-07T01:47:47Z" format: date-time example: cpu: 50 memory: 30 - timestamp: "1988-01-09T02:12:36Z" + timestamp: "1987-11-07T01:47:47Z" required: - timestamp - cpu diff --git a/sse/gen/monitor/service.go b/sse/gen/monitor/service.go index 490156761..6d997e33f 100644 --- a/sse/gen/monitor/service.go +++ b/sse/gen/monitor/service.go @@ -7,9 +7,7 @@ package monitor -import ( - "context" -) +import "context" // The monitor service provides real-time system monitoring via SSE type Service interface { diff --git a/streaming/chatter.go b/streaming/chatter.go index 43dbd0a85..171869487 100644 --- a/streaming/chatter.go +++ b/streaming/chatter.go @@ -67,7 +67,11 @@ func (s *chatterSvc) Echoer(ctx context.Context, p *chattersvc.EchoerPayload, st // Listen for context cancellation and stream input simultaneously. for done := false; !done; { select { - case str := <-strCh: + case str, ok := <-strCh: + if !ok { + done = true + continue + } s.storeMessage(str) if err = stream.Send(str); err != nil { return err @@ -111,7 +115,11 @@ func (s *chatterSvc) Listener(ctx context.Context, p *chattersvc.ListenerPayload // Listen for context cancellation and stream input simultaneously. for done := false; !done; { select { - case str := <-strCh: + case str, ok := <-strCh: + if !ok { + done = true + continue + } s.storeMessage(str) case err := <-errCh: if err != nil { @@ -153,7 +161,11 @@ func (s *chatterSvc) Summary(ctx context.Context, p *chattersvc.SummaryPayload, // Listen for context cancellation and stream input simultaneously. for done := false; !done; { select { - case str := <-strCh: + case str, ok := <-strCh: + if !ok { + done = true + continue + } s.storeMessage(str) lastMsg := s.storedMessages[len(s.storedMessages)-1] summary = append(summary, lastMsg) diff --git a/streaming/chattercli.go b/streaming/chattercli.go index 29d518224..037bf31bd 100644 --- a/streaming/chattercli.go +++ b/streaming/chattercli.go @@ -99,10 +99,6 @@ func InteractWithStreams(data interface{}) { prettyPrint(data) } } - if data != nil { - m, _ := json.MarshalIndent(data, "", " ") - fmt.Println(string(m)) - } } func prettyPrint(s interface{}) { diff --git a/streaming/design/design.go b/streaming/design/design.go index 251965dc0..77a71a452 100644 --- a/streaming/design/design.go +++ b/streaming/design/design.go @@ -194,7 +194,9 @@ var _ = Service("chatter", func() { Token("token", String, func() { Description("JWT used for authentication") }) - Attribute("view", String, "View to use to render the result") + Attribute("view", String, "View to use to render the result", func() { + Enum("tiny", "default") + }) Required("token") }) diff --git a/streaming/gen/chatter/service.go b/streaming/gen/chatter/service.go index efec5b95d..bd885919e 100644 --- a/streaming/gen/chatter/service.go +++ b/streaming/gen/chatter/service.go @@ -290,7 +290,7 @@ func NewChatSummaryCollection(vres chatterviews.ChatSummaryCollection) ChatSumma // ChatSummaryCollection from result type ChatSummaryCollection using the given // view. func NewViewedChatSummaryCollection(res ChatSummaryCollection, view string) chatterviews.ChatSummaryCollection { - var vres chatterviews.ChatSummaryCollection + vres := chatterviews.ChatSummaryCollection{View: view} switch view { case "tiny": p := newChatSummaryCollectionViewTiny(res) @@ -318,7 +318,7 @@ func NewChatSummary(vres *chatterviews.ChatSummary) *ChatSummary { // NewViewedChatSummary initializes viewed result type ChatSummary from result // type ChatSummary using the given view. func NewViewedChatSummary(res *ChatSummary, view string) *chatterviews.ChatSummary { - var vres *chatterviews.ChatSummary + vres := &chatterviews.ChatSummary{View: view} switch view { case "tiny": p := newChatSummaryViewTiny(res) diff --git a/streaming/gen/chatter/views/view.go b/streaming/gen/chatter/views/view.go index 95570aae7..db36a8789 100644 --- a/streaming/gen/chatter/views/view.go +++ b/streaming/gen/chatter/views/view.go @@ -7,9 +7,7 @@ package views -import ( - goa "goa.design/goa/v3/pkg" -) +import goa "goa.design/goa/v3/pkg" // ChatSummaryCollection is the viewed result type that is projected based on a // view. diff --git a/streaming/gen/grpc/chatter/client/cli.go b/streaming/gen/grpc/chatter/client/cli.go index 27c18d5a6..21a7276da 100644 --- a/streaming/gen/grpc/chatter/client/cli.go +++ b/streaming/gen/grpc/chatter/client/cli.go @@ -9,6 +9,7 @@ package client import ( chatter "goa.design/examples/streaming/gen/chatter" + goa "goa.design/goa/v3/pkg" ) // BuildLoginPayload builds the payload for the chatter login endpoint from CLI @@ -84,10 +85,17 @@ func BuildSubscribePayload(chatterSubscribeToken string) (*chatter.SubscribePayl // BuildHistoryPayload builds the payload for the chatter history endpoint from // CLI flags. func BuildHistoryPayload(chatterHistoryView string, chatterHistoryToken string) (*chatter.HistoryPayload, error) { + var err error var view *string { if chatterHistoryView != "" { view = &chatterHistoryView + if !(chatterHistoryView == "tiny" || chatterHistoryView == "default") { + err = goa.MergeErrors(err, goa.InvalidEnumValueError("view", chatterHistoryView, []any{"tiny", "default"})) + } + if err != nil { + return nil, err + } } } var token string diff --git a/streaming/gen/grpc/chatter/client/client.go b/streaming/gen/grpc/chatter/client/client.go index b74a65811..e09123a23 100644 --- a/streaming/gen/grpc/chatter/client/client.go +++ b/streaming/gen/grpc/chatter/client/client.go @@ -38,7 +38,6 @@ type ListenerClientStream struct { // SummaryClientStream implements the chatter.SummaryClientStream interface. type SummaryClientStream struct { stream chatterpb.Chatter_SummaryClient - view string } // SubscribeClientStream implements the chatter.SubscribeClientStream interface. @@ -48,8 +47,9 @@ type SubscribeClientStream struct { // HistoryClientStream implements the chatter.HistoryClientStream interface. type HistoryClientStream struct { - stream chatterpb.Chatter_HistoryClient - view string + stream chatterpb.Chatter_HistoryClient + view string + viewSet bool } // NewClient instantiates gRPC client for all the chatter service servers. @@ -328,7 +328,25 @@ func (s *HistoryClientStream) Recv() (*chatter.ChatSummary, error) { return res, err } } - proj := NewHistoryResponseChatSummaryView(v) + if !s.viewSet { + hdr, err := s.stream.Header() + if err != nil { + return res, err + } + views := hdr.Get("goa-view") + if len(views) == 0 { + return res, goa.MissingFieldError("goa-view", "metadata") + } + s.view = views[0] + s.viewSet = true + } + var proj *chatterviews.ChatSummaryView + switch s.view { + case "tiny": + proj = NewHistoryResponseChatSummaryViewTiny(v) + case "default", "": + proj = NewHistoryResponseChatSummaryView(v) + } vres := &chatterviews.ChatSummary{Projected: proj, View: s.view} if err := chatterviews.ValidateChatSummary(vres); err != nil { return nil, err @@ -345,4 +363,5 @@ func (s *HistoryClientStream) RecvWithContext(ctx context.Context) (*chatter.Cha // SetView sets the view. func (s *HistoryClientStream) SetView(view string) { s.view = view + s.viewSet = true } diff --git a/streaming/gen/grpc/chatter/client/encode_decode.go b/streaming/gen/grpc/chatter/client/encode_decode.go index 3e5b39630..a0952696f 100644 --- a/streaming/gen/grpc/chatter/client/encode_decode.go +++ b/streaming/gen/grpc/chatter/client/encode_decode.go @@ -37,8 +37,10 @@ func EncodeLoginRequest(ctx context.Context, v any, md *metadata.MD) (any, error if !ok { return nil, goagrpc.ErrInvalidType("chatter", "login", "*chatter.LoginPayload", v) } - (*md).Append("user", payload.User) - (*md).Append("password", payload.Password) + userWire := payload.User + (*md).Append("user", userWire) + passwordWire := payload.Password + (*md).Append("password", passwordWire) return NewProtoLoginRequest(), nil } @@ -72,7 +74,8 @@ func EncodeEchoerRequest(ctx context.Context, v any, md *metadata.MD) (any, erro if !ok { return nil, goagrpc.ErrInvalidType("chatter", "echoer", "*chatter.EchoerPayload", v) } - (*md).Append("authorization", payload.Token) + tokenWire := payload.Token + (*md).Append("authorization", tokenWire) return nil, nil } @@ -103,7 +106,8 @@ func EncodeListenerRequest(ctx context.Context, v any, md *metadata.MD) (any, er if !ok { return nil, goagrpc.ErrInvalidType("chatter", "listener", "*chatter.ListenerPayload", v) } - (*md).Append("authorization", payload.Token) + tokenWire := payload.Token + (*md).Append("authorization", tokenWire) return nil, nil } @@ -134,21 +138,15 @@ func EncodeSummaryRequest(ctx context.Context, v any, md *metadata.MD) (any, err if !ok { return nil, goagrpc.ErrInvalidType("chatter", "summary", "*chatter.SummaryPayload", v) } - (*md).Append("authorization", payload.Token) + tokenWire := payload.Token + (*md).Append("authorization", tokenWire) return nil, nil } // DecodeSummaryResponse decodes responses from the chatter summary endpoint. func DecodeSummaryResponse(ctx context.Context, v any, hdr, trlr metadata.MD) (any, error) { - var view string - { - if vals := hdr.Get("goa-view"); len(vals) > 0 { - view = vals[0] - } - } return &SummaryClientStream{ stream: v.(chatterpb.Chatter_SummaryClient), - view: view, }, nil } @@ -172,7 +170,8 @@ func EncodeSubscribeRequest(ctx context.Context, v any, md *metadata.MD) (any, e if !ok { return nil, goagrpc.ErrInvalidType("chatter", "subscribe", "*chatter.SubscribePayload", v) } - (*md).Append("authorization", payload.Token) + tokenWire := payload.Token + (*md).Append("authorization", tokenWire) return NewProtoSubscribeRequest(), nil } @@ -205,22 +204,17 @@ func EncodeHistoryRequest(ctx context.Context, v any, md *metadata.MD) (any, err return nil, goagrpc.ErrInvalidType("chatter", "history", "*chatter.HistoryPayload", v) } if payload.View != nil { - (*md).Append("view", *payload.View) + viewWire := *payload.View + (*md).Append("view", viewWire) } - (*md).Append("authorization", payload.Token) + tokenWire := payload.Token + (*md).Append("authorization", tokenWire) return NewProtoHistoryRequest(), nil } // DecodeHistoryResponse decodes responses from the chatter history endpoint. func DecodeHistoryResponse(ctx context.Context, v any, hdr, trlr metadata.MD) (any, error) { - var view string - { - if vals := hdr.Get("goa-view"); len(vals) > 0 { - view = vals[0] - } - } return &HistoryClientStream{ stream: v.(chatterpb.Chatter_HistoryClient), - view: view, }, nil } diff --git a/streaming/gen/grpc/chatter/client/types.go b/streaming/gen/grpc/chatter/client/types.go index 94a1e5da3..1392fa33e 100644 --- a/streaming/gen/grpc/chatter/client/types.go +++ b/streaming/gen/grpc/chatter/client/types.go @@ -14,37 +14,43 @@ import ( goa "goa.design/goa/v3/pkg" ) -// NewProtoLoginRequest builds the gRPC request type from the payload of the -// "login" endpoint of the "chatter" service. +// NewProtoLoginRequest builds *chatterpb.LoginRequest from +// *chatter.LoginPayload. func NewProtoLoginRequest() *chatterpb.LoginRequest { message := &chatterpb.LoginRequest{} return message } -// NewLoginResult builds the result type of the "login" endpoint of the -// "chatter" service from the gRPC response type. +// NewLoginResult builds string from *chatterpb.LoginResponse. func NewLoginResult(message *chatterpb.LoginResponse) string { result := message.Field return result } +// NewEchoerResponseEchoerResponse builds string from *chatterpb.EchoerResponse. func NewEchoerResponseEchoerResponse(v *chatterpb.EchoerResponse) string { result := v.Field return result } +// NewProtoEchoerStreamingRequest builds *chatterpb.EchoerStreamingRequest from +// string. func NewProtoEchoerStreamingRequest(spayload string) *chatterpb.EchoerStreamingRequest { v := &chatterpb.EchoerStreamingRequest{} v.Field = spayload return v } +// NewProtoListenerStreamingRequest builds *chatterpb.ListenerStreamingRequest +// from string. func NewProtoListenerStreamingRequest(spayload string) *chatterpb.ListenerStreamingRequest { v := &chatterpb.ListenerStreamingRequest{} v.Field = spayload return v } +// NewChatSummaryCollectionChatSummaryCollection builds +// chatterviews.ChatSummaryCollectionView from *chatterpb.ChatSummaryCollection. func NewChatSummaryCollectionChatSummaryCollection(v *chatterpb.ChatSummaryCollection) chatterviews.ChatSummaryCollectionView { vresult := make([]*chatterviews.ChatSummaryView, len(v.Field)) for i, val := range v.Field { @@ -60,19 +66,23 @@ func NewChatSummaryCollectionChatSummaryCollection(v *chatterpb.ChatSummaryColle return vresult } +// NewProtoSummaryStreamingRequest builds *chatterpb.SummaryStreamingRequest +// from string. func NewProtoSummaryStreamingRequest(spayload string) *chatterpb.SummaryStreamingRequest { v := &chatterpb.SummaryStreamingRequest{} v.Field = spayload return v } -// NewProtoSubscribeRequest builds the gRPC request type from the payload of -// the "subscribe" endpoint of the "chatter" service. +// NewProtoSubscribeRequest builds *chatterpb.SubscribeRequest from +// *chatter.SubscribePayload. func NewProtoSubscribeRequest() *chatterpb.SubscribeRequest { message := &chatterpb.SubscribeRequest{} return message } +// NewSubscribeResponseEvent builds *chatter.Event from +// *chatterpb.SubscribeResponse. func NewSubscribeResponseEvent(v *chatterpb.SubscribeResponse) *chatter.Event { result := &chatter.Event{ Message: v.Message_, @@ -82,13 +92,15 @@ func NewSubscribeResponseEvent(v *chatterpb.SubscribeResponse) *chatter.Event { return result } -// NewProtoHistoryRequest builds the gRPC request type from the payload of the -// "history" endpoint of the "chatter" service. +// NewProtoHistoryRequest builds *chatterpb.HistoryRequest from +// *chatter.HistoryPayload. func NewProtoHistoryRequest() *chatterpb.HistoryRequest { message := &chatterpb.HistoryRequest{} return message } +// NewHistoryResponseChatSummaryView builds *chatterviews.ChatSummaryView from +// *chatterpb.HistoryResponse. func NewHistoryResponseChatSummaryView(v *chatterpb.HistoryResponse) *chatterviews.ChatSummaryView { vresult := &chatterviews.ChatSummaryView{ Message: &v.Message_, @@ -101,10 +113,19 @@ func NewHistoryResponseChatSummaryView(v *chatterpb.HistoryResponse) *chattervie return vresult } +// NewHistoryResponseChatSummaryViewTiny builds *chatterviews.ChatSummaryView +// from *chatterpb.HistoryResponse. +func NewHistoryResponseChatSummaryViewTiny(v *chatterpb.HistoryResponse) *chatterviews.ChatSummaryView { + vresult := &chatterviews.ChatSummaryView{ + Message: &v.Message_, + } + return vresult +} + // ValidateChatSummaryCollection runs the validations defined on // ChatSummaryCollection. -func ValidateChatSummaryCollection(stream *chatterpb.ChatSummaryCollection) (err error) { - for _, e := range stream.Field { +func ValidateChatSummaryCollection(message *chatterpb.ChatSummaryCollection) (err error) { + for _, e := range message.Field { if e != nil { if err2 := ValidateChatSummary(e); err2 != nil { err = goa.MergeErrors(err, err2) @@ -121,16 +142,16 @@ func ValidateChatSummary(elem *chatterpb.ChatSummary) (err error) { } // ValidateSubscribeResponse runs the validations defined on SubscribeResponse. -func ValidateSubscribeResponse(stream *chatterpb.SubscribeResponse) (err error) { - if !(stream.Action == "added") { - err = goa.MergeErrors(err, goa.InvalidEnumValueError("stream.action", stream.Action, []any{"added"})) +func ValidateSubscribeResponse(message *chatterpb.SubscribeResponse) (err error) { + if !(message.Action == "added") { + err = goa.MergeErrors(err, goa.InvalidEnumValueError("message.action", message.Action, []any{"added"})) } - err = goa.MergeErrors(err, goa.ValidateFormat("stream.added_at", stream.AddedAt, goa.FormatDateTime)) + err = goa.MergeErrors(err, goa.ValidateFormat("message.added_at", message.AddedAt, goa.FormatDateTime)) return } // ValidateHistoryResponse runs the validations defined on HistoryResponse. -func ValidateHistoryResponse(stream *chatterpb.HistoryResponse) (err error) { - err = goa.MergeErrors(err, goa.ValidateFormat("stream.sent_at", stream.SentAt, goa.FormatDateTime)) +func ValidateHistoryResponse(message *chatterpb.HistoryResponse) (err error) { + err = goa.MergeErrors(err, goa.ValidateFormat("message.sent_at", message.SentAt, goa.FormatDateTime)) return } diff --git a/streaming/gen/grpc/chatter/pb/goagen_streaming_chatter.pb.go b/streaming/gen/grpc/chatter/pb/goagen_streaming_chatter.pb.go index f8a5f7150..57714e7e5 100644 --- a/streaming/gen/grpc/chatter/pb/goagen_streaming_chatter.pb.go +++ b/streaming/gen/grpc/chatter/pb/goagen_streaming_chatter.pb.go @@ -7,8 +7,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.36.11 -// protoc v7.34.1 +// protoc-gen-go v1.36.12 +// protoc v7.36.0 // source: goagen_streaming_chatter.proto package chatterpb diff --git a/streaming/gen/grpc/chatter/pb/goagen_streaming_chatter_grpc.pb.go b/streaming/gen/grpc/chatter/pb/goagen_streaming_chatter_grpc.pb.go index 350a5d409..dde451be1 100644 --- a/streaming/gen/grpc/chatter/pb/goagen_streaming_chatter_grpc.pb.go +++ b/streaming/gen/grpc/chatter/pb/goagen_streaming_chatter_grpc.pb.go @@ -8,7 +8,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.6.2 -// - protoc v7.34.1 +// - protoc v7.36.0 // source: goagen_streaming_chatter.proto package chatterpb diff --git a/streaming/gen/grpc/chatter/server/encode_decode.go b/streaming/gen/grpc/chatter/server/encode_decode.go index 18c32c9da..946a97776 100644 --- a/streaming/gen/grpc/chatter/server/encode_decode.go +++ b/streaming/gen/grpc/chatter/server/encode_decode.go @@ -13,6 +13,7 @@ import ( chatter "goa.design/examples/streaming/gen/chatter" chatterviews "goa.design/examples/streaming/gen/chatter/views" + chatterpb "goa.design/examples/streaming/gen/grpc/chatter/pb" goagrpc "goa.design/goa/v3/grpc" goa "goa.design/goa/v3/pkg" "google.golang.org/grpc/metadata" @@ -143,8 +144,8 @@ func EncodeSummaryResponse(ctx context.Context, v any, hdr, trlr *metadata.MD) ( return nil, goagrpc.ErrInvalidType("chatter", "summary", "chatterviews.ChatSummaryCollection", v) } result := vres.Projected - (*hdr).Append("goa-view", vres.View) resp := NewProtoChatSummaryCollection(result) + (*hdr).Append("goa-view", "default") return resp, nil } @@ -225,8 +226,16 @@ func EncodeHistoryResponse(ctx context.Context, v any, hdr, trlr *metadata.MD) ( return nil, goagrpc.ErrInvalidType("chatter", "history", "*chatterviews.ChatSummary", v) } result := vres.Projected + var resp *chatterpb.HistoryResponse + switch vres.View { + case "tiny": + resp = NewProtoHistoryResponseTiny(result) + case "default", "": + resp = NewProtoHistoryResponse(result) + default: + return nil, goa.InvalidEnumValueError("view", vres.View, []any{"tiny", "default"}) + } (*hdr).Append("goa-view", vres.View) - resp := NewProtoHistoryResponse(result) return resp, nil } @@ -242,6 +251,11 @@ func DecodeHistoryRequest(ctx context.Context, v any, md metadata.MD) (any, erro if vals := md.Get("view"); len(vals) > 0 { view = &vals[0] } + if view != nil { + if !(*view == "tiny" || *view == "default") { + err = goa.MergeErrors(err, goa.InvalidEnumValueError("view", *view, []any{"tiny", "default"})) + } + } if vals := md.Get("authorization"); len(vals) == 0 { err = goa.MergeErrors(err, goa.MissingFieldError("authorization", "metadata")) } else { diff --git a/streaming/gen/grpc/chatter/server/server.go b/streaming/gen/grpc/chatter/server/server.go index 333f8c53f..6f5eb450e 100644 --- a/streaming/gen/grpc/chatter/server/server.go +++ b/streaming/gen/grpc/chatter/server/server.go @@ -16,6 +16,7 @@ import ( goagrpc "goa.design/goa/v3/grpc" goa "goa.design/goa/v3/pkg" "google.golang.org/grpc/codes" + "google.golang.org/grpc/metadata" ) // Server implements the chatterpb.ChatterServer interface. @@ -42,7 +43,6 @@ type ListenerServerStream struct { // SummaryServerStream implements the chatter.SummaryServerStream interface. type SummaryServerStream struct { stream chatterpb.Chatter_SummaryServer - view string } // SubscribeServerStream implements the chatter.SubscribeServerStream interface. @@ -54,6 +54,9 @@ type SubscribeServerStream struct { type HistoryServerStream struct { stream chatterpb.Chatter_HistoryServer view string + // sentView is the result view named in the response header. Later sends must + // use the same view. + sentView string } // New instantiates the server struct with the chatter service endpoints. @@ -393,7 +396,7 @@ func (s *ListenerServerStream) Close() error { // "summary" endpoint gRPC stream. func (s *SummaryServerStream) SendAndClose(res chatter.ChatSummaryCollection) error { vres := chatter.NewViewedChatSummaryCollection(res, "default") - v := NewProtoChatSummaryCollectionViewChatSummaryCollection(vres.Projected) + v := NewProtoChatSummaryCollection(vres.Projected) return s.stream.SendAndClose(v) } @@ -424,7 +427,7 @@ func (s *SummaryServerStream) RecvWithContext(ctx context.Context) (string, erro // Send streams instances of "chatterpb.SubscribeResponse" to the "subscribe" // endpoint gRPC stream. func (s *SubscribeServerStream) Send(res *chatter.Event) error { - v := NewProtoEventSubscribeResponse(res) + v := NewProtoSubscribeResponse(res) return s.stream.Send(v) } @@ -442,8 +445,29 @@ func (s *SubscribeServerStream) Close() error { // Send streams instances of "chatterpb.HistoryResponse" to the "history" // endpoint gRPC stream. func (s *HistoryServerStream) Send(res *chatter.ChatSummary) error { - vres := chatter.NewViewedChatSummary(res, s.view) - v := NewProtoChatSummaryViewHistoryResponse(vres.Projected) + view := s.view + if view == "" { + view = "default" + } + if s.sentView != "" && view != s.sentView { + return goa.InvalidEnumValueError("view", view, []any{s.sentView}) + } + vres := chatter.NewViewedChatSummary(res, view) + var v *chatterpb.HistoryResponse + switch view { + case "tiny": + v = NewProtoHistoryResponseTiny(vres.Projected) + case "default", "": + v = NewProtoHistoryResponse(vres.Projected) + default: + return goa.InvalidEnumValueError("view", view, []any{"tiny", "default"}) + } + if s.sentView == "" { + if err := s.stream.SetHeader(metadata.Pairs("goa-view", view)); err != nil { + return err + } + s.sentView = view + } return s.stream.Send(v) } diff --git a/streaming/gen/grpc/chatter/server/types.go b/streaming/gen/grpc/chatter/server/types.go index 66a35a8af..2a953206e 100644 --- a/streaming/gen/grpc/chatter/server/types.go +++ b/streaming/gen/grpc/chatter/server/types.go @@ -13,8 +13,7 @@ import ( chatterpb "goa.design/examples/streaming/gen/grpc/chatter/pb" ) -// NewLoginPayload builds the payload of the "login" endpoint of the "chatter" -// service from the gRPC request type. +// NewLoginPayload builds *chatter.LoginPayload from metadata values. func NewLoginPayload(user string, password string) *chatter.LoginPayload { v := &chatter.LoginPayload{} v.User = user @@ -22,65 +21,64 @@ func NewLoginPayload(user string, password string) *chatter.LoginPayload { return v } -// NewProtoLoginResponse builds the gRPC response type from the result of the -// "login" endpoint of the "chatter" service. +// NewProtoLoginResponse builds *chatterpb.LoginResponse from string. func NewProtoLoginResponse(result string) *chatterpb.LoginResponse { message := &chatterpb.LoginResponse{} message.Field = result return message } -// NewEchoerPayload builds the payload of the "echoer" endpoint of the -// "chatter" service from the gRPC request type. +// NewEchoerPayload builds *chatter.EchoerPayload from metadata values. func NewEchoerPayload(token string) *chatter.EchoerPayload { v := &chatter.EchoerPayload{} v.Token = token return v } -// NewProtoEchoerResponse builds the gRPC response type from the result of the -// "echoer" endpoint of the "chatter" service. +// NewProtoEchoerResponse builds *chatterpb.EchoerResponse from string. func NewProtoEchoerResponse(result string) *chatterpb.EchoerResponse { message := &chatterpb.EchoerResponse{} message.Field = result return message } +// NewEchoerStreamingRequestEchoerStreamingRequest builds string from +// *chatterpb.EchoerStreamingRequest. func NewEchoerStreamingRequestEchoerStreamingRequest(v *chatterpb.EchoerStreamingRequest) string { spayload := v.Field return spayload } -// NewListenerPayload builds the payload of the "listener" endpoint of the -// "chatter" service from the gRPC request type. +// NewListenerPayload builds *chatter.ListenerPayload from metadata values. func NewListenerPayload(token string) *chatter.ListenerPayload { v := &chatter.ListenerPayload{} v.Token = token return v } -// NewProtoListenerResponse builds the gRPC response type from the result of -// the "listener" endpoint of the "chatter" service. +// NewProtoListenerResponse builds *chatterpb.ListenerResponse from metadata +// values. func NewProtoListenerResponse() *chatterpb.ListenerResponse { message := &chatterpb.ListenerResponse{} return message } +// NewListenerStreamingRequestListenerStreamingRequest builds string from +// *chatterpb.ListenerStreamingRequest. func NewListenerStreamingRequestListenerStreamingRequest(v *chatterpb.ListenerStreamingRequest) string { spayload := v.Field return spayload } -// NewSummaryPayload builds the payload of the "summary" endpoint of the -// "chatter" service from the gRPC request type. +// NewSummaryPayload builds *chatter.SummaryPayload from metadata values. func NewSummaryPayload(token string) *chatter.SummaryPayload { v := &chatter.SummaryPayload{} v.Token = token return v } -// NewProtoChatSummaryCollection builds the gRPC response type from the result -// of the "summary" endpoint of the "chatter" service. +// NewProtoChatSummaryCollection builds *chatterpb.ChatSummaryCollection from +// chatterviews.ChatSummaryCollectionView. func NewProtoChatSummaryCollection(result chatterviews.ChatSummaryCollectionView) *chatterpb.ChatSummaryCollection { message := &chatterpb.ChatSummaryCollection{} message.Field = make([]*chatterpb.ChatSummary, len(result)) @@ -97,37 +95,22 @@ func NewProtoChatSummaryCollection(result chatterviews.ChatSummaryCollectionView return message } -func NewProtoChatSummaryCollectionViewChatSummaryCollection(vresult chatterviews.ChatSummaryCollectionView) *chatterpb.ChatSummaryCollection { - v := &chatterpb.ChatSummaryCollection{} - v.Field = make([]*chatterpb.ChatSummary, len(vresult)) - for i, val := range vresult { - v.Field[i] = &chatterpb.ChatSummary{ - Message_: *val.Message, - SentAt: *val.SentAt, - } - if val.Length != nil { - length := int32(*val.Length) - v.Field[i].Length = &length - } - } - return v -} - +// NewSummaryStreamingRequestSummaryStreamingRequest builds string from +// *chatterpb.SummaryStreamingRequest. func NewSummaryStreamingRequestSummaryStreamingRequest(v *chatterpb.SummaryStreamingRequest) string { spayload := v.Field return spayload } -// NewSubscribePayload builds the payload of the "subscribe" endpoint of the -// "chatter" service from the gRPC request type. +// NewSubscribePayload builds *chatter.SubscribePayload from metadata values. func NewSubscribePayload(token string) *chatter.SubscribePayload { v := &chatter.SubscribePayload{} v.Token = token return v } -// NewProtoSubscribeResponse builds the gRPC response type from the result of -// the "subscribe" endpoint of the "chatter" service. +// NewProtoSubscribeResponse builds *chatterpb.SubscribeResponse from +// *chatter.Event. func NewProtoSubscribeResponse(result *chatter.Event) *chatterpb.SubscribeResponse { message := &chatterpb.SubscribeResponse{ Message_: result.Message, @@ -137,26 +120,20 @@ func NewProtoSubscribeResponse(result *chatter.Event) *chatterpb.SubscribeRespon return message } -func NewProtoEventSubscribeResponse(result *chatter.Event) *chatterpb.SubscribeResponse { - v := &chatterpb.SubscribeResponse{ - Message_: result.Message, - Action: result.Action, - AddedAt: result.AddedAt, - } - return v -} - -// NewHistoryPayload builds the payload of the "history" endpoint of the -// "chatter" service from the gRPC request type. +// NewHistoryPayload builds *chatter.HistoryPayload from metadata values. func NewHistoryPayload(view *string, token string) *chatter.HistoryPayload { v := &chatter.HistoryPayload{} - v.View = view + if view != nil { + viewService := *view + v.View = &viewService + } + v.Token = token return v } -// NewProtoHistoryResponse builds the gRPC response type from the result of the -// "history" endpoint of the "chatter" service. +// NewProtoHistoryResponse builds *chatterpb.HistoryResponse from +// *chatterviews.ChatSummaryView. func NewProtoHistoryResponse(result *chatterviews.ChatSummaryView) *chatterpb.HistoryResponse { message := &chatterpb.HistoryResponse{ Message_: *result.Message, @@ -169,14 +146,11 @@ func NewProtoHistoryResponse(result *chatterviews.ChatSummaryView) *chatterpb.Hi return message } -func NewProtoChatSummaryViewHistoryResponse(vresult *chatterviews.ChatSummaryView) *chatterpb.HistoryResponse { - v := &chatterpb.HistoryResponse{ - Message_: *vresult.Message, - SentAt: *vresult.SentAt, - } - if vresult.Length != nil { - length := int32(*vresult.Length) - v.Length = &length +// NewProtoHistoryResponseTiny builds *chatterpb.HistoryResponse from +// *chatterviews.ChatSummaryView. +func NewProtoHistoryResponseTiny(result *chatterviews.ChatSummaryView) *chatterpb.HistoryResponse { + message := &chatterpb.HistoryResponse{ + Message_: *result.Message, } - return v + return message } diff --git a/streaming/gen/grpc/cli/chatter/cli.go b/streaming/gen/grpc/cli/chatter/cli.go index 0d3e20078..29c13c835 100644 --- a/streaming/gen/grpc/cli/chatter/cli.go +++ b/streaming/gen/grpc/cli/chatter/cli.go @@ -224,7 +224,7 @@ func chatterEchoerUsage() { fmt.Fprintln(os.Stderr) fmt.Fprintln(os.Stderr, "Example:") - fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "chatter echoer --token \"Impedit sunt atque delectus dicta ut numquam.\"") + fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "chatter echoer --token \"Quasi facilis nulla et.\"") } func chatterListenerUsage() { @@ -242,7 +242,7 @@ func chatterListenerUsage() { fmt.Fprintln(os.Stderr) fmt.Fprintln(os.Stderr, "Example:") - fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "chatter listener --token \"Assumenda eos.\"") + fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "chatter listener --token \"Nam vitae quia est quibusdam amet eius.\"") } func chatterSummaryUsage() { @@ -260,7 +260,7 @@ func chatterSummaryUsage() { fmt.Fprintln(os.Stderr) fmt.Fprintln(os.Stderr, "Example:") - fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "chatter summary --token \"Officiis sit consectetur sunt.\"") + fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "chatter summary --token \"Recusandae ullam.\"") } func chatterSubscribeUsage() { @@ -278,7 +278,7 @@ func chatterSubscribeUsage() { fmt.Fprintln(os.Stderr) fmt.Fprintln(os.Stderr, "Example:") - fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "chatter subscribe --token \"Sed commodi.\"") + fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "chatter subscribe --token \"Et repudiandae rerum quas dolor.\"") } func chatterHistoryUsage() { @@ -298,5 +298,5 @@ func chatterHistoryUsage() { fmt.Fprintln(os.Stderr) fmt.Fprintln(os.Stderr, "Example:") - fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "chatter history --view \"Velit similique quia eum quasi assumenda.\" --token \"Sunt adipisci aliquid animi ipsa.\"") + fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "chatter history --view \"default\" --token \"Aut ut.\"") } diff --git a/streaming/gen/http/chatter/client/cli.go b/streaming/gen/http/chatter/client/cli.go index 3db212ee5..ef0b4c68d 100644 --- a/streaming/gen/http/chatter/client/cli.go +++ b/streaming/gen/http/chatter/client/cli.go @@ -9,6 +9,7 @@ package client import ( chatter "goa.design/examples/streaming/gen/chatter" + goa "goa.design/goa/v3/pkg" ) // BuildLoginPayload builds the payload for the chatter login endpoint from CLI @@ -84,10 +85,17 @@ func BuildSubscribePayload(chatterSubscribeToken string) (*chatter.SubscribePayl // BuildHistoryPayload builds the payload for the chatter history endpoint from // CLI flags. func BuildHistoryPayload(chatterHistoryView string, chatterHistoryToken string) (*chatter.HistoryPayload, error) { + var err error var view *string { if chatterHistoryView != "" { view = &chatterHistoryView + if !(chatterHistoryView == "tiny" || chatterHistoryView == "default") { + err = goa.MergeErrors(err, goa.InvalidEnumValueError("view", chatterHistoryView, []any{"tiny", "default"})) + } + if err != nil { + return nil, err + } } } var token string diff --git a/streaming/gen/http/chatter/client/encode_decode.go b/streaming/gen/http/chatter/client/encode_decode.go index 83daea628..0d15526a5 100644 --- a/streaming/gen/http/chatter/client/encode_decode.go +++ b/streaming/gen/http/chatter/client/encode_decode.go @@ -10,6 +10,7 @@ package client import ( "bytes" "context" + "errors" "io" "net/http" "net/url" @@ -55,18 +56,24 @@ func EncodeLoginRequest(encoder func(*http.Request) goahttp.Encoder) func(*http. // - "unauthorized" (type chatter.Unauthorized): http.StatusUnauthorized // - error: internal error func DecodeLoginResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (any, error) { - return func(resp *http.Response) (any, error) { + return func(resp *http.Response) (result any, decodeErr error) { + responseBody := resp.Body if restoreBody { - b, err := io.ReadAll(resp.Body) - if err != nil { - return nil, err + b, readErr := io.ReadAll(responseBody) + closeErr := responseBody.Close() + if err := errors.Join(readErr, closeErr); err != nil { + return nil, goahttp.ErrDecodingError("chatter", "login", err) } resp.Body = io.NopCloser(bytes.NewBuffer(b)) defer func() { resp.Body = io.NopCloser(bytes.NewBuffer(b)) }() } else { - defer resp.Body.Close() + defer func() { + if err := responseBody.Close(); err != nil { + decodeErr = errors.Join(decodeErr, goahttp.ErrDecodingError("chatter", "login", err)) + } + }() } switch resp.StatusCode { case http.StatusOK: @@ -90,7 +97,10 @@ func DecodeLoginResponse(decoder func(*http.Response) goahttp.Decoder, restoreBo } return nil, NewLoginUnauthorized(body) default: - body, _ := io.ReadAll(resp.Body) + body, err := io.ReadAll(resp.Body) + if err != nil { + return nil, goahttp.ErrDecodingError("chatter", "login", err) + } return nil, goahttp.ErrInvalidResponse("chatter", "login", resp.StatusCode, string(body)) } } @@ -146,18 +156,24 @@ func EncodeEchoerRequest(encoder func(*http.Request) goahttp.Encoder) func(*http // - "unauthorized" (type chatter.Unauthorized): http.StatusUnauthorized // - error: internal error func DecodeEchoerResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (any, error) { - return func(resp *http.Response) (any, error) { + return func(resp *http.Response) (result any, decodeErr error) { + responseBody := resp.Body if restoreBody { - b, err := io.ReadAll(resp.Body) - if err != nil { - return nil, err + b, readErr := io.ReadAll(responseBody) + closeErr := responseBody.Close() + if err := errors.Join(readErr, closeErr); err != nil { + return nil, goahttp.ErrDecodingError("chatter", "echoer", err) } resp.Body = io.NopCloser(bytes.NewBuffer(b)) defer func() { resp.Body = io.NopCloser(bytes.NewBuffer(b)) }() } else { - defer resp.Body.Close() + defer func() { + if err := responseBody.Close(); err != nil { + decodeErr = errors.Join(decodeErr, goahttp.ErrDecodingError("chatter", "echoer", err)) + } + }() } switch resp.StatusCode { case http.StatusOK: @@ -191,7 +207,10 @@ func DecodeEchoerResponse(decoder func(*http.Response) goahttp.Decoder, restoreB } return nil, NewEchoerUnauthorized(body) default: - body, _ := io.ReadAll(resp.Body) + body, err := io.ReadAll(resp.Body) + if err != nil { + return nil, goahttp.ErrDecodingError("chatter", "echoer", err) + } return nil, goahttp.ErrInvalidResponse("chatter", "echoer", resp.StatusCode, string(body)) } } @@ -247,18 +266,24 @@ func EncodeListenerRequest(encoder func(*http.Request) goahttp.Encoder) func(*ht // - "unauthorized" (type chatter.Unauthorized): http.StatusUnauthorized // - error: internal error func DecodeListenerResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (any, error) { - return func(resp *http.Response) (any, error) { + return func(resp *http.Response) (result any, decodeErr error) { + responseBody := resp.Body if restoreBody { - b, err := io.ReadAll(resp.Body) - if err != nil { - return nil, err + b, readErr := io.ReadAll(responseBody) + closeErr := responseBody.Close() + if err := errors.Join(readErr, closeErr); err != nil { + return nil, goahttp.ErrDecodingError("chatter", "listener", err) } resp.Body = io.NopCloser(bytes.NewBuffer(b)) defer func() { resp.Body = io.NopCloser(bytes.NewBuffer(b)) }() } else { - defer resp.Body.Close() + defer func() { + if err := responseBody.Close(); err != nil { + decodeErr = errors.Join(decodeErr, goahttp.ErrDecodingError("chatter", "listener", err)) + } + }() } switch resp.StatusCode { case http.StatusOK: @@ -284,7 +309,10 @@ func DecodeListenerResponse(decoder func(*http.Response) goahttp.Decoder, restor } return nil, NewListenerUnauthorized(body) default: - body, _ := io.ReadAll(resp.Body) + body, err := io.ReadAll(resp.Body) + if err != nil { + return nil, goahttp.ErrDecodingError("chatter", "listener", err) + } return nil, goahttp.ErrInvalidResponse("chatter", "listener", resp.StatusCode, string(body)) } } @@ -340,18 +368,24 @@ func EncodeSummaryRequest(encoder func(*http.Request) goahttp.Encoder) func(*htt // - "unauthorized" (type chatter.Unauthorized): http.StatusUnauthorized // - error: internal error func DecodeSummaryResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (any, error) { - return func(resp *http.Response) (any, error) { + return func(resp *http.Response) (result any, decodeErr error) { + responseBody := resp.Body if restoreBody { - b, err := io.ReadAll(resp.Body) - if err != nil { - return nil, err + b, readErr := io.ReadAll(responseBody) + closeErr := responseBody.Close() + if err := errors.Join(readErr, closeErr); err != nil { + return nil, goahttp.ErrDecodingError("chatter", "summary", err) } resp.Body = io.NopCloser(bytes.NewBuffer(b)) defer func() { resp.Body = io.NopCloser(bytes.NewBuffer(b)) }() } else { - defer resp.Body.Close() + defer func() { + if err := responseBody.Close(); err != nil { + decodeErr = errors.Join(decodeErr, goahttp.ErrDecodingError("chatter", "summary", err)) + } + }() } switch resp.StatusCode { case http.StatusOK: @@ -392,7 +426,10 @@ func DecodeSummaryResponse(decoder func(*http.Response) goahttp.Decoder, restore } return nil, NewSummaryUnauthorized(body) default: - body, _ := io.ReadAll(resp.Body) + body, err := io.ReadAll(resp.Body) + if err != nil { + return nil, goahttp.ErrDecodingError("chatter", "summary", err) + } return nil, goahttp.ErrInvalidResponse("chatter", "summary", resp.StatusCode, string(body)) } } @@ -448,18 +485,24 @@ func EncodeSubscribeRequest(encoder func(*http.Request) goahttp.Encoder) func(*h // - "unauthorized" (type chatter.Unauthorized): http.StatusUnauthorized // - error: internal error func DecodeSubscribeResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (any, error) { - return func(resp *http.Response) (any, error) { + return func(resp *http.Response) (result any, decodeErr error) { + responseBody := resp.Body if restoreBody { - b, err := io.ReadAll(resp.Body) - if err != nil { - return nil, err + b, readErr := io.ReadAll(responseBody) + closeErr := responseBody.Close() + if err := errors.Join(readErr, closeErr); err != nil { + return nil, goahttp.ErrDecodingError("chatter", "subscribe", err) } resp.Body = io.NopCloser(bytes.NewBuffer(b)) defer func() { resp.Body = io.NopCloser(bytes.NewBuffer(b)) }() } else { - defer resp.Body.Close() + defer func() { + if err := responseBody.Close(); err != nil { + decodeErr = errors.Join(decodeErr, goahttp.ErrDecodingError("chatter", "subscribe", err)) + } + }() } switch resp.StatusCode { case http.StatusOK: @@ -498,7 +541,10 @@ func DecodeSubscribeResponse(decoder func(*http.Response) goahttp.Decoder, resto } return nil, NewSubscribeUnauthorized(body) default: - body, _ := io.ReadAll(resp.Body) + body, err := io.ReadAll(resp.Body) + if err != nil { + return nil, goahttp.ErrDecodingError("chatter", "subscribe", err) + } return nil, goahttp.ErrInvalidResponse("chatter", "subscribe", resp.StatusCode, string(body)) } } @@ -559,18 +605,24 @@ func EncodeHistoryRequest(encoder func(*http.Request) goahttp.Encoder) func(*htt // - "unauthorized" (type chatter.Unauthorized): http.StatusUnauthorized // - error: internal error func DecodeHistoryResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (any, error) { - return func(resp *http.Response) (any, error) { + return func(resp *http.Response) (result any, decodeErr error) { + responseBody := resp.Body if restoreBody { - b, err := io.ReadAll(resp.Body) - if err != nil { - return nil, err + b, readErr := io.ReadAll(responseBody) + closeErr := responseBody.Close() + if err := errors.Join(readErr, closeErr); err != nil { + return nil, goahttp.ErrDecodingError("chatter", "history", err) } resp.Body = io.NopCloser(bytes.NewBuffer(b)) defer func() { resp.Body = io.NopCloser(bytes.NewBuffer(b)) }() } else { - defer resp.Body.Close() + defer func() { + if err := responseBody.Close(); err != nil { + decodeErr = errors.Join(decodeErr, goahttp.ErrDecodingError("chatter", "history", err)) + } + }() } switch resp.StatusCode { case http.StatusOK: @@ -611,7 +663,10 @@ func DecodeHistoryResponse(decoder func(*http.Response) goahttp.Decoder, restore } return nil, NewHistoryUnauthorized(body) default: - body, _ := io.ReadAll(resp.Body) + body, err := io.ReadAll(resp.Body) + if err != nil { + return nil, goahttp.ErrDecodingError("chatter", "history", err) + } return nil, goahttp.ErrInvalidResponse("chatter", "history", resp.StatusCode, string(body)) } } diff --git a/streaming/gen/http/chatter/client/types.go b/streaming/gen/http/chatter/client/types.go index 7f4b76e59..4f9b8c1c2 100644 --- a/streaming/gen/http/chatter/client/types.go +++ b/streaming/gen/http/chatter/client/types.go @@ -198,8 +198,7 @@ func ValidateSubscribeResponseBody(body *SubscribeResponseBody) (err error) { return } -// ValidateChatSummaryResponse runs the validations defined on -// ChatSummaryResponse +// ValidateChatSummaryResponse runs the validations defined on ChatSummary func ValidateChatSummaryResponse(body *ChatSummaryResponse) (err error) { if body.Message == nil { err = goa.MergeErrors(err, goa.MissingFieldError("message", "body")) diff --git a/streaming/gen/http/chatter/server/encode_decode.go b/streaming/gen/http/chatter/server/encode_decode.go index b3c7cecf0..3ee57c634 100644 --- a/streaming/gen/http/chatter/server/encode_decode.go +++ b/streaming/gen/http/chatter/server/encode_decode.go @@ -322,6 +322,11 @@ func DecodeHistoryRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp if viewRaw != "" { view = &viewRaw } + if view != nil { + if !(*view == "tiny" || *view == "default") { + err = goa.MergeErrors(err, goa.InvalidEnumValueError("view", *view, []any{"tiny", "default"})) + } + } token = r.Header.Get("Authorization") if token == "" { err = goa.MergeErrors(err, goa.MissingFieldError("token", "header")) diff --git a/streaming/gen/http/chatter/server/websocket.go b/streaming/gen/http/chatter/server/websocket.go index e3ffe22be..e2d03d865 100644 --- a/streaming/gen/http/chatter/server/websocket.go +++ b/streaming/gen/http/chatter/server/websocket.go @@ -17,6 +17,7 @@ import ( "github.com/gorilla/websocket" chatter "goa.design/examples/streaming/gen/chatter" goahttp "goa.design/goa/v3/http" + goa "goa.design/goa/v3/pkg" ) // ConnConfigurer holds the websocket connection configurer functions for the @@ -130,6 +131,9 @@ type HistoryServerStream struct { // view is the view to render chatter.ChatSummary result type before sending to // the websocket connection. view string + // sentView is the result view named during the WebSocket upgrade. Later sends + // must use the same view. + sentView string } // NewConnConfigurer initializes the websocket connection configurer function @@ -399,13 +403,26 @@ func (s *SubscribeServerStream) Close() error { // Send streams instances of "chatter.ChatSummary" to the "history" endpoint // websocket connection. func (s *HistoryServerStream) Send(v *chatter.ChatSummary) error { + view := s.view + if view == "" { + view = "default" + } + if s.sentView != "" && view != s.sentView { + return goa.InvalidEnumValueError("view", view, []any{s.sentView}) + } + switch view { + case "tiny": + case "default": + default: + return goa.InvalidEnumValueError("view", view, []any{"tiny", "default"}) + } var err error // Upgrade the HTTP connection to a websocket connection only once. Connection // upgrade is done here so that authorization logic in the endpoint is executed // before calling the actual service method which may call Send(). s.once.Do(func() { respHdr := make(http.Header) - respHdr.Add("goa-view", s.view) + respHdr.Add("goa-view", view) var conn *websocket.Conn conn, err = s.upgrader.Upgrade(s.w, s.r, respHdr) if err != nil { @@ -420,15 +437,19 @@ func (s *HistoryServerStream) Send(v *chatter.ChatSummary) error { if s.upgradeErr != nil { return s.upgradeErr } - res := chatter.NewViewedChatSummary(v, s.view) - var body any - switch s.view { + if s.sentView == "" { + s.sentView = view + } + switch view { case "tiny": - body = NewHistoryResponseBodyTiny(res.Projected) + res := chatter.NewViewedChatSummary(v, "tiny") + return s.conn.WriteJSON(NewHistoryResponseBodyTiny(res.Projected)) case "default", "": - body = NewHistoryResponseBody(res.Projected) + res := chatter.NewViewedChatSummary(v, "default") + return s.conn.WriteJSON(NewHistoryResponseBody(res.Projected)) + default: + return goa.InvalidEnumValueError("view", view, []any{"tiny", "default"}) } - return s.conn.WriteJSON(body) } // SendWithContext streams instances of "chatter.ChatSummary" to the "history" diff --git a/streaming/gen/http/cli/chatter/cli.go b/streaming/gen/http/cli/chatter/cli.go index 1c227e629..58e14ce0f 100644 --- a/streaming/gen/http/cli/chatter/cli.go +++ b/streaming/gen/http/cli/chatter/cli.go @@ -230,7 +230,7 @@ func chatterEchoerUsage() { fmt.Fprintln(os.Stderr) fmt.Fprintln(os.Stderr, "Example:") - fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "chatter echoer --token \"Impedit sunt atque delectus dicta ut numquam.\"") + fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "chatter echoer --token \"Quasi facilis nulla et.\"") } func chatterListenerUsage() { @@ -248,7 +248,7 @@ func chatterListenerUsage() { fmt.Fprintln(os.Stderr) fmt.Fprintln(os.Stderr, "Example:") - fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "chatter listener --token \"Assumenda eos.\"") + fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "chatter listener --token \"Nam vitae quia est quibusdam amet eius.\"") } func chatterSummaryUsage() { @@ -266,7 +266,7 @@ func chatterSummaryUsage() { fmt.Fprintln(os.Stderr) fmt.Fprintln(os.Stderr, "Example:") - fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "chatter summary --token \"Officiis sit consectetur sunt.\"") + fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "chatter summary --token \"Recusandae ullam.\"") } func chatterSubscribeUsage() { @@ -284,7 +284,7 @@ func chatterSubscribeUsage() { fmt.Fprintln(os.Stderr) fmt.Fprintln(os.Stderr, "Example:") - fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "chatter subscribe --token \"Sed commodi.\"") + fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "chatter subscribe --token \"Et repudiandae rerum quas dolor.\"") } func chatterHistoryUsage() { @@ -304,5 +304,5 @@ func chatterHistoryUsage() { fmt.Fprintln(os.Stderr) fmt.Fprintln(os.Stderr, "Example:") - fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "chatter history --view \"Velit similique quia eum quasi assumenda.\" --token \"Sunt adipisci aliquid animi ipsa.\"") + fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "chatter history --view \"default\" --token \"Aut ut.\"") } diff --git a/streaming/gen/http/openapi.json b/streaming/gen/http/openapi.json index ca30e608e..5da681d38 100644 --- a/streaming/gen/http/openapi.json +++ b/streaming/gen/http/openapi.json @@ -1 +1 @@ -{"swagger":"2.0","info":{"title":"Chatter service describing the streaming features of goa v2.","version":"0.0.1"},"host":"localhost:80","consumes":["application/json","application/xml","application/gob"],"produces":["application/json","application/xml","application/gob"],"paths":{"/echoer":{"get":{"tags":["chatter"],"summary":"echoer chatter","description":"Echoes the message sent by the client.\n\n**Required security scopes for jwt**:\n * `stream:write`","operationId":"chatter#echoer","responses":{"101":{"description":"Switching Protocols response.","schema":{"type":"string"}},"401":{"description":"Unauthorized response.","schema":{"type":"string"}},"403":{"description":"Forbidden response.","schema":{"type":"string"}}},"schemes":["ws"],"security":[{"jwt_header_Authorization":null}]}},"/history":{"get":{"tags":["chatter"],"summary":"history chatter","description":"Returns the chat messages sent to the server.\n\n**Required security scopes for jwt**:\n * `stream:read`","operationId":"chatter#history","parameters":[{"name":"view","in":"query","description":"View to use to render the result","required":false,"type":"string"}],"responses":{"101":{"description":"Switching Protocols response.","schema":{"$ref":"#/definitions/GoaSummary"}},"401":{"description":"Unauthorized response.","schema":{"type":"string"}},"403":{"description":"Forbidden response.","schema":{"type":"string"}}},"schemes":["ws"],"security":[{"jwt_header_Authorization":null}]}},"/listener":{"get":{"tags":["chatter"],"summary":"listener chatter","description":"Listens to the messages sent by the client.\n\n**Required security scopes for jwt**:\n * `stream:write`","operationId":"chatter#listener","responses":{"101":{"description":"Switching Protocols response."},"401":{"description":"Unauthorized response.","schema":{"type":"string"}},"403":{"description":"Forbidden response.","schema":{"type":"string"}}},"schemes":["ws"],"security":[{"jwt_header_Authorization":null}]}},"/login":{"post":{"tags":["chatter"],"summary":"login chatter","description":"Creates a valid JWT token for auth to chat.","operationId":"chatter#login","responses":{"200":{"description":"OK response.","schema":{"type":"string"}},"401":{"description":"Unauthorized response.","schema":{"type":"string"}}},"schemes":["http"],"security":[{"basic_header_Authorization":null}]}},"/subscribe":{"get":{"tags":["chatter"],"summary":"subscribe chatter","description":"Subscribe to events sent when new chat messages are added.\n\n**Required security scopes for jwt**:\n * `stream:write`","operationId":"chatter#subscribe","responses":{"101":{"description":"Switching Protocols response.","schema":{"$ref":"#/definitions/Event","required":["message","action","added_at"]}},"401":{"description":"Unauthorized response.","schema":{"type":"string"}},"403":{"description":"Forbidden response.","schema":{"type":"string"}}},"schemes":["ws"],"security":[{"jwt_header_Authorization":null}]}},"/summary":{"get":{"tags":["chatter"],"summary":"summary chatter","description":"Summarizes the chat messages sent by the client.\n\n**Required security scopes for jwt**:\n * `stream:write`","operationId":"chatter#summary","responses":{"101":{"description":"Switching Protocols response.","schema":{"$ref":"#/definitions/ChatterChatSummaryResponseCollection"}},"401":{"description":"Unauthorized response.","schema":{"type":"string"}},"403":{"description":"Forbidden response.","schema":{"type":"string"}}},"schemes":["ws"],"security":[{"jwt_header_Authorization":null}]}}},"definitions":{"ChatSummaryResponse":{"title":"Mediatype identifier: application/vnd.goa.summary; view=default","type":"object","properties":{"length":{"type":"integer","description":"Length of the message sent","example":6974027342252250665,"format":"int64"},"message":{"type":"string","description":"Message sent to the server","example":"Porro velit."},"sent_at":{"type":"string","description":"Time at which the message was sent","example":"1997-08-20T21:13:26Z","format":"date-time"}},"description":"ChatSummaryResponse result type (default view)","example":{"length":6974027342252250665,"message":"Porro velit.","sent_at":"1997-08-20T21:13:26Z"},"required":["message","sent_at"]},"ChatterChatSummaryResponseCollection":{"title":"Mediatype identifier: application/vnd.goa.summary; type=collection; view=default","type":"array","items":{"$ref":"#/definitions/ChatSummaryResponse"},"description":"SummaryResponseBody is the result type for an array of ChatSummaryResponse (default view)","example":[{"length":6974027342252250665,"message":"Porro velit.","sent_at":"1997-08-20T21:13:26Z"},{"length":6974027342252250665,"message":"Porro velit.","sent_at":"1997-08-20T21:13:26Z"},{"length":6974027342252250665,"message":"Porro velit.","sent_at":"1997-08-20T21:13:26Z"}]},"Event":{"title":"Event","type":"object","properties":{"action":{"type":"string","example":"added","enum":["added"]},"added_at":{"type":"string","description":"Time at which the message was added","example":"2012-03-23T20:03:18Z","format":"date-time"},"message":{"type":"string","description":"Message sent to the server","example":"Nostrum quia asperiores et sint deleniti cumque."}},"example":{"action":"added","added_at":"2012-03-23T20:03:18Z","message":"Nostrum quia asperiores et sint deleniti cumque."},"required":["message","action","added_at"]},"GoaSummary":{"title":"Mediatype identifier: application/vnd.goa.summary; view=default","type":"object","properties":{"length":{"type":"integer","description":"Length of the message sent","example":6974027342252250665,"format":"int64"},"message":{"type":"string","description":"Message sent to the server","example":"Porro velit."},"sent_at":{"type":"string","description":"Time at which the message was sent","example":"1997-08-20T21:13:26Z","format":"date-time"}},"description":"HistoryResponseBody result type (default view)","example":{"length":6974027342252250665,"message":"Porro velit.","sent_at":"1997-08-20T21:13:26Z"},"required":["message","sent_at"]}},"securityDefinitions":{"basic_header_Authorization":{"type":"basic","description":"Secures the login endpoint."},"jwt_header_Authorization":{"type":"apiKey","description":"Secures endpoint by requiring a valid JWT token. Supports scopes \"stream:read\" and \"stream:write\".\n\n**Security Scopes**:\n * `stream:read`: Read-only access\n * `stream:write`: Read and write access","name":"Authorization","in":"header"}}} \ No newline at end of file +{"swagger":"2.0","info":{"title":"Chatter service describing the streaming features of goa v2.","version":"0.0.1"},"host":"localhost:80","consumes":["application/json","application/xml","application/gob"],"produces":["application/json","application/xml","application/gob"],"paths":{"/echoer":{"get":{"tags":["chatter"],"summary":"echoer chatter","description":"Echoes the message sent by the client.\n\n**Required security scopes for jwt**:\n * `stream:write`","operationId":"chatter#echoer","responses":{"101":{"description":"Switching Protocols response.","schema":{"type":"string"}},"401":{"description":"unauthorized: Unauthorized response.","schema":{"type":"string"}},"403":{"description":"invalid-scopes: Forbidden response.","schema":{"type":"string"}}},"schemes":["ws"],"security":[{"jwt_header_Authorization":null}]}},"/history":{"get":{"tags":["chatter"],"summary":"history chatter","description":"Returns the chat messages sent to the server.\n\n**Required security scopes for jwt**:\n * `stream:read`","operationId":"chatter#history","parameters":[{"name":"view","in":"query","description":"View to use to render the result","required":false,"type":"string","enum":["tiny","default"]}],"responses":{"101":{"description":"Switching Protocols response.","schema":{"$ref":"#/definitions/GoaSummary"}},"401":{"description":"unauthorized: Unauthorized response.","schema":{"type":"string"}},"403":{"description":"invalid-scopes: Forbidden response.","schema":{"type":"string"}}},"schemes":["ws"],"security":[{"jwt_header_Authorization":null}]}},"/listener":{"get":{"tags":["chatter"],"summary":"listener chatter","description":"Listens to the messages sent by the client.\n\n**Required security scopes for jwt**:\n * `stream:write`","operationId":"chatter#listener","responses":{"101":{"description":"Switching Protocols response."},"401":{"description":"unauthorized: Unauthorized response.","schema":{"type":"string"}},"403":{"description":"invalid-scopes: Forbidden response.","schema":{"type":"string"}}},"schemes":["ws"],"security":[{"jwt_header_Authorization":null}]}},"/login":{"post":{"tags":["chatter"],"summary":"login chatter","description":"Creates a valid JWT token for auth to chat.","operationId":"chatter#login","responses":{"200":{"description":"OK response.","schema":{"type":"string"}},"401":{"description":"unauthorized: Unauthorized response.","schema":{"type":"string"}}},"schemes":["http"],"security":[{"basic_header_Authorization":null}]}},"/subscribe":{"get":{"tags":["chatter"],"summary":"subscribe chatter","description":"Subscribe to events sent when new chat messages are added.\n\n**Required security scopes for jwt**:\n * `stream:write`","operationId":"chatter#subscribe","responses":{"101":{"description":"Switching Protocols response.","schema":{"$ref":"#/definitions/Event","required":["message","action","added_at"]}},"401":{"description":"unauthorized: Unauthorized response.","schema":{"type":"string"}},"403":{"description":"invalid-scopes: Forbidden response.","schema":{"type":"string"}}},"schemes":["ws"],"security":[{"jwt_header_Authorization":null}]}},"/summary":{"get":{"tags":["chatter"],"summary":"summary chatter","description":"Summarizes the chat messages sent by the client.\n\n**Required security scopes for jwt**:\n * `stream:write`","operationId":"chatter#summary","responses":{"101":{"description":"Switching Protocols response.","schema":{"$ref":"#/definitions/ChatterChatSummaryResponseCollection"}},"401":{"description":"unauthorized: Unauthorized response.","schema":{"type":"string"}},"403":{"description":"invalid-scopes: Forbidden response.","schema":{"type":"string"}}},"schemes":["ws"],"security":[{"jwt_header_Authorization":null}]}}},"definitions":{"ChatSummaryResponse":{"title":"Mediatype identifier: application/vnd.goa.summary; view=default","type":"object","properties":{"length":{"type":"integer","description":"Length of the message sent","example":6468000556522877742,"format":"int64"},"message":{"type":"string","description":"Message sent to the server","example":"Distinctio omnis."},"sent_at":{"type":"string","description":"Time at which the message was sent","example":"2002-03-31T13:56:45Z","format":"date-time"}},"description":"ChatSummary result type (default view)","example":{"length":6468000556522877742,"message":"Distinctio omnis.","sent_at":"2002-03-31T13:56:45Z"},"required":["message","sent_at"]},"ChatterChatSummaryResponseCollection":{"title":"Mediatype identifier: application/vnd.goa.summary; type=collection; view=default","type":"array","items":{"$ref":"#/definitions/ChatSummaryResponse"},"description":"SummaryResponseBody is the result type for an array of ChatSummary (default view)","example":[{"length":6468000556522877742,"message":"Distinctio omnis.","sent_at":"2002-03-31T13:56:45Z"},{"length":6468000556522877742,"message":"Distinctio omnis.","sent_at":"2002-03-31T13:56:45Z"},{"length":6468000556522877742,"message":"Distinctio omnis.","sent_at":"2002-03-31T13:56:45Z"},{"length":6468000556522877742,"message":"Distinctio omnis.","sent_at":"2002-03-31T13:56:45Z"}]},"Event":{"title":"Event","type":"object","properties":{"action":{"type":"string","example":"added","enum":["added"]},"added_at":{"type":"string","description":"Time at which the message was added","example":"2001-05-15T07:30:58Z","format":"date-time"},"message":{"type":"string","description":"Message sent to the server","example":"Eum sequi veniam provident dolore velit."}},"example":{"action":"added","added_at":"2001-05-15T07:30:58Z","message":"Eum sequi veniam provident dolore velit."},"required":["message","action","added_at"]},"GoaSummary":{"title":"Mediatype identifier: application/vnd.goa.summary; view=default","type":"object","properties":{"length":{"type":"integer","description":"Length of the message sent","example":2987270872186463688,"format":"int64"},"message":{"type":"string","description":"Message sent to the server","example":"Deserunt velit tempore ducimus repellat aspernatur ipsum."},"sent_at":{"type":"string","description":"Time at which the message was sent","example":"1970-02-21T15:32:11Z","format":"date-time"}},"description":"HistoryResponseBody result type (default view)","example":{"length":2987270872186463688,"message":"Deserunt velit tempore ducimus repellat aspernatur ipsum.","sent_at":"1970-02-21T15:32:11Z"},"required":["message","sent_at"]}},"securityDefinitions":{"basic_header_Authorization":{"type":"basic","description":"Secures the login endpoint."},"jwt_header_Authorization":{"type":"apiKey","description":"Secures endpoint by requiring a valid JWT token. Supports scopes \"stream:read\" and \"stream:write\".\n\n**Security Scopes**:\n * `stream:read`: Read-only access\n * `stream:write`: Read and write access","name":"Authorization","in":"header"}}} \ No newline at end of file diff --git a/streaming/gen/http/openapi.yaml b/streaming/gen/http/openapi.yaml index 87ad32046..bd7104285 100644 --- a/streaming/gen/http/openapi.yaml +++ b/streaming/gen/http/openapi.yaml @@ -29,11 +29,11 @@ paths: schema: type: string "401": - description: Unauthorized response. + description: 'unauthorized: Unauthorized response.' schema: type: string "403": - description: Forbidden response. + description: 'invalid-scopes: Forbidden response.' schema: type: string schemes: @@ -57,17 +57,20 @@ paths: description: View to use to render the result required: false type: string + enum: + - tiny + - default responses: "101": description: Switching Protocols response. schema: $ref: '#/definitions/GoaSummary' "401": - description: Unauthorized response. + description: 'unauthorized: Unauthorized response.' schema: type: string "403": - description: Forbidden response. + description: 'invalid-scopes: Forbidden response.' schema: type: string schemes: @@ -89,11 +92,11 @@ paths: "101": description: Switching Protocols response. "401": - description: Unauthorized response. + description: 'unauthorized: Unauthorized response.' schema: type: string "403": - description: Forbidden response. + description: 'invalid-scopes: Forbidden response.' schema: type: string schemes: @@ -113,7 +116,7 @@ paths: schema: type: string "401": - description: Unauthorized response. + description: 'unauthorized: Unauthorized response.' schema: type: string schemes: @@ -141,11 +144,11 @@ paths: - action - added_at "401": - description: Unauthorized response. + description: 'unauthorized: Unauthorized response.' schema: type: string "403": - description: Forbidden response. + description: 'invalid-scopes: Forbidden response.' schema: type: string schemes: @@ -169,11 +172,11 @@ paths: schema: $ref: '#/definitions/ChatterChatSummaryResponseCollection' "401": - description: Unauthorized response. + description: 'unauthorized: Unauthorized response.' schema: type: string "403": - description: Forbidden response. + description: 'invalid-scopes: Forbidden response.' schema: type: string schemes: @@ -188,22 +191,22 @@ definitions: length: type: integer description: Length of the message sent - example: 6974027342252250665 + example: 6468000556522877742 format: int64 message: type: string description: Message sent to the server - example: Porro velit. + example: Distinctio omnis. sent_at: type: string description: Time at which the message was sent - example: "1997-08-20T21:13:26Z" + example: "2002-03-31T13:56:45Z" format: date-time - description: ChatSummaryResponse result type (default view) + description: ChatSummary result type (default view) example: - length: 6974027342252250665 - message: Porro velit. - sent_at: "1997-08-20T21:13:26Z" + length: 6468000556522877742 + message: Distinctio omnis. + sent_at: "2002-03-31T13:56:45Z" required: - message - sent_at @@ -212,17 +215,20 @@ definitions: type: array items: $ref: '#/definitions/ChatSummaryResponse' - description: SummaryResponseBody is the result type for an array of ChatSummaryResponse (default view) + description: SummaryResponseBody is the result type for an array of ChatSummary (default view) example: - - length: 6974027342252250665 - message: Porro velit. - sent_at: "1997-08-20T21:13:26Z" - - length: 6974027342252250665 - message: Porro velit. - sent_at: "1997-08-20T21:13:26Z" - - length: 6974027342252250665 - message: Porro velit. - sent_at: "1997-08-20T21:13:26Z" + - length: 6468000556522877742 + message: Distinctio omnis. + sent_at: "2002-03-31T13:56:45Z" + - length: 6468000556522877742 + message: Distinctio omnis. + sent_at: "2002-03-31T13:56:45Z" + - length: 6468000556522877742 + message: Distinctio omnis. + sent_at: "2002-03-31T13:56:45Z" + - length: 6468000556522877742 + message: Distinctio omnis. + sent_at: "2002-03-31T13:56:45Z" Event: title: Event type: object @@ -235,16 +241,16 @@ definitions: added_at: type: string description: Time at which the message was added - example: "2012-03-23T20:03:18Z" + example: "2001-05-15T07:30:58Z" format: date-time message: type: string description: Message sent to the server - example: Nostrum quia asperiores et sint deleniti cumque. + example: Eum sequi veniam provident dolore velit. example: action: added - added_at: "2012-03-23T20:03:18Z" - message: Nostrum quia asperiores et sint deleniti cumque. + added_at: "2001-05-15T07:30:58Z" + message: Eum sequi veniam provident dolore velit. required: - message - action @@ -256,22 +262,22 @@ definitions: length: type: integer description: Length of the message sent - example: 6974027342252250665 + example: 2987270872186463688 format: int64 message: type: string description: Message sent to the server - example: Porro velit. + example: Deserunt velit tempore ducimus repellat aspernatur ipsum. sent_at: type: string description: Time at which the message was sent - example: "1997-08-20T21:13:26Z" + example: "1970-02-21T15:32:11Z" format: date-time description: HistoryResponseBody result type (default view) example: - length: 6974027342252250665 - message: Porro velit. - sent_at: "1997-08-20T21:13:26Z" + length: 2987270872186463688 + message: Deserunt velit tempore ducimus repellat aspernatur ipsum. + sent_at: "1970-02-21T15:32:11Z" required: - message - sent_at diff --git a/streaming/gen/http/openapi3.2.json b/streaming/gen/http/openapi3.2.json index 5d8cdee50..3e2c191b0 100644 --- a/streaming/gen/http/openapi3.2.json +++ b/streaming/gen/http/openapi3.2.json @@ -1 +1 @@ -{"openapi":"3.2.0","info":{"title":"Chatter service describing the streaming features of goa v2.","version":"0.0.1"},"servers":[{"url":"http://localhost:80","name":"chatter","description":"Default server for chatter"}],"paths":{"/echoer":{"get":{"tags":["chatter"],"summary":"echoer chatter","description":"Echoes the message sent by the client.","operationId":"chatter#echoer","responses":{"101":{"description":"Switching Protocols response.","content":{"application/json":{"schema":{"type":"string","example":"Ad placeat et numquam corrupti."},"example":"Eveniet tenetur non et dolorem ut et."}}},"401":{"description":"unauthorized: Unauthorized response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"},"example":"Vel facilis voluptatem hic ea inventore."}}},"403":{"description":"invalid-scopes: Forbidden response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"},"example":"Animi voluptatem aut."}}}},"security":[{"jwt_header_Authorization":[]}]}},"/history":{"get":{"tags":["chatter"],"summary":"history chatter","description":"Returns the chat messages sent to the server.","operationId":"chatter#history","parameters":[{"name":"view","in":"query","description":"View to use to render the result","allowEmptyValue":true,"schema":{"type":"string","description":"View to use to render the result","example":"Velit similique quia eum quasi assumenda."},"example":"Possimus odit ad maxime ducimus."}],"responses":{"101":{"description":"Switching Protocols response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoaSummary"},"example":{"length":5079245588830096095,"message":"Cupiditate error quam dolor quo repudiandae doloribus.","sent_at":"1973-09-12T13:29:27Z"}}}},"401":{"description":"unauthorized: Unauthorized response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"},"example":"Impedit vel sit officiis qui non unde."}}},"403":{"description":"invalid-scopes: Forbidden response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"},"example":"Qui deserunt odio quia."}}}},"security":[{"jwt_header_Authorization":[]}]}},"/listener":{"get":{"tags":["chatter"],"summary":"listener chatter","description":"Listens to the messages sent by the client.","operationId":"chatter#listener","responses":{"101":{"description":"Switching Protocols response."},"401":{"description":"unauthorized: Unauthorized response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"},"example":"Ea rem expedita culpa dolor repudiandae cupiditate."}}},"403":{"description":"invalid-scopes: Forbidden response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"},"example":"Numquam vero eos explicabo."}}}},"security":[{"jwt_header_Authorization":[]}]}},"/login":{"post":{"tags":["chatter"],"summary":"login chatter","description":"Creates a valid JWT token for auth to chat.","operationId":"chatter#login","responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"type":"string","description":"New JWT token","example":"Molestiae et soluta non."},"example":"Molestiae et soluta non."}}},"401":{"description":"unauthorized: Unauthorized response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"},"example":"In et."}}}},"security":[{"basic_header_Authorization":[]}]}},"/subscribe":{"get":{"tags":["chatter"],"summary":"subscribe chatter","description":"Subscribe to events sent when new chat messages are added.","operationId":"chatter#subscribe","responses":{"101":{"description":"Switching Protocols response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Event"},"example":{"action":"added","added_at":"2012-03-23T20:03:18Z","message":"Nostrum quia asperiores et sint deleniti cumque."}}}},"401":{"description":"unauthorized: Unauthorized response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"},"example":"Vel et dicta vero saepe."}}},"403":{"description":"invalid-scopes: Forbidden response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"},"example":"Inventore et ea neque."}}}},"security":[{"jwt_header_Authorization":[]}]}},"/summary":{"get":{"tags":["chatter"],"summary":"summary chatter","description":"Summarizes the chat messages sent by the client.","operationId":"chatter#summary","responses":{"101":{"description":"Switching Protocols response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatSummaryResponseCollection"},"example":[{"length":6974027342252250665,"message":"Porro velit.","sent_at":"1997-08-20T21:13:26Z"},{"length":6974027342252250665,"message":"Porro velit.","sent_at":"1997-08-20T21:13:26Z"},{"length":6974027342252250665,"message":"Porro velit.","sent_at":"1997-08-20T21:13:26Z"}]}}},"401":{"description":"unauthorized: Unauthorized response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"},"example":"Cupiditate eos aut."}}},"403":{"description":"invalid-scopes: Forbidden response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"},"example":"Recusandae esse nostrum."}}}},"security":[{"jwt_header_Authorization":[]}]}}},"components":{"schemas":{"ChatSummaryResponse":{"type":"object","properties":{"length":{"type":"integer","description":"Length of the message sent","example":6974027342252250665,"format":"int64"},"message":{"type":"string","description":"Message sent to the server","example":"Porro velit."},"sent_at":{"type":"string","description":"Time at which the message was sent","example":"1997-08-20T21:13:26Z","format":"date-time"}},"description":"ChatSummaryResponse result type (default view)","example":{"length":6974027342252250665,"message":"Porro velit.","sent_at":"1997-08-20T21:13:26Z"},"required":["message","sent_at"]},"ChatSummaryResponseCollection":{"type":"array","items":{"$ref":"#/components/schemas/ChatSummaryResponse"},"description":"SummaryResponseBody is the result type for an array of ChatSummaryResponse (default view)","example":[{"length":6974027342252250665,"message":"Porro velit.","sent_at":"1997-08-20T21:13:26Z"},{"length":6974027342252250665,"message":"Porro velit.","sent_at":"1997-08-20T21:13:26Z"},{"length":6974027342252250665,"message":"Porro velit.","sent_at":"1997-08-20T21:13:26Z"}]},"Event":{"type":"object","properties":{"action":{"type":"string","example":"added","enum":["added"]},"added_at":{"type":"string","description":"Time at which the message was added","example":"2012-03-23T20:03:18Z","format":"date-time"},"message":{"type":"string","description":"Message sent to the server","example":"Nostrum quia asperiores et sint deleniti cumque."}},"example":{"action":"added","added_at":"2012-03-23T20:03:18Z","message":"Nostrum quia asperiores et sint deleniti cumque."},"required":["message","action","added_at"]},"GoaSummary":{"type":"object","properties":{"length":{"type":"integer","description":"Length of the message sent","example":8240426892299723366,"format":"int64"},"message":{"type":"string","description":"Message sent to the server","example":"Sunt vitae dolor cumque blanditiis ut similique."},"sent_at":{"type":"string","description":"Time at which the message was sent","example":"2003-03-20T17:38:02Z","format":"date-time"}},"example":{"length":8240426892299723366,"message":"Sunt vitae dolor cumque blanditiis ut similique.","sent_at":"2003-03-20T17:38:02Z"},"required":["message","sent_at"]},"Unauthorized":{"type":"string","description":"Credentials are invalid","example":"In et."}},"securitySchemes":{"basic_header_Authorization":{"type":"http","description":"Secures the login endpoint.","scheme":"basic"},"jwt_header_Authorization":{"type":"http","description":"Secures endpoint by requiring a valid JWT token. Supports scopes \"stream:read\" and \"stream:write\".","scheme":"bearer","bearerFormat":"JWT"}}},"tags":[{"name":"chatter","description":"The chatter service implements a simple client and server chat."}]} \ No newline at end of file +{"openapi":"3.2.0","info":{"title":"Chatter service describing the streaming features of goa v2.","version":"0.0.1"},"servers":[{"url":"http://localhost:80","name":"chatter","description":"Default server for chatter"}],"paths":{"/echoer":{"get":{"tags":["chatter"],"summary":"echoer chatter","description":"Echoes the message sent by the client.","operationId":"chatter#echoer","responses":{"101":{"description":"Switching Protocols response.","content":{"application/json":{"schema":{"type":"string","example":"Esse perferendis explicabo amet praesentium ducimus."},"example":"Esse perferendis explicabo amet praesentium ducimus."}}},"401":{"description":"unauthorized: Unauthorized response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"},"example":"Beatae impedit."}}},"403":{"description":"invalid-scopes: Forbidden response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"},"example":"Earum magnam aut quisquam accusantium aut."}}}},"security":[{"jwt_header_Authorization":[]}]}},"/history":{"get":{"tags":["chatter"],"summary":"history chatter","description":"Returns the chat messages sent to the server.","operationId":"chatter#history","parameters":[{"name":"view","in":"query","description":"View to use to render the result","allowEmptyValue":true,"schema":{"type":"string","description":"View to use to render the result","example":"default","enum":["tiny","default"]},"example":"default"}],"responses":{"101":{"description":"Switching Protocols response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoaSummary"},"example":{"length":2987270872186463688,"message":"Deserunt velit tempore ducimus repellat aspernatur ipsum.","sent_at":"1970-02-21T15:32:11Z"}}}},"401":{"description":"unauthorized: Unauthorized response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"},"example":"At autem voluptas."}}},"403":{"description":"invalid-scopes: Forbidden response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"},"example":"Quaerat qui quidem earum."}}}},"security":[{"jwt_header_Authorization":[]}]}},"/listener":{"get":{"tags":["chatter"],"summary":"listener chatter","description":"Listens to the messages sent by the client.","operationId":"chatter#listener","responses":{"101":{"description":"Switching Protocols response."},"401":{"description":"unauthorized: Unauthorized response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"},"example":"Et atque."}}},"403":{"description":"invalid-scopes: Forbidden response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"},"example":"Ducimus dolorem autem architecto magnam aspernatur est."}}}},"security":[{"jwt_header_Authorization":[]}]}},"/login":{"post":{"tags":["chatter"],"summary":"login chatter","description":"Creates a valid JWT token for auth to chat.","operationId":"chatter#login","responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"type":"string","description":"New JWT token","example":"Saepe harum eligendi."},"example":"Saepe harum eligendi."}}},"401":{"description":"unauthorized: Unauthorized response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"},"example":"Aliquid voluptate et vel."}}}},"security":[{"basic_header_Authorization":[]}]}},"/subscribe":{"get":{"tags":["chatter"],"summary":"subscribe chatter","description":"Subscribe to events sent when new chat messages are added.","operationId":"chatter#subscribe","responses":{"101":{"description":"Switching Protocols response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Event"},"example":{"action":"added","added_at":"2001-05-15T07:30:58Z","message":"Eum sequi veniam provident dolore velit."}}}},"401":{"description":"unauthorized: Unauthorized response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"},"example":"Sed quis dolores rem."}}},"403":{"description":"invalid-scopes: Forbidden response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"},"example":"Facere libero culpa consequatur."}}}},"security":[{"jwt_header_Authorization":[]}]}},"/summary":{"get":{"tags":["chatter"],"summary":"summary chatter","description":"Summarizes the chat messages sent by the client.","operationId":"chatter#summary","responses":{"101":{"description":"Switching Protocols response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatSummaryResponseCollection"},"example":[{"length":6468000556522877742,"message":"Distinctio omnis.","sent_at":"2002-03-31T13:56:45Z"},{"length":6468000556522877742,"message":"Distinctio omnis.","sent_at":"2002-03-31T13:56:45Z"},{"length":6468000556522877742,"message":"Distinctio omnis.","sent_at":"2002-03-31T13:56:45Z"},{"length":6468000556522877742,"message":"Distinctio omnis.","sent_at":"2002-03-31T13:56:45Z"}]}}},"401":{"description":"unauthorized: Unauthorized response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"},"example":"Aut enim molestias eos nesciunt."}}},"403":{"description":"invalid-scopes: Forbidden response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"},"example":"Provident harum quia et est."}}}},"security":[{"jwt_header_Authorization":[]}]}}},"components":{"schemas":{"ChatSummaryResponse":{"type":"object","properties":{"length":{"type":"integer","description":"Length of the message sent","example":6468000556522877742,"format":"int64"},"message":{"type":"string","description":"Message sent to the server","example":"Distinctio omnis."},"sent_at":{"type":"string","description":"Time at which the message was sent","example":"2002-03-31T13:56:45Z","format":"date-time"}},"description":"ChatSummary result type (default view)","example":{"length":6468000556522877742,"message":"Distinctio omnis.","sent_at":"2002-03-31T13:56:45Z"},"required":["message","sent_at"]},"ChatSummaryResponseCollection":{"type":"array","items":{"$ref":"#/components/schemas/ChatSummaryResponse"},"description":"SummaryResponseBody is the result type for an array of ChatSummary (default view)","example":[{"length":6468000556522877742,"message":"Distinctio omnis.","sent_at":"2002-03-31T13:56:45Z"},{"length":6468000556522877742,"message":"Distinctio omnis.","sent_at":"2002-03-31T13:56:45Z"},{"length":6468000556522877742,"message":"Distinctio omnis.","sent_at":"2002-03-31T13:56:45Z"},{"length":6468000556522877742,"message":"Distinctio omnis.","sent_at":"2002-03-31T13:56:45Z"}]},"Event":{"type":"object","properties":{"action":{"type":"string","example":"added","enum":["added"]},"added_at":{"type":"string","description":"Time at which the message was added","example":"2001-05-15T07:30:58Z","format":"date-time"},"message":{"type":"string","description":"Message sent to the server","example":"Eum sequi veniam provident dolore velit."}},"example":{"action":"added","added_at":"2001-05-15T07:30:58Z","message":"Eum sequi veniam provident dolore velit."},"required":["message","action","added_at"]},"GoaSummary":{"type":"object","properties":{"length":{"type":"integer","description":"Length of the message sent","example":2987270872186463688,"format":"int64"},"message":{"type":"string","description":"Message sent to the server","example":"Deserunt velit tempore ducimus repellat aspernatur ipsum."},"sent_at":{"type":"string","description":"Time at which the message was sent","example":"1970-02-21T15:32:11Z","format":"date-time"}},"example":{"length":2987270872186463688,"message":"Deserunt velit tempore ducimus repellat aspernatur ipsum.","sent_at":"1970-02-21T15:32:11Z"},"required":["message","sent_at"]},"Unauthorized":{"type":"string","description":"Credentials are invalid","example":"Aliquid voluptate et vel."}},"securitySchemes":{"basic_header_Authorization":{"type":"http","description":"Secures the login endpoint.","scheme":"basic"},"jwt_header_Authorization":{"type":"http","description":"Secures endpoint by requiring a valid JWT token. Supports scopes \"stream:read\" and \"stream:write\".","scheme":"bearer","bearerFormat":"JWT"}}},"tags":[{"name":"chatter","description":"The chatter service implements a simple client and server chat."}]} \ No newline at end of file diff --git a/streaming/gen/http/openapi3.2.yaml b/streaming/gen/http/openapi3.2.yaml index 56d667820..06edff3bf 100644 --- a/streaming/gen/http/openapi3.2.yaml +++ b/streaming/gen/http/openapi3.2.yaml @@ -21,22 +21,22 @@ paths: application/json: schema: type: string - example: Ad placeat et numquam corrupti. - example: Eveniet tenetur non et dolorem ut et. + example: Esse perferendis explicabo amet praesentium ducimus. + example: Esse perferendis explicabo amet praesentium ducimus. "401": description: 'unauthorized: Unauthorized response.' content: application/json: schema: $ref: '#/components/schemas/Unauthorized' - example: Vel facilis voluptatem hic ea inventore. + example: Beatae impedit. "403": description: 'invalid-scopes: Forbidden response.' content: application/json: schema: $ref: '#/components/schemas/Unauthorized' - example: Animi voluptatem aut. + example: Earum magnam aut quisquam accusantium aut. security: - jwt_header_Authorization: [] /history: @@ -54,8 +54,11 @@ paths: schema: type: string description: View to use to render the result - example: Velit similique quia eum quasi assumenda. - example: Possimus odit ad maxime ducimus. + example: default + enum: + - tiny + - default + example: default responses: "101": description: Switching Protocols response. @@ -64,23 +67,23 @@ paths: schema: $ref: '#/components/schemas/GoaSummary' example: - length: 5079245588830096095 - message: Cupiditate error quam dolor quo repudiandae doloribus. - sent_at: "1973-09-12T13:29:27Z" + length: 2987270872186463688 + message: Deserunt velit tempore ducimus repellat aspernatur ipsum. + sent_at: "1970-02-21T15:32:11Z" "401": description: 'unauthorized: Unauthorized response.' content: application/json: schema: $ref: '#/components/schemas/Unauthorized' - example: Impedit vel sit officiis qui non unde. + example: At autem voluptas. "403": description: 'invalid-scopes: Forbidden response.' content: application/json: schema: $ref: '#/components/schemas/Unauthorized' - example: Qui deserunt odio quia. + example: Quaerat qui quidem earum. security: - jwt_header_Authorization: [] /listener: @@ -99,14 +102,14 @@ paths: application/json: schema: $ref: '#/components/schemas/Unauthorized' - example: Ea rem expedita culpa dolor repudiandae cupiditate. + example: Et atque. "403": description: 'invalid-scopes: Forbidden response.' content: application/json: schema: $ref: '#/components/schemas/Unauthorized' - example: Numquam vero eos explicabo. + example: Ducimus dolorem autem architecto magnam aspernatur est. security: - jwt_header_Authorization: [] /login: @@ -124,15 +127,15 @@ paths: schema: type: string description: New JWT token - example: Molestiae et soluta non. - example: Molestiae et soluta non. + example: Saepe harum eligendi. + example: Saepe harum eligendi. "401": description: 'unauthorized: Unauthorized response.' content: application/json: schema: $ref: '#/components/schemas/Unauthorized' - example: In et. + example: Aliquid voluptate et vel. security: - basic_header_Authorization: [] /subscribe: @@ -151,22 +154,22 @@ paths: $ref: '#/components/schemas/Event' example: action: added - added_at: "2012-03-23T20:03:18Z" - message: Nostrum quia asperiores et sint deleniti cumque. + added_at: "2001-05-15T07:30:58Z" + message: Eum sequi veniam provident dolore velit. "401": description: 'unauthorized: Unauthorized response.' content: application/json: schema: $ref: '#/components/schemas/Unauthorized' - example: Vel et dicta vero saepe. + example: Sed quis dolores rem. "403": description: 'invalid-scopes: Forbidden response.' content: application/json: schema: $ref: '#/components/schemas/Unauthorized' - example: Inventore et ea neque. + example: Facere libero culpa consequatur. security: - jwt_header_Authorization: [] /summary: @@ -184,29 +187,32 @@ paths: schema: $ref: '#/components/schemas/ChatSummaryResponseCollection' example: - - length: 6974027342252250665 - message: Porro velit. - sent_at: "1997-08-20T21:13:26Z" - - length: 6974027342252250665 - message: Porro velit. - sent_at: "1997-08-20T21:13:26Z" - - length: 6974027342252250665 - message: Porro velit. - sent_at: "1997-08-20T21:13:26Z" + - length: 6468000556522877742 + message: Distinctio omnis. + sent_at: "2002-03-31T13:56:45Z" + - length: 6468000556522877742 + message: Distinctio omnis. + sent_at: "2002-03-31T13:56:45Z" + - length: 6468000556522877742 + message: Distinctio omnis. + sent_at: "2002-03-31T13:56:45Z" + - length: 6468000556522877742 + message: Distinctio omnis. + sent_at: "2002-03-31T13:56:45Z" "401": description: 'unauthorized: Unauthorized response.' content: application/json: schema: $ref: '#/components/schemas/Unauthorized' - example: Cupiditate eos aut. + example: Aut enim molestias eos nesciunt. "403": description: 'invalid-scopes: Forbidden response.' content: application/json: schema: $ref: '#/components/schemas/Unauthorized' - example: Recusandae esse nostrum. + example: Provident harum quia et est. security: - jwt_header_Authorization: [] components: @@ -217,22 +223,22 @@ components: length: type: integer description: Length of the message sent - example: 6974027342252250665 + example: 6468000556522877742 format: int64 message: type: string description: Message sent to the server - example: Porro velit. + example: Distinctio omnis. sent_at: type: string description: Time at which the message was sent - example: "1997-08-20T21:13:26Z" + example: "2002-03-31T13:56:45Z" format: date-time - description: ChatSummaryResponse result type (default view) + description: ChatSummary result type (default view) example: - length: 6974027342252250665 - message: Porro velit. - sent_at: "1997-08-20T21:13:26Z" + length: 6468000556522877742 + message: Distinctio omnis. + sent_at: "2002-03-31T13:56:45Z" required: - message - sent_at @@ -240,17 +246,20 @@ components: type: array items: $ref: '#/components/schemas/ChatSummaryResponse' - description: SummaryResponseBody is the result type for an array of ChatSummaryResponse (default view) + description: SummaryResponseBody is the result type for an array of ChatSummary (default view) example: - - length: 6974027342252250665 - message: Porro velit. - sent_at: "1997-08-20T21:13:26Z" - - length: 6974027342252250665 - message: Porro velit. - sent_at: "1997-08-20T21:13:26Z" - - length: 6974027342252250665 - message: Porro velit. - sent_at: "1997-08-20T21:13:26Z" + - length: 6468000556522877742 + message: Distinctio omnis. + sent_at: "2002-03-31T13:56:45Z" + - length: 6468000556522877742 + message: Distinctio omnis. + sent_at: "2002-03-31T13:56:45Z" + - length: 6468000556522877742 + message: Distinctio omnis. + sent_at: "2002-03-31T13:56:45Z" + - length: 6468000556522877742 + message: Distinctio omnis. + sent_at: "2002-03-31T13:56:45Z" Event: type: object properties: @@ -262,16 +271,16 @@ components: added_at: type: string description: Time at which the message was added - example: "2012-03-23T20:03:18Z" + example: "2001-05-15T07:30:58Z" format: date-time message: type: string description: Message sent to the server - example: Nostrum quia asperiores et sint deleniti cumque. + example: Eum sequi veniam provident dolore velit. example: action: added - added_at: "2012-03-23T20:03:18Z" - message: Nostrum quia asperiores et sint deleniti cumque. + added_at: "2001-05-15T07:30:58Z" + message: Eum sequi veniam provident dolore velit. required: - message - action @@ -282,28 +291,28 @@ components: length: type: integer description: Length of the message sent - example: 8240426892299723366 + example: 2987270872186463688 format: int64 message: type: string description: Message sent to the server - example: Sunt vitae dolor cumque blanditiis ut similique. + example: Deserunt velit tempore ducimus repellat aspernatur ipsum. sent_at: type: string description: Time at which the message was sent - example: "2003-03-20T17:38:02Z" + example: "1970-02-21T15:32:11Z" format: date-time example: - length: 8240426892299723366 - message: Sunt vitae dolor cumque blanditiis ut similique. - sent_at: "2003-03-20T17:38:02Z" + length: 2987270872186463688 + message: Deserunt velit tempore ducimus repellat aspernatur ipsum. + sent_at: "1970-02-21T15:32:11Z" required: - message - sent_at Unauthorized: type: string description: Credentials are invalid - example: In et. + example: Aliquid voluptate et vel. securitySchemes: basic_header_Authorization: type: http diff --git a/streaming/gen/http/openapi3.json b/streaming/gen/http/openapi3.json index 075548323..55b0a7957 100644 --- a/streaming/gen/http/openapi3.json +++ b/streaming/gen/http/openapi3.json @@ -1 +1 @@ -{"openapi":"3.0.3","info":{"title":"Chatter service describing the streaming features of goa v2.","version":"0.0.1"},"servers":[{"url":"http://localhost:80","description":"Default server for chatter"}],"paths":{"/echoer":{"get":{"tags":["chatter"],"summary":"echoer chatter","description":"Echoes the message sent by the client.","operationId":"chatter#echoer","responses":{"101":{"description":"Switching Protocols response.","content":{"application/json":{"schema":{"type":"string","example":"Ad placeat et numquam corrupti."},"example":"Eveniet tenetur non et dolorem ut et."}}},"401":{"description":"unauthorized: Unauthorized response.","content":{"application/json":{"schema":{"type":"string","example":"Vel facilis voluptatem hic ea inventore."},"example":"Vel facilis voluptatem hic ea inventore."}}},"403":{"description":"invalid-scopes: Forbidden response.","content":{"application/json":{"schema":{"type":"string","example":"Animi voluptatem aut."},"example":"Animi voluptatem aut."}}}},"security":[{"jwt_header_Authorization":[]}]}},"/history":{"get":{"tags":["chatter"],"summary":"history chatter","description":"Returns the chat messages sent to the server.","operationId":"chatter#history","parameters":[{"name":"view","in":"query","description":"View to use to render the result","allowEmptyValue":true,"schema":{"type":"string","description":"View to use to render the result","example":"Velit similique quia eum quasi assumenda."},"example":"Possimus odit ad maxime ducimus."}],"responses":{"101":{"description":"Switching Protocols response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoaSummary"},"example":{"length":5079245588830096095,"message":"Cupiditate error quam dolor quo repudiandae doloribus.","sent_at":"1973-09-12T13:29:27Z"}}}},"401":{"description":"unauthorized: Unauthorized response.","content":{"application/json":{"schema":{"type":"string","example":"Impedit vel sit officiis qui non unde."},"example":"Impedit vel sit officiis qui non unde."}}},"403":{"description":"invalid-scopes: Forbidden response.","content":{"application/json":{"schema":{"type":"string","example":"Qui deserunt odio quia."},"example":"Qui deserunt odio quia."}}}},"security":[{"jwt_header_Authorization":[]}]}},"/listener":{"get":{"tags":["chatter"],"summary":"listener chatter","description":"Listens to the messages sent by the client.","operationId":"chatter#listener","responses":{"101":{"description":"Switching Protocols response."},"401":{"description":"unauthorized: Unauthorized response.","content":{"application/json":{"schema":{"type":"string","example":"Ea rem expedita culpa dolor repudiandae cupiditate."},"example":"Ea rem expedita culpa dolor repudiandae cupiditate."}}},"403":{"description":"invalid-scopes: Forbidden response.","content":{"application/json":{"schema":{"type":"string","example":"Numquam vero eos explicabo."},"example":"Numquam vero eos explicabo."}}}},"security":[{"jwt_header_Authorization":[]}]}},"/login":{"post":{"tags":["chatter"],"summary":"login chatter","description":"Creates a valid JWT token for auth to chat.","operationId":"chatter#login","responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"type":"string","description":"New JWT token","example":"Molestiae et soluta non."},"example":"Molestiae et soluta non."}}},"401":{"description":"unauthorized: Unauthorized response.","content":{"application/json":{"schema":{"type":"string","description":"Credentials are invalid","example":"In et."},"example":"In et."}}}},"security":[{"basic_header_Authorization":[]}]}},"/subscribe":{"get":{"tags":["chatter"],"summary":"subscribe chatter","description":"Subscribe to events sent when new chat messages are added.","operationId":"chatter#subscribe","responses":{"101":{"description":"Switching Protocols response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Event"},"example":{"action":"added","added_at":"2012-03-23T20:03:18Z","message":"Nostrum quia asperiores et sint deleniti cumque."}}}},"401":{"description":"unauthorized: Unauthorized response.","content":{"application/json":{"schema":{"type":"string","example":"Vel et dicta vero saepe."},"example":"Vel et dicta vero saepe."}}},"403":{"description":"invalid-scopes: Forbidden response.","content":{"application/json":{"schema":{"type":"string","example":"Inventore et ea neque."},"example":"Inventore et ea neque."}}}},"security":[{"jwt_header_Authorization":[]}]}},"/summary":{"get":{"tags":["chatter"],"summary":"summary chatter","description":"Summarizes the chat messages sent by the client.","operationId":"chatter#summary","responses":{"101":{"description":"Switching Protocols response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatSummaryResponseCollection"},"example":[{"length":6974027342252250665,"message":"Porro velit.","sent_at":"1997-08-20T21:13:26Z"},{"length":6974027342252250665,"message":"Porro velit.","sent_at":"1997-08-20T21:13:26Z"},{"length":6974027342252250665,"message":"Porro velit.","sent_at":"1997-08-20T21:13:26Z"}]}}},"401":{"description":"unauthorized: Unauthorized response.","content":{"application/json":{"schema":{"type":"string","example":"Cupiditate eos aut."},"example":"Cupiditate eos aut."}}},"403":{"description":"invalid-scopes: Forbidden response.","content":{"application/json":{"schema":{"type":"string","example":"Recusandae esse nostrum."},"example":"Recusandae esse nostrum."}}}},"security":[{"jwt_header_Authorization":[]}]}}},"components":{"schemas":{"ChatSummaryResponse":{"type":"object","properties":{"length":{"type":"integer","description":"Length of the message sent","example":6974027342252250665,"format":"int64"},"message":{"type":"string","description":"Message sent to the server","example":"Porro velit."},"sent_at":{"type":"string","description":"Time at which the message was sent","example":"1997-08-20T21:13:26Z","format":"date-time"}},"description":"ChatSummaryResponse result type (default view)","example":{"length":6974027342252250665,"message":"Porro velit.","sent_at":"1997-08-20T21:13:26Z"},"required":["message","sent_at"]},"ChatSummaryResponseCollection":{"type":"array","items":{"$ref":"#/components/schemas/ChatSummaryResponse"},"description":"SummaryResponseBody is the result type for an array of ChatSummaryResponse (default view)","example":[{"length":6974027342252250665,"message":"Porro velit.","sent_at":"1997-08-20T21:13:26Z"},{"length":6974027342252250665,"message":"Porro velit.","sent_at":"1997-08-20T21:13:26Z"},{"length":6974027342252250665,"message":"Porro velit.","sent_at":"1997-08-20T21:13:26Z"}]},"Event":{"type":"object","properties":{"action":{"type":"string","example":"added","enum":["added"]},"added_at":{"type":"string","description":"Time at which the message was added","example":"2012-03-23T20:03:18Z","format":"date-time"},"message":{"type":"string","description":"Message sent to the server","example":"Nostrum quia asperiores et sint deleniti cumque."}},"example":{"action":"added","added_at":"2012-03-23T20:03:18Z","message":"Nostrum quia asperiores et sint deleniti cumque."},"required":["message","action","added_at"]},"GoaSummary":{"type":"object","properties":{"length":{"type":"integer","description":"Length of the message sent","example":8240426892299723366,"format":"int64"},"message":{"type":"string","description":"Message sent to the server","example":"Sunt vitae dolor cumque blanditiis ut similique."},"sent_at":{"type":"string","description":"Time at which the message was sent","example":"2003-03-20T17:38:02Z","format":"date-time"}},"example":{"length":8240426892299723366,"message":"Sunt vitae dolor cumque blanditiis ut similique.","sent_at":"2003-03-20T17:38:02Z"},"required":["message","sent_at"]}},"securitySchemes":{"basic_header_Authorization":{"type":"http","description":"Secures the login endpoint.","scheme":"basic"},"jwt_header_Authorization":{"type":"http","description":"Secures endpoint by requiring a valid JWT token. Supports scopes \"stream:read\" and \"stream:write\".","scheme":"bearer","bearerFormat":"JWT"}}},"tags":[{"name":"chatter","description":"The chatter service implements a simple client and server chat."}]} \ No newline at end of file +{"openapi":"3.0.3","info":{"title":"Chatter service describing the streaming features of goa v2.","version":"0.0.1"},"servers":[{"url":"http://localhost:80","description":"Default server for chatter"}],"paths":{"/echoer":{"get":{"tags":["chatter"],"summary":"echoer chatter","description":"Echoes the message sent by the client.","operationId":"chatter#echoer","responses":{"101":{"description":"Switching Protocols response.","content":{"application/json":{"schema":{"type":"string","example":"Esse perferendis explicabo amet praesentium ducimus."},"example":"Esse perferendis explicabo amet praesentium ducimus."}}},"401":{"description":"unauthorized: Unauthorized response.","content":{"application/json":{"schema":{"type":"string","example":"Beatae impedit."},"example":"Beatae impedit."}}},"403":{"description":"invalid-scopes: Forbidden response.","content":{"application/json":{"schema":{"type":"string","example":"Earum magnam aut quisquam accusantium aut."},"example":"Earum magnam aut quisquam accusantium aut."}}}},"security":[{"jwt_header_Authorization":[]}]}},"/history":{"get":{"tags":["chatter"],"summary":"history chatter","description":"Returns the chat messages sent to the server.","operationId":"chatter#history","parameters":[{"name":"view","in":"query","description":"View to use to render the result","allowEmptyValue":true,"schema":{"type":"string","description":"View to use to render the result","example":"default","enum":["tiny","default"]},"example":"default"}],"responses":{"101":{"description":"Switching Protocols response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoaSummary"},"example":{"length":2987270872186463688,"message":"Deserunt velit tempore ducimus repellat aspernatur ipsum.","sent_at":"1970-02-21T15:32:11Z"}}}},"401":{"description":"unauthorized: Unauthorized response.","content":{"application/json":{"schema":{"type":"string","example":"At autem voluptas."},"example":"At autem voluptas."}}},"403":{"description":"invalid-scopes: Forbidden response.","content":{"application/json":{"schema":{"type":"string","example":"Quaerat qui quidem earum."},"example":"Quaerat qui quidem earum."}}}},"security":[{"jwt_header_Authorization":[]}]}},"/listener":{"get":{"tags":["chatter"],"summary":"listener chatter","description":"Listens to the messages sent by the client.","operationId":"chatter#listener","responses":{"101":{"description":"Switching Protocols response."},"401":{"description":"unauthorized: Unauthorized response.","content":{"application/json":{"schema":{"type":"string","example":"Et atque."},"example":"Et atque."}}},"403":{"description":"invalid-scopes: Forbidden response.","content":{"application/json":{"schema":{"type":"string","example":"Ducimus dolorem autem architecto magnam aspernatur est."},"example":"Ducimus dolorem autem architecto magnam aspernatur est."}}}},"security":[{"jwt_header_Authorization":[]}]}},"/login":{"post":{"tags":["chatter"],"summary":"login chatter","description":"Creates a valid JWT token for auth to chat.","operationId":"chatter#login","responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"type":"string","description":"New JWT token","example":"Saepe harum eligendi."},"example":"Saepe harum eligendi."}}},"401":{"description":"unauthorized: Unauthorized response.","content":{"application/json":{"schema":{"type":"string","description":"Credentials are invalid","example":"Aliquid voluptate et vel."},"example":"Aliquid voluptate et vel."}}}},"security":[{"basic_header_Authorization":[]}]}},"/subscribe":{"get":{"tags":["chatter"],"summary":"subscribe chatter","description":"Subscribe to events sent when new chat messages are added.","operationId":"chatter#subscribe","responses":{"101":{"description":"Switching Protocols response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Event"},"example":{"action":"added","added_at":"2001-05-15T07:30:58Z","message":"Eum sequi veniam provident dolore velit."}}}},"401":{"description":"unauthorized: Unauthorized response.","content":{"application/json":{"schema":{"type":"string","example":"Sed quis dolores rem."},"example":"Sed quis dolores rem."}}},"403":{"description":"invalid-scopes: Forbidden response.","content":{"application/json":{"schema":{"type":"string","example":"Facere libero culpa consequatur."},"example":"Facere libero culpa consequatur."}}}},"security":[{"jwt_header_Authorization":[]}]}},"/summary":{"get":{"tags":["chatter"],"summary":"summary chatter","description":"Summarizes the chat messages sent by the client.","operationId":"chatter#summary","responses":{"101":{"description":"Switching Protocols response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatSummaryResponseCollection"},"example":[{"length":6468000556522877742,"message":"Distinctio omnis.","sent_at":"2002-03-31T13:56:45Z"},{"length":6468000556522877742,"message":"Distinctio omnis.","sent_at":"2002-03-31T13:56:45Z"},{"length":6468000556522877742,"message":"Distinctio omnis.","sent_at":"2002-03-31T13:56:45Z"},{"length":6468000556522877742,"message":"Distinctio omnis.","sent_at":"2002-03-31T13:56:45Z"}]}}},"401":{"description":"unauthorized: Unauthorized response.","content":{"application/json":{"schema":{"type":"string","example":"Aut enim molestias eos nesciunt."},"example":"Aut enim molestias eos nesciunt."}}},"403":{"description":"invalid-scopes: Forbidden response.","content":{"application/json":{"schema":{"type":"string","example":"Provident harum quia et est."},"example":"Provident harum quia et est."}}}},"security":[{"jwt_header_Authorization":[]}]}}},"components":{"schemas":{"ChatSummaryResponse":{"type":"object","properties":{"length":{"type":"integer","description":"Length of the message sent","example":6468000556522877742,"format":"int64"},"message":{"type":"string","description":"Message sent to the server","example":"Distinctio omnis."},"sent_at":{"type":"string","description":"Time at which the message was sent","example":"2002-03-31T13:56:45Z","format":"date-time"}},"description":"ChatSummary result type (default view)","example":{"length":6468000556522877742,"message":"Distinctio omnis.","sent_at":"2002-03-31T13:56:45Z"},"required":["message","sent_at"]},"ChatSummaryResponseCollection":{"type":"array","items":{"$ref":"#/components/schemas/ChatSummaryResponse"},"description":"SummaryResponseBody is the result type for an array of ChatSummary (default view)","example":[{"length":6468000556522877742,"message":"Distinctio omnis.","sent_at":"2002-03-31T13:56:45Z"},{"length":6468000556522877742,"message":"Distinctio omnis.","sent_at":"2002-03-31T13:56:45Z"},{"length":6468000556522877742,"message":"Distinctio omnis.","sent_at":"2002-03-31T13:56:45Z"},{"length":6468000556522877742,"message":"Distinctio omnis.","sent_at":"2002-03-31T13:56:45Z"}]},"Event":{"type":"object","properties":{"action":{"type":"string","example":"added","enum":["added"]},"added_at":{"type":"string","description":"Time at which the message was added","example":"2001-05-15T07:30:58Z","format":"date-time"},"message":{"type":"string","description":"Message sent to the server","example":"Eum sequi veniam provident dolore velit."}},"example":{"action":"added","added_at":"2001-05-15T07:30:58Z","message":"Eum sequi veniam provident dolore velit."},"required":["message","action","added_at"]},"GoaSummary":{"type":"object","properties":{"length":{"type":"integer","description":"Length of the message sent","example":2987270872186463688,"format":"int64"},"message":{"type":"string","description":"Message sent to the server","example":"Deserunt velit tempore ducimus repellat aspernatur ipsum."},"sent_at":{"type":"string","description":"Time at which the message was sent","example":"1970-02-21T15:32:11Z","format":"date-time"}},"example":{"length":2987270872186463688,"message":"Deserunt velit tempore ducimus repellat aspernatur ipsum.","sent_at":"1970-02-21T15:32:11Z"},"required":["message","sent_at"]}},"securitySchemes":{"basic_header_Authorization":{"type":"http","description":"Secures the login endpoint.","scheme":"basic"},"jwt_header_Authorization":{"type":"http","description":"Secures endpoint by requiring a valid JWT token. Supports scopes \"stream:read\" and \"stream:write\".","scheme":"bearer","bearerFormat":"JWT"}}},"tags":[{"name":"chatter","description":"The chatter service implements a simple client and server chat."}]} \ No newline at end of file diff --git a/streaming/gen/http/openapi3.yaml b/streaming/gen/http/openapi3.yaml index 7d20f4463..9c4eb39df 100644 --- a/streaming/gen/http/openapi3.yaml +++ b/streaming/gen/http/openapi3.yaml @@ -20,24 +20,24 @@ paths: application/json: schema: type: string - example: Ad placeat et numquam corrupti. - example: Eveniet tenetur non et dolorem ut et. + example: Esse perferendis explicabo amet praesentium ducimus. + example: Esse perferendis explicabo amet praesentium ducimus. "401": description: 'unauthorized: Unauthorized response.' content: application/json: schema: type: string - example: Vel facilis voluptatem hic ea inventore. - example: Vel facilis voluptatem hic ea inventore. + example: Beatae impedit. + example: Beatae impedit. "403": description: 'invalid-scopes: Forbidden response.' content: application/json: schema: type: string - example: Animi voluptatem aut. - example: Animi voluptatem aut. + example: Earum magnam aut quisquam accusantium aut. + example: Earum magnam aut quisquam accusantium aut. security: - jwt_header_Authorization: [] /history: @@ -55,8 +55,11 @@ paths: schema: type: string description: View to use to render the result - example: Velit similique quia eum quasi assumenda. - example: Possimus odit ad maxime ducimus. + example: default + enum: + - tiny + - default + example: default responses: "101": description: Switching Protocols response. @@ -65,25 +68,25 @@ paths: schema: $ref: '#/components/schemas/GoaSummary' example: - length: 5079245588830096095 - message: Cupiditate error quam dolor quo repudiandae doloribus. - sent_at: "1973-09-12T13:29:27Z" + length: 2987270872186463688 + message: Deserunt velit tempore ducimus repellat aspernatur ipsum. + sent_at: "1970-02-21T15:32:11Z" "401": description: 'unauthorized: Unauthorized response.' content: application/json: schema: type: string - example: Impedit vel sit officiis qui non unde. - example: Impedit vel sit officiis qui non unde. + example: At autem voluptas. + example: At autem voluptas. "403": description: 'invalid-scopes: Forbidden response.' content: application/json: schema: type: string - example: Qui deserunt odio quia. - example: Qui deserunt odio quia. + example: Quaerat qui quidem earum. + example: Quaerat qui quidem earum. security: - jwt_header_Authorization: [] /listener: @@ -102,16 +105,16 @@ paths: application/json: schema: type: string - example: Ea rem expedita culpa dolor repudiandae cupiditate. - example: Ea rem expedita culpa dolor repudiandae cupiditate. + example: Et atque. + example: Et atque. "403": description: 'invalid-scopes: Forbidden response.' content: application/json: schema: type: string - example: Numquam vero eos explicabo. - example: Numquam vero eos explicabo. + example: Ducimus dolorem autem architecto magnam aspernatur est. + example: Ducimus dolorem autem architecto magnam aspernatur est. security: - jwt_header_Authorization: [] /login: @@ -129,8 +132,8 @@ paths: schema: type: string description: New JWT token - example: Molestiae et soluta non. - example: Molestiae et soluta non. + example: Saepe harum eligendi. + example: Saepe harum eligendi. "401": description: 'unauthorized: Unauthorized response.' content: @@ -138,8 +141,8 @@ paths: schema: type: string description: Credentials are invalid - example: In et. - example: In et. + example: Aliquid voluptate et vel. + example: Aliquid voluptate et vel. security: - basic_header_Authorization: [] /subscribe: @@ -158,24 +161,24 @@ paths: $ref: '#/components/schemas/Event' example: action: added - added_at: "2012-03-23T20:03:18Z" - message: Nostrum quia asperiores et sint deleniti cumque. + added_at: "2001-05-15T07:30:58Z" + message: Eum sequi veniam provident dolore velit. "401": description: 'unauthorized: Unauthorized response.' content: application/json: schema: type: string - example: Vel et dicta vero saepe. - example: Vel et dicta vero saepe. + example: Sed quis dolores rem. + example: Sed quis dolores rem. "403": description: 'invalid-scopes: Forbidden response.' content: application/json: schema: type: string - example: Inventore et ea neque. - example: Inventore et ea neque. + example: Facere libero culpa consequatur. + example: Facere libero culpa consequatur. security: - jwt_header_Authorization: [] /summary: @@ -193,31 +196,34 @@ paths: schema: $ref: '#/components/schemas/ChatSummaryResponseCollection' example: - - length: 6974027342252250665 - message: Porro velit. - sent_at: "1997-08-20T21:13:26Z" - - length: 6974027342252250665 - message: Porro velit. - sent_at: "1997-08-20T21:13:26Z" - - length: 6974027342252250665 - message: Porro velit. - sent_at: "1997-08-20T21:13:26Z" + - length: 6468000556522877742 + message: Distinctio omnis. + sent_at: "2002-03-31T13:56:45Z" + - length: 6468000556522877742 + message: Distinctio omnis. + sent_at: "2002-03-31T13:56:45Z" + - length: 6468000556522877742 + message: Distinctio omnis. + sent_at: "2002-03-31T13:56:45Z" + - length: 6468000556522877742 + message: Distinctio omnis. + sent_at: "2002-03-31T13:56:45Z" "401": description: 'unauthorized: Unauthorized response.' content: application/json: schema: type: string - example: Cupiditate eos aut. - example: Cupiditate eos aut. + example: Aut enim molestias eos nesciunt. + example: Aut enim molestias eos nesciunt. "403": description: 'invalid-scopes: Forbidden response.' content: application/json: schema: type: string - example: Recusandae esse nostrum. - example: Recusandae esse nostrum. + example: Provident harum quia et est. + example: Provident harum quia et est. security: - jwt_header_Authorization: [] components: @@ -228,22 +234,22 @@ components: length: type: integer description: Length of the message sent - example: 6974027342252250665 + example: 6468000556522877742 format: int64 message: type: string description: Message sent to the server - example: Porro velit. + example: Distinctio omnis. sent_at: type: string description: Time at which the message was sent - example: "1997-08-20T21:13:26Z" + example: "2002-03-31T13:56:45Z" format: date-time - description: ChatSummaryResponse result type (default view) + description: ChatSummary result type (default view) example: - length: 6974027342252250665 - message: Porro velit. - sent_at: "1997-08-20T21:13:26Z" + length: 6468000556522877742 + message: Distinctio omnis. + sent_at: "2002-03-31T13:56:45Z" required: - message - sent_at @@ -251,17 +257,20 @@ components: type: array items: $ref: '#/components/schemas/ChatSummaryResponse' - description: SummaryResponseBody is the result type for an array of ChatSummaryResponse (default view) + description: SummaryResponseBody is the result type for an array of ChatSummary (default view) example: - - length: 6974027342252250665 - message: Porro velit. - sent_at: "1997-08-20T21:13:26Z" - - length: 6974027342252250665 - message: Porro velit. - sent_at: "1997-08-20T21:13:26Z" - - length: 6974027342252250665 - message: Porro velit. - sent_at: "1997-08-20T21:13:26Z" + - length: 6468000556522877742 + message: Distinctio omnis. + sent_at: "2002-03-31T13:56:45Z" + - length: 6468000556522877742 + message: Distinctio omnis. + sent_at: "2002-03-31T13:56:45Z" + - length: 6468000556522877742 + message: Distinctio omnis. + sent_at: "2002-03-31T13:56:45Z" + - length: 6468000556522877742 + message: Distinctio omnis. + sent_at: "2002-03-31T13:56:45Z" Event: type: object properties: @@ -273,16 +282,16 @@ components: added_at: type: string description: Time at which the message was added - example: "2012-03-23T20:03:18Z" + example: "2001-05-15T07:30:58Z" format: date-time message: type: string description: Message sent to the server - example: Nostrum quia asperiores et sint deleniti cumque. + example: Eum sequi veniam provident dolore velit. example: action: added - added_at: "2012-03-23T20:03:18Z" - message: Nostrum quia asperiores et sint deleniti cumque. + added_at: "2001-05-15T07:30:58Z" + message: Eum sequi veniam provident dolore velit. required: - message - action @@ -293,21 +302,21 @@ components: length: type: integer description: Length of the message sent - example: 8240426892299723366 + example: 2987270872186463688 format: int64 message: type: string description: Message sent to the server - example: Sunt vitae dolor cumque blanditiis ut similique. + example: Deserunt velit tempore ducimus repellat aspernatur ipsum. sent_at: type: string description: Time at which the message was sent - example: "2003-03-20T17:38:02Z" + example: "1970-02-21T15:32:11Z" format: date-time example: - length: 8240426892299723366 - message: Sunt vitae dolor cumque blanditiis ut similique. - sent_at: "2003-03-20T17:38:02Z" + length: 2987270872186463688 + message: Deserunt velit tempore ducimus repellat aspernatur ipsum. + sent_at: "1970-02-21T15:32:11Z" required: - message - sent_at diff --git a/tracing/cmd/calc/http.go b/tracing/cmd/calc/http.go index 664de8273..3b4c765ad 100644 --- a/tracing/cmd/calc/http.go +++ b/tracing/cmd/calc/http.go @@ -94,14 +94,16 @@ func handleHTTPServer(ctx context.Context, u *url.URL, calcEndpoints *calcsvc.En errc <- srv.ListenAndServe() }() - ctx.Done() + <-ctx.Done() logger.Printf("shutting down HTTP server at %q", u.Host) // Shutdown gracefully with a 30s timeout. - ctx, cancel := context.WithTimeout(ctx, 30*time.Second) + shutdownCtx, cancel := context.WithTimeout(context.Background(), 30*time.Second) defer cancel() - srv.Shutdown(ctx) + if err := srv.Shutdown(shutdownCtx); err != nil { + logger.Printf("failed to shut down HTTP server at %q: %s", u.Host, err) + } }() } diff --git a/tus/gen/http/cli/upload/cli.go b/tus/gen/http/cli/upload/cli.go index 8b6fc76bc..b834fee2b 100644 --- a/tus/gen/http/cli/upload/cli.go +++ b/tus/gen/http/cli/upload/cli.go @@ -29,7 +29,7 @@ func UsageCommands() []string { // UsageExamples produces an example of a valid invocation of the CLI tool. func UsageExamples() string { - return os.Args[0] + " " + "tus head --id \"q6rv3ofkukars65g6hq6\" --tus-resumable \"1.0.0\"" + "\n" + + return os.Args[0] + " " + "tus head --id \"9rh2ia73s256mmjr8kpt\" --tus-resumable \"1.0.0\"" + "\n" + "" } @@ -213,7 +213,7 @@ func tusHeadUsage() { fmt.Fprintln(os.Stderr) fmt.Fprintln(os.Stderr, "Example:") - fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "tus head --id \"q6rv3ofkukars65g6hq6\" --tus-resumable \"1.0.0\"") + fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "tus head --id \"9rh2ia73s256mmjr8kpt\" --tus-resumable \"1.0.0\"") } func tusPatchUsage() { @@ -239,7 +239,7 @@ func tusPatchUsage() { fmt.Fprintln(os.Stderr) fmt.Fprintln(os.Stderr, "Example:") - fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "tus patch --id \"kbk9n1g4u0hd4fgheooj\" --tus-resumable \"1.0.0\" --upload-offset 6034095156383247232 --upload-checksum \"sha1 Kq5sNclPz7QV2+lfQIuc6R7oRu0=\" --stream \"goa.png\"") + fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "tus patch --id \"7pc6esaasn4ffl7qlrcf\" --tus-resumable \"1.0.0\" --upload-offset 2754385183630855775 --upload-checksum \"sha1 Kq5sNclPz7QV2+lfQIuc6R7oRu0=\" --stream \"goa.png\"") } func tusOptionsUsage() { @@ -285,7 +285,7 @@ func tusPostUsage() { fmt.Fprintln(os.Stderr) fmt.Fprintln(os.Stderr, "Example:") - fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "tus post --tus-resumable \"1.0.0\" --upload-length 5038928809516772226 --upload-defer-length 1 --upload-checksum \"sha1 Kq5sNclPz7QV2+lfQIuc6R7oRu0=\" --upload-metadata \"key1 val1,key2 val2\" --tus-max-size 3823710747799640147 --stream \"goa.png\"") + fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "tus post --tus-resumable \"1.0.0\" --upload-length 7643821282600180792 --upload-defer-length 1 --upload-checksum \"sha1 Kq5sNclPz7QV2+lfQIuc6R7oRu0=\" --upload-metadata \"key1 val1,key2 val2\" --tus-max-size 3748981059432342735 --stream \"goa.png\"") } func tusDeleteUsage() { @@ -305,5 +305,5 @@ func tusDeleteUsage() { fmt.Fprintln(os.Stderr) fmt.Fprintln(os.Stderr, "Example:") - fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "tus delete --id \"l8gvnb0heh9gmtcdonme\" --tus-resumable \"1.0.0\"") + fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "tus delete --id \"fgn8ncu1uo2shoc1tgd3\" --tus-resumable \"1.0.0\"") } diff --git a/tus/gen/http/openapi.json b/tus/gen/http/openapi.json index 9d8b475aa..8a27b7887 100644 --- a/tus/gen/http/openapi.json +++ b/tus/gen/http/openapi.json @@ -1 +1 @@ -{"swagger":"2.0","info":{"title":"File Upload Service","description":"HTTP service for uploading files using the tus protocol (https://tus.io)","version":"0.0.1"},"host":"localhost:8000","consumes":["application/json","application/xml","application/gob"],"produces":["application/json","application/xml","application/gob"],"paths":{"/upload":{"post":{"tags":["tus"],"summary":"post tus","description":"Clients use the POST method against a known upload creation URL to request a new upload resource.","operationId":"tus#post","parameters":[{"name":"Tus-Resumable","in":"header","description":"tusResumable represents a tus protocol version.","required":true,"type":"string","pattern":"^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(-(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(\\.(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\\+[0-9a-zA-Z-]+(\\.[0-9a-zA-Z-]+)*)?$"},{"name":"Upload-Length","in":"header","description":"uploadLength represents the size of the entire upload in bytes.","required":false,"type":"integer","format":"int64"},{"name":"Upload-Defer-Length","in":"header","description":"The Upload-Defer-Length request and response header indicates that the size of the upload is not known currently and will be transferred later.","required":false,"type":"integer","enum":[1]},{"name":"Upload-Checksum","in":"header","description":"A Client MAY include the Upload-Checksum header in a PATCH request. Once the entire request has been received, the Server MUST verify the uploaded chunk against the provided checksum using the specified algorithm.","required":false,"type":"string"},{"name":"Upload-Metadata","in":"header","description":"The Client MAY supply the Upload-Metadata header to add additional metadata to the upload creation request.","required":false,"type":"string"},{"name":"Tus-Max-Size","in":"header","description":"Length of the upload","required":false,"type":"integer","format":"int64"}],"responses":{"201":{"description":"Created response.","headers":{"Location":{"description":"URL of created resource","type":"string","format":"uri"},"Tus-Resumable":{"description":"tusResumable represents a tus protocol version.","type":"string","pattern":"^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(-(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(\\.(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\\+[0-9a-zA-Z-]+(\\.[0-9a-zA-Z-]+)*)?$"},"Upload-Expires":{"description":"The Upload-Expires response header indicates the time after which the unfinished upload expires.","type":"string"},"Upload-Offset":{"description":"uploadOffset represents a byte offset within a resource.","type":"integer","format":"int64"}}},"400":{"description":"Bad Request response.","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","type":"boolean"},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","type":"string"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","type":"string"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","type":"string"},"goa-attribute-temporary":{"description":"Is the error temporary?","type":"boolean"},"goa-attribute-timeout":{"description":"Is the error a timeout?","type":"boolean"}}},"412":{"description":"Precondition Failed response.","headers":{"Tus-Version":{"description":"Comma separated list of supported versions.","type":"string","enum":["1.0.0"]}}},"413":{"description":"Request Entity Too Large response.","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","type":"boolean"},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","type":"string"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","type":"string"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","type":"string"},"goa-attribute-temporary":{"description":"Is the error temporary?","type":"boolean"},"goa-attribute-timeout":{"description":"Is the error a timeout?","type":"boolean"}}},"460":{"description":" response.","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","type":"boolean"},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","type":"string"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","type":"string"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","type":"string"},"goa-attribute-temporary":{"description":"Is the error temporary?","type":"boolean"},"goa-attribute-timeout":{"description":"Is the error a timeout?","type":"boolean"}}}},"schemes":["http"]},"options":{"tags":["tus"],"summary":"options tus","description":"Clients use the OPTIONS method to gather information about the Server’s current configuration.","operationId":"tus#options","responses":{"204":{"description":"No Content response.","headers":{"Tus-Checksum-Algorithm":{"description":"A Client MAY include the Upload-Checksum header in a PATCH request. Once the entire request has been received, the Server MUST verify the uploaded chunk against the provided checksum using the specified algorithm.","type":"string","enum":["md5,sha1,crc32"]},"Tus-Extension":{"description":"tusExtension is a comma separated list of extensions supported by the server. This implementation supports the creation, creation-with-upload, expiration, checksum and termination extensions","type":"string","enum":["creation,creation-with-upload,creation-defer-length,expiration,checksum,termination"]},"Tus-Max-Size":{"description":"tusMaxSize represents the maximum allowed size of an entire upload in bytes.","type":"integer","format":"int64"},"Tus-Resumable":{"description":"tusResumable represents a tus protocol version.","type":"string","pattern":"^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(-(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(\\.(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\\+[0-9a-zA-Z-]+(\\.[0-9a-zA-Z-]+)*)?$"},"Tus-Version":{"description":"tusVersion is a comma separated list of protocol versions supported by the server. This implementation only supports 1.0.0.","type":"string","enum":["1.0.0"]}}},"412":{"description":"Precondition Failed response.","headers":{"Tus-Version":{"description":"Comma separated list of supported versions.","type":"string","enum":["1.0.0"]}}}},"schemes":["http"]}},"/upload/{id}":{"delete":{"tags":["tus"],"summary":"delete tus","description":"Clients use the DELETE method to terminate completed and unfinished uploads allowing the Server to free up used resources.","operationId":"tus#delete","parameters":[{"name":"id","in":"path","description":"IDs are generated using Xid: https://github.com/rs/xid","required":true,"type":"string","pattern":"[0-9a-v]{20}"},{"name":"Tus-Resumable","in":"header","description":"tusResumable represents a tus protocol version.","required":true,"type":"string","pattern":"^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(-(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(\\.(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\\+[0-9a-zA-Z-]+(\\.[0-9a-zA-Z-]+)*)?$"}],"responses":{"204":{"description":"No Content response.","headers":{"Tus-Resumable":{"description":"tusResumable represents a tus protocol version.","type":"string","pattern":"^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(-(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(\\.(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\\+[0-9a-zA-Z-]+(\\.[0-9a-zA-Z-]+)*)?$"}}},"404":{"description":"Not Found response.","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","type":"boolean"},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","type":"string"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","type":"string"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","type":"string"},"goa-attribute-temporary":{"description":"Is the error temporary?","type":"boolean"},"goa-attribute-timeout":{"description":"Is the error a timeout?","type":"boolean"}}},"410":{"description":"Gone response.","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","type":"boolean"},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","type":"string"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","type":"string"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","type":"string"},"goa-attribute-temporary":{"description":"Is the error temporary?","type":"boolean"},"goa-attribute-timeout":{"description":"Is the error a timeout?","type":"boolean"}}},"412":{"description":"Precondition Failed response.","headers":{"Tus-Version":{"description":"Comma separated list of supported versions.","type":"string","enum":["1.0.0"]}}}},"schemes":["http"]},"head":{"tags":["tus"],"summary":"head tus","description":"Clients use the HEAD request to determine the offset at which the upload should be continued.","operationId":"tus#head","parameters":[{"name":"id","in":"path","description":"IDs are generated using Xid: https://github.com/rs/xid","required":true,"type":"string","pattern":"[0-9a-v]{20}"},{"name":"Tus-Resumable","in":"header","description":"tusResumable represents a tus protocol version.","required":true,"type":"string","pattern":"^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(-(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(\\.(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\\+[0-9a-zA-Z-]+(\\.[0-9a-zA-Z-]+)*)?$"}],"responses":{"200":{"description":"OK response.","headers":{"Tus-Resumable":{"description":"tusResumable represents a tus protocol version.","type":"string","pattern":"^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(-(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(\\.(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\\+[0-9a-zA-Z-]+(\\.[0-9a-zA-Z-]+)*)?$"},"Upload-Defer-Length":{"description":"The Upload-Defer-Length request and response header indicates that the size of the upload is not known currently and will be transferred later.","type":"integer","enum":[1]},"Upload-Length":{"description":"uploadLength represents the size of the entire upload in bytes.","type":"integer","format":"int64"},"Upload-Metadata":{"description":"The Client MAY supply the Upload-Metadata header to add additional metadata to the upload creation request.","type":"string"},"Upload-Offset":{"description":"uploadOffset represents a byte offset within a resource.","type":"integer","format":"int64"}}},"404":{"description":"Not Found response.","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","type":"boolean"},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","type":"string"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","type":"string"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","type":"string"},"goa-attribute-temporary":{"description":"Is the error temporary?","type":"boolean"},"goa-attribute-timeout":{"description":"Is the error a timeout?","type":"boolean"}}},"410":{"description":"Gone response.","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","type":"boolean"},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","type":"string"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","type":"string"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","type":"string"},"goa-attribute-temporary":{"description":"Is the error temporary?","type":"boolean"},"goa-attribute-timeout":{"description":"Is the error a timeout?","type":"boolean"}}},"412":{"description":"Precondition Failed response.","headers":{"Tus-Version":{"description":"Comma separated list of supported versions.","type":"string","enum":["1.0.0"]}}}},"schemes":["http"]},"patch":{"tags":["tus"],"summary":"patch tus","description":"Clients use the PATCH method to start or resume an upload.","operationId":"tus#patch","parameters":[{"name":"id","in":"path","description":"IDs are generated using Xid: https://github.com/rs/xid","required":true,"type":"string","pattern":"[0-9a-v]{20}"},{"name":"Tus-Resumable","in":"header","description":"tusResumable represents a tus protocol version.","required":true,"type":"string","pattern":"^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(-(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(\\.(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\\+[0-9a-zA-Z-]+(\\.[0-9a-zA-Z-]+)*)?$"},{"name":"Upload-Offset","in":"header","description":"uploadOffset represents a byte offset within a resource.","required":true,"type":"integer","format":"int64"},{"name":"Upload-Checksum","in":"header","description":"A Client MAY include the Upload-Checksum header in a PATCH request. Once the entire request has been received, the Server MUST verify the uploaded chunk against the provided checksum using the specified algorithm.","required":false,"type":"string"}],"responses":{"204":{"description":"No Content response.","headers":{"Tus-Resumable":{"description":"tusResumable represents a tus protocol version.","type":"string","pattern":"^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(-(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(\\.(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\\+[0-9a-zA-Z-]+(\\.[0-9a-zA-Z-]+)*)?$"},"Upload-Expires":{"description":"The Upload-Expires response header indicates the time after which the unfinished upload expires.","type":"string"},"Upload-Offset":{"description":"uploadOffset represents a byte offset within a resource.","type":"integer","format":"int64"}}},"400":{"description":"Bad Request response.","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","type":"boolean"},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","type":"string"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","type":"string"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","type":"string"},"goa-attribute-temporary":{"description":"Is the error temporary?","type":"boolean"},"goa-attribute-timeout":{"description":"Is the error a timeout?","type":"boolean"}}},"404":{"description":"Not Found response.","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","type":"boolean"},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","type":"string"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","type":"string"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","type":"string"},"goa-attribute-temporary":{"description":"Is the error temporary?","type":"boolean"},"goa-attribute-timeout":{"description":"Is the error a timeout?","type":"boolean"}}},"409":{"description":"Conflict response.","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","type":"boolean"},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","type":"string"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","type":"string"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","type":"string"},"goa-attribute-temporary":{"description":"Is the error temporary?","type":"boolean"},"goa-attribute-timeout":{"description":"Is the error a timeout?","type":"boolean"}}},"410":{"description":"Gone response.","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","type":"boolean"},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","type":"string"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","type":"string"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","type":"string"},"goa-attribute-temporary":{"description":"Is the error temporary?","type":"boolean"},"goa-attribute-timeout":{"description":"Is the error a timeout?","type":"boolean"}}},"412":{"description":"Precondition Failed response.","headers":{"Tus-Version":{"description":"Comma separated list of supported versions.","type":"string","enum":["1.0.0"]}}},"415":{"description":"Unsupported Media Type response.","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","type":"boolean"},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","type":"string"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","type":"string"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","type":"string"},"goa-attribute-temporary":{"description":"Is the error temporary?","type":"boolean"},"goa-attribute-timeout":{"description":"Is the error a timeout?","type":"boolean"}}},"460":{"description":" response.","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","type":"boolean"},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","type":"string"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","type":"string"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","type":"string"},"goa-attribute-temporary":{"description":"Is the error temporary?","type":"boolean"},"goa-attribute-timeout":{"description":"Is the error a timeout?","type":"boolean"}}},"500":{"description":"Internal Server Error response.","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","type":"boolean"},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","type":"string"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","type":"string"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","type":"string"},"goa-attribute-temporary":{"description":"Is the error temporary?","type":"boolean"},"goa-attribute-timeout":{"description":"Is the error a timeout?","type":"boolean"}}}},"schemes":["http"]}}}} \ No newline at end of file +{"swagger":"2.0","info":{"title":"File Upload Service","description":"HTTP service for uploading files using the tus protocol (https://tus.io)","version":"0.0.1"},"host":"localhost:8000","consumes":["application/json","application/xml","application/gob"],"produces":["application/json","application/xml","application/gob"],"paths":{"/upload":{"post":{"tags":["tus"],"summary":"post tus","description":"Clients use the POST method against a known upload creation URL to request a new upload resource.","operationId":"tus#post","parameters":[{"name":"Tus-Resumable","in":"header","description":"tusResumable represents a tus protocol version.","required":true,"type":"string","pattern":"^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(-(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(\\.(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\\+[0-9a-zA-Z-]+(\\.[0-9a-zA-Z-]+)*)?$"},{"name":"Upload-Length","in":"header","description":"uploadLength represents the size of the entire upload in bytes.","required":false,"type":"integer","format":"int64"},{"name":"Upload-Defer-Length","in":"header","description":"The Upload-Defer-Length request and response header indicates that the size of the upload is not known currently and will be transferred later.","required":false,"type":"integer","enum":[1]},{"name":"Upload-Checksum","in":"header","description":"A Client MAY include the Upload-Checksum header in a PATCH request. Once the entire request has been received, the Server MUST verify the uploaded chunk against the provided checksum using the specified algorithm.","required":false,"type":"string"},{"name":"Upload-Metadata","in":"header","description":"The Client MAY supply the Upload-Metadata header to add additional metadata to the upload creation request.","required":false,"type":"string"},{"name":"Tus-Max-Size","in":"header","description":"Length of the upload","required":false,"type":"integer","format":"int64"}],"responses":{"201":{"description":"Created response.","headers":{"Location":{"description":"URL of created resource","type":"string","format":"uri"},"Tus-Resumable":{"description":"tusResumable represents a tus protocol version.","type":"string","pattern":"^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(-(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(\\.(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\\+[0-9a-zA-Z-]+(\\.[0-9a-zA-Z-]+)*)?$"},"Upload-Expires":{"description":"The Upload-Expires response header indicates the time after which the unfinished upload expires.","type":"string"},"Upload-Offset":{"description":"uploadOffset represents a byte offset within a resource.","type":"integer","format":"int64"}}},"400":{"description":"InvalidChecksumAlgorithm: The checksum algorithm is not supported by the server.","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","type":"boolean"},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","type":"string"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","type":"string"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","type":"string"},"goa-attribute-temporary":{"description":"Is the error temporary?","type":"boolean"},"goa-attribute-timeout":{"description":"Is the error a timeout?","type":"boolean"}},"examples":{"application/json":{}}},"412":{"description":"InvalidTusResumable: If the version specified by the Client is not supported by the Server, it MUST respond with the 412 Precondition Failed status.","headers":{"Tus-Version":{"description":"Comma separated list of supported versions.","type":"string","enum":["1.0.0"]}}},"413":{"description":"MaximumSizeExceeded: If the length of the upload exceeds the maximum, which MAY be specified using the Tus-Max-Size header, the Server MUST respond with the 413 Request Entity Too Large status.","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","type":"boolean"},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","type":"string"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","type":"string"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","type":"string"},"goa-attribute-temporary":{"description":"Is the error temporary?","type":"boolean"},"goa-attribute-timeout":{"description":"Is the error a timeout?","type":"boolean"}},"examples":{"application/json":{}}},"460":{"description":"ChecksumMismatch: The checksums mismatch.","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","type":"boolean"},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","type":"string"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","type":"string"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","type":"string"},"goa-attribute-temporary":{"description":"Is the error temporary?","type":"boolean"},"goa-attribute-timeout":{"description":"Is the error a timeout?","type":"boolean"}},"examples":{"application/json":{}}}},"schemes":["http"]},"options":{"tags":["tus"],"summary":"options tus","description":"Clients use the OPTIONS method to gather information about the Server’s current configuration.","operationId":"tus#options","responses":{"204":{"description":"No Content response.","headers":{"Tus-Checksum-Algorithm":{"description":"A Client MAY include the Upload-Checksum header in a PATCH request. Once the entire request has been received, the Server MUST verify the uploaded chunk against the provided checksum using the specified algorithm.","type":"string","enum":["md5,sha1,crc32"]},"Tus-Extension":{"description":"tusExtension is a comma separated list of extensions supported by the server. This implementation supports the creation, creation-with-upload, expiration, checksum and termination extensions","type":"string","enum":["creation,creation-with-upload,creation-defer-length,expiration,checksum,termination"]},"Tus-Max-Size":{"description":"tusMaxSize represents the maximum allowed size of an entire upload in bytes.","type":"integer","format":"int64"},"Tus-Resumable":{"description":"tusResumable represents a tus protocol version.","type":"string","pattern":"^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(-(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(\\.(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\\+[0-9a-zA-Z-]+(\\.[0-9a-zA-Z-]+)*)?$"},"Tus-Version":{"description":"tusVersion is a comma separated list of protocol versions supported by the server. This implementation only supports 1.0.0.","type":"string","enum":["1.0.0"]}}},"412":{"description":"InvalidTusResumable: If the version specified by the Client is not supported by the Server, it MUST respond with the 412 Precondition Failed status.","headers":{"Tus-Version":{"description":"Comma separated list of supported versions.","type":"string","enum":["1.0.0"]}}}},"schemes":["http"]}},"/upload/{id}":{"delete":{"tags":["tus"],"summary":"delete tus","description":"Clients use the DELETE method to terminate completed and unfinished uploads allowing the Server to free up used resources.","operationId":"tus#delete","parameters":[{"name":"id","in":"path","description":"IDs are generated using Xid: https://github.com/rs/xid","required":true,"type":"string","pattern":"[0-9a-v]{20}"},{"name":"Tus-Resumable","in":"header","description":"tusResumable represents a tus protocol version.","required":true,"type":"string","pattern":"^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(-(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(\\.(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\\+[0-9a-zA-Z-]+(\\.[0-9a-zA-Z-]+)*)?$"}],"responses":{"204":{"description":"No Content response.","headers":{"Tus-Resumable":{"description":"tusResumable represents a tus protocol version.","type":"string","pattern":"^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(-(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(\\.(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\\+[0-9a-zA-Z-]+(\\.[0-9a-zA-Z-]+)*)?$"}}},"404":{"description":"NotFound: For all future requests to this URL, the Server SHOULD respond with the 404 Not Found or 410 Gone status.","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","type":"boolean"},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","type":"string"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","type":"string"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","type":"string"},"goa-attribute-temporary":{"description":"Is the error temporary?","type":"boolean"},"goa-attribute-timeout":{"description":"Is the error a timeout?","type":"boolean"}},"examples":{"application/json":{}}},"410":{"description":"Gone: For all future requests to this URL, the Server SHOULD respond with the 404 Not Found or 410 Gone status.","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","type":"boolean"},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","type":"string"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","type":"string"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","type":"string"},"goa-attribute-temporary":{"description":"Is the error temporary?","type":"boolean"},"goa-attribute-timeout":{"description":"Is the error a timeout?","type":"boolean"}},"examples":{"application/json":{}}},"412":{"description":"InvalidTusResumable: If the version specified by the Client is not supported by the Server, it MUST respond with the 412 Precondition Failed status.","headers":{"Tus-Version":{"description":"Comma separated list of supported versions.","type":"string","enum":["1.0.0"]}}}},"schemes":["http"]},"head":{"tags":["tus"],"summary":"head tus","description":"Clients use the HEAD request to determine the offset at which the upload should be continued.","operationId":"tus#head","parameters":[{"name":"id","in":"path","description":"IDs are generated using Xid: https://github.com/rs/xid","required":true,"type":"string","pattern":"[0-9a-v]{20}"},{"name":"Tus-Resumable","in":"header","description":"tusResumable represents a tus protocol version.","required":true,"type":"string","pattern":"^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(-(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(\\.(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\\+[0-9a-zA-Z-]+(\\.[0-9a-zA-Z-]+)*)?$"}],"responses":{"200":{"description":"OK response.","headers":{"Tus-Resumable":{"description":"tusResumable represents a tus protocol version.","type":"string","pattern":"^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(-(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(\\.(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\\+[0-9a-zA-Z-]+(\\.[0-9a-zA-Z-]+)*)?$"},"Upload-Defer-Length":{"description":"The Upload-Defer-Length request and response header indicates that the size of the upload is not known currently and will be transferred later.","type":"integer","enum":[1]},"Upload-Length":{"description":"uploadLength represents the size of the entire upload in bytes.","type":"integer","format":"int64"},"Upload-Metadata":{"description":"The Client MAY supply the Upload-Metadata header to add additional metadata to the upload creation request.","type":"string"},"Upload-Offset":{"description":"uploadOffset represents a byte offset within a resource.","type":"integer","format":"int64"}}},"404":{"description":"NotFound: If the resource is not found, the Server SHOULD return either the 404 Not Found, 410 Gone or 403 Forbidden status without the Upload-Offset header.","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","type":"boolean"},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","type":"string"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","type":"string"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","type":"string"},"goa-attribute-temporary":{"description":"Is the error temporary?","type":"boolean"},"goa-attribute-timeout":{"description":"Is the error a timeout?","type":"boolean"}},"examples":{"application/json":{}}},"410":{"description":"Gone: If the resource is not found, the Server SHOULD return either the 404 Not Found, 410 Gone or 403 Forbidden status without the Upload-Offset header.","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","type":"boolean"},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","type":"string"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","type":"string"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","type":"string"},"goa-attribute-temporary":{"description":"Is the error temporary?","type":"boolean"},"goa-attribute-timeout":{"description":"Is the error a timeout?","type":"boolean"}},"examples":{"application/json":{}}},"412":{"description":"InvalidTusResumable: If the version specified by the Client is not supported by the Server, it MUST respond with the 412 Precondition Failed status.","headers":{"Tus-Version":{"description":"Comma separated list of supported versions.","type":"string","enum":["1.0.0"]}}}},"schemes":["http"]},"patch":{"tags":["tus"],"summary":"patch tus","description":"Clients use the PATCH method to start or resume an upload.","operationId":"tus#patch","parameters":[{"name":"id","in":"path","description":"IDs are generated using Xid: https://github.com/rs/xid","required":true,"type":"string","pattern":"[0-9a-v]{20}"},{"name":"Tus-Resumable","in":"header","description":"tusResumable represents a tus protocol version.","required":true,"type":"string","pattern":"^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(-(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(\\.(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\\+[0-9a-zA-Z-]+(\\.[0-9a-zA-Z-]+)*)?$"},{"name":"Upload-Offset","in":"header","description":"uploadOffset represents a byte offset within a resource.","required":true,"type":"integer","format":"int64"},{"name":"Upload-Checksum","in":"header","description":"A Client MAY include the Upload-Checksum header in a PATCH request. Once the entire request has been received, the Server MUST verify the uploaded chunk against the provided checksum using the specified algorithm.","required":false,"type":"string"}],"responses":{"204":{"description":"No Content response.","headers":{"Tus-Resumable":{"description":"tusResumable represents a tus protocol version.","type":"string","pattern":"^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(-(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(\\.(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\\+[0-9a-zA-Z-]+(\\.[0-9a-zA-Z-]+)*)?$"},"Upload-Expires":{"description":"The Upload-Expires response header indicates the time after which the unfinished upload expires.","type":"string"},"Upload-Offset":{"description":"uploadOffset represents a byte offset within a resource.","type":"integer","format":"int64"}}},"400":{"description":"InvalidChecksumAlgorithm: The checksum algorithm is not supported by the server.","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","type":"boolean"},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","type":"string"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","type":"string"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","type":"string"},"goa-attribute-temporary":{"description":"Is the error temporary?","type":"boolean"},"goa-attribute-timeout":{"description":"Is the error a timeout?","type":"boolean"}},"examples":{"application/json":{}}},"404":{"description":"NotFound: If a Client does attempt to resume an upload which has since been removed by the Server, the Server SHOULD respond with the404 Not Found or 410 Gone status.","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","type":"boolean"},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","type":"string"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","type":"string"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","type":"string"},"goa-attribute-temporary":{"description":"Is the error temporary?","type":"boolean"},"goa-attribute-timeout":{"description":"Is the error a timeout?","type":"boolean"}},"examples":{"application/json":{}}},"409":{"description":"InvalidOffset: If the offsets do not match, the Server MUST respond with the 409 Conflict status without modifying the upload resource.","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","type":"boolean"},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","type":"string"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","type":"string"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","type":"string"},"goa-attribute-temporary":{"description":"Is the error temporary?","type":"boolean"},"goa-attribute-timeout":{"description":"Is the error a timeout?","type":"boolean"}},"examples":{"application/json":{}}},"410":{"description":"Gone: If a Client does attempt to resume an upload which has since been removed by the Server, the Server SHOULD respond with the404 Not Found or 410 Gone status.","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","type":"boolean"},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","type":"string"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","type":"string"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","type":"string"},"goa-attribute-temporary":{"description":"Is the error temporary?","type":"boolean"},"goa-attribute-timeout":{"description":"Is the error a timeout?","type":"boolean"}},"examples":{"application/json":{}}},"412":{"description":"InvalidTusResumable: If the version specified by the Client is not supported by the Server, it MUST respond with the 412 Precondition Failed status.","headers":{"Tus-Version":{"description":"Comma separated list of supported versions.","type":"string","enum":["1.0.0"]}}},"415":{"description":"InvalidContentType: All PATCH requests MUST use Content-Type: application/offset+octet-stream, otherwise the server SHOULD return a 415 Unsupported Media Type status.","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","type":"boolean"},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","type":"string"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","type":"string"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","type":"string"},"goa-attribute-temporary":{"description":"Is the error temporary?","type":"boolean"},"goa-attribute-timeout":{"description":"Is the error a timeout?","type":"boolean"}},"examples":{"application/json":{}}},"460":{"description":"ChecksumMismatch: The checksums mismatch.","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","type":"boolean"},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","type":"string"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","type":"string"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","type":"string"},"goa-attribute-temporary":{"description":"Is the error temporary?","type":"boolean"},"goa-attribute-timeout":{"description":"Is the error a timeout?","type":"boolean"}},"examples":{"application/json":{}}},"500":{"description":"Internal: Internal error","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","type":"boolean"},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","type":"string"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","type":"string"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","type":"string"},"goa-attribute-temporary":{"description":"Is the error temporary?","type":"boolean"},"goa-attribute-timeout":{"description":"Is the error a timeout?","type":"boolean"}},"examples":{"application/json":{}}}},"schemes":["http"]}}}} \ No newline at end of file diff --git a/tus/gen/http/openapi.yaml b/tus/gen/http/openapi.yaml index 20be6f327..06a4bd8de 100644 --- a/tus/gen/http/openapi.yaml +++ b/tus/gen/http/openapi.yaml @@ -76,7 +76,7 @@ paths: type: integer format: int64 "400": - description: Bad Request response. + description: 'InvalidChecksumAlgorithm: The checksum algorithm is not supported by the server.' headers: goa-attribute-fault: description: Is the error a server-side fault? @@ -96,8 +96,10 @@ paths: goa-attribute-timeout: description: Is the error a timeout? type: boolean + examples: + application/json: {} "412": - description: Precondition Failed response. + description: 'InvalidTusResumable: If the version specified by the Client is not supported by the Server, it MUST respond with the 412 Precondition Failed status.' headers: Tus-Version: description: Comma separated list of supported versions. @@ -105,7 +107,7 @@ paths: enum: - 1.0.0 "413": - description: Request Entity Too Large response. + description: 'MaximumSizeExceeded: If the length of the upload exceeds the maximum, which MAY be specified using the Tus-Max-Size header, the Server MUST respond with the 413 Request Entity Too Large status.' headers: goa-attribute-fault: description: Is the error a server-side fault? @@ -125,8 +127,10 @@ paths: goa-attribute-timeout: description: Is the error a timeout? type: boolean + examples: + application/json: {} "460": - description: ' response.' + description: 'ChecksumMismatch: The checksums mismatch.' headers: goa-attribute-fault: description: Is the error a server-side fault? @@ -146,6 +150,8 @@ paths: goa-attribute-timeout: description: Is the error a timeout? type: boolean + examples: + application/json: {} schemes: - http options: @@ -182,7 +188,7 @@ paths: enum: - 1.0.0 "412": - description: Precondition Failed response. + description: 'InvalidTusResumable: If the version specified by the Client is not supported by the Server, it MUST respond with the 412 Precondition Failed status.' headers: Tus-Version: description: Comma separated list of supported versions. @@ -220,7 +226,7 @@ paths: type: string pattern: ^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(-(0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(\.(0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\+[0-9a-zA-Z-]+(\.[0-9a-zA-Z-]+)*)?$ "404": - description: Not Found response. + description: 'NotFound: For all future requests to this URL, the Server SHOULD respond with the 404 Not Found or 410 Gone status.' headers: goa-attribute-fault: description: Is the error a server-side fault? @@ -240,8 +246,10 @@ paths: goa-attribute-timeout: description: Is the error a timeout? type: boolean + examples: + application/json: {} "410": - description: Gone response. + description: 'Gone: For all future requests to this URL, the Server SHOULD respond with the 404 Not Found or 410 Gone status.' headers: goa-attribute-fault: description: Is the error a server-side fault? @@ -261,8 +269,10 @@ paths: goa-attribute-timeout: description: Is the error a timeout? type: boolean + examples: + application/json: {} "412": - description: Precondition Failed response. + description: 'InvalidTusResumable: If the version specified by the Client is not supported by the Server, it MUST respond with the 412 Precondition Failed status.' headers: Tus-Version: description: Comma separated list of supported versions. @@ -315,7 +325,7 @@ paths: type: integer format: int64 "404": - description: Not Found response. + description: 'NotFound: If the resource is not found, the Server SHOULD return either the 404 Not Found, 410 Gone or 403 Forbidden status without the Upload-Offset header.' headers: goa-attribute-fault: description: Is the error a server-side fault? @@ -335,8 +345,10 @@ paths: goa-attribute-timeout: description: Is the error a timeout? type: boolean + examples: + application/json: {} "410": - description: Gone response. + description: 'Gone: If the resource is not found, the Server SHOULD return either the 404 Not Found, 410 Gone or 403 Forbidden status without the Upload-Offset header.' headers: goa-attribute-fault: description: Is the error a server-side fault? @@ -356,8 +368,10 @@ paths: goa-attribute-timeout: description: Is the error a timeout? type: boolean + examples: + application/json: {} "412": - description: Precondition Failed response. + description: 'InvalidTusResumable: If the version specified by the Client is not supported by the Server, it MUST respond with the 412 Precondition Failed status.' headers: Tus-Version: description: Comma separated list of supported versions. @@ -412,7 +426,7 @@ paths: type: integer format: int64 "400": - description: Bad Request response. + description: 'InvalidChecksumAlgorithm: The checksum algorithm is not supported by the server.' headers: goa-attribute-fault: description: Is the error a server-side fault? @@ -432,8 +446,10 @@ paths: goa-attribute-timeout: description: Is the error a timeout? type: boolean + examples: + application/json: {} "404": - description: Not Found response. + description: 'NotFound: If a Client does attempt to resume an upload which has since been removed by the Server, the Server SHOULD respond with the404 Not Found or 410 Gone status.' headers: goa-attribute-fault: description: Is the error a server-side fault? @@ -453,8 +469,10 @@ paths: goa-attribute-timeout: description: Is the error a timeout? type: boolean + examples: + application/json: {} "409": - description: Conflict response. + description: 'InvalidOffset: If the offsets do not match, the Server MUST respond with the 409 Conflict status without modifying the upload resource.' headers: goa-attribute-fault: description: Is the error a server-side fault? @@ -474,8 +492,10 @@ paths: goa-attribute-timeout: description: Is the error a timeout? type: boolean + examples: + application/json: {} "410": - description: Gone response. + description: 'Gone: If a Client does attempt to resume an upload which has since been removed by the Server, the Server SHOULD respond with the404 Not Found or 410 Gone status.' headers: goa-attribute-fault: description: Is the error a server-side fault? @@ -495,8 +515,10 @@ paths: goa-attribute-timeout: description: Is the error a timeout? type: boolean + examples: + application/json: {} "412": - description: Precondition Failed response. + description: 'InvalidTusResumable: If the version specified by the Client is not supported by the Server, it MUST respond with the 412 Precondition Failed status.' headers: Tus-Version: description: Comma separated list of supported versions. @@ -504,7 +526,7 @@ paths: enum: - 1.0.0 "415": - description: Unsupported Media Type response. + description: 'InvalidContentType: All PATCH requests MUST use Content-Type: application/offset+octet-stream, otherwise the server SHOULD return a 415 Unsupported Media Type status.' headers: goa-attribute-fault: description: Is the error a server-side fault? @@ -524,8 +546,10 @@ paths: goa-attribute-timeout: description: Is the error a timeout? type: boolean + examples: + application/json: {} "460": - description: ' response.' + description: 'ChecksumMismatch: The checksums mismatch.' headers: goa-attribute-fault: description: Is the error a server-side fault? @@ -545,8 +569,10 @@ paths: goa-attribute-timeout: description: Is the error a timeout? type: boolean + examples: + application/json: {} "500": - description: Internal Server Error response. + description: 'Internal: Internal error' headers: goa-attribute-fault: description: Is the error a server-side fault? @@ -566,5 +592,7 @@ paths: goa-attribute-timeout: description: Is the error a timeout? type: boolean + examples: + application/json: {} schemes: - http diff --git a/tus/gen/http/openapi3.2.json b/tus/gen/http/openapi3.2.json index 0fa818bc6..6f22b46dc 100644 --- a/tus/gen/http/openapi3.2.json +++ b/tus/gen/http/openapi3.2.json @@ -1 +1 @@ -{"openapi":"3.2.0","info":{"title":"File Upload Service","description":"HTTP service for uploading files using the tus protocol (https://tus.io)","version":"0.0.1"},"servers":[{"url":"http://localhost:8000/upload","name":"Upload","description":"Upload hosts the upload service."}],"paths":{"/upload":{"options":{"tags":["tus"],"summary":"options tus","description":"Clients use the OPTIONS method to gather information about the Server’s current configuration.","operationId":"tus#options","responses":{"204":{"description":"No Content response.","headers":{"Tus-Checksum-Algorithm":{"description":"A Client MAY include the Upload-Checksum header in a PATCH request. Once the entire request has been received, the Server MUST verify the uploaded chunk against the provided checksum using the specified algorithm.","schema":{"type":"string","description":"A Client MAY include the Upload-Checksum header in a PATCH request. Once the entire request has been received, the Server MUST verify the uploaded chunk against the provided checksum using the specified algorithm.","example":"md5,sha1,crc32","enum":["md5,sha1,crc32"]},"example":"md5,sha1,crc32"},"Tus-Extension":{"description":"tusExtension is a comma separated list of extensions supported by the server. This implementation supports the creation, creation-with-upload, expiration, checksum and termination extensions","schema":{"type":"string","description":"tusExtension is a comma separated list of extensions supported by the server. This implementation supports the creation, creation-with-upload, expiration, checksum and termination extensions","example":"creation,creation-with-upload,creation-defer-length,expiration,checksum,termination","enum":["creation,creation-with-upload,creation-defer-length,expiration,checksum,termination"]},"example":"creation,creation-with-upload,creation-defer-length,expiration,checksum,termination"},"Tus-Max-Size":{"description":"tusMaxSize represents the maximum allowed size of an entire upload in bytes.","schema":{"type":"integer","description":"tusMaxSize represents the maximum allowed size of an entire upload in bytes.","example":1013258800689943877,"format":"int64"},"example":2314505768905968202},"Tus-Resumable":{"description":"tusResumable represents a tus protocol version.","schema":{"type":"string","description":"tusResumable represents a tus protocol version.","example":"1.0.0","pattern":"^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(-(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(\\.(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\\+[0-9a-zA-Z-]+(\\.[0-9a-zA-Z-]+)*)?$"},"example":"1.0.0"},"Tus-Version":{"description":"tusVersion is a comma separated list of protocol versions supported by the server. This implementation only supports 1.0.0.","schema":{"type":"string","description":"tusVersion is a comma separated list of protocol versions supported by the server. This implementation only supports 1.0.0.","example":"1.0.0","enum":["1.0.0"]},"example":"1.0.0"}}},"412":{"description":"InvalidTusResumable: If the version specified by the Client is not supported by the Server, it MUST respond with the 412 Precondition Failed status.","headers":{"Tus-Version":{"description":"Comma separated list of supported versions.","schema":{"type":"string","description":"Comma separated list of supported versions.","example":"1.0.0","enum":["1.0.0"]},"example":"1.0.0"}}}}},"post":{"tags":["tus"],"summary":"post tus","description":"Clients use the POST method against a known upload creation URL to request a new upload resource.","operationId":"tus#post","parameters":[{"name":"Tus-Resumable","in":"header","description":"tusResumable represents a tus protocol version.","required":true,"schema":{"type":"string","description":"tusResumable represents a tus protocol version.","example":"1.0.0","pattern":"^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(-(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(\\.(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\\+[0-9a-zA-Z-]+(\\.[0-9a-zA-Z-]+)*)?$"},"example":"1.0.0"},{"name":"Upload-Length","in":"header","description":"uploadLength represents the size of the entire upload in bytes.","schema":{"type":"integer","description":"uploadLength represents the size of the entire upload in bytes.","example":5038928809516772226,"format":"int64"},"example":5150934415033324711},{"name":"Upload-Defer-Length","in":"header","description":"The Upload-Defer-Length request and response header indicates that the size of the upload is not known currently and will be transferred later.","schema":{"type":"integer","description":"The Upload-Defer-Length request and response header indicates that the size of the upload is not known currently and will be transferred later.","example":1,"enum":[1],"format":"int64"},"example":1},{"name":"Upload-Checksum","in":"header","description":"A Client MAY include the Upload-Checksum header in a PATCH request. Once the entire request has been received, the Server MUST verify the uploaded chunk against the provided checksum using the specified algorithm.","schema":{"type":"string","description":"A Client MAY include the Upload-Checksum header in a PATCH request. Once the entire request has been received, the Server MUST verify the uploaded chunk against the provided checksum using the specified algorithm.","example":"sha1 Kq5sNclPz7QV2+lfQIuc6R7oRu0="},"example":"sha1 Kq5sNclPz7QV2+lfQIuc6R7oRu0="},{"name":"Upload-Metadata","in":"header","description":"The Client MAY supply the Upload-Metadata header to add additional metadata to the upload creation request.","schema":{"type":"string","description":"The Client MAY supply the Upload-Metadata header to add additional metadata to the upload creation request.","example":"key1 val1,key2 val2"},"example":"key1 val1,key2 val2"},{"name":"Tus-Max-Size","in":"header","description":"Length of the upload","schema":{"type":"integer","description":"Length of the upload","example":3823710747799640147,"format":"int64"},"example":1267051366245696839}],"responses":{"201":{"description":"Created response.","headers":{"Location":{"description":"URL of created resource","schema":{"type":"string","description":"URL of created resource","example":"/files/123","format":"uri"},"example":"/files/123"},"Tus-Resumable":{"description":"tusResumable represents a tus protocol version.","schema":{"type":"string","description":"tusResumable represents a tus protocol version.","example":"1.0.0","pattern":"^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(-(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(\\.(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\\+[0-9a-zA-Z-]+(\\.[0-9a-zA-Z-]+)*)?$"},"example":"1.0.0"},"Upload-Expires":{"description":"The Upload-Expires response header indicates the time after which the unfinished upload expires.","schema":{"type":"string","description":"The Upload-Expires response header indicates the time after which the unfinished upload expires.","example":"Wed, 25 Jun 2014 16:00:00 GMT"},"example":"Wed, 25 Jun 2014 16:00:00 GMT"},"Upload-Offset":{"description":"uploadOffset represents a byte offset within a resource.","schema":{"type":"integer","description":"uploadOffset represents a byte offset within a resource.","example":399962519172712526,"format":"int64"},"example":4810967207691105196}}},"400":{"description":"InvalidChecksumAlgorithm: The checksum algorithm is not supported by the server.","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","schema":{"type":"boolean","description":"Is the error a server-side fault?","example":true},"example":false},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","schema":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"example":"123abc"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","schema":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"example":"parameter 'p' must be an integer"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","schema":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"example":"bad_request"},"goa-attribute-temporary":{"description":"Is the error temporary?","schema":{"type":"boolean","description":"Is the error temporary?","example":true},"example":false},"goa-attribute-timeout":{"description":"Is the error a timeout?","schema":{"type":"boolean","description":"Is the error a timeout?","example":false},"example":true}}},"412":{"description":"InvalidTusResumable: If the version specified by the Client is not supported by the Server, it MUST respond with the 412 Precondition Failed status.","headers":{"Tus-Version":{"description":"Comma separated list of supported versions.","schema":{"type":"string","description":"Comma separated list of supported versions.","example":"1.0.0","enum":["1.0.0"]},"example":"1.0.0"}}},"413":{"description":"MaximumSizeExceeded: If the length of the upload exceeds the maximum, which MAY be specified using the Tus-Max-Size header, the Server MUST respond with the 413 Request Entity Too Large status.","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","schema":{"type":"boolean","description":"Is the error a server-side fault?","example":true},"example":false},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","schema":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"example":"123abc"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","schema":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"example":"parameter 'p' must be an integer"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","schema":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"example":"bad_request"},"goa-attribute-temporary":{"description":"Is the error temporary?","schema":{"type":"boolean","description":"Is the error temporary?","example":true},"example":false},"goa-attribute-timeout":{"description":"Is the error a timeout?","schema":{"type":"boolean","description":"Is the error a timeout?","example":false},"example":true}}},"460":{"description":"ChecksumMismatch: The checksums mismatch.","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","schema":{"type":"boolean","description":"Is the error a server-side fault?","example":true},"example":false},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","schema":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"example":"123abc"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","schema":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"example":"parameter 'p' must be an integer"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","schema":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"example":"bad_request"},"goa-attribute-temporary":{"description":"Is the error temporary?","schema":{"type":"boolean","description":"Is the error temporary?","example":true},"example":false},"goa-attribute-timeout":{"description":"Is the error a timeout?","schema":{"type":"boolean","description":"Is the error a timeout?","example":false},"example":true}}}}}},"/upload/{id}":{"delete":{"tags":["tus"],"summary":"delete tus","description":"Clients use the DELETE method to terminate completed and unfinished uploads allowing the Server to free up used resources.","operationId":"tus#delete","parameters":[{"name":"id","in":"path","description":"IDs are generated using Xid: https://github.com/rs/xid","required":true,"schema":{"type":"string","description":"IDs are generated using Xid: https://github.com/rs/xid","example":"l8gvnb0heh9gmtcdonme","pattern":"[0-9a-v]{20}"},"example":"4a7cfcbpum4qskf2i29r"},{"name":"Tus-Resumable","in":"header","description":"tusResumable represents a tus protocol version.","required":true,"schema":{"type":"string","description":"tusResumable represents a tus protocol version.","example":"1.0.0","pattern":"^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(-(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(\\.(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\\+[0-9a-zA-Z-]+(\\.[0-9a-zA-Z-]+)*)?$"},"example":"1.0.0"}],"responses":{"204":{"description":"No Content response.","headers":{"Tus-Resumable":{"description":"tusResumable represents a tus protocol version.","schema":{"type":"string","description":"tusResumable represents a tus protocol version.","example":"1.0.0","pattern":"^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(-(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(\\.(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\\+[0-9a-zA-Z-]+(\\.[0-9a-zA-Z-]+)*)?$"},"example":"1.0.0"}}},"404":{"description":"NotFound: For all future requests to this URL, the Server SHOULD respond with the 404 Not Found or 410 Gone status.","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","schema":{"type":"boolean","description":"Is the error a server-side fault?","example":true},"example":false},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","schema":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"example":"123abc"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","schema":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"example":"parameter 'p' must be an integer"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","schema":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"example":"bad_request"},"goa-attribute-temporary":{"description":"Is the error temporary?","schema":{"type":"boolean","description":"Is the error temporary?","example":true},"example":false},"goa-attribute-timeout":{"description":"Is the error a timeout?","schema":{"type":"boolean","description":"Is the error a timeout?","example":false},"example":true}}},"410":{"description":"Gone: For all future requests to this URL, the Server SHOULD respond with the 404 Not Found or 410 Gone status.","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","schema":{"type":"boolean","description":"Is the error a server-side fault?","example":true},"example":false},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","schema":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"example":"123abc"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","schema":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"example":"parameter 'p' must be an integer"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","schema":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"example":"bad_request"},"goa-attribute-temporary":{"description":"Is the error temporary?","schema":{"type":"boolean","description":"Is the error temporary?","example":true},"example":false},"goa-attribute-timeout":{"description":"Is the error a timeout?","schema":{"type":"boolean","description":"Is the error a timeout?","example":false},"example":true}}},"412":{"description":"InvalidTusResumable: If the version specified by the Client is not supported by the Server, it MUST respond with the 412 Precondition Failed status.","headers":{"Tus-Version":{"description":"Comma separated list of supported versions.","schema":{"type":"string","description":"Comma separated list of supported versions.","example":"1.0.0","enum":["1.0.0"]},"example":"1.0.0"}}}}},"head":{"tags":["tus"],"summary":"head tus","description":"Clients use the HEAD request to determine the offset at which the upload should be continued.","operationId":"tus#head","parameters":[{"name":"id","in":"path","description":"IDs are generated using Xid: https://github.com/rs/xid","required":true,"schema":{"type":"string","description":"IDs are generated using Xid: https://github.com/rs/xid","example":"q6rv3ofkukars65g6hq6","pattern":"[0-9a-v]{20}"},"example":"gci6h77lvrh5fel0fpvn"},{"name":"Tus-Resumable","in":"header","description":"tusResumable represents a tus protocol version.","required":true,"schema":{"type":"string","description":"tusResumable represents a tus protocol version.","example":"1.0.0","pattern":"^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(-(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(\\.(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\\+[0-9a-zA-Z-]+(\\.[0-9a-zA-Z-]+)*)?$"},"example":"1.0.0"}],"responses":{"200":{"description":"OK response.","headers":{"Tus-Resumable":{"description":"tusResumable represents a tus protocol version.","schema":{"type":"string","description":"tusResumable represents a tus protocol version.","example":"1.0.0","pattern":"^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(-(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(\\.(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\\+[0-9a-zA-Z-]+(\\.[0-9a-zA-Z-]+)*)?$"},"example":"1.0.0"},"Upload-Defer-Length":{"description":"The Upload-Defer-Length request and response header indicates that the size of the upload is not known currently and will be transferred later.","schema":{"type":"integer","description":"The Upload-Defer-Length request and response header indicates that the size of the upload is not known currently and will be transferred later.","example":1,"enum":[1],"format":"int64"},"example":1},"Upload-Length":{"description":"uploadLength represents the size of the entire upload in bytes.","schema":{"type":"integer","description":"uploadLength represents the size of the entire upload in bytes.","example":8560999440483038788,"format":"int64"},"example":1104782678439473248},"Upload-Metadata":{"description":"The Client MAY supply the Upload-Metadata header to add additional metadata to the upload creation request.","schema":{"type":"string","description":"The Client MAY supply the Upload-Metadata header to add additional metadata to the upload creation request.","example":"key1 val1,key2 val2"},"example":"key1 val1,key2 val2"},"Upload-Offset":{"description":"uploadOffset represents a byte offset within a resource.","schema":{"type":"integer","description":"uploadOffset represents a byte offset within a resource.","example":399962519172712526,"format":"int64"},"example":4810967207691105196}}},"404":{"description":"NotFound: If the resource is not found, the Server SHOULD return either the 404 Not Found, 410 Gone or 403 Forbidden status without the Upload-Offset header.","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","schema":{"type":"boolean","description":"Is the error a server-side fault?","example":true},"example":false},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","schema":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"example":"123abc"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","schema":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"example":"parameter 'p' must be an integer"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","schema":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"example":"bad_request"},"goa-attribute-temporary":{"description":"Is the error temporary?","schema":{"type":"boolean","description":"Is the error temporary?","example":true},"example":false},"goa-attribute-timeout":{"description":"Is the error a timeout?","schema":{"type":"boolean","description":"Is the error a timeout?","example":false},"example":true}}},"410":{"description":"Gone: If the resource is not found, the Server SHOULD return either the 404 Not Found, 410 Gone or 403 Forbidden status without the Upload-Offset header.","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","schema":{"type":"boolean","description":"Is the error a server-side fault?","example":true},"example":false},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","schema":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"example":"123abc"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","schema":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"example":"parameter 'p' must be an integer"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","schema":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"example":"bad_request"},"goa-attribute-temporary":{"description":"Is the error temporary?","schema":{"type":"boolean","description":"Is the error temporary?","example":true},"example":false},"goa-attribute-timeout":{"description":"Is the error a timeout?","schema":{"type":"boolean","description":"Is the error a timeout?","example":false},"example":true}}},"412":{"description":"InvalidTusResumable: If the version specified by the Client is not supported by the Server, it MUST respond with the 412 Precondition Failed status.","headers":{"Tus-Version":{"description":"Comma separated list of supported versions.","schema":{"type":"string","description":"Comma separated list of supported versions.","example":"1.0.0","enum":["1.0.0"]},"example":"1.0.0"}}}}},"patch":{"tags":["tus"],"summary":"patch tus","description":"Clients use the PATCH method to start or resume an upload.","operationId":"tus#patch","parameters":[{"name":"id","in":"path","description":"IDs are generated using Xid: https://github.com/rs/xid","required":true,"schema":{"type":"string","description":"IDs are generated using Xid: https://github.com/rs/xid","example":"kbk9n1g4u0hd4fgheooj","pattern":"[0-9a-v]{20}"},"example":"36qdphsraeoin48e0v1k"},{"name":"Tus-Resumable","in":"header","description":"tusResumable represents a tus protocol version.","required":true,"schema":{"type":"string","description":"tusResumable represents a tus protocol version.","example":"1.0.0","pattern":"^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(-(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(\\.(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\\+[0-9a-zA-Z-]+(\\.[0-9a-zA-Z-]+)*)?$"},"example":"1.0.0"},{"name":"Upload-Offset","in":"header","description":"uploadOffset represents a byte offset within a resource.","required":true,"schema":{"type":"integer","description":"uploadOffset represents a byte offset within a resource.","example":6034095156383247232,"format":"int64"},"example":5253941728923434458},{"name":"Upload-Checksum","in":"header","description":"A Client MAY include the Upload-Checksum header in a PATCH request. Once the entire request has been received, the Server MUST verify the uploaded chunk against the provided checksum using the specified algorithm.","schema":{"type":"string","description":"A Client MAY include the Upload-Checksum header in a PATCH request. Once the entire request has been received, the Server MUST verify the uploaded chunk against the provided checksum using the specified algorithm.","example":"sha1 Kq5sNclPz7QV2+lfQIuc6R7oRu0="},"example":"sha1 Kq5sNclPz7QV2+lfQIuc6R7oRu0="}],"responses":{"204":{"description":"No Content response.","headers":{"Tus-Resumable":{"description":"tusResumable represents a tus protocol version.","schema":{"type":"string","description":"tusResumable represents a tus protocol version.","example":"1.0.0","pattern":"^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(-(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(\\.(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\\+[0-9a-zA-Z-]+(\\.[0-9a-zA-Z-]+)*)?$"},"example":"1.0.0"},"Upload-Expires":{"description":"The Upload-Expires response header indicates the time after which the unfinished upload expires.","schema":{"type":"string","description":"The Upload-Expires response header indicates the time after which the unfinished upload expires.","example":"Wed, 25 Jun 2014 16:00:00 GMT"},"example":"Wed, 25 Jun 2014 16:00:00 GMT"},"Upload-Offset":{"description":"uploadOffset represents a byte offset within a resource.","schema":{"type":"integer","description":"uploadOffset represents a byte offset within a resource.","example":399962519172712526,"format":"int64"},"example":4810967207691105196}}},"400":{"description":"InvalidChecksumAlgorithm: The checksum algorithm is not supported by the server.","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","schema":{"type":"boolean","description":"Is the error a server-side fault?","example":true},"example":false},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","schema":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"example":"123abc"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","schema":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"example":"parameter 'p' must be an integer"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","schema":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"example":"bad_request"},"goa-attribute-temporary":{"description":"Is the error temporary?","schema":{"type":"boolean","description":"Is the error temporary?","example":true},"example":false},"goa-attribute-timeout":{"description":"Is the error a timeout?","schema":{"type":"boolean","description":"Is the error a timeout?","example":false},"example":true}}},"404":{"description":"NotFound: If a Client does attempt to resume an upload which has since been removed by the Server, the Server SHOULD respond with the404 Not Found or 410 Gone status.","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","schema":{"type":"boolean","description":"Is the error a server-side fault?","example":true},"example":false},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","schema":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"example":"123abc"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","schema":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"example":"parameter 'p' must be an integer"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","schema":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"example":"bad_request"},"goa-attribute-temporary":{"description":"Is the error temporary?","schema":{"type":"boolean","description":"Is the error temporary?","example":true},"example":false},"goa-attribute-timeout":{"description":"Is the error a timeout?","schema":{"type":"boolean","description":"Is the error a timeout?","example":false},"example":true}}},"409":{"description":"InvalidOffset: If the offsets do not match, the Server MUST respond with the 409 Conflict status without modifying the upload resource.","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","schema":{"type":"boolean","description":"Is the error a server-side fault?","example":true},"example":false},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","schema":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"example":"123abc"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","schema":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"example":"parameter 'p' must be an integer"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","schema":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"example":"bad_request"},"goa-attribute-temporary":{"description":"Is the error temporary?","schema":{"type":"boolean","description":"Is the error temporary?","example":true},"example":false},"goa-attribute-timeout":{"description":"Is the error a timeout?","schema":{"type":"boolean","description":"Is the error a timeout?","example":false},"example":true}}},"410":{"description":"Gone: If a Client does attempt to resume an upload which has since been removed by the Server, the Server SHOULD respond with the404 Not Found or 410 Gone status.","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","schema":{"type":"boolean","description":"Is the error a server-side fault?","example":true},"example":false},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","schema":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"example":"123abc"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","schema":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"example":"parameter 'p' must be an integer"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","schema":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"example":"bad_request"},"goa-attribute-temporary":{"description":"Is the error temporary?","schema":{"type":"boolean","description":"Is the error temporary?","example":true},"example":false},"goa-attribute-timeout":{"description":"Is the error a timeout?","schema":{"type":"boolean","description":"Is the error a timeout?","example":false},"example":true}}},"412":{"description":"InvalidTusResumable: If the version specified by the Client is not supported by the Server, it MUST respond with the 412 Precondition Failed status.","headers":{"Tus-Version":{"description":"Comma separated list of supported versions.","schema":{"type":"string","description":"Comma separated list of supported versions.","example":"1.0.0","enum":["1.0.0"]},"example":"1.0.0"}}},"415":{"description":"InvalidContentType: All PATCH requests MUST use Content-Type: application/offset+octet-stream, otherwise the server SHOULD return a 415 Unsupported Media Type status.","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","schema":{"type":"boolean","description":"Is the error a server-side fault?","example":true},"example":false},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","schema":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"example":"123abc"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","schema":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"example":"parameter 'p' must be an integer"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","schema":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"example":"bad_request"},"goa-attribute-temporary":{"description":"Is the error temporary?","schema":{"type":"boolean","description":"Is the error temporary?","example":true},"example":false},"goa-attribute-timeout":{"description":"Is the error a timeout?","schema":{"type":"boolean","description":"Is the error a timeout?","example":false},"example":true}}},"460":{"description":"ChecksumMismatch: The checksums mismatch.","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","schema":{"type":"boolean","description":"Is the error a server-side fault?","example":true},"example":false},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","schema":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"example":"123abc"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","schema":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"example":"parameter 'p' must be an integer"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","schema":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"example":"bad_request"},"goa-attribute-temporary":{"description":"Is the error temporary?","schema":{"type":"boolean","description":"Is the error temporary?","example":true},"example":false},"goa-attribute-timeout":{"description":"Is the error a timeout?","schema":{"type":"boolean","description":"Is the error a timeout?","example":false},"example":true}}},"500":{"description":"Internal: Internal error","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","schema":{"type":"boolean","description":"Is the error a server-side fault?","example":true},"example":false},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","schema":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"example":"123abc"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","schema":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"example":"parameter 'p' must be an integer"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","schema":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"example":"bad_request"},"goa-attribute-temporary":{"description":"Is the error temporary?","schema":{"type":"boolean","description":"Is the error temporary?","example":true},"example":false},"goa-attribute-timeout":{"description":"Is the error a timeout?","schema":{"type":"boolean","description":"Is the error a timeout?","example":false},"example":true}}}}}}},"components":{},"tags":[{"name":"tus","description":"The tus service exposes the methods required to implement the tus protocol"}]} \ No newline at end of file +{"openapi":"3.2.0","info":{"title":"File Upload Service","description":"HTTP service for uploading files using the tus protocol (https://tus.io)","version":"0.0.1"},"servers":[{"url":"http://localhost:8000/upload","name":"Upload","description":"Upload hosts the upload service."}],"paths":{"/upload":{"options":{"tags":["tus"],"summary":"options tus","description":"Clients use the OPTIONS method to gather information about the Server’s current configuration.","operationId":"tus#options","responses":{"204":{"description":"No Content response.","headers":{"Tus-Checksum-Algorithm":{"description":"A Client MAY include the Upload-Checksum header in a PATCH request. Once the entire request has been received, the Server MUST verify the uploaded chunk against the provided checksum using the specified algorithm.","schema":{"type":"string","description":"A Client MAY include the Upload-Checksum header in a PATCH request. Once the entire request has been received, the Server MUST verify the uploaded chunk against the provided checksum using the specified algorithm.","example":"md5,sha1,crc32","enum":["md5,sha1,crc32"]},"example":"md5,sha1,crc32"},"Tus-Extension":{"description":"tusExtension is a comma separated list of extensions supported by the server. This implementation supports the creation, creation-with-upload, expiration, checksum and termination extensions","schema":{"type":"string","description":"tusExtension is a comma separated list of extensions supported by the server. This implementation supports the creation, creation-with-upload, expiration, checksum and termination extensions","example":"creation,creation-with-upload,creation-defer-length,expiration,checksum,termination","enum":["creation,creation-with-upload,creation-defer-length,expiration,checksum,termination"]},"example":"creation,creation-with-upload,creation-defer-length,expiration,checksum,termination"},"Tus-Max-Size":{"description":"tusMaxSize represents the maximum allowed size of an entire upload in bytes.","schema":{"type":"integer","description":"tusMaxSize represents the maximum allowed size of an entire upload in bytes.","example":8712211226016374128,"format":"int64"},"example":8712211226016374128},"Tus-Resumable":{"description":"tusResumable represents a tus protocol version.","schema":{"type":"string","description":"tusResumable represents a tus protocol version.","example":"1.0.0","pattern":"^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(-(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(\\.(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\\+[0-9a-zA-Z-]+(\\.[0-9a-zA-Z-]+)*)?$"},"example":"1.0.0"},"Tus-Version":{"description":"tusVersion is a comma separated list of protocol versions supported by the server. This implementation only supports 1.0.0.","schema":{"type":"string","description":"tusVersion is a comma separated list of protocol versions supported by the server. This implementation only supports 1.0.0.","example":"1.0.0","enum":["1.0.0"]},"example":"1.0.0"}}},"412":{"description":"InvalidTusResumable: If the version specified by the Client is not supported by the Server, it MUST respond with the 412 Precondition Failed status.","headers":{"Tus-Version":{"description":"Comma separated list of supported versions.","schema":{"type":"string","description":"Comma separated list of supported versions.","example":"1.0.0","enum":["1.0.0"]},"example":"1.0.0"}}}}},"post":{"tags":["tus"],"summary":"post tus","description":"Clients use the POST method against a known upload creation URL to request a new upload resource.","operationId":"tus#post","parameters":[{"name":"Tus-Resumable","in":"header","description":"tusResumable represents a tus protocol version.","required":true,"schema":{"type":"string","description":"tusResumable represents a tus protocol version.","example":"1.0.0","pattern":"^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(-(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(\\.(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\\+[0-9a-zA-Z-]+(\\.[0-9a-zA-Z-]+)*)?$"},"example":"1.0.0"},{"name":"Upload-Length","in":"header","description":"uploadLength represents the size of the entire upload in bytes.","schema":{"type":"integer","description":"uploadLength represents the size of the entire upload in bytes.","example":7643821282600180792,"format":"int64"},"example":7643821282600180792},{"name":"Upload-Defer-Length","in":"header","description":"The Upload-Defer-Length request and response header indicates that the size of the upload is not known currently and will be transferred later.","schema":{"type":"integer","description":"The Upload-Defer-Length request and response header indicates that the size of the upload is not known currently and will be transferred later.","example":1,"enum":[1],"format":"int64"},"example":1},{"name":"Upload-Checksum","in":"header","description":"A Client MAY include the Upload-Checksum header in a PATCH request. Once the entire request has been received, the Server MUST verify the uploaded chunk against the provided checksum using the specified algorithm.","schema":{"type":"string","description":"A Client MAY include the Upload-Checksum header in a PATCH request. Once the entire request has been received, the Server MUST verify the uploaded chunk against the provided checksum using the specified algorithm.","example":"sha1 Kq5sNclPz7QV2+lfQIuc6R7oRu0="},"example":"sha1 Kq5sNclPz7QV2+lfQIuc6R7oRu0="},{"name":"Upload-Metadata","in":"header","description":"The Client MAY supply the Upload-Metadata header to add additional metadata to the upload creation request.","schema":{"type":"string","description":"The Client MAY supply the Upload-Metadata header to add additional metadata to the upload creation request.","example":"key1 val1,key2 val2"},"example":"key1 val1,key2 val2"},{"name":"Tus-Max-Size","in":"header","description":"Length of the upload","schema":{"type":"integer","description":"Length of the upload","example":3748981059432342735,"format":"int64"},"example":3748981059432342735}],"responses":{"201":{"description":"Created response.","headers":{"Location":{"description":"URL of created resource","schema":{"type":"string","description":"URL of created resource","example":"/files/123","format":"uri"},"example":"/files/123"},"Tus-Resumable":{"description":"tusResumable represents a tus protocol version.","schema":{"type":"string","description":"tusResumable represents a tus protocol version.","example":"1.0.0","pattern":"^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(-(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(\\.(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\\+[0-9a-zA-Z-]+(\\.[0-9a-zA-Z-]+)*)?$"},"example":"1.0.0"},"Upload-Expires":{"description":"The Upload-Expires response header indicates the time after which the unfinished upload expires.","schema":{"type":"string","description":"The Upload-Expires response header indicates the time after which the unfinished upload expires.","example":"Wed, 25 Jun 2014 16:00:00 GMT"},"example":"Wed, 25 Jun 2014 16:00:00 GMT"},"Upload-Offset":{"description":"uploadOffset represents a byte offset within a resource.","schema":{"type":"integer","description":"uploadOffset represents a byte offset within a resource.","example":3875770313577187398,"format":"int64"},"example":3875770313577187398}}},"400":{"description":"InvalidChecksumAlgorithm: The checksum algorithm is not supported by the server.","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","schema":{"type":"boolean","description":"Is the error a server-side fault?","example":true},"example":true},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","schema":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"example":"123abc"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","schema":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"example":"parameter 'p' must be an integer"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","schema":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"example":"bad_request"},"goa-attribute-temporary":{"description":"Is the error temporary?","schema":{"type":"boolean","description":"Is the error temporary?","example":true},"example":true},"goa-attribute-timeout":{"description":"Is the error a timeout?","schema":{"type":"boolean","description":"Is the error a timeout?","example":false},"example":false}}},"412":{"description":"InvalidTusResumable: If the version specified by the Client is not supported by the Server, it MUST respond with the 412 Precondition Failed status.","headers":{"Tus-Version":{"description":"Comma separated list of supported versions.","schema":{"type":"string","description":"Comma separated list of supported versions.","example":"1.0.0","enum":["1.0.0"]},"example":"1.0.0"}}},"413":{"description":"MaximumSizeExceeded: If the length of the upload exceeds the maximum, which MAY be specified using the Tus-Max-Size header, the Server MUST respond with the 413 Request Entity Too Large status.","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","schema":{"type":"boolean","description":"Is the error a server-side fault?","example":true},"example":true},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","schema":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"example":"123abc"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","schema":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"example":"parameter 'p' must be an integer"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","schema":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"example":"bad_request"},"goa-attribute-temporary":{"description":"Is the error temporary?","schema":{"type":"boolean","description":"Is the error temporary?","example":true},"example":true},"goa-attribute-timeout":{"description":"Is the error a timeout?","schema":{"type":"boolean","description":"Is the error a timeout?","example":false},"example":false}}},"460":{"description":"ChecksumMismatch: The checksums mismatch.","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","schema":{"type":"boolean","description":"Is the error a server-side fault?","example":true},"example":true},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","schema":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"example":"123abc"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","schema":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"example":"parameter 'p' must be an integer"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","schema":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"example":"bad_request"},"goa-attribute-temporary":{"description":"Is the error temporary?","schema":{"type":"boolean","description":"Is the error temporary?","example":true},"example":true},"goa-attribute-timeout":{"description":"Is the error a timeout?","schema":{"type":"boolean","description":"Is the error a timeout?","example":false},"example":false}}}}}},"/upload/{id}":{"delete":{"tags":["tus"],"summary":"delete tus","description":"Clients use the DELETE method to terminate completed and unfinished uploads allowing the Server to free up used resources.","operationId":"tus#delete","parameters":[{"name":"id","in":"path","description":"IDs are generated using Xid: https://github.com/rs/xid","required":true,"schema":{"type":"string","description":"IDs are generated using Xid: https://github.com/rs/xid","example":"fgn8ncu1uo2shoc1tgd3","pattern":"[0-9a-v]{20}"},"example":"fgn8ncu1uo2shoc1tgd3"},{"name":"Tus-Resumable","in":"header","description":"tusResumable represents a tus protocol version.","required":true,"schema":{"type":"string","description":"tusResumable represents a tus protocol version.","example":"1.0.0","pattern":"^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(-(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(\\.(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\\+[0-9a-zA-Z-]+(\\.[0-9a-zA-Z-]+)*)?$"},"example":"1.0.0"}],"responses":{"204":{"description":"No Content response.","headers":{"Tus-Resumable":{"description":"tusResumable represents a tus protocol version.","schema":{"type":"string","description":"tusResumable represents a tus protocol version.","example":"1.0.0","pattern":"^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(-(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(\\.(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\\+[0-9a-zA-Z-]+(\\.[0-9a-zA-Z-]+)*)?$"},"example":"1.0.0"}}},"404":{"description":"NotFound: For all future requests to this URL, the Server SHOULD respond with the 404 Not Found or 410 Gone status.","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","schema":{"type":"boolean","description":"Is the error a server-side fault?","example":true},"example":true},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","schema":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"example":"123abc"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","schema":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"example":"parameter 'p' must be an integer"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","schema":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"example":"bad_request"},"goa-attribute-temporary":{"description":"Is the error temporary?","schema":{"type":"boolean","description":"Is the error temporary?","example":true},"example":true},"goa-attribute-timeout":{"description":"Is the error a timeout?","schema":{"type":"boolean","description":"Is the error a timeout?","example":false},"example":false}}},"410":{"description":"Gone: For all future requests to this URL, the Server SHOULD respond with the 404 Not Found or 410 Gone status.","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","schema":{"type":"boolean","description":"Is the error a server-side fault?","example":true},"example":true},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","schema":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"example":"123abc"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","schema":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"example":"parameter 'p' must be an integer"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","schema":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"example":"bad_request"},"goa-attribute-temporary":{"description":"Is the error temporary?","schema":{"type":"boolean","description":"Is the error temporary?","example":true},"example":true},"goa-attribute-timeout":{"description":"Is the error a timeout?","schema":{"type":"boolean","description":"Is the error a timeout?","example":false},"example":false}}},"412":{"description":"InvalidTusResumable: If the version specified by the Client is not supported by the Server, it MUST respond with the 412 Precondition Failed status.","headers":{"Tus-Version":{"description":"Comma separated list of supported versions.","schema":{"type":"string","description":"Comma separated list of supported versions.","example":"1.0.0","enum":["1.0.0"]},"example":"1.0.0"}}}}},"head":{"tags":["tus"],"summary":"head tus","description":"Clients use the HEAD request to determine the offset at which the upload should be continued.","operationId":"tus#head","parameters":[{"name":"id","in":"path","description":"IDs are generated using Xid: https://github.com/rs/xid","required":true,"schema":{"type":"string","description":"IDs are generated using Xid: https://github.com/rs/xid","example":"9rh2ia73s256mmjr8kpt","pattern":"[0-9a-v]{20}"},"example":"9rh2ia73s256mmjr8kpt"},{"name":"Tus-Resumable","in":"header","description":"tusResumable represents a tus protocol version.","required":true,"schema":{"type":"string","description":"tusResumable represents a tus protocol version.","example":"1.0.0","pattern":"^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(-(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(\\.(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\\+[0-9a-zA-Z-]+(\\.[0-9a-zA-Z-]+)*)?$"},"example":"1.0.0"}],"responses":{"200":{"description":"OK response.","headers":{"Tus-Resumable":{"description":"tusResumable represents a tus protocol version.","schema":{"type":"string","description":"tusResumable represents a tus protocol version.","example":"1.0.0","pattern":"^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(-(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(\\.(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\\+[0-9a-zA-Z-]+(\\.[0-9a-zA-Z-]+)*)?$"},"example":"1.0.0"},"Upload-Defer-Length":{"description":"The Upload-Defer-Length request and response header indicates that the size of the upload is not known currently and will be transferred later.","schema":{"type":"integer","description":"The Upload-Defer-Length request and response header indicates that the size of the upload is not known currently and will be transferred later.","example":1,"enum":[1],"format":"int64"},"example":1},"Upload-Length":{"description":"uploadLength represents the size of the entire upload in bytes.","schema":{"type":"integer","description":"uploadLength represents the size of the entire upload in bytes.","example":4029420343829624487,"format":"int64"},"example":4029420343829624487},"Upload-Metadata":{"description":"The Client MAY supply the Upload-Metadata header to add additional metadata to the upload creation request.","schema":{"type":"string","description":"The Client MAY supply the Upload-Metadata header to add additional metadata to the upload creation request.","example":"key1 val1,key2 val2"},"example":"key1 val1,key2 val2"},"Upload-Offset":{"description":"uploadOffset represents a byte offset within a resource.","schema":{"type":"integer","description":"uploadOffset represents a byte offset within a resource.","example":8805735883885567628,"format":"int64"},"example":8805735883885567628}}},"404":{"description":"NotFound: If the resource is not found, the Server SHOULD return either the 404 Not Found, 410 Gone or 403 Forbidden status without the Upload-Offset header.","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","schema":{"type":"boolean","description":"Is the error a server-side fault?","example":true},"example":true},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","schema":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"example":"123abc"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","schema":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"example":"parameter 'p' must be an integer"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","schema":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"example":"bad_request"},"goa-attribute-temporary":{"description":"Is the error temporary?","schema":{"type":"boolean","description":"Is the error temporary?","example":true},"example":true},"goa-attribute-timeout":{"description":"Is the error a timeout?","schema":{"type":"boolean","description":"Is the error a timeout?","example":false},"example":false}}},"410":{"description":"Gone: If the resource is not found, the Server SHOULD return either the 404 Not Found, 410 Gone or 403 Forbidden status without the Upload-Offset header.","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","schema":{"type":"boolean","description":"Is the error a server-side fault?","example":true},"example":true},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","schema":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"example":"123abc"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","schema":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"example":"parameter 'p' must be an integer"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","schema":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"example":"bad_request"},"goa-attribute-temporary":{"description":"Is the error temporary?","schema":{"type":"boolean","description":"Is the error temporary?","example":true},"example":true},"goa-attribute-timeout":{"description":"Is the error a timeout?","schema":{"type":"boolean","description":"Is the error a timeout?","example":false},"example":false}}},"412":{"description":"InvalidTusResumable: If the version specified by the Client is not supported by the Server, it MUST respond with the 412 Precondition Failed status.","headers":{"Tus-Version":{"description":"Comma separated list of supported versions.","schema":{"type":"string","description":"Comma separated list of supported versions.","example":"1.0.0","enum":["1.0.0"]},"example":"1.0.0"}}}}},"patch":{"tags":["tus"],"summary":"patch tus","description":"Clients use the PATCH method to start or resume an upload.","operationId":"tus#patch","parameters":[{"name":"id","in":"path","description":"IDs are generated using Xid: https://github.com/rs/xid","required":true,"schema":{"type":"string","description":"IDs are generated using Xid: https://github.com/rs/xid","example":"7pc6esaasn4ffl7qlrcf","pattern":"[0-9a-v]{20}"},"example":"7pc6esaasn4ffl7qlrcf"},{"name":"Tus-Resumable","in":"header","description":"tusResumable represents a tus protocol version.","required":true,"schema":{"type":"string","description":"tusResumable represents a tus protocol version.","example":"1.0.0","pattern":"^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(-(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(\\.(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\\+[0-9a-zA-Z-]+(\\.[0-9a-zA-Z-]+)*)?$"},"example":"1.0.0"},{"name":"Upload-Offset","in":"header","description":"uploadOffset represents a byte offset within a resource.","required":true,"schema":{"type":"integer","description":"uploadOffset represents a byte offset within a resource.","example":2754385183630855775,"format":"int64"},"example":2754385183630855775},{"name":"Upload-Checksum","in":"header","description":"A Client MAY include the Upload-Checksum header in a PATCH request. Once the entire request has been received, the Server MUST verify the uploaded chunk against the provided checksum using the specified algorithm.","schema":{"type":"string","description":"A Client MAY include the Upload-Checksum header in a PATCH request. Once the entire request has been received, the Server MUST verify the uploaded chunk against the provided checksum using the specified algorithm.","example":"sha1 Kq5sNclPz7QV2+lfQIuc6R7oRu0="},"example":"sha1 Kq5sNclPz7QV2+lfQIuc6R7oRu0="}],"responses":{"204":{"description":"No Content response.","headers":{"Tus-Resumable":{"description":"tusResumable represents a tus protocol version.","schema":{"type":"string","description":"tusResumable represents a tus protocol version.","example":"1.0.0","pattern":"^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(-(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(\\.(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\\+[0-9a-zA-Z-]+(\\.[0-9a-zA-Z-]+)*)?$"},"example":"1.0.0"},"Upload-Expires":{"description":"The Upload-Expires response header indicates the time after which the unfinished upload expires.","schema":{"type":"string","description":"The Upload-Expires response header indicates the time after which the unfinished upload expires.","example":"Wed, 25 Jun 2014 16:00:00 GMT"},"example":"Wed, 25 Jun 2014 16:00:00 GMT"},"Upload-Offset":{"description":"uploadOffset represents a byte offset within a resource.","schema":{"type":"integer","description":"uploadOffset represents a byte offset within a resource.","example":3831825769931087659,"format":"int64"},"example":3831825769931087659}}},"400":{"description":"InvalidChecksumAlgorithm: The checksum algorithm is not supported by the server.","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","schema":{"type":"boolean","description":"Is the error a server-side fault?","example":true},"example":true},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","schema":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"example":"123abc"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","schema":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"example":"parameter 'p' must be an integer"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","schema":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"example":"bad_request"},"goa-attribute-temporary":{"description":"Is the error temporary?","schema":{"type":"boolean","description":"Is the error temporary?","example":true},"example":true},"goa-attribute-timeout":{"description":"Is the error a timeout?","schema":{"type":"boolean","description":"Is the error a timeout?","example":false},"example":false}}},"404":{"description":"NotFound: If a Client does attempt to resume an upload which has since been removed by the Server, the Server SHOULD respond with the404 Not Found or 410 Gone status.","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","schema":{"type":"boolean","description":"Is the error a server-side fault?","example":true},"example":true},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","schema":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"example":"123abc"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","schema":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"example":"parameter 'p' must be an integer"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","schema":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"example":"bad_request"},"goa-attribute-temporary":{"description":"Is the error temporary?","schema":{"type":"boolean","description":"Is the error temporary?","example":true},"example":true},"goa-attribute-timeout":{"description":"Is the error a timeout?","schema":{"type":"boolean","description":"Is the error a timeout?","example":false},"example":false}}},"409":{"description":"InvalidOffset: If the offsets do not match, the Server MUST respond with the 409 Conflict status without modifying the upload resource.","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","schema":{"type":"boolean","description":"Is the error a server-side fault?","example":true},"example":true},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","schema":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"example":"123abc"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","schema":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"example":"parameter 'p' must be an integer"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","schema":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"example":"bad_request"},"goa-attribute-temporary":{"description":"Is the error temporary?","schema":{"type":"boolean","description":"Is the error temporary?","example":true},"example":true},"goa-attribute-timeout":{"description":"Is the error a timeout?","schema":{"type":"boolean","description":"Is the error a timeout?","example":false},"example":false}}},"410":{"description":"Gone: If a Client does attempt to resume an upload which has since been removed by the Server, the Server SHOULD respond with the404 Not Found or 410 Gone status.","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","schema":{"type":"boolean","description":"Is the error a server-side fault?","example":true},"example":true},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","schema":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"example":"123abc"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","schema":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"example":"parameter 'p' must be an integer"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","schema":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"example":"bad_request"},"goa-attribute-temporary":{"description":"Is the error temporary?","schema":{"type":"boolean","description":"Is the error temporary?","example":true},"example":true},"goa-attribute-timeout":{"description":"Is the error a timeout?","schema":{"type":"boolean","description":"Is the error a timeout?","example":false},"example":false}}},"412":{"description":"InvalidTusResumable: If the version specified by the Client is not supported by the Server, it MUST respond with the 412 Precondition Failed status.","headers":{"Tus-Version":{"description":"Comma separated list of supported versions.","schema":{"type":"string","description":"Comma separated list of supported versions.","example":"1.0.0","enum":["1.0.0"]},"example":"1.0.0"}}},"415":{"description":"InvalidContentType: All PATCH requests MUST use Content-Type: application/offset+octet-stream, otherwise the server SHOULD return a 415 Unsupported Media Type status.","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","schema":{"type":"boolean","description":"Is the error a server-side fault?","example":true},"example":true},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","schema":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"example":"123abc"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","schema":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"example":"parameter 'p' must be an integer"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","schema":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"example":"bad_request"},"goa-attribute-temporary":{"description":"Is the error temporary?","schema":{"type":"boolean","description":"Is the error temporary?","example":true},"example":true},"goa-attribute-timeout":{"description":"Is the error a timeout?","schema":{"type":"boolean","description":"Is the error a timeout?","example":false},"example":false}}},"460":{"description":"ChecksumMismatch: The checksums mismatch.","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","schema":{"type":"boolean","description":"Is the error a server-side fault?","example":true},"example":true},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","schema":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"example":"123abc"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","schema":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"example":"parameter 'p' must be an integer"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","schema":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"example":"bad_request"},"goa-attribute-temporary":{"description":"Is the error temporary?","schema":{"type":"boolean","description":"Is the error temporary?","example":true},"example":true},"goa-attribute-timeout":{"description":"Is the error a timeout?","schema":{"type":"boolean","description":"Is the error a timeout?","example":false},"example":false}}},"500":{"description":"Internal: Internal error","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","schema":{"type":"boolean","description":"Is the error a server-side fault?","example":true},"example":true},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","schema":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"example":"123abc"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","schema":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"example":"parameter 'p' must be an integer"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","schema":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"example":"bad_request"},"goa-attribute-temporary":{"description":"Is the error temporary?","schema":{"type":"boolean","description":"Is the error temporary?","example":true},"example":true},"goa-attribute-timeout":{"description":"Is the error a timeout?","schema":{"type":"boolean","description":"Is the error a timeout?","example":false},"example":false}}}}}}},"components":{},"tags":[{"name":"tus","description":"The tus service exposes the methods required to implement the tus protocol"}]} \ No newline at end of file diff --git a/tus/gen/http/openapi3.2.yaml b/tus/gen/http/openapi3.2.yaml index 5168282db..ab41feb7d 100644 --- a/tus/gen/http/openapi3.2.yaml +++ b/tus/gen/http/openapi3.2.yaml @@ -42,9 +42,9 @@ paths: schema: type: integer description: tusMaxSize represents the maximum allowed size of an entire upload in bytes. - example: 1013258800689943877 + example: 8712211226016374128 format: int64 - example: 2314505768905968202 + example: 8712211226016374128 Tus-Resumable: description: tusResumable represents a tus protocol version. schema: @@ -97,9 +97,9 @@ paths: schema: type: integer description: uploadLength represents the size of the entire upload in bytes. - example: 5038928809516772226 + example: 7643821282600180792 format: int64 - example: 5150934415033324711 + example: 7643821282600180792 - name: Upload-Defer-Length in: header description: The Upload-Defer-Length request and response header indicates that the size of the upload is not known currently and will be transferred later. @@ -133,9 +133,9 @@ paths: schema: type: integer description: Length of the upload - example: 3823710747799640147 + example: 3748981059432342735 format: int64 - example: 1267051366245696839 + example: 3748981059432342735 responses: "201": description: Created response. @@ -168,9 +168,9 @@ paths: schema: type: integer description: uploadOffset represents a byte offset within a resource. - example: 399962519172712526 + example: 3875770313577187398 format: int64 - example: 4810967207691105196 + example: 3875770313577187398 "400": description: 'InvalidChecksumAlgorithm: The checksum algorithm is not supported by the server.' headers: @@ -180,7 +180,7 @@ paths: type: boolean description: Is the error a server-side fault? example: true - example: false + example: true goa-attribute-id: description: ID is a unique identifier for this particular occurrence of the problem. schema: @@ -208,14 +208,14 @@ paths: type: boolean description: Is the error temporary? example: true - example: false + example: true goa-attribute-timeout: description: Is the error a timeout? schema: type: boolean description: Is the error a timeout? example: false - example: true + example: false "412": description: 'InvalidTusResumable: If the version specified by the Client is not supported by the Server, it MUST respond with the 412 Precondition Failed status.' headers: @@ -237,7 +237,7 @@ paths: type: boolean description: Is the error a server-side fault? example: true - example: false + example: true goa-attribute-id: description: ID is a unique identifier for this particular occurrence of the problem. schema: @@ -265,14 +265,14 @@ paths: type: boolean description: Is the error temporary? example: true - example: false + example: true goa-attribute-timeout: description: Is the error a timeout? schema: type: boolean description: Is the error a timeout? example: false - example: true + example: false "460": description: 'ChecksumMismatch: The checksums mismatch.' headers: @@ -282,7 +282,7 @@ paths: type: boolean description: Is the error a server-side fault? example: true - example: false + example: true goa-attribute-id: description: ID is a unique identifier for this particular occurrence of the problem. schema: @@ -310,14 +310,14 @@ paths: type: boolean description: Is the error temporary? example: true - example: false + example: true goa-attribute-timeout: description: Is the error a timeout? schema: type: boolean description: Is the error a timeout? example: false - example: true + example: false /upload/{id}: delete: tags: @@ -333,9 +333,9 @@ paths: schema: type: string description: 'IDs are generated using Xid: https://github.com/rs/xid' - example: l8gvnb0heh9gmtcdonme + example: fgn8ncu1uo2shoc1tgd3 pattern: '[0-9a-v]{20}' - example: 4a7cfcbpum4qskf2i29r + example: fgn8ncu1uo2shoc1tgd3 - name: Tus-Resumable in: header description: tusResumable represents a tus protocol version. @@ -367,7 +367,7 @@ paths: type: boolean description: Is the error a server-side fault? example: true - example: false + example: true goa-attribute-id: description: ID is a unique identifier for this particular occurrence of the problem. schema: @@ -395,14 +395,14 @@ paths: type: boolean description: Is the error temporary? example: true - example: false + example: true goa-attribute-timeout: description: Is the error a timeout? schema: type: boolean description: Is the error a timeout? example: false - example: true + example: false "410": description: 'Gone: For all future requests to this URL, the Server SHOULD respond with the 404 Not Found or 410 Gone status.' headers: @@ -412,7 +412,7 @@ paths: type: boolean description: Is the error a server-side fault? example: true - example: false + example: true goa-attribute-id: description: ID is a unique identifier for this particular occurrence of the problem. schema: @@ -440,14 +440,14 @@ paths: type: boolean description: Is the error temporary? example: true - example: false + example: true goa-attribute-timeout: description: Is the error a timeout? schema: type: boolean description: Is the error a timeout? example: false - example: true + example: false "412": description: 'InvalidTusResumable: If the version specified by the Client is not supported by the Server, it MUST respond with the 412 Precondition Failed status.' headers: @@ -474,9 +474,9 @@ paths: schema: type: string description: 'IDs are generated using Xid: https://github.com/rs/xid' - example: q6rv3ofkukars65g6hq6 + example: 9rh2ia73s256mmjr8kpt pattern: '[0-9a-v]{20}' - example: gci6h77lvrh5fel0fpvn + example: 9rh2ia73s256mmjr8kpt - name: Tus-Resumable in: header description: tusResumable represents a tus protocol version. @@ -514,9 +514,9 @@ paths: schema: type: integer description: uploadLength represents the size of the entire upload in bytes. - example: 8560999440483038788 + example: 4029420343829624487 format: int64 - example: 1104782678439473248 + example: 4029420343829624487 Upload-Metadata: description: The Client MAY supply the Upload-Metadata header to add additional metadata to the upload creation request. schema: @@ -529,9 +529,9 @@ paths: schema: type: integer description: uploadOffset represents a byte offset within a resource. - example: 399962519172712526 + example: 8805735883885567628 format: int64 - example: 4810967207691105196 + example: 8805735883885567628 "404": description: 'NotFound: If the resource is not found, the Server SHOULD return either the 404 Not Found, 410 Gone or 403 Forbidden status without the Upload-Offset header.' headers: @@ -541,7 +541,7 @@ paths: type: boolean description: Is the error a server-side fault? example: true - example: false + example: true goa-attribute-id: description: ID is a unique identifier for this particular occurrence of the problem. schema: @@ -569,14 +569,14 @@ paths: type: boolean description: Is the error temporary? example: true - example: false + example: true goa-attribute-timeout: description: Is the error a timeout? schema: type: boolean description: Is the error a timeout? example: false - example: true + example: false "410": description: 'Gone: If the resource is not found, the Server SHOULD return either the 404 Not Found, 410 Gone or 403 Forbidden status without the Upload-Offset header.' headers: @@ -586,7 +586,7 @@ paths: type: boolean description: Is the error a server-side fault? example: true - example: false + example: true goa-attribute-id: description: ID is a unique identifier for this particular occurrence of the problem. schema: @@ -614,14 +614,14 @@ paths: type: boolean description: Is the error temporary? example: true - example: false + example: true goa-attribute-timeout: description: Is the error a timeout? schema: type: boolean description: Is the error a timeout? example: false - example: true + example: false "412": description: 'InvalidTusResumable: If the version specified by the Client is not supported by the Server, it MUST respond with the 412 Precondition Failed status.' headers: @@ -648,9 +648,9 @@ paths: schema: type: string description: 'IDs are generated using Xid: https://github.com/rs/xid' - example: kbk9n1g4u0hd4fgheooj + example: 7pc6esaasn4ffl7qlrcf pattern: '[0-9a-v]{20}' - example: 36qdphsraeoin48e0v1k + example: 7pc6esaasn4ffl7qlrcf - name: Tus-Resumable in: header description: tusResumable represents a tus protocol version. @@ -668,9 +668,9 @@ paths: schema: type: integer description: uploadOffset represents a byte offset within a resource. - example: 6034095156383247232 + example: 2754385183630855775 format: int64 - example: 5253941728923434458 + example: 2754385183630855775 - name: Upload-Checksum in: header description: A Client MAY include the Upload-Checksum header in a PATCH request. Once the entire request has been received, the Server MUST verify the uploaded chunk against the provided checksum using the specified algorithm. @@ -703,9 +703,9 @@ paths: schema: type: integer description: uploadOffset represents a byte offset within a resource. - example: 399962519172712526 + example: 3831825769931087659 format: int64 - example: 4810967207691105196 + example: 3831825769931087659 "400": description: 'InvalidChecksumAlgorithm: The checksum algorithm is not supported by the server.' headers: @@ -715,7 +715,7 @@ paths: type: boolean description: Is the error a server-side fault? example: true - example: false + example: true goa-attribute-id: description: ID is a unique identifier for this particular occurrence of the problem. schema: @@ -743,14 +743,14 @@ paths: type: boolean description: Is the error temporary? example: true - example: false + example: true goa-attribute-timeout: description: Is the error a timeout? schema: type: boolean description: Is the error a timeout? example: false - example: true + example: false "404": description: 'NotFound: If a Client does attempt to resume an upload which has since been removed by the Server, the Server SHOULD respond with the404 Not Found or 410 Gone status.' headers: @@ -760,7 +760,7 @@ paths: type: boolean description: Is the error a server-side fault? example: true - example: false + example: true goa-attribute-id: description: ID is a unique identifier for this particular occurrence of the problem. schema: @@ -788,14 +788,14 @@ paths: type: boolean description: Is the error temporary? example: true - example: false + example: true goa-attribute-timeout: description: Is the error a timeout? schema: type: boolean description: Is the error a timeout? example: false - example: true + example: false "409": description: 'InvalidOffset: If the offsets do not match, the Server MUST respond with the 409 Conflict status without modifying the upload resource.' headers: @@ -805,7 +805,7 @@ paths: type: boolean description: Is the error a server-side fault? example: true - example: false + example: true goa-attribute-id: description: ID is a unique identifier for this particular occurrence of the problem. schema: @@ -833,14 +833,14 @@ paths: type: boolean description: Is the error temporary? example: true - example: false + example: true goa-attribute-timeout: description: Is the error a timeout? schema: type: boolean description: Is the error a timeout? example: false - example: true + example: false "410": description: 'Gone: If a Client does attempt to resume an upload which has since been removed by the Server, the Server SHOULD respond with the404 Not Found or 410 Gone status.' headers: @@ -850,7 +850,7 @@ paths: type: boolean description: Is the error a server-side fault? example: true - example: false + example: true goa-attribute-id: description: ID is a unique identifier for this particular occurrence of the problem. schema: @@ -878,14 +878,14 @@ paths: type: boolean description: Is the error temporary? example: true - example: false + example: true goa-attribute-timeout: description: Is the error a timeout? schema: type: boolean description: Is the error a timeout? example: false - example: true + example: false "412": description: 'InvalidTusResumable: If the version specified by the Client is not supported by the Server, it MUST respond with the 412 Precondition Failed status.' headers: @@ -907,7 +907,7 @@ paths: type: boolean description: Is the error a server-side fault? example: true - example: false + example: true goa-attribute-id: description: ID is a unique identifier for this particular occurrence of the problem. schema: @@ -935,14 +935,14 @@ paths: type: boolean description: Is the error temporary? example: true - example: false + example: true goa-attribute-timeout: description: Is the error a timeout? schema: type: boolean description: Is the error a timeout? example: false - example: true + example: false "460": description: 'ChecksumMismatch: The checksums mismatch.' headers: @@ -952,7 +952,7 @@ paths: type: boolean description: Is the error a server-side fault? example: true - example: false + example: true goa-attribute-id: description: ID is a unique identifier for this particular occurrence of the problem. schema: @@ -980,14 +980,14 @@ paths: type: boolean description: Is the error temporary? example: true - example: false + example: true goa-attribute-timeout: description: Is the error a timeout? schema: type: boolean description: Is the error a timeout? example: false - example: true + example: false "500": description: 'Internal: Internal error' headers: @@ -997,7 +997,7 @@ paths: type: boolean description: Is the error a server-side fault? example: true - example: false + example: true goa-attribute-id: description: ID is a unique identifier for this particular occurrence of the problem. schema: @@ -1025,14 +1025,14 @@ paths: type: boolean description: Is the error temporary? example: true - example: false + example: true goa-attribute-timeout: description: Is the error a timeout? schema: type: boolean description: Is the error a timeout? example: false - example: true + example: false components: {} tags: - name: tus diff --git a/tus/gen/http/openapi3.json b/tus/gen/http/openapi3.json index 8714b65c1..8e017ae03 100644 --- a/tus/gen/http/openapi3.json +++ b/tus/gen/http/openapi3.json @@ -1 +1 @@ -{"openapi":"3.0.3","info":{"title":"File Upload Service","description":"HTTP service for uploading files using the tus protocol (https://tus.io)","version":"0.0.1"},"servers":[{"url":"http://localhost:8000/upload","description":"Upload hosts the upload service."}],"paths":{"/upload":{"options":{"tags":["tus"],"summary":"options tus","description":"Clients use the OPTIONS method to gather information about the Server’s current configuration.","operationId":"tus#options","responses":{"204":{"description":"No Content response.","headers":{"Tus-Checksum-Algorithm":{"description":"A Client MAY include the Upload-Checksum header in a PATCH request. Once the entire request has been received, the Server MUST verify the uploaded chunk against the provided checksum using the specified algorithm.","schema":{"type":"string","description":"A Client MAY include the Upload-Checksum header in a PATCH request. Once the entire request has been received, the Server MUST verify the uploaded chunk against the provided checksum using the specified algorithm.","example":"md5,sha1,crc32","enum":["md5,sha1,crc32"]},"example":"md5,sha1,crc32"},"Tus-Extension":{"description":"tusExtension is a comma separated list of extensions supported by the server. This implementation supports the creation, creation-with-upload, expiration, checksum and termination extensions","schema":{"type":"string","description":"tusExtension is a comma separated list of extensions supported by the server. This implementation supports the creation, creation-with-upload, expiration, checksum and termination extensions","example":"creation,creation-with-upload,creation-defer-length,expiration,checksum,termination","enum":["creation,creation-with-upload,creation-defer-length,expiration,checksum,termination"]},"example":"creation,creation-with-upload,creation-defer-length,expiration,checksum,termination"},"Tus-Max-Size":{"description":"tusMaxSize represents the maximum allowed size of an entire upload in bytes.","schema":{"type":"integer","description":"tusMaxSize represents the maximum allowed size of an entire upload in bytes.","example":1013258800689943877,"format":"int64"},"example":2314505768905968202},"Tus-Resumable":{"description":"tusResumable represents a tus protocol version.","schema":{"type":"string","description":"tusResumable represents a tus protocol version.","example":"1.0.0","pattern":"^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(-(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(\\.(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\\+[0-9a-zA-Z-]+(\\.[0-9a-zA-Z-]+)*)?$"},"example":"1.0.0"},"Tus-Version":{"description":"tusVersion is a comma separated list of protocol versions supported by the server. This implementation only supports 1.0.0.","schema":{"type":"string","description":"tusVersion is a comma separated list of protocol versions supported by the server. This implementation only supports 1.0.0.","example":"1.0.0","enum":["1.0.0"]},"example":"1.0.0"}}},"412":{"description":"InvalidTusResumable: If the version specified by the Client is not supported by the Server, it MUST respond with the 412 Precondition Failed status.","headers":{"Tus-Version":{"description":"Comma separated list of supported versions.","schema":{"type":"string","description":"Comma separated list of supported versions.","example":"1.0.0","enum":["1.0.0"]},"example":"1.0.0"}}}}},"post":{"tags":["tus"],"summary":"post tus","description":"Clients use the POST method against a known upload creation URL to request a new upload resource.","operationId":"tus#post","parameters":[{"name":"Tus-Resumable","in":"header","description":"tusResumable represents a tus protocol version.","required":true,"schema":{"type":"string","description":"tusResumable represents a tus protocol version.","example":"1.0.0","pattern":"^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(-(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(\\.(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\\+[0-9a-zA-Z-]+(\\.[0-9a-zA-Z-]+)*)?$"},"example":"1.0.0"},{"name":"Upload-Length","in":"header","description":"uploadLength represents the size of the entire upload in bytes.","schema":{"type":"integer","description":"uploadLength represents the size of the entire upload in bytes.","example":5038928809516772226,"format":"int64"},"example":5150934415033324711},{"name":"Upload-Defer-Length","in":"header","description":"The Upload-Defer-Length request and response header indicates that the size of the upload is not known currently and will be transferred later.","schema":{"type":"integer","description":"The Upload-Defer-Length request and response header indicates that the size of the upload is not known currently and will be transferred later.","example":1,"enum":[1],"format":"int64"},"example":1},{"name":"Upload-Checksum","in":"header","description":"A Client MAY include the Upload-Checksum header in a PATCH request. Once the entire request has been received, the Server MUST verify the uploaded chunk against the provided checksum using the specified algorithm.","schema":{"type":"string","description":"A Client MAY include the Upload-Checksum header in a PATCH request. Once the entire request has been received, the Server MUST verify the uploaded chunk against the provided checksum using the specified algorithm.","example":"sha1 Kq5sNclPz7QV2+lfQIuc6R7oRu0="},"example":"sha1 Kq5sNclPz7QV2+lfQIuc6R7oRu0="},{"name":"Upload-Metadata","in":"header","description":"The Client MAY supply the Upload-Metadata header to add additional metadata to the upload creation request.","schema":{"type":"string","description":"The Client MAY supply the Upload-Metadata header to add additional metadata to the upload creation request.","example":"key1 val1,key2 val2"},"example":"key1 val1,key2 val2"},{"name":"Tus-Max-Size","in":"header","description":"Length of the upload","schema":{"type":"integer","description":"Length of the upload","example":3823710747799640147,"format":"int64"},"example":1267051366245696839}],"responses":{"201":{"description":"Created response.","headers":{"Location":{"description":"URL of created resource","schema":{"type":"string","description":"URL of created resource","example":"/files/123","format":"uri"},"example":"/files/123"},"Tus-Resumable":{"description":"tusResumable represents a tus protocol version.","schema":{"type":"string","description":"tusResumable represents a tus protocol version.","example":"1.0.0","pattern":"^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(-(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(\\.(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\\+[0-9a-zA-Z-]+(\\.[0-9a-zA-Z-]+)*)?$"},"example":"1.0.0"},"Upload-Expires":{"description":"The Upload-Expires response header indicates the time after which the unfinished upload expires.","schema":{"type":"string","description":"The Upload-Expires response header indicates the time after which the unfinished upload expires.","example":"Wed, 25 Jun 2014 16:00:00 GMT"},"example":"Wed, 25 Jun 2014 16:00:00 GMT"},"Upload-Offset":{"description":"uploadOffset represents a byte offset within a resource.","schema":{"type":"integer","description":"uploadOffset represents a byte offset within a resource.","example":399962519172712526,"format":"int64"},"example":4810967207691105196}}},"400":{"description":"InvalidChecksumAlgorithm: The checksum algorithm is not supported by the server.","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","schema":{"type":"boolean","description":"Is the error a server-side fault?","example":true},"example":false},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","schema":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"example":"123abc"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","schema":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"example":"parameter 'p' must be an integer"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","schema":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"example":"bad_request"},"goa-attribute-temporary":{"description":"Is the error temporary?","schema":{"type":"boolean","description":"Is the error temporary?","example":true},"example":false},"goa-attribute-timeout":{"description":"Is the error a timeout?","schema":{"type":"boolean","description":"Is the error a timeout?","example":false},"example":true}}},"412":{"description":"InvalidTusResumable: If the version specified by the Client is not supported by the Server, it MUST respond with the 412 Precondition Failed status.","headers":{"Tus-Version":{"description":"Comma separated list of supported versions.","schema":{"type":"string","description":"Comma separated list of supported versions.","example":"1.0.0","enum":["1.0.0"]},"example":"1.0.0"}}},"413":{"description":"MaximumSizeExceeded: If the length of the upload exceeds the maximum, which MAY be specified using the Tus-Max-Size header, the Server MUST respond with the 413 Request Entity Too Large status.","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","schema":{"type":"boolean","description":"Is the error a server-side fault?","example":true},"example":false},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","schema":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"example":"123abc"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","schema":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"example":"parameter 'p' must be an integer"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","schema":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"example":"bad_request"},"goa-attribute-temporary":{"description":"Is the error temporary?","schema":{"type":"boolean","description":"Is the error temporary?","example":true},"example":false},"goa-attribute-timeout":{"description":"Is the error a timeout?","schema":{"type":"boolean","description":"Is the error a timeout?","example":false},"example":true}}},"460":{"description":"ChecksumMismatch: The checksums mismatch.","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","schema":{"type":"boolean","description":"Is the error a server-side fault?","example":true},"example":false},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","schema":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"example":"123abc"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","schema":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"example":"parameter 'p' must be an integer"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","schema":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"example":"bad_request"},"goa-attribute-temporary":{"description":"Is the error temporary?","schema":{"type":"boolean","description":"Is the error temporary?","example":true},"example":false},"goa-attribute-timeout":{"description":"Is the error a timeout?","schema":{"type":"boolean","description":"Is the error a timeout?","example":false},"example":true}}}}}},"/upload/{id}":{"delete":{"tags":["tus"],"summary":"delete tus","description":"Clients use the DELETE method to terminate completed and unfinished uploads allowing the Server to free up used resources.","operationId":"tus#delete","parameters":[{"name":"id","in":"path","description":"IDs are generated using Xid: https://github.com/rs/xid","required":true,"schema":{"type":"string","description":"IDs are generated using Xid: https://github.com/rs/xid","example":"l8gvnb0heh9gmtcdonme","pattern":"[0-9a-v]{20}"},"example":"4a7cfcbpum4qskf2i29r"},{"name":"Tus-Resumable","in":"header","description":"tusResumable represents a tus protocol version.","required":true,"schema":{"type":"string","description":"tusResumable represents a tus protocol version.","example":"1.0.0","pattern":"^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(-(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(\\.(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\\+[0-9a-zA-Z-]+(\\.[0-9a-zA-Z-]+)*)?$"},"example":"1.0.0"}],"responses":{"204":{"description":"No Content response.","headers":{"Tus-Resumable":{"description":"tusResumable represents a tus protocol version.","schema":{"type":"string","description":"tusResumable represents a tus protocol version.","example":"1.0.0","pattern":"^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(-(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(\\.(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\\+[0-9a-zA-Z-]+(\\.[0-9a-zA-Z-]+)*)?$"},"example":"1.0.0"}}},"404":{"description":"NotFound: For all future requests to this URL, the Server SHOULD respond with the 404 Not Found or 410 Gone status.","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","schema":{"type":"boolean","description":"Is the error a server-side fault?","example":true},"example":false},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","schema":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"example":"123abc"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","schema":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"example":"parameter 'p' must be an integer"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","schema":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"example":"bad_request"},"goa-attribute-temporary":{"description":"Is the error temporary?","schema":{"type":"boolean","description":"Is the error temporary?","example":true},"example":false},"goa-attribute-timeout":{"description":"Is the error a timeout?","schema":{"type":"boolean","description":"Is the error a timeout?","example":false},"example":true}}},"410":{"description":"Gone: For all future requests to this URL, the Server SHOULD respond with the 404 Not Found or 410 Gone status.","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","schema":{"type":"boolean","description":"Is the error a server-side fault?","example":true},"example":false},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","schema":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"example":"123abc"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","schema":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"example":"parameter 'p' must be an integer"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","schema":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"example":"bad_request"},"goa-attribute-temporary":{"description":"Is the error temporary?","schema":{"type":"boolean","description":"Is the error temporary?","example":true},"example":false},"goa-attribute-timeout":{"description":"Is the error a timeout?","schema":{"type":"boolean","description":"Is the error a timeout?","example":false},"example":true}}},"412":{"description":"InvalidTusResumable: If the version specified by the Client is not supported by the Server, it MUST respond with the 412 Precondition Failed status.","headers":{"Tus-Version":{"description":"Comma separated list of supported versions.","schema":{"type":"string","description":"Comma separated list of supported versions.","example":"1.0.0","enum":["1.0.0"]},"example":"1.0.0"}}}}},"head":{"tags":["tus"],"summary":"head tus","description":"Clients use the HEAD request to determine the offset at which the upload should be continued.","operationId":"tus#head","parameters":[{"name":"id","in":"path","description":"IDs are generated using Xid: https://github.com/rs/xid","required":true,"schema":{"type":"string","description":"IDs are generated using Xid: https://github.com/rs/xid","example":"q6rv3ofkukars65g6hq6","pattern":"[0-9a-v]{20}"},"example":"gci6h77lvrh5fel0fpvn"},{"name":"Tus-Resumable","in":"header","description":"tusResumable represents a tus protocol version.","required":true,"schema":{"type":"string","description":"tusResumable represents a tus protocol version.","example":"1.0.0","pattern":"^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(-(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(\\.(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\\+[0-9a-zA-Z-]+(\\.[0-9a-zA-Z-]+)*)?$"},"example":"1.0.0"}],"responses":{"200":{"description":"OK response.","headers":{"Tus-Resumable":{"description":"tusResumable represents a tus protocol version.","schema":{"type":"string","description":"tusResumable represents a tus protocol version.","example":"1.0.0","pattern":"^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(-(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(\\.(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\\+[0-9a-zA-Z-]+(\\.[0-9a-zA-Z-]+)*)?$"},"example":"1.0.0"},"Upload-Defer-Length":{"description":"The Upload-Defer-Length request and response header indicates that the size of the upload is not known currently and will be transferred later.","schema":{"type":"integer","description":"The Upload-Defer-Length request and response header indicates that the size of the upload is not known currently and will be transferred later.","example":1,"enum":[1],"format":"int64"},"example":1},"Upload-Length":{"description":"uploadLength represents the size of the entire upload in bytes.","schema":{"type":"integer","description":"uploadLength represents the size of the entire upload in bytes.","example":8560999440483038788,"format":"int64"},"example":1104782678439473248},"Upload-Metadata":{"description":"The Client MAY supply the Upload-Metadata header to add additional metadata to the upload creation request.","schema":{"type":"string","description":"The Client MAY supply the Upload-Metadata header to add additional metadata to the upload creation request.","example":"key1 val1,key2 val2"},"example":"key1 val1,key2 val2"},"Upload-Offset":{"description":"uploadOffset represents a byte offset within a resource.","schema":{"type":"integer","description":"uploadOffset represents a byte offset within a resource.","example":399962519172712526,"format":"int64"},"example":4810967207691105196}}},"404":{"description":"NotFound: If the resource is not found, the Server SHOULD return either the 404 Not Found, 410 Gone or 403 Forbidden status without the Upload-Offset header.","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","schema":{"type":"boolean","description":"Is the error a server-side fault?","example":true},"example":false},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","schema":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"example":"123abc"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","schema":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"example":"parameter 'p' must be an integer"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","schema":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"example":"bad_request"},"goa-attribute-temporary":{"description":"Is the error temporary?","schema":{"type":"boolean","description":"Is the error temporary?","example":true},"example":false},"goa-attribute-timeout":{"description":"Is the error a timeout?","schema":{"type":"boolean","description":"Is the error a timeout?","example":false},"example":true}}},"410":{"description":"Gone: If the resource is not found, the Server SHOULD return either the 404 Not Found, 410 Gone or 403 Forbidden status without the Upload-Offset header.","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","schema":{"type":"boolean","description":"Is the error a server-side fault?","example":true},"example":false},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","schema":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"example":"123abc"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","schema":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"example":"parameter 'p' must be an integer"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","schema":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"example":"bad_request"},"goa-attribute-temporary":{"description":"Is the error temporary?","schema":{"type":"boolean","description":"Is the error temporary?","example":true},"example":false},"goa-attribute-timeout":{"description":"Is the error a timeout?","schema":{"type":"boolean","description":"Is the error a timeout?","example":false},"example":true}}},"412":{"description":"InvalidTusResumable: If the version specified by the Client is not supported by the Server, it MUST respond with the 412 Precondition Failed status.","headers":{"Tus-Version":{"description":"Comma separated list of supported versions.","schema":{"type":"string","description":"Comma separated list of supported versions.","example":"1.0.0","enum":["1.0.0"]},"example":"1.0.0"}}}}},"patch":{"tags":["tus"],"summary":"patch tus","description":"Clients use the PATCH method to start or resume an upload.","operationId":"tus#patch","parameters":[{"name":"id","in":"path","description":"IDs are generated using Xid: https://github.com/rs/xid","required":true,"schema":{"type":"string","description":"IDs are generated using Xid: https://github.com/rs/xid","example":"kbk9n1g4u0hd4fgheooj","pattern":"[0-9a-v]{20}"},"example":"36qdphsraeoin48e0v1k"},{"name":"Tus-Resumable","in":"header","description":"tusResumable represents a tus protocol version.","required":true,"schema":{"type":"string","description":"tusResumable represents a tus protocol version.","example":"1.0.0","pattern":"^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(-(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(\\.(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\\+[0-9a-zA-Z-]+(\\.[0-9a-zA-Z-]+)*)?$"},"example":"1.0.0"},{"name":"Upload-Offset","in":"header","description":"uploadOffset represents a byte offset within a resource.","required":true,"schema":{"type":"integer","description":"uploadOffset represents a byte offset within a resource.","example":6034095156383247232,"format":"int64"},"example":5253941728923434458},{"name":"Upload-Checksum","in":"header","description":"A Client MAY include the Upload-Checksum header in a PATCH request. Once the entire request has been received, the Server MUST verify the uploaded chunk against the provided checksum using the specified algorithm.","schema":{"type":"string","description":"A Client MAY include the Upload-Checksum header in a PATCH request. Once the entire request has been received, the Server MUST verify the uploaded chunk against the provided checksum using the specified algorithm.","example":"sha1 Kq5sNclPz7QV2+lfQIuc6R7oRu0="},"example":"sha1 Kq5sNclPz7QV2+lfQIuc6R7oRu0="}],"responses":{"204":{"description":"No Content response.","headers":{"Tus-Resumable":{"description":"tusResumable represents a tus protocol version.","schema":{"type":"string","description":"tusResumable represents a tus protocol version.","example":"1.0.0","pattern":"^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(-(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(\\.(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\\+[0-9a-zA-Z-]+(\\.[0-9a-zA-Z-]+)*)?$"},"example":"1.0.0"},"Upload-Expires":{"description":"The Upload-Expires response header indicates the time after which the unfinished upload expires.","schema":{"type":"string","description":"The Upload-Expires response header indicates the time after which the unfinished upload expires.","example":"Wed, 25 Jun 2014 16:00:00 GMT"},"example":"Wed, 25 Jun 2014 16:00:00 GMT"},"Upload-Offset":{"description":"uploadOffset represents a byte offset within a resource.","schema":{"type":"integer","description":"uploadOffset represents a byte offset within a resource.","example":399962519172712526,"format":"int64"},"example":4810967207691105196}}},"400":{"description":"InvalidChecksumAlgorithm: The checksum algorithm is not supported by the server.","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","schema":{"type":"boolean","description":"Is the error a server-side fault?","example":true},"example":false},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","schema":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"example":"123abc"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","schema":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"example":"parameter 'p' must be an integer"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","schema":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"example":"bad_request"},"goa-attribute-temporary":{"description":"Is the error temporary?","schema":{"type":"boolean","description":"Is the error temporary?","example":true},"example":false},"goa-attribute-timeout":{"description":"Is the error a timeout?","schema":{"type":"boolean","description":"Is the error a timeout?","example":false},"example":true}}},"404":{"description":"NotFound: If a Client does attempt to resume an upload which has since been removed by the Server, the Server SHOULD respond with the404 Not Found or 410 Gone status.","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","schema":{"type":"boolean","description":"Is the error a server-side fault?","example":true},"example":false},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","schema":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"example":"123abc"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","schema":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"example":"parameter 'p' must be an integer"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","schema":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"example":"bad_request"},"goa-attribute-temporary":{"description":"Is the error temporary?","schema":{"type":"boolean","description":"Is the error temporary?","example":true},"example":false},"goa-attribute-timeout":{"description":"Is the error a timeout?","schema":{"type":"boolean","description":"Is the error a timeout?","example":false},"example":true}}},"409":{"description":"InvalidOffset: If the offsets do not match, the Server MUST respond with the 409 Conflict status without modifying the upload resource.","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","schema":{"type":"boolean","description":"Is the error a server-side fault?","example":true},"example":false},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","schema":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"example":"123abc"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","schema":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"example":"parameter 'p' must be an integer"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","schema":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"example":"bad_request"},"goa-attribute-temporary":{"description":"Is the error temporary?","schema":{"type":"boolean","description":"Is the error temporary?","example":true},"example":false},"goa-attribute-timeout":{"description":"Is the error a timeout?","schema":{"type":"boolean","description":"Is the error a timeout?","example":false},"example":true}}},"410":{"description":"Gone: If a Client does attempt to resume an upload which has since been removed by the Server, the Server SHOULD respond with the404 Not Found or 410 Gone status.","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","schema":{"type":"boolean","description":"Is the error a server-side fault?","example":true},"example":false},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","schema":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"example":"123abc"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","schema":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"example":"parameter 'p' must be an integer"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","schema":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"example":"bad_request"},"goa-attribute-temporary":{"description":"Is the error temporary?","schema":{"type":"boolean","description":"Is the error temporary?","example":true},"example":false},"goa-attribute-timeout":{"description":"Is the error a timeout?","schema":{"type":"boolean","description":"Is the error a timeout?","example":false},"example":true}}},"412":{"description":"InvalidTusResumable: If the version specified by the Client is not supported by the Server, it MUST respond with the 412 Precondition Failed status.","headers":{"Tus-Version":{"description":"Comma separated list of supported versions.","schema":{"type":"string","description":"Comma separated list of supported versions.","example":"1.0.0","enum":["1.0.0"]},"example":"1.0.0"}}},"415":{"description":"InvalidContentType: All PATCH requests MUST use Content-Type: application/offset+octet-stream, otherwise the server SHOULD return a 415 Unsupported Media Type status.","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","schema":{"type":"boolean","description":"Is the error a server-side fault?","example":true},"example":false},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","schema":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"example":"123abc"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","schema":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"example":"parameter 'p' must be an integer"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","schema":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"example":"bad_request"},"goa-attribute-temporary":{"description":"Is the error temporary?","schema":{"type":"boolean","description":"Is the error temporary?","example":true},"example":false},"goa-attribute-timeout":{"description":"Is the error a timeout?","schema":{"type":"boolean","description":"Is the error a timeout?","example":false},"example":true}}},"460":{"description":"ChecksumMismatch: The checksums mismatch.","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","schema":{"type":"boolean","description":"Is the error a server-side fault?","example":true},"example":false},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","schema":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"example":"123abc"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","schema":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"example":"parameter 'p' must be an integer"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","schema":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"example":"bad_request"},"goa-attribute-temporary":{"description":"Is the error temporary?","schema":{"type":"boolean","description":"Is the error temporary?","example":true},"example":false},"goa-attribute-timeout":{"description":"Is the error a timeout?","schema":{"type":"boolean","description":"Is the error a timeout?","example":false},"example":true}}},"500":{"description":"Internal: Internal error","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","schema":{"type":"boolean","description":"Is the error a server-side fault?","example":true},"example":false},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","schema":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"example":"123abc"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","schema":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"example":"parameter 'p' must be an integer"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","schema":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"example":"bad_request"},"goa-attribute-temporary":{"description":"Is the error temporary?","schema":{"type":"boolean","description":"Is the error temporary?","example":true},"example":false},"goa-attribute-timeout":{"description":"Is the error a timeout?","schema":{"type":"boolean","description":"Is the error a timeout?","example":false},"example":true}}}}}}},"components":{},"tags":[{"name":"tus","description":"The tus service exposes the methods required to implement the tus protocol"}]} \ No newline at end of file +{"openapi":"3.0.3","info":{"title":"File Upload Service","description":"HTTP service for uploading files using the tus protocol (https://tus.io)","version":"0.0.1"},"servers":[{"url":"http://localhost:8000/upload","description":"Upload hosts the upload service."}],"paths":{"/upload":{"options":{"tags":["tus"],"summary":"options tus","description":"Clients use the OPTIONS method to gather information about the Server’s current configuration.","operationId":"tus#options","responses":{"204":{"description":"No Content response.","headers":{"Tus-Checksum-Algorithm":{"description":"A Client MAY include the Upload-Checksum header in a PATCH request. Once the entire request has been received, the Server MUST verify the uploaded chunk against the provided checksum using the specified algorithm.","schema":{"type":"string","description":"A Client MAY include the Upload-Checksum header in a PATCH request. Once the entire request has been received, the Server MUST verify the uploaded chunk against the provided checksum using the specified algorithm.","example":"md5,sha1,crc32","enum":["md5,sha1,crc32"]},"example":"md5,sha1,crc32"},"Tus-Extension":{"description":"tusExtension is a comma separated list of extensions supported by the server. This implementation supports the creation, creation-with-upload, expiration, checksum and termination extensions","schema":{"type":"string","description":"tusExtension is a comma separated list of extensions supported by the server. This implementation supports the creation, creation-with-upload, expiration, checksum and termination extensions","example":"creation,creation-with-upload,creation-defer-length,expiration,checksum,termination","enum":["creation,creation-with-upload,creation-defer-length,expiration,checksum,termination"]},"example":"creation,creation-with-upload,creation-defer-length,expiration,checksum,termination"},"Tus-Max-Size":{"description":"tusMaxSize represents the maximum allowed size of an entire upload in bytes.","schema":{"type":"integer","description":"tusMaxSize represents the maximum allowed size of an entire upload in bytes.","example":8712211226016374128,"format":"int64"},"example":8712211226016374128},"Tus-Resumable":{"description":"tusResumable represents a tus protocol version.","schema":{"type":"string","description":"tusResumable represents a tus protocol version.","example":"1.0.0","pattern":"^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(-(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(\\.(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\\+[0-9a-zA-Z-]+(\\.[0-9a-zA-Z-]+)*)?$"},"example":"1.0.0"},"Tus-Version":{"description":"tusVersion is a comma separated list of protocol versions supported by the server. This implementation only supports 1.0.0.","schema":{"type":"string","description":"tusVersion is a comma separated list of protocol versions supported by the server. This implementation only supports 1.0.0.","example":"1.0.0","enum":["1.0.0"]},"example":"1.0.0"}}},"412":{"description":"InvalidTusResumable: If the version specified by the Client is not supported by the Server, it MUST respond with the 412 Precondition Failed status.","headers":{"Tus-Version":{"description":"Comma separated list of supported versions.","schema":{"type":"string","description":"Comma separated list of supported versions.","example":"1.0.0","enum":["1.0.0"]},"example":"1.0.0"}}}}},"post":{"tags":["tus"],"summary":"post tus","description":"Clients use the POST method against a known upload creation URL to request a new upload resource.","operationId":"tus#post","parameters":[{"name":"Tus-Resumable","in":"header","description":"tusResumable represents a tus protocol version.","required":true,"schema":{"type":"string","description":"tusResumable represents a tus protocol version.","example":"1.0.0","pattern":"^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(-(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(\\.(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\\+[0-9a-zA-Z-]+(\\.[0-9a-zA-Z-]+)*)?$"},"example":"1.0.0"},{"name":"Upload-Length","in":"header","description":"uploadLength represents the size of the entire upload in bytes.","schema":{"type":"integer","description":"uploadLength represents the size of the entire upload in bytes.","example":7643821282600180792,"format":"int64"},"example":7643821282600180792},{"name":"Upload-Defer-Length","in":"header","description":"The Upload-Defer-Length request and response header indicates that the size of the upload is not known currently and will be transferred later.","schema":{"type":"integer","description":"The Upload-Defer-Length request and response header indicates that the size of the upload is not known currently and will be transferred later.","example":1,"enum":[1],"format":"int64"},"example":1},{"name":"Upload-Checksum","in":"header","description":"A Client MAY include the Upload-Checksum header in a PATCH request. Once the entire request has been received, the Server MUST verify the uploaded chunk against the provided checksum using the specified algorithm.","schema":{"type":"string","description":"A Client MAY include the Upload-Checksum header in a PATCH request. Once the entire request has been received, the Server MUST verify the uploaded chunk against the provided checksum using the specified algorithm.","example":"sha1 Kq5sNclPz7QV2+lfQIuc6R7oRu0="},"example":"sha1 Kq5sNclPz7QV2+lfQIuc6R7oRu0="},{"name":"Upload-Metadata","in":"header","description":"The Client MAY supply the Upload-Metadata header to add additional metadata to the upload creation request.","schema":{"type":"string","description":"The Client MAY supply the Upload-Metadata header to add additional metadata to the upload creation request.","example":"key1 val1,key2 val2"},"example":"key1 val1,key2 val2"},{"name":"Tus-Max-Size","in":"header","description":"Length of the upload","schema":{"type":"integer","description":"Length of the upload","example":3748981059432342735,"format":"int64"},"example":3748981059432342735}],"responses":{"201":{"description":"Created response.","headers":{"Location":{"description":"URL of created resource","schema":{"type":"string","description":"URL of created resource","example":"/files/123","format":"uri"},"example":"/files/123"},"Tus-Resumable":{"description":"tusResumable represents a tus protocol version.","schema":{"type":"string","description":"tusResumable represents a tus protocol version.","example":"1.0.0","pattern":"^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(-(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(\\.(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\\+[0-9a-zA-Z-]+(\\.[0-9a-zA-Z-]+)*)?$"},"example":"1.0.0"},"Upload-Expires":{"description":"The Upload-Expires response header indicates the time after which the unfinished upload expires.","schema":{"type":"string","description":"The Upload-Expires response header indicates the time after which the unfinished upload expires.","example":"Wed, 25 Jun 2014 16:00:00 GMT"},"example":"Wed, 25 Jun 2014 16:00:00 GMT"},"Upload-Offset":{"description":"uploadOffset represents a byte offset within a resource.","schema":{"type":"integer","description":"uploadOffset represents a byte offset within a resource.","example":3875770313577187398,"format":"int64"},"example":3875770313577187398}}},"400":{"description":"InvalidChecksumAlgorithm: The checksum algorithm is not supported by the server.","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","schema":{"type":"boolean","description":"Is the error a server-side fault?","example":true},"example":true},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","schema":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"example":"123abc"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","schema":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"example":"parameter 'p' must be an integer"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","schema":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"example":"bad_request"},"goa-attribute-temporary":{"description":"Is the error temporary?","schema":{"type":"boolean","description":"Is the error temporary?","example":true},"example":true},"goa-attribute-timeout":{"description":"Is the error a timeout?","schema":{"type":"boolean","description":"Is the error a timeout?","example":false},"example":false}}},"412":{"description":"InvalidTusResumable: If the version specified by the Client is not supported by the Server, it MUST respond with the 412 Precondition Failed status.","headers":{"Tus-Version":{"description":"Comma separated list of supported versions.","schema":{"type":"string","description":"Comma separated list of supported versions.","example":"1.0.0","enum":["1.0.0"]},"example":"1.0.0"}}},"413":{"description":"MaximumSizeExceeded: If the length of the upload exceeds the maximum, which MAY be specified using the Tus-Max-Size header, the Server MUST respond with the 413 Request Entity Too Large status.","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","schema":{"type":"boolean","description":"Is the error a server-side fault?","example":true},"example":true},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","schema":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"example":"123abc"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","schema":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"example":"parameter 'p' must be an integer"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","schema":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"example":"bad_request"},"goa-attribute-temporary":{"description":"Is the error temporary?","schema":{"type":"boolean","description":"Is the error temporary?","example":true},"example":true},"goa-attribute-timeout":{"description":"Is the error a timeout?","schema":{"type":"boolean","description":"Is the error a timeout?","example":false},"example":false}}},"460":{"description":"ChecksumMismatch: The checksums mismatch.","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","schema":{"type":"boolean","description":"Is the error a server-side fault?","example":true},"example":true},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","schema":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"example":"123abc"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","schema":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"example":"parameter 'p' must be an integer"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","schema":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"example":"bad_request"},"goa-attribute-temporary":{"description":"Is the error temporary?","schema":{"type":"boolean","description":"Is the error temporary?","example":true},"example":true},"goa-attribute-timeout":{"description":"Is the error a timeout?","schema":{"type":"boolean","description":"Is the error a timeout?","example":false},"example":false}}}}}},"/upload/{id}":{"delete":{"tags":["tus"],"summary":"delete tus","description":"Clients use the DELETE method to terminate completed and unfinished uploads allowing the Server to free up used resources.","operationId":"tus#delete","parameters":[{"name":"id","in":"path","description":"IDs are generated using Xid: https://github.com/rs/xid","required":true,"schema":{"type":"string","description":"IDs are generated using Xid: https://github.com/rs/xid","example":"fgn8ncu1uo2shoc1tgd3","pattern":"[0-9a-v]{20}"},"example":"fgn8ncu1uo2shoc1tgd3"},{"name":"Tus-Resumable","in":"header","description":"tusResumable represents a tus protocol version.","required":true,"schema":{"type":"string","description":"tusResumable represents a tus protocol version.","example":"1.0.0","pattern":"^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(-(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(\\.(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\\+[0-9a-zA-Z-]+(\\.[0-9a-zA-Z-]+)*)?$"},"example":"1.0.0"}],"responses":{"204":{"description":"No Content response.","headers":{"Tus-Resumable":{"description":"tusResumable represents a tus protocol version.","schema":{"type":"string","description":"tusResumable represents a tus protocol version.","example":"1.0.0","pattern":"^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(-(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(\\.(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\\+[0-9a-zA-Z-]+(\\.[0-9a-zA-Z-]+)*)?$"},"example":"1.0.0"}}},"404":{"description":"NotFound: For all future requests to this URL, the Server SHOULD respond with the 404 Not Found or 410 Gone status.","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","schema":{"type":"boolean","description":"Is the error a server-side fault?","example":true},"example":true},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","schema":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"example":"123abc"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","schema":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"example":"parameter 'p' must be an integer"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","schema":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"example":"bad_request"},"goa-attribute-temporary":{"description":"Is the error temporary?","schema":{"type":"boolean","description":"Is the error temporary?","example":true},"example":true},"goa-attribute-timeout":{"description":"Is the error a timeout?","schema":{"type":"boolean","description":"Is the error a timeout?","example":false},"example":false}}},"410":{"description":"Gone: For all future requests to this URL, the Server SHOULD respond with the 404 Not Found or 410 Gone status.","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","schema":{"type":"boolean","description":"Is the error a server-side fault?","example":true},"example":true},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","schema":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"example":"123abc"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","schema":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"example":"parameter 'p' must be an integer"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","schema":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"example":"bad_request"},"goa-attribute-temporary":{"description":"Is the error temporary?","schema":{"type":"boolean","description":"Is the error temporary?","example":true},"example":true},"goa-attribute-timeout":{"description":"Is the error a timeout?","schema":{"type":"boolean","description":"Is the error a timeout?","example":false},"example":false}}},"412":{"description":"InvalidTusResumable: If the version specified by the Client is not supported by the Server, it MUST respond with the 412 Precondition Failed status.","headers":{"Tus-Version":{"description":"Comma separated list of supported versions.","schema":{"type":"string","description":"Comma separated list of supported versions.","example":"1.0.0","enum":["1.0.0"]},"example":"1.0.0"}}}}},"head":{"tags":["tus"],"summary":"head tus","description":"Clients use the HEAD request to determine the offset at which the upload should be continued.","operationId":"tus#head","parameters":[{"name":"id","in":"path","description":"IDs are generated using Xid: https://github.com/rs/xid","required":true,"schema":{"type":"string","description":"IDs are generated using Xid: https://github.com/rs/xid","example":"9rh2ia73s256mmjr8kpt","pattern":"[0-9a-v]{20}"},"example":"9rh2ia73s256mmjr8kpt"},{"name":"Tus-Resumable","in":"header","description":"tusResumable represents a tus protocol version.","required":true,"schema":{"type":"string","description":"tusResumable represents a tus protocol version.","example":"1.0.0","pattern":"^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(-(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(\\.(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\\+[0-9a-zA-Z-]+(\\.[0-9a-zA-Z-]+)*)?$"},"example":"1.0.0"}],"responses":{"200":{"description":"OK response.","headers":{"Tus-Resumable":{"description":"tusResumable represents a tus protocol version.","schema":{"type":"string","description":"tusResumable represents a tus protocol version.","example":"1.0.0","pattern":"^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(-(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(\\.(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\\+[0-9a-zA-Z-]+(\\.[0-9a-zA-Z-]+)*)?$"},"example":"1.0.0"},"Upload-Defer-Length":{"description":"The Upload-Defer-Length request and response header indicates that the size of the upload is not known currently and will be transferred later.","schema":{"type":"integer","description":"The Upload-Defer-Length request and response header indicates that the size of the upload is not known currently and will be transferred later.","example":1,"enum":[1],"format":"int64"},"example":1},"Upload-Length":{"description":"uploadLength represents the size of the entire upload in bytes.","schema":{"type":"integer","description":"uploadLength represents the size of the entire upload in bytes.","example":4029420343829624487,"format":"int64"},"example":4029420343829624487},"Upload-Metadata":{"description":"The Client MAY supply the Upload-Metadata header to add additional metadata to the upload creation request.","schema":{"type":"string","description":"The Client MAY supply the Upload-Metadata header to add additional metadata to the upload creation request.","example":"key1 val1,key2 val2"},"example":"key1 val1,key2 val2"},"Upload-Offset":{"description":"uploadOffset represents a byte offset within a resource.","schema":{"type":"integer","description":"uploadOffset represents a byte offset within a resource.","example":8805735883885567628,"format":"int64"},"example":8805735883885567628}}},"404":{"description":"NotFound: If the resource is not found, the Server SHOULD return either the 404 Not Found, 410 Gone or 403 Forbidden status without the Upload-Offset header.","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","schema":{"type":"boolean","description":"Is the error a server-side fault?","example":true},"example":true},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","schema":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"example":"123abc"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","schema":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"example":"parameter 'p' must be an integer"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","schema":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"example":"bad_request"},"goa-attribute-temporary":{"description":"Is the error temporary?","schema":{"type":"boolean","description":"Is the error temporary?","example":true},"example":true},"goa-attribute-timeout":{"description":"Is the error a timeout?","schema":{"type":"boolean","description":"Is the error a timeout?","example":false},"example":false}}},"410":{"description":"Gone: If the resource is not found, the Server SHOULD return either the 404 Not Found, 410 Gone or 403 Forbidden status without the Upload-Offset header.","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","schema":{"type":"boolean","description":"Is the error a server-side fault?","example":true},"example":true},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","schema":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"example":"123abc"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","schema":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"example":"parameter 'p' must be an integer"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","schema":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"example":"bad_request"},"goa-attribute-temporary":{"description":"Is the error temporary?","schema":{"type":"boolean","description":"Is the error temporary?","example":true},"example":true},"goa-attribute-timeout":{"description":"Is the error a timeout?","schema":{"type":"boolean","description":"Is the error a timeout?","example":false},"example":false}}},"412":{"description":"InvalidTusResumable: If the version specified by the Client is not supported by the Server, it MUST respond with the 412 Precondition Failed status.","headers":{"Tus-Version":{"description":"Comma separated list of supported versions.","schema":{"type":"string","description":"Comma separated list of supported versions.","example":"1.0.0","enum":["1.0.0"]},"example":"1.0.0"}}}}},"patch":{"tags":["tus"],"summary":"patch tus","description":"Clients use the PATCH method to start or resume an upload.","operationId":"tus#patch","parameters":[{"name":"id","in":"path","description":"IDs are generated using Xid: https://github.com/rs/xid","required":true,"schema":{"type":"string","description":"IDs are generated using Xid: https://github.com/rs/xid","example":"7pc6esaasn4ffl7qlrcf","pattern":"[0-9a-v]{20}"},"example":"7pc6esaasn4ffl7qlrcf"},{"name":"Tus-Resumable","in":"header","description":"tusResumable represents a tus protocol version.","required":true,"schema":{"type":"string","description":"tusResumable represents a tus protocol version.","example":"1.0.0","pattern":"^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(-(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(\\.(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\\+[0-9a-zA-Z-]+(\\.[0-9a-zA-Z-]+)*)?$"},"example":"1.0.0"},{"name":"Upload-Offset","in":"header","description":"uploadOffset represents a byte offset within a resource.","required":true,"schema":{"type":"integer","description":"uploadOffset represents a byte offset within a resource.","example":2754385183630855775,"format":"int64"},"example":2754385183630855775},{"name":"Upload-Checksum","in":"header","description":"A Client MAY include the Upload-Checksum header in a PATCH request. Once the entire request has been received, the Server MUST verify the uploaded chunk against the provided checksum using the specified algorithm.","schema":{"type":"string","description":"A Client MAY include the Upload-Checksum header in a PATCH request. Once the entire request has been received, the Server MUST verify the uploaded chunk against the provided checksum using the specified algorithm.","example":"sha1 Kq5sNclPz7QV2+lfQIuc6R7oRu0="},"example":"sha1 Kq5sNclPz7QV2+lfQIuc6R7oRu0="}],"responses":{"204":{"description":"No Content response.","headers":{"Tus-Resumable":{"description":"tusResumable represents a tus protocol version.","schema":{"type":"string","description":"tusResumable represents a tus protocol version.","example":"1.0.0","pattern":"^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(-(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(\\.(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\\+[0-9a-zA-Z-]+(\\.[0-9a-zA-Z-]+)*)?$"},"example":"1.0.0"},"Upload-Expires":{"description":"The Upload-Expires response header indicates the time after which the unfinished upload expires.","schema":{"type":"string","description":"The Upload-Expires response header indicates the time after which the unfinished upload expires.","example":"Wed, 25 Jun 2014 16:00:00 GMT"},"example":"Wed, 25 Jun 2014 16:00:00 GMT"},"Upload-Offset":{"description":"uploadOffset represents a byte offset within a resource.","schema":{"type":"integer","description":"uploadOffset represents a byte offset within a resource.","example":3831825769931087659,"format":"int64"},"example":3831825769931087659}}},"400":{"description":"InvalidChecksumAlgorithm: The checksum algorithm is not supported by the server.","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","schema":{"type":"boolean","description":"Is the error a server-side fault?","example":true},"example":true},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","schema":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"example":"123abc"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","schema":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"example":"parameter 'p' must be an integer"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","schema":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"example":"bad_request"},"goa-attribute-temporary":{"description":"Is the error temporary?","schema":{"type":"boolean","description":"Is the error temporary?","example":true},"example":true},"goa-attribute-timeout":{"description":"Is the error a timeout?","schema":{"type":"boolean","description":"Is the error a timeout?","example":false},"example":false}}},"404":{"description":"NotFound: If a Client does attempt to resume an upload which has since been removed by the Server, the Server SHOULD respond with the404 Not Found or 410 Gone status.","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","schema":{"type":"boolean","description":"Is the error a server-side fault?","example":true},"example":true},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","schema":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"example":"123abc"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","schema":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"example":"parameter 'p' must be an integer"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","schema":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"example":"bad_request"},"goa-attribute-temporary":{"description":"Is the error temporary?","schema":{"type":"boolean","description":"Is the error temporary?","example":true},"example":true},"goa-attribute-timeout":{"description":"Is the error a timeout?","schema":{"type":"boolean","description":"Is the error a timeout?","example":false},"example":false}}},"409":{"description":"InvalidOffset: If the offsets do not match, the Server MUST respond with the 409 Conflict status without modifying the upload resource.","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","schema":{"type":"boolean","description":"Is the error a server-side fault?","example":true},"example":true},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","schema":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"example":"123abc"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","schema":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"example":"parameter 'p' must be an integer"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","schema":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"example":"bad_request"},"goa-attribute-temporary":{"description":"Is the error temporary?","schema":{"type":"boolean","description":"Is the error temporary?","example":true},"example":true},"goa-attribute-timeout":{"description":"Is the error a timeout?","schema":{"type":"boolean","description":"Is the error a timeout?","example":false},"example":false}}},"410":{"description":"Gone: If a Client does attempt to resume an upload which has since been removed by the Server, the Server SHOULD respond with the404 Not Found or 410 Gone status.","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","schema":{"type":"boolean","description":"Is the error a server-side fault?","example":true},"example":true},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","schema":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"example":"123abc"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","schema":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"example":"parameter 'p' must be an integer"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","schema":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"example":"bad_request"},"goa-attribute-temporary":{"description":"Is the error temporary?","schema":{"type":"boolean","description":"Is the error temporary?","example":true},"example":true},"goa-attribute-timeout":{"description":"Is the error a timeout?","schema":{"type":"boolean","description":"Is the error a timeout?","example":false},"example":false}}},"412":{"description":"InvalidTusResumable: If the version specified by the Client is not supported by the Server, it MUST respond with the 412 Precondition Failed status.","headers":{"Tus-Version":{"description":"Comma separated list of supported versions.","schema":{"type":"string","description":"Comma separated list of supported versions.","example":"1.0.0","enum":["1.0.0"]},"example":"1.0.0"}}},"415":{"description":"InvalidContentType: All PATCH requests MUST use Content-Type: application/offset+octet-stream, otherwise the server SHOULD return a 415 Unsupported Media Type status.","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","schema":{"type":"boolean","description":"Is the error a server-side fault?","example":true},"example":true},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","schema":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"example":"123abc"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","schema":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"example":"parameter 'p' must be an integer"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","schema":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"example":"bad_request"},"goa-attribute-temporary":{"description":"Is the error temporary?","schema":{"type":"boolean","description":"Is the error temporary?","example":true},"example":true},"goa-attribute-timeout":{"description":"Is the error a timeout?","schema":{"type":"boolean","description":"Is the error a timeout?","example":false},"example":false}}},"460":{"description":"ChecksumMismatch: The checksums mismatch.","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","schema":{"type":"boolean","description":"Is the error a server-side fault?","example":true},"example":true},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","schema":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"example":"123abc"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","schema":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"example":"parameter 'p' must be an integer"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","schema":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"example":"bad_request"},"goa-attribute-temporary":{"description":"Is the error temporary?","schema":{"type":"boolean","description":"Is the error temporary?","example":true},"example":true},"goa-attribute-timeout":{"description":"Is the error a timeout?","schema":{"type":"boolean","description":"Is the error a timeout?","example":false},"example":false}}},"500":{"description":"Internal: Internal error","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","schema":{"type":"boolean","description":"Is the error a server-side fault?","example":true},"example":true},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","schema":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"example":"123abc"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","schema":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"example":"parameter 'p' must be an integer"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","schema":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"example":"bad_request"},"goa-attribute-temporary":{"description":"Is the error temporary?","schema":{"type":"boolean","description":"Is the error temporary?","example":true},"example":true},"goa-attribute-timeout":{"description":"Is the error a timeout?","schema":{"type":"boolean","description":"Is the error a timeout?","example":false},"example":false}}}}}}},"components":{},"tags":[{"name":"tus","description":"The tus service exposes the methods required to implement the tus protocol"}]} \ No newline at end of file diff --git a/tus/gen/http/openapi3.yaml b/tus/gen/http/openapi3.yaml index 85ea83976..49453de95 100644 --- a/tus/gen/http/openapi3.yaml +++ b/tus/gen/http/openapi3.yaml @@ -41,9 +41,9 @@ paths: schema: type: integer description: tusMaxSize represents the maximum allowed size of an entire upload in bytes. - example: 1013258800689943877 + example: 8712211226016374128 format: int64 - example: 2314505768905968202 + example: 8712211226016374128 Tus-Resumable: description: tusResumable represents a tus protocol version. schema: @@ -96,9 +96,9 @@ paths: schema: type: integer description: uploadLength represents the size of the entire upload in bytes. - example: 5038928809516772226 + example: 7643821282600180792 format: int64 - example: 5150934415033324711 + example: 7643821282600180792 - name: Upload-Defer-Length in: header description: The Upload-Defer-Length request and response header indicates that the size of the upload is not known currently and will be transferred later. @@ -132,9 +132,9 @@ paths: schema: type: integer description: Length of the upload - example: 3823710747799640147 + example: 3748981059432342735 format: int64 - example: 1267051366245696839 + example: 3748981059432342735 responses: "201": description: Created response. @@ -167,9 +167,9 @@ paths: schema: type: integer description: uploadOffset represents a byte offset within a resource. - example: 399962519172712526 + example: 3875770313577187398 format: int64 - example: 4810967207691105196 + example: 3875770313577187398 "400": description: 'InvalidChecksumAlgorithm: The checksum algorithm is not supported by the server.' headers: @@ -179,7 +179,7 @@ paths: type: boolean description: Is the error a server-side fault? example: true - example: false + example: true goa-attribute-id: description: ID is a unique identifier for this particular occurrence of the problem. schema: @@ -207,14 +207,14 @@ paths: type: boolean description: Is the error temporary? example: true - example: false + example: true goa-attribute-timeout: description: Is the error a timeout? schema: type: boolean description: Is the error a timeout? example: false - example: true + example: false "412": description: 'InvalidTusResumable: If the version specified by the Client is not supported by the Server, it MUST respond with the 412 Precondition Failed status.' headers: @@ -236,7 +236,7 @@ paths: type: boolean description: Is the error a server-side fault? example: true - example: false + example: true goa-attribute-id: description: ID is a unique identifier for this particular occurrence of the problem. schema: @@ -264,14 +264,14 @@ paths: type: boolean description: Is the error temporary? example: true - example: false + example: true goa-attribute-timeout: description: Is the error a timeout? schema: type: boolean description: Is the error a timeout? example: false - example: true + example: false "460": description: 'ChecksumMismatch: The checksums mismatch.' headers: @@ -281,7 +281,7 @@ paths: type: boolean description: Is the error a server-side fault? example: true - example: false + example: true goa-attribute-id: description: ID is a unique identifier for this particular occurrence of the problem. schema: @@ -309,14 +309,14 @@ paths: type: boolean description: Is the error temporary? example: true - example: false + example: true goa-attribute-timeout: description: Is the error a timeout? schema: type: boolean description: Is the error a timeout? example: false - example: true + example: false /upload/{id}: delete: tags: @@ -332,9 +332,9 @@ paths: schema: type: string description: 'IDs are generated using Xid: https://github.com/rs/xid' - example: l8gvnb0heh9gmtcdonme + example: fgn8ncu1uo2shoc1tgd3 pattern: '[0-9a-v]{20}' - example: 4a7cfcbpum4qskf2i29r + example: fgn8ncu1uo2shoc1tgd3 - name: Tus-Resumable in: header description: tusResumable represents a tus protocol version. @@ -366,7 +366,7 @@ paths: type: boolean description: Is the error a server-side fault? example: true - example: false + example: true goa-attribute-id: description: ID is a unique identifier for this particular occurrence of the problem. schema: @@ -394,14 +394,14 @@ paths: type: boolean description: Is the error temporary? example: true - example: false + example: true goa-attribute-timeout: description: Is the error a timeout? schema: type: boolean description: Is the error a timeout? example: false - example: true + example: false "410": description: 'Gone: For all future requests to this URL, the Server SHOULD respond with the 404 Not Found or 410 Gone status.' headers: @@ -411,7 +411,7 @@ paths: type: boolean description: Is the error a server-side fault? example: true - example: false + example: true goa-attribute-id: description: ID is a unique identifier for this particular occurrence of the problem. schema: @@ -439,14 +439,14 @@ paths: type: boolean description: Is the error temporary? example: true - example: false + example: true goa-attribute-timeout: description: Is the error a timeout? schema: type: boolean description: Is the error a timeout? example: false - example: true + example: false "412": description: 'InvalidTusResumable: If the version specified by the Client is not supported by the Server, it MUST respond with the 412 Precondition Failed status.' headers: @@ -473,9 +473,9 @@ paths: schema: type: string description: 'IDs are generated using Xid: https://github.com/rs/xid' - example: q6rv3ofkukars65g6hq6 + example: 9rh2ia73s256mmjr8kpt pattern: '[0-9a-v]{20}' - example: gci6h77lvrh5fel0fpvn + example: 9rh2ia73s256mmjr8kpt - name: Tus-Resumable in: header description: tusResumable represents a tus protocol version. @@ -513,9 +513,9 @@ paths: schema: type: integer description: uploadLength represents the size of the entire upload in bytes. - example: 8560999440483038788 + example: 4029420343829624487 format: int64 - example: 1104782678439473248 + example: 4029420343829624487 Upload-Metadata: description: The Client MAY supply the Upload-Metadata header to add additional metadata to the upload creation request. schema: @@ -528,9 +528,9 @@ paths: schema: type: integer description: uploadOffset represents a byte offset within a resource. - example: 399962519172712526 + example: 8805735883885567628 format: int64 - example: 4810967207691105196 + example: 8805735883885567628 "404": description: 'NotFound: If the resource is not found, the Server SHOULD return either the 404 Not Found, 410 Gone or 403 Forbidden status without the Upload-Offset header.' headers: @@ -540,7 +540,7 @@ paths: type: boolean description: Is the error a server-side fault? example: true - example: false + example: true goa-attribute-id: description: ID is a unique identifier for this particular occurrence of the problem. schema: @@ -568,14 +568,14 @@ paths: type: boolean description: Is the error temporary? example: true - example: false + example: true goa-attribute-timeout: description: Is the error a timeout? schema: type: boolean description: Is the error a timeout? example: false - example: true + example: false "410": description: 'Gone: If the resource is not found, the Server SHOULD return either the 404 Not Found, 410 Gone or 403 Forbidden status without the Upload-Offset header.' headers: @@ -585,7 +585,7 @@ paths: type: boolean description: Is the error a server-side fault? example: true - example: false + example: true goa-attribute-id: description: ID is a unique identifier for this particular occurrence of the problem. schema: @@ -613,14 +613,14 @@ paths: type: boolean description: Is the error temporary? example: true - example: false + example: true goa-attribute-timeout: description: Is the error a timeout? schema: type: boolean description: Is the error a timeout? example: false - example: true + example: false "412": description: 'InvalidTusResumable: If the version specified by the Client is not supported by the Server, it MUST respond with the 412 Precondition Failed status.' headers: @@ -647,9 +647,9 @@ paths: schema: type: string description: 'IDs are generated using Xid: https://github.com/rs/xid' - example: kbk9n1g4u0hd4fgheooj + example: 7pc6esaasn4ffl7qlrcf pattern: '[0-9a-v]{20}' - example: 36qdphsraeoin48e0v1k + example: 7pc6esaasn4ffl7qlrcf - name: Tus-Resumable in: header description: tusResumable represents a tus protocol version. @@ -667,9 +667,9 @@ paths: schema: type: integer description: uploadOffset represents a byte offset within a resource. - example: 6034095156383247232 + example: 2754385183630855775 format: int64 - example: 5253941728923434458 + example: 2754385183630855775 - name: Upload-Checksum in: header description: A Client MAY include the Upload-Checksum header in a PATCH request. Once the entire request has been received, the Server MUST verify the uploaded chunk against the provided checksum using the specified algorithm. @@ -702,9 +702,9 @@ paths: schema: type: integer description: uploadOffset represents a byte offset within a resource. - example: 399962519172712526 + example: 3831825769931087659 format: int64 - example: 4810967207691105196 + example: 3831825769931087659 "400": description: 'InvalidChecksumAlgorithm: The checksum algorithm is not supported by the server.' headers: @@ -714,7 +714,7 @@ paths: type: boolean description: Is the error a server-side fault? example: true - example: false + example: true goa-attribute-id: description: ID is a unique identifier for this particular occurrence of the problem. schema: @@ -742,14 +742,14 @@ paths: type: boolean description: Is the error temporary? example: true - example: false + example: true goa-attribute-timeout: description: Is the error a timeout? schema: type: boolean description: Is the error a timeout? example: false - example: true + example: false "404": description: 'NotFound: If a Client does attempt to resume an upload which has since been removed by the Server, the Server SHOULD respond with the404 Not Found or 410 Gone status.' headers: @@ -759,7 +759,7 @@ paths: type: boolean description: Is the error a server-side fault? example: true - example: false + example: true goa-attribute-id: description: ID is a unique identifier for this particular occurrence of the problem. schema: @@ -787,14 +787,14 @@ paths: type: boolean description: Is the error temporary? example: true - example: false + example: true goa-attribute-timeout: description: Is the error a timeout? schema: type: boolean description: Is the error a timeout? example: false - example: true + example: false "409": description: 'InvalidOffset: If the offsets do not match, the Server MUST respond with the 409 Conflict status without modifying the upload resource.' headers: @@ -804,7 +804,7 @@ paths: type: boolean description: Is the error a server-side fault? example: true - example: false + example: true goa-attribute-id: description: ID is a unique identifier for this particular occurrence of the problem. schema: @@ -832,14 +832,14 @@ paths: type: boolean description: Is the error temporary? example: true - example: false + example: true goa-attribute-timeout: description: Is the error a timeout? schema: type: boolean description: Is the error a timeout? example: false - example: true + example: false "410": description: 'Gone: If a Client does attempt to resume an upload which has since been removed by the Server, the Server SHOULD respond with the404 Not Found or 410 Gone status.' headers: @@ -849,7 +849,7 @@ paths: type: boolean description: Is the error a server-side fault? example: true - example: false + example: true goa-attribute-id: description: ID is a unique identifier for this particular occurrence of the problem. schema: @@ -877,14 +877,14 @@ paths: type: boolean description: Is the error temporary? example: true - example: false + example: true goa-attribute-timeout: description: Is the error a timeout? schema: type: boolean description: Is the error a timeout? example: false - example: true + example: false "412": description: 'InvalidTusResumable: If the version specified by the Client is not supported by the Server, it MUST respond with the 412 Precondition Failed status.' headers: @@ -906,7 +906,7 @@ paths: type: boolean description: Is the error a server-side fault? example: true - example: false + example: true goa-attribute-id: description: ID is a unique identifier for this particular occurrence of the problem. schema: @@ -934,14 +934,14 @@ paths: type: boolean description: Is the error temporary? example: true - example: false + example: true goa-attribute-timeout: description: Is the error a timeout? schema: type: boolean description: Is the error a timeout? example: false - example: true + example: false "460": description: 'ChecksumMismatch: The checksums mismatch.' headers: @@ -951,7 +951,7 @@ paths: type: boolean description: Is the error a server-side fault? example: true - example: false + example: true goa-attribute-id: description: ID is a unique identifier for this particular occurrence of the problem. schema: @@ -979,14 +979,14 @@ paths: type: boolean description: Is the error temporary? example: true - example: false + example: true goa-attribute-timeout: description: Is the error a timeout? schema: type: boolean description: Is the error a timeout? example: false - example: true + example: false "500": description: 'Internal: Internal error' headers: @@ -996,7 +996,7 @@ paths: type: boolean description: Is the error a server-side fault? example: true - example: false + example: true goa-attribute-id: description: ID is a unique identifier for this particular occurrence of the problem. schema: @@ -1024,14 +1024,14 @@ paths: type: boolean description: Is the error temporary? example: true - example: false + example: true goa-attribute-timeout: description: Is the error a timeout? schema: type: boolean description: Is the error a timeout? example: false - example: true + example: false components: {} tags: - name: tus diff --git a/tus/gen/http/tus/client/cli.go b/tus/gen/http/tus/client/cli.go index 7a7ee416c..782c93c60 100644 --- a/tus/gen/http/tus/client/cli.go +++ b/tus/gen/http/tus/client/cli.go @@ -97,7 +97,8 @@ func BuildPostPayload(tusPostTusResumable string, tusPostUploadLength string, tu var uploadLength *int64 { if tusPostUploadLength != "" { - val, err := strconv.ParseInt(tusPostUploadLength, 10, 64) + var val int64 + val, err = strconv.ParseInt(tusPostUploadLength, 10, 64) uploadLength = &val if err != nil { return nil, fmt.Errorf("invalid value for uploadLength, must be INT64") @@ -114,8 +115,8 @@ func BuildPostPayload(tusPostTusResumable string, tusPostUploadLength string, tu if err != nil { return nil, fmt.Errorf("invalid value for uploadDeferLength, must be INT") } - if !(*uploadDeferLength == 1) { - err = goa.MergeErrors(err, goa.InvalidEnumValueError("uploadDeferLength", *uploadDeferLength, []any{1})) + if !(val == 1) { + err = goa.MergeErrors(err, goa.InvalidEnumValueError("uploadDeferLength", val, []any{1})) } if err != nil { return nil, err @@ -137,7 +138,8 @@ func BuildPostPayload(tusPostTusResumable string, tusPostUploadLength string, tu var tusMaxSize *int64 { if tusPostTusMaxSize != "" { - val, err := strconv.ParseInt(tusPostTusMaxSize, 10, 64) + var val int64 + val, err = strconv.ParseInt(tusPostTusMaxSize, 10, 64) tusMaxSize = &val if err != nil { return nil, fmt.Errorf("invalid value for tusMaxSize, must be INT64") diff --git a/tus/gen/http/tus/client/encode_decode.go b/tus/gen/http/tus/client/encode_decode.go index b7ca6ee86..3de7b2091 100644 --- a/tus/gen/http/tus/client/encode_decode.go +++ b/tus/gen/http/tus/client/encode_decode.go @@ -10,6 +10,7 @@ package client import ( "bytes" "context" + "errors" "io" "net/http" "net/url" @@ -71,18 +72,24 @@ func EncodeHeadRequest(encoder func(*http.Request) goahttp.Encoder) func(*http.R // - "InvalidTusResumable" (type *tus.ErrInvalidTUSResumable): http.StatusPreconditionFailed // - error: internal error func DecodeHeadResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (any, error) { - return func(resp *http.Response) (any, error) { + return func(resp *http.Response) (result any, decodeErr error) { + responseBody := resp.Body if restoreBody { - b, err := io.ReadAll(resp.Body) - if err != nil { - return nil, err + b, readErr := io.ReadAll(responseBody) + closeErr := responseBody.Close() + if err := errors.Join(readErr, closeErr); err != nil { + return nil, goahttp.ErrDecodingError("tus", "head", err) } resp.Body = io.NopCloser(bytes.NewBuffer(b)) defer func() { resp.Body = io.NopCloser(bytes.NewBuffer(b)) }() } else { - defer resp.Body.Close() + defer func() { + if err := responseBody.Close(); err != nil { + decodeErr = errors.Join(decodeErr, goahttp.ErrDecodingError("tus", "head", err)) + } + }() } switch resp.StatusCode { case http.StatusOK: @@ -288,7 +295,10 @@ func DecodeHeadResponse(decoder func(*http.Response) goahttp.Decoder, restoreBod } return nil, NewHeadInvalidTusResumable(tusVersion) default: - body, _ := io.ReadAll(resp.Body) + body, err := io.ReadAll(resp.Body) + if err != nil { + return nil, goahttp.ErrDecodingError("tus", "head", err) + } return nil, goahttp.ErrInvalidResponse("tus", "head", resp.StatusCode, string(body)) } } @@ -362,18 +372,24 @@ func EncodePatchRequest(encoder func(*http.Request) goahttp.Encoder) func(*http. // - "InvalidTusResumable" (type *tus.ErrInvalidTUSResumable): http.StatusPreconditionFailed // - error: internal error func DecodePatchResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (any, error) { - return func(resp *http.Response) (any, error) { + return func(resp *http.Response) (result any, decodeErr error) { + responseBody := resp.Body if restoreBody { - b, err := io.ReadAll(resp.Body) - if err != nil { - return nil, err + b, readErr := io.ReadAll(responseBody) + closeErr := responseBody.Close() + if err := errors.Join(readErr, closeErr); err != nil { + return nil, goahttp.ErrDecodingError("tus", "patch", err) } resp.Body = io.NopCloser(bytes.NewBuffer(b)) defer func() { resp.Body = io.NopCloser(bytes.NewBuffer(b)) }() } else { - defer resp.Body.Close() + defer func() { + if err := responseBody.Close(); err != nil { + decodeErr = errors.Join(decodeErr, goahttp.ErrDecodingError("tus", "patch", err)) + } + }() } switch resp.StatusCode { case http.StatusNoContent: @@ -861,7 +877,10 @@ func DecodePatchResponse(decoder func(*http.Response) goahttp.Decoder, restoreBo } return nil, NewPatchInvalidTusResumable(tusVersion) default: - body, _ := io.ReadAll(resp.Body) + body, err := io.ReadAll(resp.Body) + if err != nil { + return nil, goahttp.ErrDecodingError("tus", "patch", err) + } return nil, goahttp.ErrInvalidResponse("tus", "patch", resp.StatusCode, string(body)) } } @@ -902,18 +921,24 @@ func (c *Client) BuildOptionsRequest(ctx context.Context, v any) (*http.Request, // - "InvalidTusResumable" (type *tus.ErrInvalidTUSResumable): http.StatusPreconditionFailed // - error: internal error func DecodeOptionsResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (any, error) { - return func(resp *http.Response) (any, error) { + return func(resp *http.Response) (result any, decodeErr error) { + responseBody := resp.Body if restoreBody { - b, err := io.ReadAll(resp.Body) - if err != nil { - return nil, err + b, readErr := io.ReadAll(responseBody) + closeErr := responseBody.Close() + if err := errors.Join(readErr, closeErr); err != nil { + return nil, goahttp.ErrDecodingError("tus", "options", err) } resp.Body = io.NopCloser(bytes.NewBuffer(b)) defer func() { resp.Body = io.NopCloser(bytes.NewBuffer(b)) }() } else { - defer resp.Body.Close() + defer func() { + if err := responseBody.Close(); err != nil { + decodeErr = errors.Join(decodeErr, goahttp.ErrDecodingError("tus", "options", err)) + } + }() } switch resp.StatusCode { case http.StatusNoContent: @@ -988,7 +1013,10 @@ func DecodeOptionsResponse(decoder func(*http.Response) goahttp.Decoder, restore } return nil, NewOptionsInvalidTusResumable(tusVersion) default: - body, _ := io.ReadAll(resp.Body) + body, err := io.ReadAll(resp.Body) + if err != nil { + return nil, goahttp.ErrDecodingError("tus", "options", err) + } return nil, goahttp.ErrInvalidResponse("tus", "options", resp.StatusCode, string(body)) } } @@ -1069,18 +1097,24 @@ func EncodePostRequest(encoder func(*http.Request) goahttp.Encoder) func(*http.R // - "InvalidTusResumable" (type *tus.ErrInvalidTUSResumable): http.StatusPreconditionFailed // - error: internal error func DecodePostResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (any, error) { - return func(resp *http.Response) (any, error) { + return func(resp *http.Response) (result any, decodeErr error) { + responseBody := resp.Body if restoreBody { - b, err := io.ReadAll(resp.Body) - if err != nil { - return nil, err + b, readErr := io.ReadAll(responseBody) + closeErr := responseBody.Close() + if err := errors.Join(readErr, closeErr); err != nil { + return nil, goahttp.ErrDecodingError("tus", "post", err) } resp.Body = io.NopCloser(bytes.NewBuffer(b)) defer func() { resp.Body = io.NopCloser(bytes.NewBuffer(b)) }() } else { - defer resp.Body.Close() + defer func() { + if err := responseBody.Close(); err != nil { + decodeErr = errors.Join(decodeErr, goahttp.ErrDecodingError("tus", "post", err)) + } + }() } switch resp.StatusCode { case http.StatusCreated: @@ -1313,7 +1347,10 @@ func DecodePostResponse(decoder func(*http.Response) goahttp.Decoder, restoreBod } return nil, NewPostInvalidChecksumAlgorithm(name, id, message, temporary, timeout, fault) default: - body, _ := io.ReadAll(resp.Body) + body, err := io.ReadAll(resp.Body) + if err != nil { + return nil, goahttp.ErrDecodingError("tus", "post", err) + } return nil, goahttp.ErrInvalidResponse("tus", "post", resp.StatusCode, string(body)) } case http.StatusRequestEntityTooLarge: @@ -1458,7 +1495,10 @@ func DecodePostResponse(decoder func(*http.Response) goahttp.Decoder, restoreBod } return nil, NewPostInvalidTusResumable(tusVersion) default: - body, _ := io.ReadAll(resp.Body) + body, err := io.ReadAll(resp.Body) + if err != nil { + return nil, goahttp.ErrDecodingError("tus", "post", err) + } return nil, goahttp.ErrInvalidResponse("tus", "post", resp.StatusCode, string(body)) } } @@ -1527,18 +1567,24 @@ func EncodeDeleteRequest(encoder func(*http.Request) goahttp.Encoder) func(*http // - "InvalidTusResumable" (type *tus.ErrInvalidTUSResumable): http.StatusPreconditionFailed // - error: internal error func DecodeDeleteResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (any, error) { - return func(resp *http.Response) (any, error) { + return func(resp *http.Response) (result any, decodeErr error) { + responseBody := resp.Body if restoreBody { - b, err := io.ReadAll(resp.Body) - if err != nil { - return nil, err + b, readErr := io.ReadAll(responseBody) + closeErr := responseBody.Close() + if err := errors.Join(readErr, closeErr); err != nil { + return nil, goahttp.ErrDecodingError("tus", "delete", err) } resp.Body = io.NopCloser(bytes.NewBuffer(b)) defer func() { resp.Body = io.NopCloser(bytes.NewBuffer(b)) }() } else { - defer resp.Body.Close() + defer func() { + if err := responseBody.Close(); err != nil { + decodeErr = errors.Join(decodeErr, goahttp.ErrDecodingError("tus", "delete", err)) + } + }() } switch resp.StatusCode { case http.StatusNoContent: @@ -1699,7 +1745,10 @@ func DecodeDeleteResponse(decoder func(*http.Response) goahttp.Decoder, restoreB } return nil, NewDeleteInvalidTusResumable(tusVersion) default: - body, _ := io.ReadAll(resp.Body) + body, err := io.ReadAll(resp.Body) + if err != nil { + return nil, goahttp.ErrDecodingError("tus", "delete", err) + } return nil, goahttp.ErrInvalidResponse("tus", "delete", resp.StatusCode, string(body)) } } diff --git a/upload_download/gen/http/cli/upload_download/cli.go b/upload_download/gen/http/cli/upload_download/cli.go index b3aab6ff7..35f7c9f2f 100644 --- a/upload_download/gen/http/cli/upload_download/cli.go +++ b/upload_download/gen/http/cli/upload_download/cli.go @@ -200,5 +200,5 @@ func updownDownloadUsage() { fmt.Fprintln(os.Stderr) fmt.Fprintln(os.Stderr, "Example:") - fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "updown download --p \"Hic accusamus delectus voluptatum architecto.\"") + fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "updown download --p \"Amet odit illum voluptatem suscipit.\"") } diff --git a/upload_download/gen/http/openapi.json b/upload_download/gen/http/openapi.json index a0261a0f8..fcd07f7e5 100644 --- a/upload_download/gen/http/openapi.json +++ b/upload_download/gen/http/openapi.json @@ -1 +1 @@ -{"swagger":"2.0","info":{"title":"","description":"Simple file upload and download example.","version":"0.0.1"},"host":"localhost:80","consumes":["application/json","application/xml","application/gob"],"produces":["application/json","application/xml","application/gob"],"paths":{"/download/{filename}":{"get":{"tags":["updown"],"summary":"download updown","operationId":"updown#download","parameters":[{"name":"filename","in":"path","description":"Path to downloaded file.","required":true,"type":"string"}],"responses":{"200":{"description":"OK response.","headers":{"Content-Length":{"description":"Length is the downloaded content length in bytes.","type":"integer","format":"int64"}}},"404":{"description":"Not Found response.","schema":{"$ref":"#/definitions/UpdownDownloadInvalidFilePathResponseBody"}},"500":{"description":"Internal Server Error response.","schema":{"$ref":"#/definitions/UpdownDownloadInternalErrorResponseBody"}}},"schemes":["http"]}},"/upload/{dir}":{"post":{"tags":["updown"],"summary":"upload updown","operationId":"updown#upload","parameters":[{"name":"dir","in":"path","description":"Dir is the relative path to the file directory where the uploaded content is saved.","required":true,"type":"string","default":"upload"},{"name":"Content-Type","in":"header","description":"Content-Type header, must define value for multipart boundary.","required":false,"type":"string","default":"multipart/form-data; boundary=goa","pattern":"multipart/[^;]+; boundary=.+"}],"responses":{"204":{"description":"No Content response."},"400":{"description":"Bad Request response.","schema":{"$ref":"#/definitions/UpdownUploadInvalidMultipartRequestResponseBody"}},"500":{"description":"Internal Server Error response.","schema":{"$ref":"#/definitions/UpdownUploadInternalErrorResponseBody"}}},"schemes":["http"]}}},"definitions":{"UpdownDownloadInternalErrorResponseBody":{"title":"Mediatype identifier: application/vnd.goa.error; view=default","type":"object","properties":{"fault":{"type":"boolean","description":"Is the error a server-side fault?","example":false},"id":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"message":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"name":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"temporary":{"type":"boolean","description":"Is the error temporary?","example":false},"timeout":{"type":"boolean","description":"Is the error a timeout?","example":false}},"description":"Fault while processing download. (default view)","example":{"fault":false,"id":"123abc","message":"parameter 'p' must be an integer","name":"bad_request","temporary":false,"timeout":false},"required":["name","id","message","temporary","timeout","fault"]},"UpdownDownloadInvalidFilePathResponseBody":{"title":"Mediatype identifier: application/vnd.goa.error; view=default","type":"object","properties":{"fault":{"type":"boolean","description":"Is the error a server-side fault?","example":false},"id":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"message":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"name":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"temporary":{"type":"boolean","description":"Is the error temporary?","example":false},"timeout":{"type":"boolean","description":"Is the error a timeout?","example":false}},"description":"Could not locate file for download (default view)","example":{"fault":false,"id":"123abc","message":"parameter 'p' must be an integer","name":"bad_request","temporary":false,"timeout":false},"required":["name","id","message","temporary","timeout","fault"]},"UpdownUploadInternalErrorResponseBody":{"title":"Mediatype identifier: application/vnd.goa.error; view=default","type":"object","properties":{"fault":{"type":"boolean","description":"Is the error a server-side fault?","example":false},"id":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"message":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"name":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"temporary":{"type":"boolean","description":"Is the error temporary?","example":false},"timeout":{"type":"boolean","description":"Is the error a timeout?","example":false}},"description":"Fault while processing upload. (default view)","example":{"fault":false,"id":"123abc","message":"parameter 'p' must be an integer","name":"bad_request","temporary":false,"timeout":false},"required":["name","id","message","temporary","timeout","fault"]},"UpdownUploadInvalidMediaTypeResponseBody":{"title":"Mediatype identifier: application/vnd.goa.error; view=default","type":"object","properties":{"fault":{"type":"boolean","description":"Is the error a server-side fault?","example":false},"id":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"message":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"name":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"temporary":{"type":"boolean","description":"Is the error temporary?","example":false},"timeout":{"type":"boolean","description":"Is the error a timeout?","example":false}},"description":"Error returned when the Content-Type header does not define a multipart request. (default view)","example":{"fault":false,"id":"123abc","message":"parameter 'p' must be an integer","name":"bad_request","temporary":false,"timeout":false},"required":["name","id","message","temporary","timeout","fault"]},"UpdownUploadInvalidMultipartRequestResponseBody":{"title":"Mediatype identifier: application/vnd.goa.error; view=default","type":"object","properties":{"fault":{"type":"boolean","description":"Is the error a server-side fault?","example":false},"id":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"message":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"name":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"temporary":{"type":"boolean","description":"Is the error temporary?","example":false},"timeout":{"type":"boolean","description":"Is the error a timeout?","example":false}},"description":"Error returned when the request body is not a valid multipart content. (default view)","example":{"fault":false,"id":"123abc","message":"parameter 'p' must be an integer","name":"bad_request","temporary":false,"timeout":false},"required":["name","id","message","temporary","timeout","fault"]}}} \ No newline at end of file +{"swagger":"2.0","info":{"title":"","description":"Simple file upload and download example.","version":"0.0.1"},"host":"localhost:80","consumes":["application/json","application/xml","application/gob"],"produces":["application/json","application/xml","application/gob"],"paths":{"/download/{filename}":{"get":{"tags":["updown"],"summary":"download updown","operationId":"updown#download","parameters":[{"name":"filename","in":"path","description":"Path to downloaded file.","required":true,"type":"string"}],"responses":{"200":{"description":"OK response.","headers":{"Content-Length":{"description":"Length is the downloaded content length in bytes.","type":"integer","format":"int64"}}},"404":{"description":"invalid_file_path: Could not locate file for download","schema":{"$ref":"#/definitions/UpdownDownloadInvalidFilePathResponseBody"},"examples":{"application/vnd.goa.error":{"fault":false,"id":"123abc","message":"parameter 'p' must be an integer","name":"invalid_file_path","temporary":false,"timeout":false}}},"500":{"description":"internal_error: Fault while processing download.","schema":{"$ref":"#/definitions/UpdownDownloadInternalErrorResponseBody"},"examples":{"application/vnd.goa.error":{"fault":false,"id":"123abc","message":"parameter 'p' must be an integer","name":"internal_error","temporary":false,"timeout":false}}}},"schemes":["http"]}},"/upload/{dir}":{"post":{"tags":["updown"],"summary":"upload updown","operationId":"updown#upload","parameters":[{"name":"dir","in":"path","description":"Dir is the relative path to the file directory where the uploaded content is saved.","required":true,"type":"string","default":"upload"},{"name":"Content-Type","in":"header","description":"Content-Type header, must define value for multipart boundary.","required":false,"type":"string","default":"multipart/form-data; boundary=goa","pattern":"multipart/[^;]+; boundary=.+"}],"responses":{"204":{"description":"No Content response."},"400":{"description":"invalid_multipart_request: Error returned when the request body is not a valid multipart content.","schema":{"$ref":"#/definitions/UpdownUploadInvalidMultipartRequestResponseBody"},"examples":{"application/vnd.goa.error":{"fault":false,"id":"123abc","message":"parameter 'p' must be an integer","name":"invalid_multipart_request","temporary":false,"timeout":false}}},"500":{"description":"internal_error: Fault while processing upload.","schema":{"$ref":"#/definitions/UpdownUploadInternalErrorResponseBody"},"examples":{"application/vnd.goa.error":{"fault":false,"id":"123abc","message":"parameter 'p' must be an integer","name":"internal_error","temporary":false,"timeout":false}}}},"schemes":["http"]}}},"definitions":{"UpdownDownloadInternalErrorResponseBody":{"title":"Mediatype identifier: application/vnd.goa.error; view=default","type":"object","properties":{"fault":{"type":"boolean","description":"Is the error a server-side fault?","example":false},"id":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"message":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"name":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"temporary":{"type":"boolean","description":"Is the error temporary?","example":false},"timeout":{"type":"boolean","description":"Is the error a timeout?","example":false}},"description":"Error response result type (default view)","example":{"fault":false,"id":"123abc","message":"parameter 'p' must be an integer","name":"bad_request","temporary":false,"timeout":false},"required":["name","id","message","temporary","timeout","fault"]},"UpdownDownloadInvalidFilePathResponseBody":{"title":"Mediatype identifier: application/vnd.goa.error; view=default","type":"object","properties":{"fault":{"type":"boolean","description":"Is the error a server-side fault?","example":true},"id":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"message":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"name":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"temporary":{"type":"boolean","description":"Is the error temporary?","example":true},"timeout":{"type":"boolean","description":"Is the error a timeout?","example":true}},"description":"Error response result type (default view)","example":{"fault":true,"id":"123abc","message":"parameter 'p' must be an integer","name":"bad_request","temporary":true,"timeout":true},"required":["name","id","message","temporary","timeout","fault"]},"UpdownUploadInternalErrorResponseBody":{"title":"Mediatype identifier: application/vnd.goa.error; view=default","type":"object","properties":{"fault":{"type":"boolean","description":"Is the error a server-side fault?","example":false},"id":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"message":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"name":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"temporary":{"type":"boolean","description":"Is the error temporary?","example":false},"timeout":{"type":"boolean","description":"Is the error a timeout?","example":true}},"description":"Error response result type (default view)","example":{"fault":false,"id":"123abc","message":"parameter 'p' must be an integer","name":"bad_request","temporary":false,"timeout":true},"required":["name","id","message","temporary","timeout","fault"]},"UpdownUploadInvalidMediaTypeResponseBody":{"title":"Mediatype identifier: application/vnd.goa.error; view=default","type":"object","properties":{"fault":{"type":"boolean","description":"Is the error a server-side fault?","example":false},"id":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"message":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"name":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"temporary":{"type":"boolean","description":"Is the error temporary?","example":false},"timeout":{"type":"boolean","description":"Is the error a timeout?","example":false}},"description":"Error response result type (default view)","example":{"fault":false,"id":"123abc","message":"parameter 'p' must be an integer","name":"bad_request","temporary":false,"timeout":false},"required":["name","id","message","temporary","timeout","fault"]},"UpdownUploadInvalidMultipartRequestResponseBody":{"title":"Mediatype identifier: application/vnd.goa.error; view=default","type":"object","properties":{"fault":{"type":"boolean","description":"Is the error a server-side fault?","example":true},"id":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"message":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"name":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"temporary":{"type":"boolean","description":"Is the error temporary?","example":true},"timeout":{"type":"boolean","description":"Is the error a timeout?","example":false}},"description":"Error response result type (default view)","example":{"fault":true,"id":"123abc","message":"parameter 'p' must be an integer","name":"bad_request","temporary":true,"timeout":false},"required":["name","id","message","temporary","timeout","fault"]}}} \ No newline at end of file diff --git a/upload_download/gen/http/openapi.yaml b/upload_download/gen/http/openapi.yaml index 5f1ca650c..6c3245cbe 100644 --- a/upload_download/gen/http/openapi.yaml +++ b/upload_download/gen/http/openapi.yaml @@ -34,13 +34,29 @@ paths: type: integer format: int64 "404": - description: Not Found response. + description: 'invalid_file_path: Could not locate file for download' schema: $ref: '#/definitions/UpdownDownloadInvalidFilePathResponseBody' + examples: + application/vnd.goa.error: + fault: false + id: 123abc + message: parameter 'p' must be an integer + name: invalid_file_path + temporary: false + timeout: false "500": - description: Internal Server Error response. + description: 'internal_error: Fault while processing download.' schema: $ref: '#/definitions/UpdownDownloadInternalErrorResponseBody' + examples: + application/vnd.goa.error: + fault: false + id: 123abc + message: parameter 'p' must be an integer + name: internal_error + temporary: false + timeout: false schemes: - http /upload/{dir}: @@ -67,13 +83,29 @@ paths: "204": description: No Content response. "400": - description: Bad Request response. + description: 'invalid_multipart_request: Error returned when the request body is not a valid multipart content.' schema: $ref: '#/definitions/UpdownUploadInvalidMultipartRequestResponseBody' + examples: + application/vnd.goa.error: + fault: false + id: 123abc + message: parameter 'p' must be an integer + name: invalid_multipart_request + temporary: false + timeout: false "500": - description: Internal Server Error response. + description: 'internal_error: Fault while processing upload.' schema: $ref: '#/definitions/UpdownUploadInternalErrorResponseBody' + examples: + application/vnd.goa.error: + fault: false + id: 123abc + message: parameter 'p' must be an integer + name: internal_error + temporary: false + timeout: false schemes: - http definitions: @@ -105,7 +137,7 @@ definitions: type: boolean description: Is the error a timeout? example: false - description: Fault while processing download. (default view) + description: Error response result type (default view) example: fault: false id: 123abc @@ -127,7 +159,7 @@ definitions: fault: type: boolean description: Is the error a server-side fault? - example: false + example: true id: type: string description: ID is a unique identifier for this particular occurrence of the problem. @@ -143,19 +175,19 @@ definitions: temporary: type: boolean description: Is the error temporary? - example: false + example: true timeout: type: boolean description: Is the error a timeout? - example: false - description: Could not locate file for download (default view) + example: true + description: Error response result type (default view) example: - fault: false + fault: true id: 123abc message: parameter 'p' must be an integer name: bad_request - temporary: false - timeout: false + temporary: true + timeout: true required: - name - id @@ -190,15 +222,15 @@ definitions: timeout: type: boolean description: Is the error a timeout? - example: false - description: Fault while processing upload. (default view) + example: true + description: Error response result type (default view) example: fault: false id: 123abc message: parameter 'p' must be an integer name: bad_request temporary: false - timeout: false + timeout: true required: - name - id @@ -234,7 +266,7 @@ definitions: type: boolean description: Is the error a timeout? example: false - description: Error returned when the Content-Type header does not define a multipart request. (default view) + description: Error response result type (default view) example: fault: false id: 123abc @@ -256,7 +288,7 @@ definitions: fault: type: boolean description: Is the error a server-side fault? - example: false + example: true id: type: string description: ID is a unique identifier for this particular occurrence of the problem. @@ -272,18 +304,18 @@ definitions: temporary: type: boolean description: Is the error temporary? - example: false + example: true timeout: type: boolean description: Is the error a timeout? example: false - description: Error returned when the request body is not a valid multipart content. (default view) + description: Error response result type (default view) example: - fault: false + fault: true id: 123abc message: parameter 'p' must be an integer name: bad_request - temporary: false + temporary: true timeout: false required: - name diff --git a/upload_download/gen/http/openapi3.2.json b/upload_download/gen/http/openapi3.2.json index 394ac294f..449516914 100644 --- a/upload_download/gen/http/openapi3.2.json +++ b/upload_download/gen/http/openapi3.2.json @@ -1 +1 @@ -{"openapi":"3.2.0","info":{"title":"Goa API","description":"Simple file upload and download example.","version":"0.0.1"},"servers":[{"url":"http://localhost:80","name":"upload_download","description":"Default server for upload_download"}],"paths":{"/download/{filename}":{"get":{"tags":["updown"],"summary":"download updown","operationId":"updown#download","parameters":[{"name":"filename","in":"path","description":"Path to downloaded file.","required":true,"schema":{"type":"string","description":"Path to downloaded file.","example":"Qui vel non."},"example":"Tempora in."}],"responses":{"200":{"description":"OK response.","headers":{"Content-Length":{"description":"Length is the downloaded content length in bytes.","schema":{"type":"integer","description":"Length is the downloaded content length in bytes.","example":4194304,"format":"int64"},"example":4194304}},"content":{"application/json":{"schema":{"type":"string","format":"binary"}}}},"404":{"description":"invalid_file_path: Could not locate file for download","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"internal_error: Fault while processing download.","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/upload/{dir}":{"post":{"tags":["updown"],"summary":"upload updown","operationId":"updown#upload","parameters":[{"name":"dir","in":"path","description":"Dir is the relative path to the file directory where the uploaded content is saved.","required":true,"schema":{"type":"string","description":"Dir is the relative path to the file directory where the uploaded content is saved.","default":"upload","example":"upload"},"example":"upload"},{"name":"Content-Type","in":"header","description":"Content-Type header, must define value for multipart boundary.","schema":{"type":"string","description":"Content-Type header, must define value for multipart boundary.","default":"multipart/form-data; boundary=goa","example":"multipart/form-data; boundary=goa","pattern":"multipart/[^;]+; boundary=.+"},"example":"multipart/form-data; boundary=goa"}],"responses":{"204":{"description":"No Content response."},"400":{"description":"invalid_multipart_request: Error returned when the request body is not a valid multipart content.","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"internal_error: Fault while processing upload.","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"schemas":{"Error":{"type":"object","properties":{"fault":{"type":"boolean","description":"Is the error a server-side fault?","example":true},"id":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"message":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"name":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"temporary":{"type":"boolean","description":"Is the error temporary?","example":false},"timeout":{"type":"boolean","description":"Is the error a timeout?","example":false}},"description":"Error returned when the Content-Type header does not define a multipart request.","example":{"fault":true,"id":"123abc","message":"parameter 'p' must be an integer","name":"bad_request","temporary":false,"timeout":false},"required":["name","id","message","temporary","timeout","fault"]}}},"tags":[{"name":"updown","description":"Service updown demonstrates how to implement upload and download of files in\nGoa without having to load the entire content in memory first.\nThe upload method uses SkipRequestBodyEncodeDecode to delegate reading the HTTP\nrequest body to the service logic. This alleviates the need for loading the\nfull body content in memory first to decode it into a data structure. Note that\nusing SkipRequestBodyDecode is incompatible with gRPC and can only be used on\nmethods that only define a HTTP transport mapping. This example implementation\nleverages package \"mime/multipart\" to read the request body.\nSimilarly the download method uses SkipResponseBodyEncodeDecode to stream the \nfile to the client without requiring to load the complete content in memory\nfirst. As with SkipRequestBodyDecode using SkipResponseBodyEncodeDecode is\nincompatible with gRPC."}]} \ No newline at end of file +{"openapi":"3.2.0","info":{"title":"Goa API","description":"Simple file upload and download example.","version":"0.0.1"},"servers":[{"url":"http://localhost:80","name":"upload_download","description":"Default server for upload_download"}],"paths":{"/download/{filename}":{"get":{"tags":["updown"],"summary":"download updown","operationId":"updown#download","parameters":[{"name":"filename","in":"path","description":"Path to downloaded file.","required":true,"schema":{"type":"string","description":"Path to downloaded file.","example":"Ut rerum est minus natus voluptas ex."},"example":"Ut rerum est minus natus voluptas ex."}],"responses":{"200":{"description":"OK response.","headers":{"Content-Length":{"description":"Length is the downloaded content length in bytes.","schema":{"type":"integer","description":"Length is the downloaded content length in bytes.","example":4194304,"format":"int64"},"example":4194304}},"content":{"application/json":{"schema":{"type":"string","format":"binary"}}}},"404":{"description":"invalid_file_path: Could not locate file for download","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"fault":false,"id":"123abc","message":"parameter 'p' must be an integer","name":"invalid_file_path","temporary":false,"timeout":false}}}},"500":{"description":"internal_error: Fault while processing download.","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"fault":false,"id":"123abc","message":"parameter 'p' must be an integer","name":"internal_error","temporary":false,"timeout":false}}}}}}},"/upload/{dir}":{"post":{"tags":["updown"],"summary":"upload updown","operationId":"updown#upload","parameters":[{"name":"dir","in":"path","description":"Dir is the relative path to the file directory where the uploaded content is saved.","required":true,"schema":{"type":"string","description":"Dir is the relative path to the file directory where the uploaded content is saved.","default":"upload","example":"upload"},"example":"upload"},{"name":"Content-Type","in":"header","description":"Content-Type header, must define value for multipart boundary.","schema":{"type":"string","description":"Content-Type header, must define value for multipart boundary.","default":"multipart/form-data; boundary=goa","example":"multipart/form-data; boundary=goa","pattern":"multipart/[^;]+; boundary=.+"},"example":"multipart/form-data; boundary=goa"}],"responses":{"204":{"description":"No Content response."},"400":{"description":"invalid_multipart_request: Error returned when the request body is not a valid multipart content.","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"fault":false,"id":"123abc","message":"parameter 'p' must be an integer","name":"invalid_multipart_request","temporary":false,"timeout":false}}}},"500":{"description":"internal_error: Fault while processing upload.","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"fault":false,"id":"123abc","message":"parameter 'p' must be an integer","name":"internal_error","temporary":false,"timeout":false}}}}}}}},"components":{"schemas":{"Error":{"type":"object","properties":{"fault":{"type":"boolean","description":"Is the error a server-side fault?","example":false},"id":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"message":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"name":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"temporary":{"type":"boolean","description":"Is the error temporary?","example":false},"timeout":{"type":"boolean","description":"Is the error a timeout?","example":false}},"description":"Error response result type","example":{"fault":false,"id":"123abc","message":"parameter 'p' must be an integer","name":"bad_request","temporary":false,"timeout":false},"required":["name","id","message","temporary","timeout","fault"]}}},"tags":[{"name":"updown","description":"Service updown demonstrates how to implement upload and download of files in\nGoa without having to load the entire content in memory first.\nThe upload method uses SkipRequestBodyEncodeDecode to delegate reading the HTTP\nrequest body to the service logic. This alleviates the need for loading the\nfull body content in memory first to decode it into a data structure. Note that\nusing SkipRequestBodyDecode is incompatible with gRPC and can only be used on\nmethods that only define a HTTP transport mapping. This example implementation\nleverages package \"mime/multipart\" to read the request body.\nSimilarly the download method uses SkipResponseBodyEncodeDecode to stream the \nfile to the client without requiring to load the complete content in memory\nfirst. As with SkipRequestBodyDecode using SkipResponseBodyEncodeDecode is\nincompatible with gRPC."}]} \ No newline at end of file diff --git a/upload_download/gen/http/openapi3.2.yaml b/upload_download/gen/http/openapi3.2.yaml index 04df0526b..f751bcfe3 100644 --- a/upload_download/gen/http/openapi3.2.yaml +++ b/upload_download/gen/http/openapi3.2.yaml @@ -22,8 +22,8 @@ paths: schema: type: string description: Path to downloaded file. - example: Qui vel non. - example: Tempora in. + example: Ut rerum est minus natus voluptas ex. + example: Ut rerum est minus natus voluptas ex. responses: "200": description: OK response. @@ -47,12 +47,26 @@ paths: application/vnd.goa.error: schema: $ref: '#/components/schemas/Error' + example: + fault: false + id: 123abc + message: parameter 'p' must be an integer + name: invalid_file_path + temporary: false + timeout: false "500": description: 'internal_error: Fault while processing download.' content: application/vnd.goa.error: schema: $ref: '#/components/schemas/Error' + example: + fault: false + id: 123abc + message: parameter 'p' must be an integer + name: internal_error + temporary: false + timeout: false /upload/{dir}: post: tags: @@ -89,12 +103,26 @@ paths: application/vnd.goa.error: schema: $ref: '#/components/schemas/Error' + example: + fault: false + id: 123abc + message: parameter 'p' must be an integer + name: invalid_multipart_request + temporary: false + timeout: false "500": description: 'internal_error: Fault while processing upload.' content: application/vnd.goa.error: schema: $ref: '#/components/schemas/Error' + example: + fault: false + id: 123abc + message: parameter 'p' must be an integer + name: internal_error + temporary: false + timeout: false components: schemas: Error: @@ -103,7 +131,7 @@ components: fault: type: boolean description: Is the error a server-side fault? - example: true + example: false id: type: string description: ID is a unique identifier for this particular occurrence of the problem. @@ -124,9 +152,9 @@ components: type: boolean description: Is the error a timeout? example: false - description: Error returned when the Content-Type header does not define a multipart request. + description: Error response result type example: - fault: true + fault: false id: 123abc message: parameter 'p' must be an integer name: bad_request diff --git a/upload_download/gen/http/openapi3.json b/upload_download/gen/http/openapi3.json index 4979c3c36..a2002993a 100644 --- a/upload_download/gen/http/openapi3.json +++ b/upload_download/gen/http/openapi3.json @@ -1 +1 @@ -{"openapi":"3.0.3","info":{"title":"Goa API","description":"Simple file upload and download example.","version":"0.0.1"},"servers":[{"url":"http://localhost:80","description":"Default server for upload_download"}],"paths":{"/download/{filename}":{"get":{"tags":["updown"],"summary":"download updown","operationId":"updown#download","parameters":[{"name":"filename","in":"path","description":"Path to downloaded file.","required":true,"schema":{"type":"string","description":"Path to downloaded file.","example":"Qui vel non."},"example":"Tempora in."}],"responses":{"200":{"description":"OK response.","headers":{"Content-Length":{"description":"Length is the downloaded content length in bytes.","schema":{"type":"integer","description":"Length is the downloaded content length in bytes.","example":4194304,"format":"int64"},"example":4194304}},"content":{"application/json":{"schema":{"type":"string","format":"binary"}}}},"404":{"description":"invalid_file_path: Could not locate file for download","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"internal_error: Fault while processing download.","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/upload/{dir}":{"post":{"tags":["updown"],"summary":"upload updown","operationId":"updown#upload","parameters":[{"name":"dir","in":"path","description":"Dir is the relative path to the file directory where the uploaded content is saved.","required":true,"schema":{"type":"string","description":"Dir is the relative path to the file directory where the uploaded content is saved.","default":"upload","example":"upload"},"example":"upload"},{"name":"Content-Type","in":"header","description":"Content-Type header, must define value for multipart boundary.","schema":{"type":"string","description":"Content-Type header, must define value for multipart boundary.","default":"multipart/form-data; boundary=goa","example":"multipart/form-data; boundary=goa","pattern":"multipart/[^;]+; boundary=.+"},"example":"multipart/form-data; boundary=goa"}],"responses":{"204":{"description":"No Content response."},"400":{"description":"invalid_multipart_request: Error returned when the request body is not a valid multipart content.","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"internal_error: Fault while processing upload.","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"schemas":{"Error":{"type":"object","properties":{"fault":{"type":"boolean","description":"Is the error a server-side fault?","example":true},"id":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"message":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"name":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"temporary":{"type":"boolean","description":"Is the error temporary?","example":false},"timeout":{"type":"boolean","description":"Is the error a timeout?","example":false}},"description":"Error returned when the Content-Type header does not define a multipart request.","example":{"fault":true,"id":"123abc","message":"parameter 'p' must be an integer","name":"bad_request","temporary":false,"timeout":false},"required":["name","id","message","temporary","timeout","fault"]}}},"tags":[{"name":"updown","description":"Service updown demonstrates how to implement upload and download of files in\nGoa without having to load the entire content in memory first.\nThe upload method uses SkipRequestBodyEncodeDecode to delegate reading the HTTP\nrequest body to the service logic. This alleviates the need for loading the\nfull body content in memory first to decode it into a data structure. Note that\nusing SkipRequestBodyDecode is incompatible with gRPC and can only be used on\nmethods that only define a HTTP transport mapping. This example implementation\nleverages package \"mime/multipart\" to read the request body.\nSimilarly the download method uses SkipResponseBodyEncodeDecode to stream the \nfile to the client without requiring to load the complete content in memory\nfirst. As with SkipRequestBodyDecode using SkipResponseBodyEncodeDecode is\nincompatible with gRPC."}]} \ No newline at end of file +{"openapi":"3.0.3","info":{"title":"Goa API","description":"Simple file upload and download example.","version":"0.0.1"},"servers":[{"url":"http://localhost:80","description":"Default server for upload_download"}],"paths":{"/download/{filename}":{"get":{"tags":["updown"],"summary":"download updown","operationId":"updown#download","parameters":[{"name":"filename","in":"path","description":"Path to downloaded file.","required":true,"schema":{"type":"string","description":"Path to downloaded file.","example":"Ut rerum est minus natus voluptas ex."},"example":"Ut rerum est minus natus voluptas ex."}],"responses":{"200":{"description":"OK response.","headers":{"Content-Length":{"description":"Length is the downloaded content length in bytes.","schema":{"type":"integer","description":"Length is the downloaded content length in bytes.","example":4194304,"format":"int64"},"example":4194304}},"content":{"application/json":{"schema":{"type":"string","format":"binary"}}}},"404":{"description":"invalid_file_path: Could not locate file for download","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"fault":false,"id":"123abc","message":"parameter 'p' must be an integer","name":"invalid_file_path","temporary":false,"timeout":false}}}},"500":{"description":"internal_error: Fault while processing download.","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"fault":false,"id":"123abc","message":"parameter 'p' must be an integer","name":"internal_error","temporary":false,"timeout":false}}}}}}},"/upload/{dir}":{"post":{"tags":["updown"],"summary":"upload updown","operationId":"updown#upload","parameters":[{"name":"dir","in":"path","description":"Dir is the relative path to the file directory where the uploaded content is saved.","required":true,"schema":{"type":"string","description":"Dir is the relative path to the file directory where the uploaded content is saved.","default":"upload","example":"upload"},"example":"upload"},{"name":"Content-Type","in":"header","description":"Content-Type header, must define value for multipart boundary.","schema":{"type":"string","description":"Content-Type header, must define value for multipart boundary.","default":"multipart/form-data; boundary=goa","example":"multipart/form-data; boundary=goa","pattern":"multipart/[^;]+; boundary=.+"},"example":"multipart/form-data; boundary=goa"}],"responses":{"204":{"description":"No Content response."},"400":{"description":"invalid_multipart_request: Error returned when the request body is not a valid multipart content.","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"fault":false,"id":"123abc","message":"parameter 'p' must be an integer","name":"invalid_multipart_request","temporary":false,"timeout":false}}}},"500":{"description":"internal_error: Fault while processing upload.","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"fault":false,"id":"123abc","message":"parameter 'p' must be an integer","name":"internal_error","temporary":false,"timeout":false}}}}}}}},"components":{"schemas":{"Error":{"type":"object","properties":{"fault":{"type":"boolean","description":"Is the error a server-side fault?","example":false},"id":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"message":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"name":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"temporary":{"type":"boolean","description":"Is the error temporary?","example":false},"timeout":{"type":"boolean","description":"Is the error a timeout?","example":false}},"description":"Error response result type","example":{"fault":false,"id":"123abc","message":"parameter 'p' must be an integer","name":"bad_request","temporary":false,"timeout":false},"required":["name","id","message","temporary","timeout","fault"]}}},"tags":[{"name":"updown","description":"Service updown demonstrates how to implement upload and download of files in\nGoa without having to load the entire content in memory first.\nThe upload method uses SkipRequestBodyEncodeDecode to delegate reading the HTTP\nrequest body to the service logic. This alleviates the need for loading the\nfull body content in memory first to decode it into a data structure. Note that\nusing SkipRequestBodyDecode is incompatible with gRPC and can only be used on\nmethods that only define a HTTP transport mapping. This example implementation\nleverages package \"mime/multipart\" to read the request body.\nSimilarly the download method uses SkipResponseBodyEncodeDecode to stream the \nfile to the client without requiring to load the complete content in memory\nfirst. As with SkipRequestBodyDecode using SkipResponseBodyEncodeDecode is\nincompatible with gRPC."}]} \ No newline at end of file diff --git a/upload_download/gen/http/openapi3.yaml b/upload_download/gen/http/openapi3.yaml index 18b7b135c..2b54308c3 100644 --- a/upload_download/gen/http/openapi3.yaml +++ b/upload_download/gen/http/openapi3.yaml @@ -21,8 +21,8 @@ paths: schema: type: string description: Path to downloaded file. - example: Qui vel non. - example: Tempora in. + example: Ut rerum est minus natus voluptas ex. + example: Ut rerum est minus natus voluptas ex. responses: "200": description: OK response. @@ -46,12 +46,26 @@ paths: application/vnd.goa.error: schema: $ref: '#/components/schemas/Error' + example: + fault: false + id: 123abc + message: parameter 'p' must be an integer + name: invalid_file_path + temporary: false + timeout: false "500": description: 'internal_error: Fault while processing download.' content: application/vnd.goa.error: schema: $ref: '#/components/schemas/Error' + example: + fault: false + id: 123abc + message: parameter 'p' must be an integer + name: internal_error + temporary: false + timeout: false /upload/{dir}: post: tags: @@ -88,12 +102,26 @@ paths: application/vnd.goa.error: schema: $ref: '#/components/schemas/Error' + example: + fault: false + id: 123abc + message: parameter 'p' must be an integer + name: invalid_multipart_request + temporary: false + timeout: false "500": description: 'internal_error: Fault while processing upload.' content: application/vnd.goa.error: schema: $ref: '#/components/schemas/Error' + example: + fault: false + id: 123abc + message: parameter 'p' must be an integer + name: internal_error + temporary: false + timeout: false components: schemas: Error: @@ -102,7 +130,7 @@ components: fault: type: boolean description: Is the error a server-side fault? - example: true + example: false id: type: string description: ID is a unique identifier for this particular occurrence of the problem. @@ -123,9 +151,9 @@ components: type: boolean description: Is the error a timeout? example: false - description: Error returned when the Content-Type header does not define a multipart request. + description: Error response result type example: - fault: true + fault: false id: 123abc message: parameter 'p' must be an integer name: bad_request diff --git a/upload_download/gen/http/updown/client/client.go b/upload_download/gen/http/updown/client/client.go index de5f42eb4..8cb2c2f73 100644 --- a/upload_download/gen/http/updown/client/client.go +++ b/upload_download/gen/http/updown/client/client.go @@ -9,6 +9,7 @@ package client import ( "context" + "errors" "net/http" updown "goa.design/examples/upload_download/gen/updown" @@ -96,7 +97,9 @@ func (c *Client) Download() goa.Endpoint { } res, err := decodeResponse(resp) if err != nil { - resp.Body.Close() + if closeErr := resp.Body.Close(); closeErr != nil { + return nil, errors.Join(err, goahttp.ErrDecodingError("updown", "download", closeErr)) + } return nil, err } return &updown.DownloadResponseData{Result: res.(*updown.DownloadResult), Body: resp.Body}, nil diff --git a/upload_download/gen/http/updown/client/encode_decode.go b/upload_download/gen/http/updown/client/encode_decode.go index 8b9afab51..b7e1df4ba 100644 --- a/upload_download/gen/http/updown/client/encode_decode.go +++ b/upload_download/gen/http/updown/client/encode_decode.go @@ -10,6 +10,7 @@ package client import ( "bytes" "context" + "errors" "io" "net/http" "net/url" @@ -75,18 +76,24 @@ func EncodeUploadRequest(encoder func(*http.Request) goahttp.Encoder) func(*http // - "internal_error" (type *goa.ServiceError): http.StatusInternalServerError // - error: internal error func DecodeUploadResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (any, error) { - return func(resp *http.Response) (any, error) { + return func(resp *http.Response) (result any, decodeErr error) { + responseBody := resp.Body if restoreBody { - b, err := io.ReadAll(resp.Body) - if err != nil { - return nil, err + b, readErr := io.ReadAll(responseBody) + closeErr := responseBody.Close() + if err := errors.Join(readErr, closeErr); err != nil { + return nil, goahttp.ErrDecodingError("updown", "upload", err) } resp.Body = io.NopCloser(bytes.NewBuffer(b)) defer func() { resp.Body = io.NopCloser(bytes.NewBuffer(b)) }() } else { - defer resp.Body.Close() + defer func() { + if err := responseBody.Close(); err != nil { + decodeErr = errors.Join(decodeErr, goahttp.ErrDecodingError("updown", "upload", err)) + } + }() } switch resp.StatusCode { case http.StatusNoContent: @@ -123,7 +130,10 @@ func DecodeUploadResponse(decoder func(*http.Response) goahttp.Decoder, restoreB } return nil, NewUploadInvalidMultipartRequest(&body) default: - body, _ := io.ReadAll(resp.Body) + body, err := io.ReadAll(resp.Body) + if err != nil { + return nil, goahttp.ErrDecodingError("updown", "upload", err) + } return nil, goahttp.ErrInvalidResponse("updown", "upload", resp.StatusCode, string(body)) } case http.StatusInternalServerError: @@ -141,7 +151,10 @@ func DecodeUploadResponse(decoder func(*http.Response) goahttp.Decoder, restoreB } return nil, NewUploadInternalError(&body) default: - body, _ := io.ReadAll(resp.Body) + body, err := io.ReadAll(resp.Body) + if err != nil { + return nil, goahttp.ErrDecodingError("updown", "upload", err) + } return nil, goahttp.ErrInvalidResponse("updown", "upload", resp.StatusCode, string(body)) } } @@ -194,16 +207,6 @@ func (c *Client) BuildDownloadRequest(ctx context.Context, v any) (*http.Request // - error: internal error func DecodeDownloadResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (any, error) { return func(resp *http.Response) (any, error) { - if restoreBody { - b, err := io.ReadAll(resp.Body) - if err != nil { - return nil, err - } - resp.Body = io.NopCloser(bytes.NewBuffer(b)) - defer func() { - resp.Body = io.NopCloser(bytes.NewBuffer(b)) - }() - } switch resp.StatusCode { case http.StatusOK: var ( @@ -255,7 +258,10 @@ func DecodeDownloadResponse(decoder func(*http.Response) goahttp.Decoder, restor } return nil, NewDownloadInternalError(&body) default: - body, _ := io.ReadAll(resp.Body) + body, err := io.ReadAll(resp.Body) + if err != nil { + return nil, goahttp.ErrDecodingError("updown", "download", err) + } return nil, goahttp.ErrInvalidResponse("updown", "download", resp.StatusCode, string(body)) } } diff --git a/upload_download/gen/http/updown/client/types.go b/upload_download/gen/http/updown/client/types.go index 9bdb1b83c..f9a3fa863 100644 --- a/upload_download/gen/http/updown/client/types.go +++ b/upload_download/gen/http/updown/client/types.go @@ -188,7 +188,7 @@ func NewDownloadInternalError(body *DownloadInternalErrorResponseBody) *goa.Serv } // ValidateUploadInvalidMediaTypeResponseBody runs the validations defined on -// upload_invalid_media_type_response_body +// UploadInvalidMediaTypeResponseBody func ValidateUploadInvalidMediaTypeResponseBody(body *UploadInvalidMediaTypeResponseBody) (err error) { if body.Name == nil { err = goa.MergeErrors(err, goa.MissingFieldError("name", "body")) @@ -212,7 +212,7 @@ func ValidateUploadInvalidMediaTypeResponseBody(body *UploadInvalidMediaTypeResp } // ValidateUploadInvalidMultipartRequestResponseBody runs the validations -// defined on upload_invalid_multipart_request_response_body +// defined on UploadInvalidMultipartRequestResponseBody func ValidateUploadInvalidMultipartRequestResponseBody(body *UploadInvalidMultipartRequestResponseBody) (err error) { if body.Name == nil { err = goa.MergeErrors(err, goa.MissingFieldError("name", "body")) @@ -236,7 +236,7 @@ func ValidateUploadInvalidMultipartRequestResponseBody(body *UploadInvalidMultip } // ValidateUploadInternalErrorResponseBody runs the validations defined on -// upload_internal_error_response_body +// UploadInternalErrorResponseBody func ValidateUploadInternalErrorResponseBody(body *UploadInternalErrorResponseBody) (err error) { if body.Name == nil { err = goa.MergeErrors(err, goa.MissingFieldError("name", "body")) @@ -260,7 +260,7 @@ func ValidateUploadInternalErrorResponseBody(body *UploadInternalErrorResponseBo } // ValidateDownloadInvalidFilePathResponseBody runs the validations defined on -// download_invalid_file_path_response_body +// DownloadInvalidFilePathResponseBody func ValidateDownloadInvalidFilePathResponseBody(body *DownloadInvalidFilePathResponseBody) (err error) { if body.Name == nil { err = goa.MergeErrors(err, goa.MissingFieldError("name", "body")) @@ -284,7 +284,7 @@ func ValidateDownloadInvalidFilePathResponseBody(body *DownloadInvalidFilePathRe } // ValidateDownloadInternalErrorResponseBody runs the validations defined on -// download_internal_error_response_body +// DownloadInternalErrorResponseBody func ValidateDownloadInternalErrorResponseBody(body *DownloadInternalErrorResponseBody) (err error) { if body.Name == nil { err = goa.MergeErrors(err, goa.MissingFieldError("name", "body")) From a68a567346883e01e9845158332e0d3fab577746 Mon Sep 17 00:00:00 2001 From: "Raphael (manual office deploy after cloud-state fix)" Date: Mon, 24 Aug 2026 00:25:40 -0700 Subject: [PATCH 02/28] chore: regenerate examples with final Goa contracts --- basic/gen/grpc/calc/client/cli.go | 4 +- cellar/gen/grpc/sommelier/client/cli.go | 4 +- cellar/gen/grpc/storage/client/cli.go | 14 +- cellar/gen/http/cli/cellar/cli.go | 4 +- .../gen/http/storage/server/encode_decode.go | 30 ++-- encodings/text/gen/http/openapi3.2.yaml | 58 +------ encodings/text/gen/http/openapi3.yaml | 58 +------ error/gen/grpc/calc/client/cli.go | 4 +- interceptors/gen/grpc/cli/interceptors/cli.go | 4 +- .../gen/grpc/interceptors/client/cli.go | 6 +- .../gen/http/interceptors/server/websocket.go | 33 +++- retry/gen/grpc/retry/client/cli.go | 4 +- security/hierarchy/gen/http/openapi.json | 2 +- .../gen/grpc/secured_service/client/cli.go | 8 +- security/multiauth/gen/http/openapi.json | 2 +- .../gen/http/chatter/server/websocket.go | 144 +++++++++++++++++- streaming/gen/http/openapi.json | 2 +- 17 files changed, 213 insertions(+), 168 deletions(-) diff --git a/basic/gen/grpc/calc/client/cli.go b/basic/gen/grpc/calc/client/cli.go index 1cbfdcf8a..4efd0690a 100644 --- a/basic/gen/grpc/calc/client/cli.go +++ b/basic/gen/grpc/calc/client/cli.go @@ -8,11 +8,11 @@ package client import ( - "encoding/json" "fmt" calc "goa.design/examples/basic/gen/calc" calcpb "goa.design/examples/basic/gen/grpc/calc/pb" + "google.golang.org/protobuf/encoding/protojson" ) // BuildMultiplyPayload builds the payload for the calc multiply endpoint from @@ -22,7 +22,7 @@ func BuildMultiplyPayload(calcMultiplyMessage string) (*calc.MultiplyPayload, er var message calcpb.MultiplyRequest { if calcMultiplyMessage != "" { - err = json.Unmarshal([]byte(calcMultiplyMessage), &message) + err = protojson.Unmarshal([]byte(calcMultiplyMessage), &message) if err != nil { return nil, fmt.Errorf("invalid JSON for message, \nerror: %s, \nexample of valid JSON:\n%s", err, "'{\n \"a\": 7630570414871587529,\n \"b\": 2968728213815611862\n }'") } diff --git a/cellar/gen/grpc/sommelier/client/cli.go b/cellar/gen/grpc/sommelier/client/cli.go index 64ec8d06c..dddc96809 100644 --- a/cellar/gen/grpc/sommelier/client/cli.go +++ b/cellar/gen/grpc/sommelier/client/cli.go @@ -8,11 +8,11 @@ package client import ( - "encoding/json" "fmt" sommelierpb "goa.design/examples/cellar/gen/grpc/sommelier/pb" sommelier "goa.design/examples/cellar/gen/sommelier" + "google.golang.org/protobuf/encoding/protojson" ) // BuildPickPayload builds the payload for the sommelier pick endpoint from CLI @@ -22,7 +22,7 @@ func BuildPickPayload(sommelierPickMessage string) (*sommelier.Criteria, error) var message sommelierpb.PickRequest { if sommelierPickMessage != "" { - err = json.Unmarshal([]byte(sommelierPickMessage), &message) + err = protojson.Unmarshal([]byte(sommelierPickMessage), &message) if err != nil { return nil, fmt.Errorf("invalid JSON for message, \nerror: %s, \nexample of valid JSON:\n%s", err, "'{\n \"name\": \"Blue\\'s Cuvee\",\n \"varietal\": [\n \"pinot noir\",\n \"merlot\",\n \"cabernet franc\"\n ],\n \"winery\": \"longoria\"\n }'") } diff --git a/cellar/gen/grpc/storage/client/cli.go b/cellar/gen/grpc/storage/client/cli.go index c42c03c42..bd09f10c3 100644 --- a/cellar/gen/grpc/storage/client/cli.go +++ b/cellar/gen/grpc/storage/client/cli.go @@ -8,12 +8,12 @@ package client import ( - "encoding/json" "fmt" storagepb "goa.design/examples/cellar/gen/grpc/storage/pb" storage "goa.design/examples/cellar/gen/storage" goa "goa.design/goa/v3/pkg" + "google.golang.org/protobuf/encoding/protojson" ) // BuildShowPayload builds the payload for the storage show endpoint from CLI @@ -23,7 +23,7 @@ func BuildShowPayload(storageShowMessage string, storageShowView string) (*stora var message storagepb.ShowRequest { if storageShowMessage != "" { - err = json.Unmarshal([]byte(storageShowMessage), &message) + err = protojson.Unmarshal([]byte(storageShowMessage), &message) if err != nil { return nil, fmt.Errorf("invalid JSON for message, \nerror: %s, \nexample of valid JSON:\n%s", err, "'{\n \"id\": \"Neque voluptas molestias.\"\n }'") } @@ -56,7 +56,7 @@ func BuildAddPayload(storageAddMessage string) (*storage.Bottle, error) { var message storagepb.AddRequest { if storageAddMessage != "" { - err = json.Unmarshal([]byte(storageAddMessage), &message) + err = protojson.Unmarshal([]byte(storageAddMessage), &message) if err != nil { return nil, fmt.Errorf("invalid JSON for message, \nerror: %s, \nexample of valid JSON:\n%s", err, "'{\n \"composition\": [\n {\n \"percentage\": 8,\n \"varietal\": \"Syrah\"\n },\n {\n \"percentage\": 8,\n \"varietal\": \"Syrah\"\n }\n ],\n \"description\": \"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah\",\n \"name\": \"Blue\\'s Cuvee\",\n \"rating\": 2,\n \"vintage\": 1918,\n \"winery\": {\n \"country\": \"USA\",\n \"name\": \"Longoria\",\n \"region\": \"Central Coast, California\",\n \"url\": \"http://www.longoriawine.com/\"\n }\n }'") } @@ -91,7 +91,7 @@ func BuildRemovePayload(storageRemoveMessage string) (*storage.RemovePayload, er var message storagepb.RemoveRequest { if storageRemoveMessage != "" { - err = json.Unmarshal([]byte(storageRemoveMessage), &message) + err = protojson.Unmarshal([]byte(storageRemoveMessage), &message) if err != nil { return nil, fmt.Errorf("invalid JSON for message, \nerror: %s, \nexample of valid JSON:\n%s", err, "'{\n \"id\": \"Consectetur quaerat neque sed.\"\n }'") } @@ -111,7 +111,7 @@ func BuildRatePayload(storageRateMessage string) (map[uint32][]string, error) { var message storagepb.RateRequest { if storageRateMessage != "" { - err = json.Unmarshal([]byte(storageRateMessage), &message) + err = protojson.Unmarshal([]byte(storageRateMessage), &message) if err != nil { return nil, fmt.Errorf("invalid JSON for message, \nerror: %s, \nexample of valid JSON:\n%s", err, "'{\n \"field\": {\n \"3188487350\": {\n \"field\": [\n \"Sed quibusdam quidem.\",\n \"Dolore ratione libero.\"\n ]\n },\n \"507886676\": {\n \"field\": [\n \"Sed quibusdam quidem.\",\n \"Dolore ratione libero.\"\n ]\n },\n \"890945719\": {\n \"field\": [\n \"Sed quibusdam quidem.\",\n \"Dolore ratione libero.\"\n ]\n }\n }\n }'") } @@ -136,7 +136,7 @@ func BuildMultiAddPayload(storageMultiAddMessage string) ([]*storage.Bottle, err var message storagepb.MultiAddRequest { if storageMultiAddMessage != "" { - err = json.Unmarshal([]byte(storageMultiAddMessage), &message) + err = protojson.Unmarshal([]byte(storageMultiAddMessage), &message) if err != nil { return nil, fmt.Errorf("invalid JSON for message, \nerror: %s, \nexample of valid JSON:\n%s", err, "'{\n \"field\": [\n {\n \"composition\": [\n {\n \"percentage\": 8,\n \"varietal\": \"Syrah\"\n },\n {\n \"percentage\": 8,\n \"varietal\": \"Syrah\"\n },\n {\n \"percentage\": 8,\n \"varietal\": \"Syrah\"\n }\n ],\n \"description\": \"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah\",\n \"name\": \"Blue\\'s Cuvee\",\n \"rating\": 3,\n \"vintage\": 2003,\n \"winery\": {\n \"country\": \"USA\",\n \"name\": \"Longoria\",\n \"region\": \"Central Coast, California\",\n \"url\": \"http://www.longoriawine.com/\"\n }\n },\n {\n \"composition\": [\n {\n \"percentage\": 8,\n \"varietal\": \"Syrah\"\n },\n {\n \"percentage\": 8,\n \"varietal\": \"Syrah\"\n },\n {\n \"percentage\": 8,\n \"varietal\": \"Syrah\"\n }\n ],\n \"description\": \"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah\",\n \"name\": \"Blue\\'s Cuvee\",\n \"rating\": 3,\n \"vintage\": 2003,\n \"winery\": {\n \"country\": \"USA\",\n \"name\": \"Longoria\",\n \"region\": \"Central Coast, California\",\n \"url\": \"http://www.longoriawine.com/\"\n }\n }\n ]\n }'") } @@ -173,7 +173,7 @@ func BuildMultiUpdatePayload(storageMultiUpdateMessage string) (*storage.MultiUp var message storagepb.MultiUpdateRequest { if storageMultiUpdateMessage != "" { - err = json.Unmarshal([]byte(storageMultiUpdateMessage), &message) + err = protojson.Unmarshal([]byte(storageMultiUpdateMessage), &message) if err != nil { return nil, fmt.Errorf("invalid JSON for message, \nerror: %s, \nexample of valid JSON:\n%s", err, "'{\n \"bottles\": [\n {\n \"composition\": [\n {\n \"percentage\": 8,\n \"varietal\": \"Syrah\"\n },\n {\n \"percentage\": 8,\n \"varietal\": \"Syrah\"\n },\n {\n \"percentage\": 8,\n \"varietal\": \"Syrah\"\n }\n ],\n \"description\": \"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah\",\n \"name\": \"Blue\\'s Cuvee\",\n \"rating\": 3,\n \"vintage\": 2003,\n \"winery\": {\n \"country\": \"USA\",\n \"name\": \"Longoria\",\n \"region\": \"Central Coast, California\",\n \"url\": \"http://www.longoriawine.com/\"\n }\n },\n {\n \"composition\": [\n {\n \"percentage\": 8,\n \"varietal\": \"Syrah\"\n },\n {\n \"percentage\": 8,\n \"varietal\": \"Syrah\"\n },\n {\n \"percentage\": 8,\n \"varietal\": \"Syrah\"\n }\n ],\n \"description\": \"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah\",\n \"name\": \"Blue\\'s Cuvee\",\n \"rating\": 3,\n \"vintage\": 2003,\n \"winery\": {\n \"country\": \"USA\",\n \"name\": \"Longoria\",\n \"region\": \"Central Coast, California\",\n \"url\": \"http://www.longoriawine.com/\"\n }\n }\n ],\n \"ids\": [\n \"Nihil voluptatibus aut mollitia ipsam.\",\n \"Qui optio non voluptate rem adipisci soluta.\",\n \"Omnis corporis quod veritatis temporibus dolores.\",\n \"Dolores voluptatem sunt architecto consequatur non.\"\n ]\n }'") } diff --git a/cellar/gen/http/cli/cellar/cli.go b/cellar/gen/http/cli/cellar/cli.go index 3f031e3e4..ea4fb4c6f 100644 --- a/cellar/gen/http/cli/cellar/cli.go +++ b/cellar/gen/http/cli/cellar/cli.go @@ -204,7 +204,7 @@ func ParseEndpoint( err = json.Unmarshal([]byte(*storageRatePFlag), &val) data = val if err != nil { - return nil, nil, fmt.Errorf("invalid JSON for storageRatePFlag, \nerror: %s, \nexample of valid JSON:\n%s", err, "'{\n \"\\u003cuint32 Value\\u003e\": [\n \"Similique officia.\",\n \"Reprehenderit ut similique iste velit.\",\n \"Expedita quia.\"\n ]\n }'") + return nil, nil, fmt.Errorf("invalid JSON for storageRatePFlag, \nerror: %s, \nexample of valid JSON:\n%s", err, "'{\n \"2205736647\": [\n \"Aliquam occaecati voluptas neque vel.\",\n \"Omnis ducimus ut voluptatum expedita aut id.\",\n \"Nostrum magnam fugiat maiores.\"\n ],\n \"2592953118\": [\n \"Similique officia.\",\n \"Reprehenderit ut similique iste velit.\",\n \"Expedita quia.\"\n ],\n \"95281316\": [\n \"Velit et ab occaecati dolorum.\",\n \"Optio molestiae vel dolores.\"\n ]\n }'") } case "multi-add": endpoint = c.MultiAdd(storageMultiAddEncoderFn) @@ -354,7 +354,7 @@ func storageRateUsage() { fmt.Fprintln(os.Stderr) fmt.Fprintln(os.Stderr, "Example:") - fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "storage rate --p '{\n \"\\u003cuint32 Value\\u003e\": [\n \"Similique officia.\",\n \"Reprehenderit ut similique iste velit.\",\n \"Expedita quia.\"\n ]\n }'") + fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "storage rate --p '{\n \"2205736647\": [\n \"Aliquam occaecati voluptas neque vel.\",\n \"Omnis ducimus ut voluptatum expedita aut id.\",\n \"Nostrum magnam fugiat maiores.\"\n ],\n \"2592953118\": [\n \"Similique officia.\",\n \"Reprehenderit ut similique iste velit.\",\n \"Expedita quia.\"\n ],\n \"95281316\": [\n \"Velit et ab occaecati dolorum.\",\n \"Optio molestiae vel dolores.\"\n ]\n }'") } func storageMultiAddUsage() { diff --git a/cellar/gen/http/storage/server/encode_decode.go b/cellar/gen/http/storage/server/encode_decode.go index c5cfeca0e..0490534a7 100644 --- a/cellar/gen/http/storage/server/encode_decode.go +++ b/cellar/gen/http/storage/server/encode_decode.go @@ -13,7 +13,6 @@ import ( "io" "net/http" "strconv" - "strings" storage "goa.design/examples/cellar/gen/storage" storageviews "goa.design/examples/cellar/gen/storage/views" @@ -203,28 +202,17 @@ func DecodeRateRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp.De if len(queryRaw) == 0 { err = goa.MergeErrors(err, goa.MissingFieldError("query", "query string")) } + if query == nil { + query = make(map[uint32][]string) + } for keyRaw, valRaw := range queryRaw { - if strings.HasPrefix(keyRaw, "query[") { - if query == nil { - query = make(map[uint32][]string) - } - var keya uint32 - { - openIdx := strings.IndexRune(keyRaw, '[') - closeIdx := strings.IndexRune(keyRaw, ']') - if openIdx == -1 || closeIdx == -1 || closeIdx <= openIdx { - err = goa.MergeErrors(err, goa.DecodePayloadError("invalid query string: malformed brackets")) - } else { - keyaRaw := keyRaw[openIdx+1 : closeIdx] - v, err2 := strconv.ParseUint(keyaRaw, 10, 32) - if err2 != nil { - err = goa.MergeErrors(err, goa.InvalidFieldTypeError("query", keyaRaw, "unsigned integer")) - } - keya = uint32(v) - } - } - query[keya] = valRaw + var key uint32 + v, err2 := strconv.ParseUint(keyRaw, 10, 32) + if err2 != nil { + err = goa.MergeErrors(err, goa.InvalidFieldTypeError("query", keyRaw, "unsigned integer")) } + key = uint32(v) + query[key] = valRaw } } if err != nil { diff --git a/encodings/text/gen/http/openapi3.2.yaml b/encodings/text/gen/http/openapi3.2.yaml index 958ecbf04..323db5ff2 100644 --- a/encodings/text/gen/http/openapi3.2.yaml +++ b/encodings/text/gen/http/openapi3.2.yaml @@ -39,33 +39,9 @@ paths: text/html: schema: type: string - example: - - 73 - - 109 - - 112 - - 101 - - 100 - - 105 - - 116 - - 32 - - 113 - - 117 - - 105 - - 46 + example: SW1wZWRpdCBxdWku format: binary - example: - - 73 - - 109 - - 112 - - 101 - - 100 - - 105 - - 116 - - 32 - - 113 - - 117 - - 105 - - 46 + example: SW1wZWRpdCBxdWku /concatbytesfield/{a}/{b}: get: tags: @@ -98,35 +74,9 @@ paths: text/html: schema: type: string - example: - - 69 - - 116 - - 32 - - 101 - - 110 - - 105 - - 109 - - 32 - - 113 - - 117 - - 105 - - 97 - - 46 + example: RXQgZW5pbSBxdWlhLg== format: binary - example: - - 69 - - 116 - - 32 - - 101 - - 110 - - 105 - - 109 - - 32 - - 113 - - 117 - - 105 - - 97 - - 46 + example: RXQgZW5pbSBxdWlhLg== /concatstringfield/{a}/{b}: get: tags: diff --git a/encodings/text/gen/http/openapi3.yaml b/encodings/text/gen/http/openapi3.yaml index 09f726ced..54402481f 100644 --- a/encodings/text/gen/http/openapi3.yaml +++ b/encodings/text/gen/http/openapi3.yaml @@ -38,33 +38,9 @@ paths: text/html: schema: type: string - example: - - 73 - - 109 - - 112 - - 101 - - 100 - - 105 - - 116 - - 32 - - 113 - - 117 - - 105 - - 46 + example: SW1wZWRpdCBxdWku format: binary - example: - - 73 - - 109 - - 112 - - 101 - - 100 - - 105 - - 116 - - 32 - - 113 - - 117 - - 105 - - 46 + example: SW1wZWRpdCBxdWku /concatbytesfield/{a}/{b}: get: tags: @@ -97,35 +73,9 @@ paths: text/html: schema: type: string - example: - - 69 - - 116 - - 32 - - 101 - - 110 - - 105 - - 109 - - 32 - - 113 - - 117 - - 105 - - 97 - - 46 + example: RXQgZW5pbSBxdWlhLg== format: binary - example: - - 69 - - 116 - - 32 - - 101 - - 110 - - 105 - - 109 - - 32 - - 113 - - 117 - - 105 - - 97 - - 46 + example: RXQgZW5pbSBxdWlhLg== /concatstringfield/{a}/{b}: get: tags: diff --git a/error/gen/grpc/calc/client/cli.go b/error/gen/grpc/calc/client/cli.go index 4f2c35d34..e055633f1 100644 --- a/error/gen/grpc/calc/client/cli.go +++ b/error/gen/grpc/calc/client/cli.go @@ -8,11 +8,11 @@ package client import ( - "encoding/json" "fmt" calc "goa.design/examples/error/gen/calc" calcpb "goa.design/examples/error/gen/grpc/calc/pb" + "google.golang.org/protobuf/encoding/protojson" ) // BuildDividePayload builds the payload for the calc divide endpoint from CLI @@ -22,7 +22,7 @@ func BuildDividePayload(calcDivideMessage string) (*calc.DividePayload, error) { var message calcpb.DivideRequest { if calcDivideMessage != "" { - err = json.Unmarshal([]byte(calcDivideMessage), &message) + err = protojson.Unmarshal([]byte(calcDivideMessage), &message) if err != nil { return nil, fmt.Errorf("invalid JSON for message, \nerror: %s, \nexample of valid JSON:\n%s", err, "'{\n \"dividend\": 2120767999786333776,\n \"divisor\": 6535528958544806582\n }'") } diff --git a/interceptors/gen/grpc/cli/interceptors/cli.go b/interceptors/gen/grpc/cli/interceptors/cli.go index 291bd462a..b3c6a3201 100644 --- a/interceptors/gen/grpc/cli/interceptors/cli.go +++ b/interceptors/gen/grpc/cli/interceptors/cli.go @@ -29,7 +29,7 @@ func UsageCommands() []string { // UsageExamples produces an example of a valid invocation of the CLI tool. func UsageExamples() string { - return os.Args[0] + " " + "interceptors get --message '{\n \"auth\": \"Aut dolorem nisi qui accusantium.\",\n \"recordID\": \"dd11abcb-f3b1-412f-9ede-6f80730d5a28\",\n \"spanID\": \"dd11abcb-f3b1-412f-9ede-6f80730d5a28\",\n \"tenantID\": \"dd11abcb-f3b1-412f-9ede-6f80730d5a28\",\n \"traceID\": \"dd11abcb-f3b1-412f-9ede-6f80730d5a28\"\n }'" + "\n" + + return os.Args[0] + " " + "interceptors get --message '{\n \"auth\": \"Aut dolorem nisi qui accusantium.\",\n \"record_id\": \"dd11abcb-f3b1-412f-9ede-6f80730d5a28\",\n \"span_id\": \"dd11abcb-f3b1-412f-9ede-6f80730d5a28\",\n \"tenant_id\": \"dd11abcb-f3b1-412f-9ede-6f80730d5a28\",\n \"trace_id\": \"dd11abcb-f3b1-412f-9ede-6f80730d5a28\"\n }'" + "\n" + "" } @@ -153,5 +153,5 @@ func interceptorsGetUsage() { fmt.Fprintln(os.Stderr) fmt.Fprintln(os.Stderr, "Example:") - fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "interceptors get --message '{\n \"auth\": \"Aut dolorem nisi qui accusantium.\",\n \"recordID\": \"dd11abcb-f3b1-412f-9ede-6f80730d5a28\",\n \"spanID\": \"dd11abcb-f3b1-412f-9ede-6f80730d5a28\",\n \"tenantID\": \"dd11abcb-f3b1-412f-9ede-6f80730d5a28\",\n \"traceID\": \"dd11abcb-f3b1-412f-9ede-6f80730d5a28\"\n }'") + fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "interceptors get --message '{\n \"auth\": \"Aut dolorem nisi qui accusantium.\",\n \"record_id\": \"dd11abcb-f3b1-412f-9ede-6f80730d5a28\",\n \"span_id\": \"dd11abcb-f3b1-412f-9ede-6f80730d5a28\",\n \"tenant_id\": \"dd11abcb-f3b1-412f-9ede-6f80730d5a28\",\n \"trace_id\": \"dd11abcb-f3b1-412f-9ede-6f80730d5a28\"\n }'") } diff --git a/interceptors/gen/grpc/interceptors/client/cli.go b/interceptors/gen/grpc/interceptors/client/cli.go index 3942e198b..5310a11e8 100644 --- a/interceptors/gen/grpc/interceptors/client/cli.go +++ b/interceptors/gen/grpc/interceptors/client/cli.go @@ -8,11 +8,11 @@ package client import ( - "encoding/json" "fmt" interceptorspb "goa.design/examples/interceptors/gen/grpc/interceptors/pb" interceptors "goa.design/examples/interceptors/gen/interceptors" + "google.golang.org/protobuf/encoding/protojson" ) // BuildGetPayload builds the payload for the interceptors get endpoint from @@ -22,9 +22,9 @@ func BuildGetPayload(interceptorsGetMessage string) (*interceptors.GetPayload, e var message interceptorspb.GetRequest { if interceptorsGetMessage != "" { - err = json.Unmarshal([]byte(interceptorsGetMessage), &message) + err = protojson.Unmarshal([]byte(interceptorsGetMessage), &message) if err != nil { - return nil, fmt.Errorf("invalid JSON for message, \nerror: %s, \nexample of valid JSON:\n%s", err, "'{\n \"auth\": \"Aut dolorem nisi qui accusantium.\",\n \"recordID\": \"dd11abcb-f3b1-412f-9ede-6f80730d5a28\",\n \"spanID\": \"dd11abcb-f3b1-412f-9ede-6f80730d5a28\",\n \"tenantID\": \"dd11abcb-f3b1-412f-9ede-6f80730d5a28\",\n \"traceID\": \"dd11abcb-f3b1-412f-9ede-6f80730d5a28\"\n }'") + return nil, fmt.Errorf("invalid JSON for message, \nerror: %s, \nexample of valid JSON:\n%s", err, "'{\n \"auth\": \"Aut dolorem nisi qui accusantium.\",\n \"record_id\": \"dd11abcb-f3b1-412f-9ede-6f80730d5a28\",\n \"span_id\": \"dd11abcb-f3b1-412f-9ede-6f80730d5a28\",\n \"tenant_id\": \"dd11abcb-f3b1-412f-9ede-6f80730d5a28\",\n \"trace_id\": \"dd11abcb-f3b1-412f-9ede-6f80730d5a28\"\n }'") } } } diff --git a/interceptors/gen/http/interceptors/server/websocket.go b/interceptors/gen/http/interceptors/server/websocket.go index 80db4cc39..92afff3bf 100644 --- a/interceptors/gen/http/interceptors/server/websocket.go +++ b/interceptors/gen/http/interceptors/server/websocket.go @@ -30,6 +30,11 @@ type StreamServerStream struct { once sync.Once // upgradeErr is the error returned by the websocket upgrade attempt. upgradeErr error + // closeOnce makes repeated Close calls return the first close result without + // writing again. + closeOnce sync.Once + // closeErr is the result of the first Close call. + closeErr error // upgrader is the websocket connection upgrader. upgrader goahttp.Upgrader // configurer is the websocket connection configurer. @@ -134,9 +139,33 @@ func (s *StreamServerStream) RecvWithContext(ctx context.Context) (*interceptors // Close closes the "stream" endpoint websocket connection. func (s *StreamServerStream) Close() error { + s.closeOnce.Do(func() { + s.closeErr = s.close() + }) + return s.closeErr +} + +// close opens the websocket connection when needed, sends its normal close +// message, and closes it. +func (s *StreamServerStream) close() error { var err error - if s.conn == nil { - return nil + // Upgrade the HTTP connection to a websocket connection only once. Connection + // upgrade is done here so that authorization logic in the endpoint is executed + // before calling the actual service method which may call Close(). + s.once.Do(func() { + var conn *websocket.Conn + conn, err = s.upgrader.Upgrade(s.w, s.r, nil) + if err != nil { + s.upgradeErr = err + return + } + if s.configurer != nil { + conn = s.configurer(conn, s.cancel) + } + s.conn = conn + }) + if s.upgradeErr != nil { + return s.upgradeErr } if err = s.conn.WriteControl( websocket.CloseMessage, diff --git a/retry/gen/grpc/retry/client/cli.go b/retry/gen/grpc/retry/client/cli.go index 1bca102f0..fb2d1b72b 100644 --- a/retry/gen/grpc/retry/client/cli.go +++ b/retry/gen/grpc/retry/client/cli.go @@ -8,11 +8,11 @@ package client import ( - "encoding/json" "fmt" retrypb "goa.design/examples/retry/gen/grpc/retry/pb" retry "goa.design/examples/retry/gen/retry" + "google.golang.org/protobuf/encoding/protojson" ) // BuildGetMessagePayload builds the payload for the retry get_message endpoint @@ -22,7 +22,7 @@ func BuildGetMessagePayload(retryGetMessageMessage string) (*retry.GetMessagePay var message retrypb.GetMessageRequest { if retryGetMessageMessage != "" { - err = json.Unmarshal([]byte(retryGetMessageMessage), &message) + err = protojson.Unmarshal([]byte(retryGetMessageMessage), &message) if err != nil { return nil, fmt.Errorf("invalid JSON for message, \nerror: %s, \nexample of valid JSON:\n%s", err, "'{\n \"id\": \"Dolores asperiores ipsam.\"\n }'") } diff --git a/security/hierarchy/gen/http/openapi.json b/security/hierarchy/gen/http/openapi.json index 1a54ffbb0..e25a28428 100644 --- a/security/hierarchy/gen/http/openapi.json +++ b/security/hierarchy/gen/http/openapi.json @@ -1 +1 @@ -{"swagger":"2.0","info":{"title":"Security Example API","description":"This API demonstrates the effect of using Security at the API, Service or Method levels","version":"0.0.1"},"host":"localhost:80","consumes":["application/json","application/xml","application/gob"],"produces":["application/json","application/xml","application/gob"],"paths":{"/default":{"get":{"tags":["default_service"],"summary":"default default_service","description":"The default service default_method is secured with basic authentication","operationId":"default_service#default","responses":{"204":{"description":"No Content response."}},"schemes":["http"],"security":[{"basic_header_Authorization":null}]}},"/svc/default":{"get":{"tags":["api_key_service"],"summary":"default api_key_service","operationId":"api_key_service#default","responses":{"204":{"description":"No Content response."}},"schemes":["http"],"security":[{"api_key_header_Authorization":null}]}},"/svc/secure":{"get":{"tags":["api_key_service"],"summary":"secure api_key_service","description":"This method requires a valid JWT token.","operationId":"api_key_service#secure","responses":{"204":{"description":"No Content response."}},"schemes":["http"],"security":[{"jwt_header_Authorization":null}]}}},"securityDefinitions":{"api_key_header_Authorization":{"type":"apiKey","description":"Secures endpoint by requiring an API key.","name":"Authorization","in":"header"},"basic_header_Authorization":{"type":"basic","description":"Basic authentication"},"jwt_header_Authorization":{"type":"apiKey","description":"Secures endpoint by requiring a valid JWT token.","name":"Authorization","in":"header"}}} \ No newline at end of file +{"swagger":"2.0","info":{"title":"Security Example API","description":"This API demonstrates the effect of using Security at the API, Service or Method levels","version":"0.0.1"},"host":"localhost:80","consumes":["application/json","application/xml","application/gob"],"produces":["application/json","application/xml","application/gob"],"paths":{"/default":{"get":{"tags":["default_service"],"summary":"default default_service","description":"The default service default_method is secured with basic authentication","operationId":"default_service#default","responses":{"204":{"description":"No Content response."}},"schemes":["http"],"security":[{"basic_header_Authorization":[]}]}},"/svc/default":{"get":{"tags":["api_key_service"],"summary":"default api_key_service","operationId":"api_key_service#default","responses":{"204":{"description":"No Content response."}},"schemes":["http"],"security":[{"api_key_header_Authorization":[]}]}},"/svc/secure":{"get":{"tags":["api_key_service"],"summary":"secure api_key_service","description":"This method requires a valid JWT token.","operationId":"api_key_service#secure","responses":{"204":{"description":"No Content response."}},"schemes":["http"],"security":[{"jwt_header_Authorization":[]}]}}},"securityDefinitions":{"api_key_header_Authorization":{"type":"apiKey","description":"Secures endpoint by requiring an API key.","name":"Authorization","in":"header"},"basic_header_Authorization":{"type":"basic","description":"Basic authentication"},"jwt_header_Authorization":{"type":"apiKey","description":"Secures endpoint by requiring a valid JWT token.","name":"Authorization","in":"header"}}} \ No newline at end of file diff --git a/security/multiauth/gen/grpc/secured_service/client/cli.go b/security/multiauth/gen/grpc/secured_service/client/cli.go index 7c09430b6..736518b1c 100644 --- a/security/multiauth/gen/grpc/secured_service/client/cli.go +++ b/security/multiauth/gen/grpc/secured_service/client/cli.go @@ -8,11 +8,11 @@ package client import ( - "encoding/json" "fmt" secured_servicepb "goa.design/examples/security/multiauth/gen/grpc/secured_service/pb" securedservice "goa.design/examples/security/multiauth/gen/secured_service" + "google.golang.org/protobuf/encoding/protojson" ) // BuildSigninPayload builds the payload for the secured_service signin @@ -40,7 +40,7 @@ func BuildSecurePayload(securedServiceSecureMessage string, securedServiceSecure var message secured_servicepb.SecureRequest { if securedServiceSecureMessage != "" { - err = json.Unmarshal([]byte(securedServiceSecureMessage), &message) + err = protojson.Unmarshal([]byte(securedServiceSecureMessage), &message) if err != nil { return nil, fmt.Errorf("invalid JSON for message, \nerror: %s, \nexample of valid JSON:\n%s", err, "'{\n \"fail\": false\n }'") } @@ -65,7 +65,7 @@ func BuildDoublySecurePayload(securedServiceDoublySecureMessage string, securedS var message secured_servicepb.DoublySecureRequest { if securedServiceDoublySecureMessage != "" { - err = json.Unmarshal([]byte(securedServiceDoublySecureMessage), &message) + err = protojson.Unmarshal([]byte(securedServiceDoublySecureMessage), &message) if err != nil { return nil, fmt.Errorf("invalid JSON for message, \nerror: %s, \nexample of valid JSON:\n%s", err, "'{\n \"key\": \"abcdef12345\"\n }'") } @@ -90,7 +90,7 @@ func BuildAlsoDoublySecurePayload(securedServiceAlsoDoublySecureMessage string, var message secured_servicepb.AlsoDoublySecureRequest { if securedServiceAlsoDoublySecureMessage != "" { - err = json.Unmarshal([]byte(securedServiceAlsoDoublySecureMessage), &message) + err = protojson.Unmarshal([]byte(securedServiceAlsoDoublySecureMessage), &message) if err != nil { return nil, fmt.Errorf("invalid JSON for message, \nerror: %s, \nexample of valid JSON:\n%s", err, "'{\n \"key\": \"abcdef12345\",\n \"password\": \"password\",\n \"username\": \"user\"\n }'") } diff --git a/security/multiauth/gen/http/openapi.json b/security/multiauth/gen/http/openapi.json index 40dee1556..448ddf51f 100644 --- a/security/multiauth/gen/http/openapi.json +++ b/security/multiauth/gen/http/openapi.json @@ -1 +1 @@ -{"swagger":"2.0","info":{"title":"Security Example API","description":"This API demonstrates the use of the goa security DSL","version":"0.0.1"},"host":"localhost:80","consumes":["application/json","application/xml","application/gob"],"produces":["application/json","application/xml","application/gob"],"paths":{"/secure":{"get":{"tags":["secured_service"],"summary":"secure secured_service","description":"This action is secured with the jwt scheme\n\n**Required security scopes for jwt**:\n * `api:read`","operationId":"secured_service#secure","parameters":[{"name":"fail","in":"query","description":"Whether to force auth failure even with a valid JWT","required":false,"type":"boolean"}],"responses":{"200":{"description":"OK response.","schema":{"type":"string"}},"401":{"description":"unauthorized: Unauthorized response.","schema":{"type":"string"}},"403":{"description":"invalid-scopes: Forbidden response.","schema":{"type":"string"}}},"schemes":["http"],"security":[{"jwt_header_Authorization":null}]},"put":{"tags":["secured_service"],"summary":"doubly_secure secured_service","description":"This action is secured with the jwt scheme and also requires an API key query string.\n\n**Required security scopes for jwt**:\n * `api:read`\n * `api:write`\n\n**Required security scopes for api_key**:\n * `api:read`\n * `api:write`","operationId":"secured_service#doubly_secure","responses":{"200":{"description":"OK response.","schema":{"type":"string"}},"401":{"description":"unauthorized: Unauthorized response.","schema":{"type":"string"}},"403":{"description":"invalid-scopes: Forbidden response.","schema":{"type":"string"}}},"schemes":["http"],"security":[{"api_key_query_k":null,"jwt_header_Authorization":null}]},"post":{"tags":["secured_service"],"summary":"also_doubly_secure secured_service","description":"This action is secured with the jwt scheme and also requires an API key header.\n\n**Required security scopes for jwt**:\n * `api:read`\n * `api:write`\n\n**Required security scopes for api_key**:\n * `api:read`\n * `api:write`\n\n**Required security scopes for basic**:\n * `api:read`\n * `api:write`","operationId":"secured_service#also_doubly_secure","responses":{"200":{"description":"OK response.","schema":{"type":"string"}},"401":{"description":"unauthorized: Unauthorized response.","schema":{"type":"string"}},"403":{"description":"invalid-scopes: Forbidden response.","schema":{"type":"string"}}},"schemes":["http"],"security":[{"api_key_query_k":null,"jwt_header_X-Authorization":null},{"basic_header_Authorization":null,"oauth2_query_oauth":["api:read","api:write"]}]}},"/signin":{"post":{"tags":["secured_service"],"summary":"signin secured_service","description":"Creates a valid JWT","operationId":"secured_service#signin","responses":{"200":{"description":"OK response.","schema":{"$ref":"#/definitions/Creds","required":["jwt","api_key","oauth_token"]}},"401":{"description":"unauthorized: Unauthorized response.","schema":{"type":"string"}}},"schemes":["http"],"security":[{"basic_header_Authorization":null}]}}},"definitions":{"Creds":{"title":"Creds","type":"object","properties":{"api_key":{"type":"string","description":"API Key","example":"abcdef12345"},"jwt":{"type":"string","description":"JWT token","example":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiYWRtaW4iOnRydWV9.TJVA95OrM7E2cBab30RMHrHDcEfxjoYZgeFONFh7HgQ"},"oauth_token":{"type":"string","description":"OAuth2 token","example":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiYWRtaW4iOnRydWV9.TJVA95OrM7E2cBab30RMHrHDcEfxjoYZgeFONFh7HgQ"}},"example":{"api_key":"abcdef12345","jwt":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiYWRtaW4iOnRydWV9.TJVA95OrM7E2cBab30RMHrHDcEfxjoYZgeFONFh7HgQ","oauth_token":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiYWRtaW4iOnRydWV9.TJVA95OrM7E2cBab30RMHrHDcEfxjoYZgeFONFh7HgQ"},"required":["jwt","api_key","oauth_token"]}},"securityDefinitions":{"api_key_query_k":{"type":"apiKey","description":"Secures endpoint by requiring an API key.","name":"k","in":"query"},"basic_header_Authorization":{"type":"basic","description":"Basic authentication used to authenticate security principal during signin\n\n**Security Scopes**:\n * `api:read`: Read-only access"},"jwt_header_Authorization":{"type":"apiKey","description":"Secures endpoint by requiring a valid JWT token retrieved via the signin endpoint. Supports scopes \"api:read\" and \"api:write\".\n\n**Security Scopes**:\n * `api:read`: Read-only access\n * `api:write`: Read and write access","name":"Authorization","in":"header"},"jwt_header_X-Authorization":{"type":"apiKey","description":"Secures endpoint by requiring a valid JWT token retrieved via the signin endpoint. Supports scopes \"api:read\" and \"api:write\".\n\n**Security Scopes**:\n * `api:read`: Read-only access\n * `api:write`: Read and write access","name":"X-Authorization","in":"header"},"oauth2_query_oauth":{"type":"oauth2","description":"Secures endpoint by requiring a valid OAuth2 token retrieved via the signin endpoint. Supports scopes \"api:read\" and \"api:write\".","flow":"accessCode","authorizationUrl":"http://goa.design/authorization","tokenUrl":"http://goa.design/token","scopes":{"api:read":"Read-only access","api:write":"Read and write access"}}},"externalDocs":{"description":"Security example README","url":"https://github.com/goadesign/goa/tree/master/example/security/README.md"}} \ No newline at end of file +{"swagger":"2.0","info":{"title":"Security Example API","description":"This API demonstrates the use of the goa security DSL","version":"0.0.1"},"host":"localhost:80","consumes":["application/json","application/xml","application/gob"],"produces":["application/json","application/xml","application/gob"],"paths":{"/secure":{"get":{"tags":["secured_service"],"summary":"secure secured_service","description":"This action is secured with the jwt scheme\n\n**Required security scopes for jwt**:\n * `api:read`","operationId":"secured_service#secure","parameters":[{"name":"fail","in":"query","description":"Whether to force auth failure even with a valid JWT","required":false,"type":"boolean"}],"responses":{"200":{"description":"OK response.","schema":{"type":"string"}},"401":{"description":"unauthorized: Unauthorized response.","schema":{"type":"string"}},"403":{"description":"invalid-scopes: Forbidden response.","schema":{"type":"string"}}},"schemes":["http"],"security":[{"jwt_header_Authorization":[]}]},"put":{"tags":["secured_service"],"summary":"doubly_secure secured_service","description":"This action is secured with the jwt scheme and also requires an API key query string.\n\n**Required security scopes for jwt**:\n * `api:read`\n * `api:write`\n\n**Required security scopes for api_key**:\n * `api:read`\n * `api:write`","operationId":"secured_service#doubly_secure","responses":{"200":{"description":"OK response.","schema":{"type":"string"}},"401":{"description":"unauthorized: Unauthorized response.","schema":{"type":"string"}},"403":{"description":"invalid-scopes: Forbidden response.","schema":{"type":"string"}}},"schemes":["http"],"security":[{"api_key_query_k":[],"jwt_header_Authorization":[]}]},"post":{"tags":["secured_service"],"summary":"also_doubly_secure secured_service","description":"This action is secured with the jwt scheme and also requires an API key header.\n\n**Required security scopes for jwt**:\n * `api:read`\n * `api:write`\n\n**Required security scopes for api_key**:\n * `api:read`\n * `api:write`\n\n**Required security scopes for basic**:\n * `api:read`\n * `api:write`","operationId":"secured_service#also_doubly_secure","responses":{"200":{"description":"OK response.","schema":{"type":"string"}},"401":{"description":"unauthorized: Unauthorized response.","schema":{"type":"string"}},"403":{"description":"invalid-scopes: Forbidden response.","schema":{"type":"string"}}},"schemes":["http"],"security":[{"api_key_query_k":[],"jwt_header_X-Authorization":[]},{"basic_header_Authorization":[],"oauth2_query_oauth":["api:read","api:write"]}]}},"/signin":{"post":{"tags":["secured_service"],"summary":"signin secured_service","description":"Creates a valid JWT","operationId":"secured_service#signin","responses":{"200":{"description":"OK response.","schema":{"$ref":"#/definitions/Creds","required":["jwt","api_key","oauth_token"]}},"401":{"description":"unauthorized: Unauthorized response.","schema":{"type":"string"}}},"schemes":["http"],"security":[{"basic_header_Authorization":[]}]}}},"definitions":{"Creds":{"title":"Creds","type":"object","properties":{"api_key":{"type":"string","description":"API Key","example":"abcdef12345"},"jwt":{"type":"string","description":"JWT token","example":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiYWRtaW4iOnRydWV9.TJVA95OrM7E2cBab30RMHrHDcEfxjoYZgeFONFh7HgQ"},"oauth_token":{"type":"string","description":"OAuth2 token","example":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiYWRtaW4iOnRydWV9.TJVA95OrM7E2cBab30RMHrHDcEfxjoYZgeFONFh7HgQ"}},"example":{"api_key":"abcdef12345","jwt":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiYWRtaW4iOnRydWV9.TJVA95OrM7E2cBab30RMHrHDcEfxjoYZgeFONFh7HgQ","oauth_token":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiYWRtaW4iOnRydWV9.TJVA95OrM7E2cBab30RMHrHDcEfxjoYZgeFONFh7HgQ"},"required":["jwt","api_key","oauth_token"]}},"securityDefinitions":{"api_key_query_k":{"type":"apiKey","description":"Secures endpoint by requiring an API key.","name":"k","in":"query"},"basic_header_Authorization":{"type":"basic","description":"Basic authentication used to authenticate security principal during signin\n\n**Security Scopes**:\n * `api:read`: Read-only access"},"jwt_header_Authorization":{"type":"apiKey","description":"Secures endpoint by requiring a valid JWT token retrieved via the signin endpoint. Supports scopes \"api:read\" and \"api:write\".\n\n**Security Scopes**:\n * `api:read`: Read-only access\n * `api:write`: Read and write access","name":"Authorization","in":"header"},"jwt_header_X-Authorization":{"type":"apiKey","description":"Secures endpoint by requiring a valid JWT token retrieved via the signin endpoint. Supports scopes \"api:read\" and \"api:write\".\n\n**Security Scopes**:\n * `api:read`: Read-only access\n * `api:write`: Read and write access","name":"X-Authorization","in":"header"},"oauth2_query_oauth":{"type":"oauth2","description":"Secures endpoint by requiring a valid OAuth2 token retrieved via the signin endpoint. Supports scopes \"api:read\" and \"api:write\".","flow":"accessCode","authorizationUrl":"http://goa.design/authorization","tokenUrl":"http://goa.design/token","scopes":{"api:read":"Read-only access","api:write":"Read and write access"}}},"externalDocs":{"description":"Security example README","url":"https://github.com/goadesign/goa/tree/master/example/security/README.md"}} \ No newline at end of file diff --git a/streaming/gen/http/chatter/server/websocket.go b/streaming/gen/http/chatter/server/websocket.go index e2d03d865..fa5f91ece 100644 --- a/streaming/gen/http/chatter/server/websocket.go +++ b/streaming/gen/http/chatter/server/websocket.go @@ -35,6 +35,11 @@ type EchoerServerStream struct { once sync.Once // upgradeErr is the error returned by the websocket upgrade attempt. upgradeErr error + // closeOnce makes repeated Close calls return the first close result without + // writing again. + closeOnce sync.Once + // closeErr is the result of the first Close call. + closeErr error // upgrader is the websocket connection upgrader. upgrader goahttp.Upgrader // configurer is the websocket connection configurer. @@ -55,6 +60,11 @@ type ListenerServerStream struct { once sync.Once // upgradeErr is the error returned by the websocket upgrade attempt. upgradeErr error + // closeOnce makes repeated Close calls return the first close result without + // writing again. + closeOnce sync.Once + // closeErr is the result of the first Close call. + closeErr error // upgrader is the websocket connection upgrader. upgrader goahttp.Upgrader // configurer is the websocket connection configurer. @@ -95,6 +105,11 @@ type SubscribeServerStream struct { once sync.Once // upgradeErr is the error returned by the websocket upgrade attempt. upgradeErr error + // closeOnce makes repeated Close calls return the first close result without + // writing again. + closeOnce sync.Once + // closeErr is the result of the first Close call. + closeErr error // upgrader is the websocket connection upgrader. upgrader goahttp.Upgrader // configurer is the websocket connection configurer. @@ -115,6 +130,11 @@ type HistoryServerStream struct { once sync.Once // upgradeErr is the error returned by the websocket upgrade attempt. upgradeErr error + // closeOnce makes repeated Close calls return the first close result without + // writing again. + closeOnce sync.Once + // closeErr is the result of the first Close call. + closeErr error // upgrader is the websocket connection upgrader. upgrader goahttp.Upgrader // configurer is the websocket connection configurer. @@ -223,9 +243,33 @@ func (s *EchoerServerStream) RecvWithContext(ctx context.Context) (string, error // Close closes the "echoer" endpoint websocket connection. func (s *EchoerServerStream) Close() error { + s.closeOnce.Do(func() { + s.closeErr = s.close() + }) + return s.closeErr +} + +// close opens the websocket connection when needed, sends its normal close +// message, and closes it. +func (s *EchoerServerStream) close() error { var err error - if s.conn == nil { - return nil + // Upgrade the HTTP connection to a websocket connection only once. Connection + // upgrade is done here so that authorization logic in the endpoint is executed + // before calling the actual service method which may call Close(). + s.once.Do(func() { + var conn *websocket.Conn + conn, err = s.upgrader.Upgrade(s.w, s.r, nil) + if err != nil { + s.upgradeErr = err + return + } + if s.configurer != nil { + conn = s.configurer(conn, s.cancel) + } + s.conn = conn + }) + if s.upgradeErr != nil { + return s.upgradeErr } if err = s.conn.WriteControl( websocket.CloseMessage, @@ -280,9 +324,33 @@ func (s *ListenerServerStream) RecvWithContext(ctx context.Context) (string, err // Close closes the "listener" endpoint websocket connection. func (s *ListenerServerStream) Close() error { + s.closeOnce.Do(func() { + s.closeErr = s.close() + }) + return s.closeErr +} + +// close opens the websocket connection when needed, sends its normal close +// message, and closes it. +func (s *ListenerServerStream) close() error { var err error - if s.conn == nil { - return nil + // Upgrade the HTTP connection to a websocket connection only once. Connection + // upgrade is done here so that authorization logic in the endpoint is executed + // before calling the actual service method which may call Close(). + s.once.Do(func() { + var conn *websocket.Conn + conn, err = s.upgrader.Upgrade(s.w, s.r, nil) + if err != nil { + s.upgradeErr = err + return + } + if s.configurer != nil { + conn = s.configurer(conn, s.cancel) + } + s.conn = conn + }) + if s.upgradeErr != nil { + return s.upgradeErr } if err = s.conn.WriteControl( websocket.CloseMessage, @@ -386,9 +454,33 @@ func (s *SubscribeServerStream) SendWithContext(ctx context.Context, v *chatter. // Close closes the "subscribe" endpoint websocket connection. func (s *SubscribeServerStream) Close() error { + s.closeOnce.Do(func() { + s.closeErr = s.close() + }) + return s.closeErr +} + +// close opens the websocket connection when needed, sends its normal close +// message, and closes it. +func (s *SubscribeServerStream) close() error { var err error - if s.conn == nil { - return nil + // Upgrade the HTTP connection to a websocket connection only once. Connection + // upgrade is done here so that authorization logic in the endpoint is executed + // before calling the actual service method which may call Close(). + s.once.Do(func() { + var conn *websocket.Conn + conn, err = s.upgrader.Upgrade(s.w, s.r, nil) + if err != nil { + s.upgradeErr = err + return + } + if s.configurer != nil { + conn = s.configurer(conn, s.cancel) + } + s.conn = conn + }) + if s.upgradeErr != nil { + return s.upgradeErr } if err = s.conn.WriteControl( websocket.CloseMessage, @@ -460,9 +552,45 @@ func (s *HistoryServerStream) SendWithContext(ctx context.Context, v *chatter.Ch // Close closes the "history" endpoint websocket connection. func (s *HistoryServerStream) Close() error { + s.closeOnce.Do(func() { + s.closeErr = s.close() + }) + return s.closeErr +} + +// close opens the websocket connection when needed, sends its normal close +// message, and closes it. +func (s *HistoryServerStream) close() error { var err error - if s.conn == nil { - return nil + view := s.view + if view == "" { + view = "default" + } + switch view { + case "tiny": + case "default": + default: + return goa.InvalidEnumValueError("view", view, []any{"tiny", "default"}) + } + // Upgrade the HTTP connection to a websocket connection only once. Connection + // upgrade is done here so that authorization logic in the endpoint is executed + // before calling the actual service method which may call Close(). + s.once.Do(func() { + respHdr := make(http.Header) + respHdr.Add("goa-view", view) + var conn *websocket.Conn + conn, err = s.upgrader.Upgrade(s.w, s.r, respHdr) + if err != nil { + s.upgradeErr = err + return + } + if s.configurer != nil { + conn = s.configurer(conn, s.cancel) + } + s.conn = conn + }) + if s.upgradeErr != nil { + return s.upgradeErr } if err = s.conn.WriteControl( websocket.CloseMessage, diff --git a/streaming/gen/http/openapi.json b/streaming/gen/http/openapi.json index 5da681d38..af771e1ee 100644 --- a/streaming/gen/http/openapi.json +++ b/streaming/gen/http/openapi.json @@ -1 +1 @@ -{"swagger":"2.0","info":{"title":"Chatter service describing the streaming features of goa v2.","version":"0.0.1"},"host":"localhost:80","consumes":["application/json","application/xml","application/gob"],"produces":["application/json","application/xml","application/gob"],"paths":{"/echoer":{"get":{"tags":["chatter"],"summary":"echoer chatter","description":"Echoes the message sent by the client.\n\n**Required security scopes for jwt**:\n * `stream:write`","operationId":"chatter#echoer","responses":{"101":{"description":"Switching Protocols response.","schema":{"type":"string"}},"401":{"description":"unauthorized: Unauthorized response.","schema":{"type":"string"}},"403":{"description":"invalid-scopes: Forbidden response.","schema":{"type":"string"}}},"schemes":["ws"],"security":[{"jwt_header_Authorization":null}]}},"/history":{"get":{"tags":["chatter"],"summary":"history chatter","description":"Returns the chat messages sent to the server.\n\n**Required security scopes for jwt**:\n * `stream:read`","operationId":"chatter#history","parameters":[{"name":"view","in":"query","description":"View to use to render the result","required":false,"type":"string","enum":["tiny","default"]}],"responses":{"101":{"description":"Switching Protocols response.","schema":{"$ref":"#/definitions/GoaSummary"}},"401":{"description":"unauthorized: Unauthorized response.","schema":{"type":"string"}},"403":{"description":"invalid-scopes: Forbidden response.","schema":{"type":"string"}}},"schemes":["ws"],"security":[{"jwt_header_Authorization":null}]}},"/listener":{"get":{"tags":["chatter"],"summary":"listener chatter","description":"Listens to the messages sent by the client.\n\n**Required security scopes for jwt**:\n * `stream:write`","operationId":"chatter#listener","responses":{"101":{"description":"Switching Protocols response."},"401":{"description":"unauthorized: Unauthorized response.","schema":{"type":"string"}},"403":{"description":"invalid-scopes: Forbidden response.","schema":{"type":"string"}}},"schemes":["ws"],"security":[{"jwt_header_Authorization":null}]}},"/login":{"post":{"tags":["chatter"],"summary":"login chatter","description":"Creates a valid JWT token for auth to chat.","operationId":"chatter#login","responses":{"200":{"description":"OK response.","schema":{"type":"string"}},"401":{"description":"unauthorized: Unauthorized response.","schema":{"type":"string"}}},"schemes":["http"],"security":[{"basic_header_Authorization":null}]}},"/subscribe":{"get":{"tags":["chatter"],"summary":"subscribe chatter","description":"Subscribe to events sent when new chat messages are added.\n\n**Required security scopes for jwt**:\n * `stream:write`","operationId":"chatter#subscribe","responses":{"101":{"description":"Switching Protocols response.","schema":{"$ref":"#/definitions/Event","required":["message","action","added_at"]}},"401":{"description":"unauthorized: Unauthorized response.","schema":{"type":"string"}},"403":{"description":"invalid-scopes: Forbidden response.","schema":{"type":"string"}}},"schemes":["ws"],"security":[{"jwt_header_Authorization":null}]}},"/summary":{"get":{"tags":["chatter"],"summary":"summary chatter","description":"Summarizes the chat messages sent by the client.\n\n**Required security scopes for jwt**:\n * `stream:write`","operationId":"chatter#summary","responses":{"101":{"description":"Switching Protocols response.","schema":{"$ref":"#/definitions/ChatterChatSummaryResponseCollection"}},"401":{"description":"unauthorized: Unauthorized response.","schema":{"type":"string"}},"403":{"description":"invalid-scopes: Forbidden response.","schema":{"type":"string"}}},"schemes":["ws"],"security":[{"jwt_header_Authorization":null}]}}},"definitions":{"ChatSummaryResponse":{"title":"Mediatype identifier: application/vnd.goa.summary; view=default","type":"object","properties":{"length":{"type":"integer","description":"Length of the message sent","example":6468000556522877742,"format":"int64"},"message":{"type":"string","description":"Message sent to the server","example":"Distinctio omnis."},"sent_at":{"type":"string","description":"Time at which the message was sent","example":"2002-03-31T13:56:45Z","format":"date-time"}},"description":"ChatSummary result type (default view)","example":{"length":6468000556522877742,"message":"Distinctio omnis.","sent_at":"2002-03-31T13:56:45Z"},"required":["message","sent_at"]},"ChatterChatSummaryResponseCollection":{"title":"Mediatype identifier: application/vnd.goa.summary; type=collection; view=default","type":"array","items":{"$ref":"#/definitions/ChatSummaryResponse"},"description":"SummaryResponseBody is the result type for an array of ChatSummary (default view)","example":[{"length":6468000556522877742,"message":"Distinctio omnis.","sent_at":"2002-03-31T13:56:45Z"},{"length":6468000556522877742,"message":"Distinctio omnis.","sent_at":"2002-03-31T13:56:45Z"},{"length":6468000556522877742,"message":"Distinctio omnis.","sent_at":"2002-03-31T13:56:45Z"},{"length":6468000556522877742,"message":"Distinctio omnis.","sent_at":"2002-03-31T13:56:45Z"}]},"Event":{"title":"Event","type":"object","properties":{"action":{"type":"string","example":"added","enum":["added"]},"added_at":{"type":"string","description":"Time at which the message was added","example":"2001-05-15T07:30:58Z","format":"date-time"},"message":{"type":"string","description":"Message sent to the server","example":"Eum sequi veniam provident dolore velit."}},"example":{"action":"added","added_at":"2001-05-15T07:30:58Z","message":"Eum sequi veniam provident dolore velit."},"required":["message","action","added_at"]},"GoaSummary":{"title":"Mediatype identifier: application/vnd.goa.summary; view=default","type":"object","properties":{"length":{"type":"integer","description":"Length of the message sent","example":2987270872186463688,"format":"int64"},"message":{"type":"string","description":"Message sent to the server","example":"Deserunt velit tempore ducimus repellat aspernatur ipsum."},"sent_at":{"type":"string","description":"Time at which the message was sent","example":"1970-02-21T15:32:11Z","format":"date-time"}},"description":"HistoryResponseBody result type (default view)","example":{"length":2987270872186463688,"message":"Deserunt velit tempore ducimus repellat aspernatur ipsum.","sent_at":"1970-02-21T15:32:11Z"},"required":["message","sent_at"]}},"securityDefinitions":{"basic_header_Authorization":{"type":"basic","description":"Secures the login endpoint."},"jwt_header_Authorization":{"type":"apiKey","description":"Secures endpoint by requiring a valid JWT token. Supports scopes \"stream:read\" and \"stream:write\".\n\n**Security Scopes**:\n * `stream:read`: Read-only access\n * `stream:write`: Read and write access","name":"Authorization","in":"header"}}} \ No newline at end of file +{"swagger":"2.0","info":{"title":"Chatter service describing the streaming features of goa v2.","version":"0.0.1"},"host":"localhost:80","consumes":["application/json","application/xml","application/gob"],"produces":["application/json","application/xml","application/gob"],"paths":{"/echoer":{"get":{"tags":["chatter"],"summary":"echoer chatter","description":"Echoes the message sent by the client.\n\n**Required security scopes for jwt**:\n * `stream:write`","operationId":"chatter#echoer","responses":{"101":{"description":"Switching Protocols response.","schema":{"type":"string"}},"401":{"description":"unauthorized: Unauthorized response.","schema":{"type":"string"}},"403":{"description":"invalid-scopes: Forbidden response.","schema":{"type":"string"}}},"schemes":["ws"],"security":[{"jwt_header_Authorization":[]}]}},"/history":{"get":{"tags":["chatter"],"summary":"history chatter","description":"Returns the chat messages sent to the server.\n\n**Required security scopes for jwt**:\n * `stream:read`","operationId":"chatter#history","parameters":[{"name":"view","in":"query","description":"View to use to render the result","required":false,"type":"string","enum":["tiny","default"]}],"responses":{"101":{"description":"Switching Protocols response.","schema":{"$ref":"#/definitions/GoaSummary"}},"401":{"description":"unauthorized: Unauthorized response.","schema":{"type":"string"}},"403":{"description":"invalid-scopes: Forbidden response.","schema":{"type":"string"}}},"schemes":["ws"],"security":[{"jwt_header_Authorization":[]}]}},"/listener":{"get":{"tags":["chatter"],"summary":"listener chatter","description":"Listens to the messages sent by the client.\n\n**Required security scopes for jwt**:\n * `stream:write`","operationId":"chatter#listener","responses":{"101":{"description":"Switching Protocols response."},"401":{"description":"unauthorized: Unauthorized response.","schema":{"type":"string"}},"403":{"description":"invalid-scopes: Forbidden response.","schema":{"type":"string"}}},"schemes":["ws"],"security":[{"jwt_header_Authorization":[]}]}},"/login":{"post":{"tags":["chatter"],"summary":"login chatter","description":"Creates a valid JWT token for auth to chat.","operationId":"chatter#login","responses":{"200":{"description":"OK response.","schema":{"type":"string"}},"401":{"description":"unauthorized: Unauthorized response.","schema":{"type":"string"}}},"schemes":["http"],"security":[{"basic_header_Authorization":[]}]}},"/subscribe":{"get":{"tags":["chatter"],"summary":"subscribe chatter","description":"Subscribe to events sent when new chat messages are added.\n\n**Required security scopes for jwt**:\n * `stream:write`","operationId":"chatter#subscribe","responses":{"101":{"description":"Switching Protocols response.","schema":{"$ref":"#/definitions/Event","required":["message","action","added_at"]}},"401":{"description":"unauthorized: Unauthorized response.","schema":{"type":"string"}},"403":{"description":"invalid-scopes: Forbidden response.","schema":{"type":"string"}}},"schemes":["ws"],"security":[{"jwt_header_Authorization":[]}]}},"/summary":{"get":{"tags":["chatter"],"summary":"summary chatter","description":"Summarizes the chat messages sent by the client.\n\n**Required security scopes for jwt**:\n * `stream:write`","operationId":"chatter#summary","responses":{"101":{"description":"Switching Protocols response.","schema":{"$ref":"#/definitions/ChatterChatSummaryResponseCollection"}},"401":{"description":"unauthorized: Unauthorized response.","schema":{"type":"string"}},"403":{"description":"invalid-scopes: Forbidden response.","schema":{"type":"string"}}},"schemes":["ws"],"security":[{"jwt_header_Authorization":[]}]}}},"definitions":{"ChatSummaryResponse":{"title":"Mediatype identifier: application/vnd.goa.summary; view=default","type":"object","properties":{"length":{"type":"integer","description":"Length of the message sent","example":6468000556522877742,"format":"int64"},"message":{"type":"string","description":"Message sent to the server","example":"Distinctio omnis."},"sent_at":{"type":"string","description":"Time at which the message was sent","example":"2002-03-31T13:56:45Z","format":"date-time"}},"description":"ChatSummary result type (default view)","example":{"length":6468000556522877742,"message":"Distinctio omnis.","sent_at":"2002-03-31T13:56:45Z"},"required":["message","sent_at"]},"ChatterChatSummaryResponseCollection":{"title":"Mediatype identifier: application/vnd.goa.summary; type=collection; view=default","type":"array","items":{"$ref":"#/definitions/ChatSummaryResponse"},"description":"SummaryResponseBody is the result type for an array of ChatSummary (default view)","example":[{"length":6468000556522877742,"message":"Distinctio omnis.","sent_at":"2002-03-31T13:56:45Z"},{"length":6468000556522877742,"message":"Distinctio omnis.","sent_at":"2002-03-31T13:56:45Z"},{"length":6468000556522877742,"message":"Distinctio omnis.","sent_at":"2002-03-31T13:56:45Z"},{"length":6468000556522877742,"message":"Distinctio omnis.","sent_at":"2002-03-31T13:56:45Z"}]},"Event":{"title":"Event","type":"object","properties":{"action":{"type":"string","example":"added","enum":["added"]},"added_at":{"type":"string","description":"Time at which the message was added","example":"2001-05-15T07:30:58Z","format":"date-time"},"message":{"type":"string","description":"Message sent to the server","example":"Eum sequi veniam provident dolore velit."}},"example":{"action":"added","added_at":"2001-05-15T07:30:58Z","message":"Eum sequi veniam provident dolore velit."},"required":["message","action","added_at"]},"GoaSummary":{"title":"Mediatype identifier: application/vnd.goa.summary; view=default","type":"object","properties":{"length":{"type":"integer","description":"Length of the message sent","example":2987270872186463688,"format":"int64"},"message":{"type":"string","description":"Message sent to the server","example":"Deserunt velit tempore ducimus repellat aspernatur ipsum."},"sent_at":{"type":"string","description":"Time at which the message was sent","example":"1970-02-21T15:32:11Z","format":"date-time"}},"description":"HistoryResponseBody result type (default view)","example":{"length":2987270872186463688,"message":"Deserunt velit tempore ducimus repellat aspernatur ipsum.","sent_at":"1970-02-21T15:32:11Z"},"required":["message","sent_at"]}},"securityDefinitions":{"basic_header_Authorization":{"type":"basic","description":"Secures the login endpoint."},"jwt_header_Authorization":{"type":"apiKey","description":"Secures endpoint by requiring a valid JWT token. Supports scopes \"stream:read\" and \"stream:write\".\n\n**Security Scopes**:\n * `stream:read`: Read-only access\n * `stream:write`: Read and write access","name":"Authorization","in":"header"}}} \ No newline at end of file From 4be0dfc6382ed70d897aef8174958fa42e440ffb Mon Sep 17 00:00:00 2001 From: "Raphael (manual office deploy after cloud-state fix)" Date: Mon, 24 Aug 2026 00:25:46 -0700 Subject: [PATCH 03/28] fix(tus): enforce upload protocol headers and deletion --- tus/design/design.go | 6 ++++- tus/gen/http/cli/upload/cli.go | 7 +++-- tus/gen/http/openapi.json | 2 +- tus/gen/http/openapi.yaml | 5 ++++ tus/gen/http/openapi3.2.json | 2 +- tus/gen/http/openapi3.2.yaml | 9 +++++++ tus/gen/http/openapi3.json | 2 +- tus/gen/http/openapi3.yaml | 9 +++++++ tus/gen/http/tus/client/cli.go | 7 ++++- tus/gen/http/tus/client/encode_decode.go | 4 +++ tus/gen/http/tus/server/encode_decode.go | 7 ++++- tus/gen/http/tus/server/types.go | 3 ++- tus/gen/tus/service.go | 2 ++ tus/tus.go | 13 +++------ tus/tus_test.go | 34 ++++++++++++++++++++++++ 15 files changed, 93 insertions(+), 19 deletions(-) create mode 100644 tus/tus_test.go diff --git a/tus/design/design.go b/tus/design/design.go index 9bc1e7625..611d58a54 100644 --- a/tus/design/design.go +++ b/tus/design/design.go @@ -91,10 +91,13 @@ var _ = Service("tus", func() { Reference(TUSCoreHeaders) Reference(TUSExtensionHeaders) UploadID() + Attribute("contentType", String, "Media type of the uploaded bytes.", func() { + Example("application/offset+octet-stream") + }) Attribute("tusResumable") Attribute("uploadOffset") Attribute("uploadChecksum") - Required("id", "tusResumable", "uploadOffset") + Required("id", "contentType", "tusResumable", "uploadOffset") }) Result(func() { @@ -130,6 +133,7 @@ var _ = Service("tus", func() { HTTP(func() { PATCH("/{id}") + Header("contentType:Content-Type") Header("tusResumable:Tus-Resumable") Header("uploadOffset:Upload-Offset") Header("uploadChecksum:Upload-Checksum") diff --git a/tus/gen/http/cli/upload/cli.go b/tus/gen/http/cli/upload/cli.go index b834fee2b..f59c6c805 100644 --- a/tus/gen/http/cli/upload/cli.go +++ b/tus/gen/http/cli/upload/cli.go @@ -51,6 +51,7 @@ func ParseEndpoint( tusPatchFlags = flag.NewFlagSet("patch", flag.ExitOnError) tusPatchIDFlag = tusPatchFlags.String("id", "REQUIRED", "IDs are generated using Xid: https://github.com/rs/xid") + tusPatchContentTypeFlag = tusPatchFlags.String("content-type", "REQUIRED", "") tusPatchTusResumableFlag = tusPatchFlags.String("tus-resumable", "REQUIRED", "") tusPatchUploadOffsetFlag = tusPatchFlags.String("upload-offset", "REQUIRED", "") tusPatchUploadChecksumFlag = tusPatchFlags.String("upload-checksum", "", "") @@ -157,7 +158,7 @@ func ParseEndpoint( data, err = tusc.BuildHeadPayload(*tusHeadIDFlag, *tusHeadTusResumableFlag) case "patch": endpoint = c.Patch() - data, err = tusc.BuildPatchPayload(*tusPatchIDFlag, *tusPatchTusResumableFlag, *tusPatchUploadOffsetFlag, *tusPatchUploadChecksumFlag) + data, err = tusc.BuildPatchPayload(*tusPatchIDFlag, *tusPatchContentTypeFlag, *tusPatchTusResumableFlag, *tusPatchUploadOffsetFlag, *tusPatchUploadChecksumFlag) if err == nil { data, err = tusc.BuildPatchStreamPayload(data, *tusPatchStreamFlag) } @@ -220,6 +221,7 @@ func tusPatchUsage() { // Header with flags fmt.Fprintf(os.Stderr, "%s [flags] tus patch", os.Args[0]) fmt.Fprint(os.Stderr, " -id STRING") + fmt.Fprint(os.Stderr, " -content-type STRING") fmt.Fprint(os.Stderr, " -tus-resumable STRING") fmt.Fprint(os.Stderr, " -upload-offset INT64") fmt.Fprint(os.Stderr, " -upload-checksum STRING") @@ -232,6 +234,7 @@ func tusPatchUsage() { // Flags list fmt.Fprintln(os.Stderr, ` -id STRING: IDs are generated using Xid: https://github.com/rs/xid`) + fmt.Fprintln(os.Stderr, ` -content-type STRING: `) fmt.Fprintln(os.Stderr, ` -tus-resumable STRING: `) fmt.Fprintln(os.Stderr, ` -upload-offset INT64: `) fmt.Fprintln(os.Stderr, ` -upload-checksum STRING: `) @@ -239,7 +242,7 @@ func tusPatchUsage() { fmt.Fprintln(os.Stderr) fmt.Fprintln(os.Stderr, "Example:") - fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "tus patch --id \"7pc6esaasn4ffl7qlrcf\" --tus-resumable \"1.0.0\" --upload-offset 2754385183630855775 --upload-checksum \"sha1 Kq5sNclPz7QV2+lfQIuc6R7oRu0=\" --stream \"goa.png\"") + fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "tus patch --id \"7pc6esaasn4ffl7qlrcf\" --content-type \"application/offset+octet-stream\" --tus-resumable \"1.0.0\" --upload-offset 2754385183630855775 --upload-checksum \"sha1 Kq5sNclPz7QV2+lfQIuc6R7oRu0=\" --stream \"goa.png\"") } func tusOptionsUsage() { diff --git a/tus/gen/http/openapi.json b/tus/gen/http/openapi.json index 8a27b7887..d07dbb2a4 100644 --- a/tus/gen/http/openapi.json +++ b/tus/gen/http/openapi.json @@ -1 +1 @@ -{"swagger":"2.0","info":{"title":"File Upload Service","description":"HTTP service for uploading files using the tus protocol (https://tus.io)","version":"0.0.1"},"host":"localhost:8000","consumes":["application/json","application/xml","application/gob"],"produces":["application/json","application/xml","application/gob"],"paths":{"/upload":{"post":{"tags":["tus"],"summary":"post tus","description":"Clients use the POST method against a known upload creation URL to request a new upload resource.","operationId":"tus#post","parameters":[{"name":"Tus-Resumable","in":"header","description":"tusResumable represents a tus protocol version.","required":true,"type":"string","pattern":"^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(-(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(\\.(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\\+[0-9a-zA-Z-]+(\\.[0-9a-zA-Z-]+)*)?$"},{"name":"Upload-Length","in":"header","description":"uploadLength represents the size of the entire upload in bytes.","required":false,"type":"integer","format":"int64"},{"name":"Upload-Defer-Length","in":"header","description":"The Upload-Defer-Length request and response header indicates that the size of the upload is not known currently and will be transferred later.","required":false,"type":"integer","enum":[1]},{"name":"Upload-Checksum","in":"header","description":"A Client MAY include the Upload-Checksum header in a PATCH request. Once the entire request has been received, the Server MUST verify the uploaded chunk against the provided checksum using the specified algorithm.","required":false,"type":"string"},{"name":"Upload-Metadata","in":"header","description":"The Client MAY supply the Upload-Metadata header to add additional metadata to the upload creation request.","required":false,"type":"string"},{"name":"Tus-Max-Size","in":"header","description":"Length of the upload","required":false,"type":"integer","format":"int64"}],"responses":{"201":{"description":"Created response.","headers":{"Location":{"description":"URL of created resource","type":"string","format":"uri"},"Tus-Resumable":{"description":"tusResumable represents a tus protocol version.","type":"string","pattern":"^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(-(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(\\.(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\\+[0-9a-zA-Z-]+(\\.[0-9a-zA-Z-]+)*)?$"},"Upload-Expires":{"description":"The Upload-Expires response header indicates the time after which the unfinished upload expires.","type":"string"},"Upload-Offset":{"description":"uploadOffset represents a byte offset within a resource.","type":"integer","format":"int64"}}},"400":{"description":"InvalidChecksumAlgorithm: The checksum algorithm is not supported by the server.","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","type":"boolean"},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","type":"string"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","type":"string"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","type":"string"},"goa-attribute-temporary":{"description":"Is the error temporary?","type":"boolean"},"goa-attribute-timeout":{"description":"Is the error a timeout?","type":"boolean"}},"examples":{"application/json":{}}},"412":{"description":"InvalidTusResumable: If the version specified by the Client is not supported by the Server, it MUST respond with the 412 Precondition Failed status.","headers":{"Tus-Version":{"description":"Comma separated list of supported versions.","type":"string","enum":["1.0.0"]}}},"413":{"description":"MaximumSizeExceeded: If the length of the upload exceeds the maximum, which MAY be specified using the Tus-Max-Size header, the Server MUST respond with the 413 Request Entity Too Large status.","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","type":"boolean"},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","type":"string"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","type":"string"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","type":"string"},"goa-attribute-temporary":{"description":"Is the error temporary?","type":"boolean"},"goa-attribute-timeout":{"description":"Is the error a timeout?","type":"boolean"}},"examples":{"application/json":{}}},"460":{"description":"ChecksumMismatch: The checksums mismatch.","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","type":"boolean"},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","type":"string"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","type":"string"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","type":"string"},"goa-attribute-temporary":{"description":"Is the error temporary?","type":"boolean"},"goa-attribute-timeout":{"description":"Is the error a timeout?","type":"boolean"}},"examples":{"application/json":{}}}},"schemes":["http"]},"options":{"tags":["tus"],"summary":"options tus","description":"Clients use the OPTIONS method to gather information about the Server’s current configuration.","operationId":"tus#options","responses":{"204":{"description":"No Content response.","headers":{"Tus-Checksum-Algorithm":{"description":"A Client MAY include the Upload-Checksum header in a PATCH request. Once the entire request has been received, the Server MUST verify the uploaded chunk against the provided checksum using the specified algorithm.","type":"string","enum":["md5,sha1,crc32"]},"Tus-Extension":{"description":"tusExtension is a comma separated list of extensions supported by the server. This implementation supports the creation, creation-with-upload, expiration, checksum and termination extensions","type":"string","enum":["creation,creation-with-upload,creation-defer-length,expiration,checksum,termination"]},"Tus-Max-Size":{"description":"tusMaxSize represents the maximum allowed size of an entire upload in bytes.","type":"integer","format":"int64"},"Tus-Resumable":{"description":"tusResumable represents a tus protocol version.","type":"string","pattern":"^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(-(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(\\.(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\\+[0-9a-zA-Z-]+(\\.[0-9a-zA-Z-]+)*)?$"},"Tus-Version":{"description":"tusVersion is a comma separated list of protocol versions supported by the server. This implementation only supports 1.0.0.","type":"string","enum":["1.0.0"]}}},"412":{"description":"InvalidTusResumable: If the version specified by the Client is not supported by the Server, it MUST respond with the 412 Precondition Failed status.","headers":{"Tus-Version":{"description":"Comma separated list of supported versions.","type":"string","enum":["1.0.0"]}}}},"schemes":["http"]}},"/upload/{id}":{"delete":{"tags":["tus"],"summary":"delete tus","description":"Clients use the DELETE method to terminate completed and unfinished uploads allowing the Server to free up used resources.","operationId":"tus#delete","parameters":[{"name":"id","in":"path","description":"IDs are generated using Xid: https://github.com/rs/xid","required":true,"type":"string","pattern":"[0-9a-v]{20}"},{"name":"Tus-Resumable","in":"header","description":"tusResumable represents a tus protocol version.","required":true,"type":"string","pattern":"^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(-(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(\\.(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\\+[0-9a-zA-Z-]+(\\.[0-9a-zA-Z-]+)*)?$"}],"responses":{"204":{"description":"No Content response.","headers":{"Tus-Resumable":{"description":"tusResumable represents a tus protocol version.","type":"string","pattern":"^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(-(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(\\.(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\\+[0-9a-zA-Z-]+(\\.[0-9a-zA-Z-]+)*)?$"}}},"404":{"description":"NotFound: For all future requests to this URL, the Server SHOULD respond with the 404 Not Found or 410 Gone status.","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","type":"boolean"},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","type":"string"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","type":"string"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","type":"string"},"goa-attribute-temporary":{"description":"Is the error temporary?","type":"boolean"},"goa-attribute-timeout":{"description":"Is the error a timeout?","type":"boolean"}},"examples":{"application/json":{}}},"410":{"description":"Gone: For all future requests to this URL, the Server SHOULD respond with the 404 Not Found or 410 Gone status.","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","type":"boolean"},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","type":"string"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","type":"string"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","type":"string"},"goa-attribute-temporary":{"description":"Is the error temporary?","type":"boolean"},"goa-attribute-timeout":{"description":"Is the error a timeout?","type":"boolean"}},"examples":{"application/json":{}}},"412":{"description":"InvalidTusResumable: If the version specified by the Client is not supported by the Server, it MUST respond with the 412 Precondition Failed status.","headers":{"Tus-Version":{"description":"Comma separated list of supported versions.","type":"string","enum":["1.0.0"]}}}},"schemes":["http"]},"head":{"tags":["tus"],"summary":"head tus","description":"Clients use the HEAD request to determine the offset at which the upload should be continued.","operationId":"tus#head","parameters":[{"name":"id","in":"path","description":"IDs are generated using Xid: https://github.com/rs/xid","required":true,"type":"string","pattern":"[0-9a-v]{20}"},{"name":"Tus-Resumable","in":"header","description":"tusResumable represents a tus protocol version.","required":true,"type":"string","pattern":"^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(-(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(\\.(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\\+[0-9a-zA-Z-]+(\\.[0-9a-zA-Z-]+)*)?$"}],"responses":{"200":{"description":"OK response.","headers":{"Tus-Resumable":{"description":"tusResumable represents a tus protocol version.","type":"string","pattern":"^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(-(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(\\.(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\\+[0-9a-zA-Z-]+(\\.[0-9a-zA-Z-]+)*)?$"},"Upload-Defer-Length":{"description":"The Upload-Defer-Length request and response header indicates that the size of the upload is not known currently and will be transferred later.","type":"integer","enum":[1]},"Upload-Length":{"description":"uploadLength represents the size of the entire upload in bytes.","type":"integer","format":"int64"},"Upload-Metadata":{"description":"The Client MAY supply the Upload-Metadata header to add additional metadata to the upload creation request.","type":"string"},"Upload-Offset":{"description":"uploadOffset represents a byte offset within a resource.","type":"integer","format":"int64"}}},"404":{"description":"NotFound: If the resource is not found, the Server SHOULD return either the 404 Not Found, 410 Gone or 403 Forbidden status without the Upload-Offset header.","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","type":"boolean"},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","type":"string"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","type":"string"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","type":"string"},"goa-attribute-temporary":{"description":"Is the error temporary?","type":"boolean"},"goa-attribute-timeout":{"description":"Is the error a timeout?","type":"boolean"}},"examples":{"application/json":{}}},"410":{"description":"Gone: If the resource is not found, the Server SHOULD return either the 404 Not Found, 410 Gone or 403 Forbidden status without the Upload-Offset header.","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","type":"boolean"},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","type":"string"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","type":"string"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","type":"string"},"goa-attribute-temporary":{"description":"Is the error temporary?","type":"boolean"},"goa-attribute-timeout":{"description":"Is the error a timeout?","type":"boolean"}},"examples":{"application/json":{}}},"412":{"description":"InvalidTusResumable: If the version specified by the Client is not supported by the Server, it MUST respond with the 412 Precondition Failed status.","headers":{"Tus-Version":{"description":"Comma separated list of supported versions.","type":"string","enum":["1.0.0"]}}}},"schemes":["http"]},"patch":{"tags":["tus"],"summary":"patch tus","description":"Clients use the PATCH method to start or resume an upload.","operationId":"tus#patch","parameters":[{"name":"id","in":"path","description":"IDs are generated using Xid: https://github.com/rs/xid","required":true,"type":"string","pattern":"[0-9a-v]{20}"},{"name":"Tus-Resumable","in":"header","description":"tusResumable represents a tus protocol version.","required":true,"type":"string","pattern":"^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(-(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(\\.(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\\+[0-9a-zA-Z-]+(\\.[0-9a-zA-Z-]+)*)?$"},{"name":"Upload-Offset","in":"header","description":"uploadOffset represents a byte offset within a resource.","required":true,"type":"integer","format":"int64"},{"name":"Upload-Checksum","in":"header","description":"A Client MAY include the Upload-Checksum header in a PATCH request. Once the entire request has been received, the Server MUST verify the uploaded chunk against the provided checksum using the specified algorithm.","required":false,"type":"string"}],"responses":{"204":{"description":"No Content response.","headers":{"Tus-Resumable":{"description":"tusResumable represents a tus protocol version.","type":"string","pattern":"^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(-(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(\\.(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\\+[0-9a-zA-Z-]+(\\.[0-9a-zA-Z-]+)*)?$"},"Upload-Expires":{"description":"The Upload-Expires response header indicates the time after which the unfinished upload expires.","type":"string"},"Upload-Offset":{"description":"uploadOffset represents a byte offset within a resource.","type":"integer","format":"int64"}}},"400":{"description":"InvalidChecksumAlgorithm: The checksum algorithm is not supported by the server.","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","type":"boolean"},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","type":"string"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","type":"string"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","type":"string"},"goa-attribute-temporary":{"description":"Is the error temporary?","type":"boolean"},"goa-attribute-timeout":{"description":"Is the error a timeout?","type":"boolean"}},"examples":{"application/json":{}}},"404":{"description":"NotFound: If a Client does attempt to resume an upload which has since been removed by the Server, the Server SHOULD respond with the404 Not Found or 410 Gone status.","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","type":"boolean"},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","type":"string"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","type":"string"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","type":"string"},"goa-attribute-temporary":{"description":"Is the error temporary?","type":"boolean"},"goa-attribute-timeout":{"description":"Is the error a timeout?","type":"boolean"}},"examples":{"application/json":{}}},"409":{"description":"InvalidOffset: If the offsets do not match, the Server MUST respond with the 409 Conflict status without modifying the upload resource.","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","type":"boolean"},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","type":"string"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","type":"string"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","type":"string"},"goa-attribute-temporary":{"description":"Is the error temporary?","type":"boolean"},"goa-attribute-timeout":{"description":"Is the error a timeout?","type":"boolean"}},"examples":{"application/json":{}}},"410":{"description":"Gone: If a Client does attempt to resume an upload which has since been removed by the Server, the Server SHOULD respond with the404 Not Found or 410 Gone status.","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","type":"boolean"},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","type":"string"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","type":"string"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","type":"string"},"goa-attribute-temporary":{"description":"Is the error temporary?","type":"boolean"},"goa-attribute-timeout":{"description":"Is the error a timeout?","type":"boolean"}},"examples":{"application/json":{}}},"412":{"description":"InvalidTusResumable: If the version specified by the Client is not supported by the Server, it MUST respond with the 412 Precondition Failed status.","headers":{"Tus-Version":{"description":"Comma separated list of supported versions.","type":"string","enum":["1.0.0"]}}},"415":{"description":"InvalidContentType: All PATCH requests MUST use Content-Type: application/offset+octet-stream, otherwise the server SHOULD return a 415 Unsupported Media Type status.","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","type":"boolean"},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","type":"string"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","type":"string"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","type":"string"},"goa-attribute-temporary":{"description":"Is the error temporary?","type":"boolean"},"goa-attribute-timeout":{"description":"Is the error a timeout?","type":"boolean"}},"examples":{"application/json":{}}},"460":{"description":"ChecksumMismatch: The checksums mismatch.","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","type":"boolean"},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","type":"string"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","type":"string"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","type":"string"},"goa-attribute-temporary":{"description":"Is the error temporary?","type":"boolean"},"goa-attribute-timeout":{"description":"Is the error a timeout?","type":"boolean"}},"examples":{"application/json":{}}},"500":{"description":"Internal: Internal error","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","type":"boolean"},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","type":"string"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","type":"string"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","type":"string"},"goa-attribute-temporary":{"description":"Is the error temporary?","type":"boolean"},"goa-attribute-timeout":{"description":"Is the error a timeout?","type":"boolean"}},"examples":{"application/json":{}}}},"schemes":["http"]}}}} \ No newline at end of file +{"swagger":"2.0","info":{"title":"File Upload Service","description":"HTTP service for uploading files using the tus protocol (https://tus.io)","version":"0.0.1"},"host":"localhost:8000","consumes":["application/json","application/xml","application/gob"],"produces":["application/json","application/xml","application/gob"],"paths":{"/upload":{"post":{"tags":["tus"],"summary":"post tus","description":"Clients use the POST method against a known upload creation URL to request a new upload resource.","operationId":"tus#post","parameters":[{"name":"Tus-Resumable","in":"header","description":"tusResumable represents a tus protocol version.","required":true,"type":"string","pattern":"^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(-(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(\\.(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\\+[0-9a-zA-Z-]+(\\.[0-9a-zA-Z-]+)*)?$"},{"name":"Upload-Length","in":"header","description":"uploadLength represents the size of the entire upload in bytes.","required":false,"type":"integer","format":"int64"},{"name":"Upload-Defer-Length","in":"header","description":"The Upload-Defer-Length request and response header indicates that the size of the upload is not known currently and will be transferred later.","required":false,"type":"integer","enum":[1]},{"name":"Upload-Checksum","in":"header","description":"A Client MAY include the Upload-Checksum header in a PATCH request. Once the entire request has been received, the Server MUST verify the uploaded chunk against the provided checksum using the specified algorithm.","required":false,"type":"string"},{"name":"Upload-Metadata","in":"header","description":"The Client MAY supply the Upload-Metadata header to add additional metadata to the upload creation request.","required":false,"type":"string"},{"name":"Tus-Max-Size","in":"header","description":"Length of the upload","required":false,"type":"integer","format":"int64"}],"responses":{"201":{"description":"Created response.","headers":{"Location":{"description":"URL of created resource","type":"string","format":"uri"},"Tus-Resumable":{"description":"tusResumable represents a tus protocol version.","type":"string","pattern":"^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(-(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(\\.(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\\+[0-9a-zA-Z-]+(\\.[0-9a-zA-Z-]+)*)?$"},"Upload-Expires":{"description":"The Upload-Expires response header indicates the time after which the unfinished upload expires.","type":"string"},"Upload-Offset":{"description":"uploadOffset represents a byte offset within a resource.","type":"integer","format":"int64"}}},"400":{"description":"InvalidChecksumAlgorithm: The checksum algorithm is not supported by the server.","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","type":"boolean"},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","type":"string"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","type":"string"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","type":"string"},"goa-attribute-temporary":{"description":"Is the error temporary?","type":"boolean"},"goa-attribute-timeout":{"description":"Is the error a timeout?","type":"boolean"}},"examples":{"application/json":{}}},"412":{"description":"InvalidTusResumable: If the version specified by the Client is not supported by the Server, it MUST respond with the 412 Precondition Failed status.","headers":{"Tus-Version":{"description":"Comma separated list of supported versions.","type":"string","enum":["1.0.0"]}}},"413":{"description":"MaximumSizeExceeded: If the length of the upload exceeds the maximum, which MAY be specified using the Tus-Max-Size header, the Server MUST respond with the 413 Request Entity Too Large status.","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","type":"boolean"},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","type":"string"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","type":"string"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","type":"string"},"goa-attribute-temporary":{"description":"Is the error temporary?","type":"boolean"},"goa-attribute-timeout":{"description":"Is the error a timeout?","type":"boolean"}},"examples":{"application/json":{}}},"460":{"description":"ChecksumMismatch: The checksums mismatch.","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","type":"boolean"},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","type":"string"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","type":"string"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","type":"string"},"goa-attribute-temporary":{"description":"Is the error temporary?","type":"boolean"},"goa-attribute-timeout":{"description":"Is the error a timeout?","type":"boolean"}},"examples":{"application/json":{}}}},"schemes":["http"]},"options":{"tags":["tus"],"summary":"options tus","description":"Clients use the OPTIONS method to gather information about the Server’s current configuration.","operationId":"tus#options","responses":{"204":{"description":"No Content response.","headers":{"Tus-Checksum-Algorithm":{"description":"A Client MAY include the Upload-Checksum header in a PATCH request. Once the entire request has been received, the Server MUST verify the uploaded chunk against the provided checksum using the specified algorithm.","type":"string","enum":["md5,sha1,crc32"]},"Tus-Extension":{"description":"tusExtension is a comma separated list of extensions supported by the server. This implementation supports the creation, creation-with-upload, expiration, checksum and termination extensions","type":"string","enum":["creation,creation-with-upload,creation-defer-length,expiration,checksum,termination"]},"Tus-Max-Size":{"description":"tusMaxSize represents the maximum allowed size of an entire upload in bytes.","type":"integer","format":"int64"},"Tus-Resumable":{"description":"tusResumable represents a tus protocol version.","type":"string","pattern":"^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(-(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(\\.(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\\+[0-9a-zA-Z-]+(\\.[0-9a-zA-Z-]+)*)?$"},"Tus-Version":{"description":"tusVersion is a comma separated list of protocol versions supported by the server. This implementation only supports 1.0.0.","type":"string","enum":["1.0.0"]}}},"412":{"description":"InvalidTusResumable: If the version specified by the Client is not supported by the Server, it MUST respond with the 412 Precondition Failed status.","headers":{"Tus-Version":{"description":"Comma separated list of supported versions.","type":"string","enum":["1.0.0"]}}}},"schemes":["http"]}},"/upload/{id}":{"delete":{"tags":["tus"],"summary":"delete tus","description":"Clients use the DELETE method to terminate completed and unfinished uploads allowing the Server to free up used resources.","operationId":"tus#delete","parameters":[{"name":"id","in":"path","description":"IDs are generated using Xid: https://github.com/rs/xid","required":true,"type":"string","pattern":"[0-9a-v]{20}"},{"name":"Tus-Resumable","in":"header","description":"tusResumable represents a tus protocol version.","required":true,"type":"string","pattern":"^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(-(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(\\.(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\\+[0-9a-zA-Z-]+(\\.[0-9a-zA-Z-]+)*)?$"}],"responses":{"204":{"description":"No Content response.","headers":{"Tus-Resumable":{"description":"tusResumable represents a tus protocol version.","type":"string","pattern":"^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(-(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(\\.(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\\+[0-9a-zA-Z-]+(\\.[0-9a-zA-Z-]+)*)?$"}}},"404":{"description":"NotFound: For all future requests to this URL, the Server SHOULD respond with the 404 Not Found or 410 Gone status.","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","type":"boolean"},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","type":"string"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","type":"string"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","type":"string"},"goa-attribute-temporary":{"description":"Is the error temporary?","type":"boolean"},"goa-attribute-timeout":{"description":"Is the error a timeout?","type":"boolean"}},"examples":{"application/json":{}}},"410":{"description":"Gone: For all future requests to this URL, the Server SHOULD respond with the 404 Not Found or 410 Gone status.","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","type":"boolean"},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","type":"string"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","type":"string"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","type":"string"},"goa-attribute-temporary":{"description":"Is the error temporary?","type":"boolean"},"goa-attribute-timeout":{"description":"Is the error a timeout?","type":"boolean"}},"examples":{"application/json":{}}},"412":{"description":"InvalidTusResumable: If the version specified by the Client is not supported by the Server, it MUST respond with the 412 Precondition Failed status.","headers":{"Tus-Version":{"description":"Comma separated list of supported versions.","type":"string","enum":["1.0.0"]}}}},"schemes":["http"]},"head":{"tags":["tus"],"summary":"head tus","description":"Clients use the HEAD request to determine the offset at which the upload should be continued.","operationId":"tus#head","parameters":[{"name":"id","in":"path","description":"IDs are generated using Xid: https://github.com/rs/xid","required":true,"type":"string","pattern":"[0-9a-v]{20}"},{"name":"Tus-Resumable","in":"header","description":"tusResumable represents a tus protocol version.","required":true,"type":"string","pattern":"^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(-(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(\\.(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\\+[0-9a-zA-Z-]+(\\.[0-9a-zA-Z-]+)*)?$"}],"responses":{"200":{"description":"OK response.","headers":{"Tus-Resumable":{"description":"tusResumable represents a tus protocol version.","type":"string","pattern":"^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(-(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(\\.(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\\+[0-9a-zA-Z-]+(\\.[0-9a-zA-Z-]+)*)?$"},"Upload-Defer-Length":{"description":"The Upload-Defer-Length request and response header indicates that the size of the upload is not known currently and will be transferred later.","type":"integer","enum":[1]},"Upload-Length":{"description":"uploadLength represents the size of the entire upload in bytes.","type":"integer","format":"int64"},"Upload-Metadata":{"description":"The Client MAY supply the Upload-Metadata header to add additional metadata to the upload creation request.","type":"string"},"Upload-Offset":{"description":"uploadOffset represents a byte offset within a resource.","type":"integer","format":"int64"}}},"404":{"description":"NotFound: If the resource is not found, the Server SHOULD return either the 404 Not Found, 410 Gone or 403 Forbidden status without the Upload-Offset header.","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","type":"boolean"},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","type":"string"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","type":"string"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","type":"string"},"goa-attribute-temporary":{"description":"Is the error temporary?","type":"boolean"},"goa-attribute-timeout":{"description":"Is the error a timeout?","type":"boolean"}},"examples":{"application/json":{}}},"410":{"description":"Gone: If the resource is not found, the Server SHOULD return either the 404 Not Found, 410 Gone or 403 Forbidden status without the Upload-Offset header.","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","type":"boolean"},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","type":"string"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","type":"string"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","type":"string"},"goa-attribute-temporary":{"description":"Is the error temporary?","type":"boolean"},"goa-attribute-timeout":{"description":"Is the error a timeout?","type":"boolean"}},"examples":{"application/json":{}}},"412":{"description":"InvalidTusResumable: If the version specified by the Client is not supported by the Server, it MUST respond with the 412 Precondition Failed status.","headers":{"Tus-Version":{"description":"Comma separated list of supported versions.","type":"string","enum":["1.0.0"]}}}},"schemes":["http"]},"patch":{"tags":["tus"],"summary":"patch tus","description":"Clients use the PATCH method to start or resume an upload.","operationId":"tus#patch","parameters":[{"name":"id","in":"path","description":"IDs are generated using Xid: https://github.com/rs/xid","required":true,"type":"string","pattern":"[0-9a-v]{20}"},{"name":"Content-Type","in":"header","description":"Media type of the uploaded bytes.","required":true,"type":"string"},{"name":"Tus-Resumable","in":"header","description":"tusResumable represents a tus protocol version.","required":true,"type":"string","pattern":"^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(-(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(\\.(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\\+[0-9a-zA-Z-]+(\\.[0-9a-zA-Z-]+)*)?$"},{"name":"Upload-Offset","in":"header","description":"uploadOffset represents a byte offset within a resource.","required":true,"type":"integer","format":"int64"},{"name":"Upload-Checksum","in":"header","description":"A Client MAY include the Upload-Checksum header in a PATCH request. Once the entire request has been received, the Server MUST verify the uploaded chunk against the provided checksum using the specified algorithm.","required":false,"type":"string"}],"responses":{"204":{"description":"No Content response.","headers":{"Tus-Resumable":{"description":"tusResumable represents a tus protocol version.","type":"string","pattern":"^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(-(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(\\.(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\\+[0-9a-zA-Z-]+(\\.[0-9a-zA-Z-]+)*)?$"},"Upload-Expires":{"description":"The Upload-Expires response header indicates the time after which the unfinished upload expires.","type":"string"},"Upload-Offset":{"description":"uploadOffset represents a byte offset within a resource.","type":"integer","format":"int64"}}},"400":{"description":"InvalidChecksumAlgorithm: The checksum algorithm is not supported by the server.","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","type":"boolean"},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","type":"string"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","type":"string"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","type":"string"},"goa-attribute-temporary":{"description":"Is the error temporary?","type":"boolean"},"goa-attribute-timeout":{"description":"Is the error a timeout?","type":"boolean"}},"examples":{"application/json":{}}},"404":{"description":"NotFound: If a Client does attempt to resume an upload which has since been removed by the Server, the Server SHOULD respond with the404 Not Found or 410 Gone status.","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","type":"boolean"},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","type":"string"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","type":"string"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","type":"string"},"goa-attribute-temporary":{"description":"Is the error temporary?","type":"boolean"},"goa-attribute-timeout":{"description":"Is the error a timeout?","type":"boolean"}},"examples":{"application/json":{}}},"409":{"description":"InvalidOffset: If the offsets do not match, the Server MUST respond with the 409 Conflict status without modifying the upload resource.","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","type":"boolean"},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","type":"string"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","type":"string"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","type":"string"},"goa-attribute-temporary":{"description":"Is the error temporary?","type":"boolean"},"goa-attribute-timeout":{"description":"Is the error a timeout?","type":"boolean"}},"examples":{"application/json":{}}},"410":{"description":"Gone: If a Client does attempt to resume an upload which has since been removed by the Server, the Server SHOULD respond with the404 Not Found or 410 Gone status.","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","type":"boolean"},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","type":"string"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","type":"string"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","type":"string"},"goa-attribute-temporary":{"description":"Is the error temporary?","type":"boolean"},"goa-attribute-timeout":{"description":"Is the error a timeout?","type":"boolean"}},"examples":{"application/json":{}}},"412":{"description":"InvalidTusResumable: If the version specified by the Client is not supported by the Server, it MUST respond with the 412 Precondition Failed status.","headers":{"Tus-Version":{"description":"Comma separated list of supported versions.","type":"string","enum":["1.0.0"]}}},"415":{"description":"InvalidContentType: All PATCH requests MUST use Content-Type: application/offset+octet-stream, otherwise the server SHOULD return a 415 Unsupported Media Type status.","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","type":"boolean"},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","type":"string"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","type":"string"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","type":"string"},"goa-attribute-temporary":{"description":"Is the error temporary?","type":"boolean"},"goa-attribute-timeout":{"description":"Is the error a timeout?","type":"boolean"}},"examples":{"application/json":{}}},"460":{"description":"ChecksumMismatch: The checksums mismatch.","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","type":"boolean"},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","type":"string"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","type":"string"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","type":"string"},"goa-attribute-temporary":{"description":"Is the error temporary?","type":"boolean"},"goa-attribute-timeout":{"description":"Is the error a timeout?","type":"boolean"}},"examples":{"application/json":{}}},"500":{"description":"Internal: Internal error","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","type":"boolean"},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","type":"string"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","type":"string"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","type":"string"},"goa-attribute-temporary":{"description":"Is the error temporary?","type":"boolean"},"goa-attribute-timeout":{"description":"Is the error a timeout?","type":"boolean"}},"examples":{"application/json":{}}}},"schemes":["http"]}}}} \ No newline at end of file diff --git a/tus/gen/http/openapi.yaml b/tus/gen/http/openapi.yaml index 06a4bd8de..dd8657c7a 100644 --- a/tus/gen/http/openapi.yaml +++ b/tus/gen/http/openapi.yaml @@ -393,6 +393,11 @@ paths: required: true type: string pattern: '[0-9a-v]{20}' + - name: Content-Type + in: header + description: Media type of the uploaded bytes. + required: true + type: string - name: Tus-Resumable in: header description: tusResumable represents a tus protocol version. diff --git a/tus/gen/http/openapi3.2.json b/tus/gen/http/openapi3.2.json index 6f22b46dc..334d04f6f 100644 --- a/tus/gen/http/openapi3.2.json +++ b/tus/gen/http/openapi3.2.json @@ -1 +1 @@ -{"openapi":"3.2.0","info":{"title":"File Upload Service","description":"HTTP service for uploading files using the tus protocol (https://tus.io)","version":"0.0.1"},"servers":[{"url":"http://localhost:8000/upload","name":"Upload","description":"Upload hosts the upload service."}],"paths":{"/upload":{"options":{"tags":["tus"],"summary":"options tus","description":"Clients use the OPTIONS method to gather information about the Server’s current configuration.","operationId":"tus#options","responses":{"204":{"description":"No Content response.","headers":{"Tus-Checksum-Algorithm":{"description":"A Client MAY include the Upload-Checksum header in a PATCH request. Once the entire request has been received, the Server MUST verify the uploaded chunk against the provided checksum using the specified algorithm.","schema":{"type":"string","description":"A Client MAY include the Upload-Checksum header in a PATCH request. Once the entire request has been received, the Server MUST verify the uploaded chunk against the provided checksum using the specified algorithm.","example":"md5,sha1,crc32","enum":["md5,sha1,crc32"]},"example":"md5,sha1,crc32"},"Tus-Extension":{"description":"tusExtension is a comma separated list of extensions supported by the server. This implementation supports the creation, creation-with-upload, expiration, checksum and termination extensions","schema":{"type":"string","description":"tusExtension is a comma separated list of extensions supported by the server. This implementation supports the creation, creation-with-upload, expiration, checksum and termination extensions","example":"creation,creation-with-upload,creation-defer-length,expiration,checksum,termination","enum":["creation,creation-with-upload,creation-defer-length,expiration,checksum,termination"]},"example":"creation,creation-with-upload,creation-defer-length,expiration,checksum,termination"},"Tus-Max-Size":{"description":"tusMaxSize represents the maximum allowed size of an entire upload in bytes.","schema":{"type":"integer","description":"tusMaxSize represents the maximum allowed size of an entire upload in bytes.","example":8712211226016374128,"format":"int64"},"example":8712211226016374128},"Tus-Resumable":{"description":"tusResumable represents a tus protocol version.","schema":{"type":"string","description":"tusResumable represents a tus protocol version.","example":"1.0.0","pattern":"^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(-(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(\\.(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\\+[0-9a-zA-Z-]+(\\.[0-9a-zA-Z-]+)*)?$"},"example":"1.0.0"},"Tus-Version":{"description":"tusVersion is a comma separated list of protocol versions supported by the server. This implementation only supports 1.0.0.","schema":{"type":"string","description":"tusVersion is a comma separated list of protocol versions supported by the server. This implementation only supports 1.0.0.","example":"1.0.0","enum":["1.0.0"]},"example":"1.0.0"}}},"412":{"description":"InvalidTusResumable: If the version specified by the Client is not supported by the Server, it MUST respond with the 412 Precondition Failed status.","headers":{"Tus-Version":{"description":"Comma separated list of supported versions.","schema":{"type":"string","description":"Comma separated list of supported versions.","example":"1.0.0","enum":["1.0.0"]},"example":"1.0.0"}}}}},"post":{"tags":["tus"],"summary":"post tus","description":"Clients use the POST method against a known upload creation URL to request a new upload resource.","operationId":"tus#post","parameters":[{"name":"Tus-Resumable","in":"header","description":"tusResumable represents a tus protocol version.","required":true,"schema":{"type":"string","description":"tusResumable represents a tus protocol version.","example":"1.0.0","pattern":"^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(-(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(\\.(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\\+[0-9a-zA-Z-]+(\\.[0-9a-zA-Z-]+)*)?$"},"example":"1.0.0"},{"name":"Upload-Length","in":"header","description":"uploadLength represents the size of the entire upload in bytes.","schema":{"type":"integer","description":"uploadLength represents the size of the entire upload in bytes.","example":7643821282600180792,"format":"int64"},"example":7643821282600180792},{"name":"Upload-Defer-Length","in":"header","description":"The Upload-Defer-Length request and response header indicates that the size of the upload is not known currently and will be transferred later.","schema":{"type":"integer","description":"The Upload-Defer-Length request and response header indicates that the size of the upload is not known currently and will be transferred later.","example":1,"enum":[1],"format":"int64"},"example":1},{"name":"Upload-Checksum","in":"header","description":"A Client MAY include the Upload-Checksum header in a PATCH request. Once the entire request has been received, the Server MUST verify the uploaded chunk against the provided checksum using the specified algorithm.","schema":{"type":"string","description":"A Client MAY include the Upload-Checksum header in a PATCH request. Once the entire request has been received, the Server MUST verify the uploaded chunk against the provided checksum using the specified algorithm.","example":"sha1 Kq5sNclPz7QV2+lfQIuc6R7oRu0="},"example":"sha1 Kq5sNclPz7QV2+lfQIuc6R7oRu0="},{"name":"Upload-Metadata","in":"header","description":"The Client MAY supply the Upload-Metadata header to add additional metadata to the upload creation request.","schema":{"type":"string","description":"The Client MAY supply the Upload-Metadata header to add additional metadata to the upload creation request.","example":"key1 val1,key2 val2"},"example":"key1 val1,key2 val2"},{"name":"Tus-Max-Size","in":"header","description":"Length of the upload","schema":{"type":"integer","description":"Length of the upload","example":3748981059432342735,"format":"int64"},"example":3748981059432342735}],"responses":{"201":{"description":"Created response.","headers":{"Location":{"description":"URL of created resource","schema":{"type":"string","description":"URL of created resource","example":"/files/123","format":"uri"},"example":"/files/123"},"Tus-Resumable":{"description":"tusResumable represents a tus protocol version.","schema":{"type":"string","description":"tusResumable represents a tus protocol version.","example":"1.0.0","pattern":"^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(-(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(\\.(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\\+[0-9a-zA-Z-]+(\\.[0-9a-zA-Z-]+)*)?$"},"example":"1.0.0"},"Upload-Expires":{"description":"The Upload-Expires response header indicates the time after which the unfinished upload expires.","schema":{"type":"string","description":"The Upload-Expires response header indicates the time after which the unfinished upload expires.","example":"Wed, 25 Jun 2014 16:00:00 GMT"},"example":"Wed, 25 Jun 2014 16:00:00 GMT"},"Upload-Offset":{"description":"uploadOffset represents a byte offset within a resource.","schema":{"type":"integer","description":"uploadOffset represents a byte offset within a resource.","example":3875770313577187398,"format":"int64"},"example":3875770313577187398}}},"400":{"description":"InvalidChecksumAlgorithm: The checksum algorithm is not supported by the server.","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","schema":{"type":"boolean","description":"Is the error a server-side fault?","example":true},"example":true},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","schema":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"example":"123abc"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","schema":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"example":"parameter 'p' must be an integer"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","schema":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"example":"bad_request"},"goa-attribute-temporary":{"description":"Is the error temporary?","schema":{"type":"boolean","description":"Is the error temporary?","example":true},"example":true},"goa-attribute-timeout":{"description":"Is the error a timeout?","schema":{"type":"boolean","description":"Is the error a timeout?","example":false},"example":false}}},"412":{"description":"InvalidTusResumable: If the version specified by the Client is not supported by the Server, it MUST respond with the 412 Precondition Failed status.","headers":{"Tus-Version":{"description":"Comma separated list of supported versions.","schema":{"type":"string","description":"Comma separated list of supported versions.","example":"1.0.0","enum":["1.0.0"]},"example":"1.0.0"}}},"413":{"description":"MaximumSizeExceeded: If the length of the upload exceeds the maximum, which MAY be specified using the Tus-Max-Size header, the Server MUST respond with the 413 Request Entity Too Large status.","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","schema":{"type":"boolean","description":"Is the error a server-side fault?","example":true},"example":true},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","schema":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"example":"123abc"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","schema":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"example":"parameter 'p' must be an integer"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","schema":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"example":"bad_request"},"goa-attribute-temporary":{"description":"Is the error temporary?","schema":{"type":"boolean","description":"Is the error temporary?","example":true},"example":true},"goa-attribute-timeout":{"description":"Is the error a timeout?","schema":{"type":"boolean","description":"Is the error a timeout?","example":false},"example":false}}},"460":{"description":"ChecksumMismatch: The checksums mismatch.","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","schema":{"type":"boolean","description":"Is the error a server-side fault?","example":true},"example":true},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","schema":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"example":"123abc"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","schema":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"example":"parameter 'p' must be an integer"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","schema":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"example":"bad_request"},"goa-attribute-temporary":{"description":"Is the error temporary?","schema":{"type":"boolean","description":"Is the error temporary?","example":true},"example":true},"goa-attribute-timeout":{"description":"Is the error a timeout?","schema":{"type":"boolean","description":"Is the error a timeout?","example":false},"example":false}}}}}},"/upload/{id}":{"delete":{"tags":["tus"],"summary":"delete tus","description":"Clients use the DELETE method to terminate completed and unfinished uploads allowing the Server to free up used resources.","operationId":"tus#delete","parameters":[{"name":"id","in":"path","description":"IDs are generated using Xid: https://github.com/rs/xid","required":true,"schema":{"type":"string","description":"IDs are generated using Xid: https://github.com/rs/xid","example":"fgn8ncu1uo2shoc1tgd3","pattern":"[0-9a-v]{20}"},"example":"fgn8ncu1uo2shoc1tgd3"},{"name":"Tus-Resumable","in":"header","description":"tusResumable represents a tus protocol version.","required":true,"schema":{"type":"string","description":"tusResumable represents a tus protocol version.","example":"1.0.0","pattern":"^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(-(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(\\.(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\\+[0-9a-zA-Z-]+(\\.[0-9a-zA-Z-]+)*)?$"},"example":"1.0.0"}],"responses":{"204":{"description":"No Content response.","headers":{"Tus-Resumable":{"description":"tusResumable represents a tus protocol version.","schema":{"type":"string","description":"tusResumable represents a tus protocol version.","example":"1.0.0","pattern":"^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(-(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(\\.(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\\+[0-9a-zA-Z-]+(\\.[0-9a-zA-Z-]+)*)?$"},"example":"1.0.0"}}},"404":{"description":"NotFound: For all future requests to this URL, the Server SHOULD respond with the 404 Not Found or 410 Gone status.","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","schema":{"type":"boolean","description":"Is the error a server-side fault?","example":true},"example":true},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","schema":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"example":"123abc"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","schema":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"example":"parameter 'p' must be an integer"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","schema":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"example":"bad_request"},"goa-attribute-temporary":{"description":"Is the error temporary?","schema":{"type":"boolean","description":"Is the error temporary?","example":true},"example":true},"goa-attribute-timeout":{"description":"Is the error a timeout?","schema":{"type":"boolean","description":"Is the error a timeout?","example":false},"example":false}}},"410":{"description":"Gone: For all future requests to this URL, the Server SHOULD respond with the 404 Not Found or 410 Gone status.","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","schema":{"type":"boolean","description":"Is the error a server-side fault?","example":true},"example":true},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","schema":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"example":"123abc"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","schema":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"example":"parameter 'p' must be an integer"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","schema":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"example":"bad_request"},"goa-attribute-temporary":{"description":"Is the error temporary?","schema":{"type":"boolean","description":"Is the error temporary?","example":true},"example":true},"goa-attribute-timeout":{"description":"Is the error a timeout?","schema":{"type":"boolean","description":"Is the error a timeout?","example":false},"example":false}}},"412":{"description":"InvalidTusResumable: If the version specified by the Client is not supported by the Server, it MUST respond with the 412 Precondition Failed status.","headers":{"Tus-Version":{"description":"Comma separated list of supported versions.","schema":{"type":"string","description":"Comma separated list of supported versions.","example":"1.0.0","enum":["1.0.0"]},"example":"1.0.0"}}}}},"head":{"tags":["tus"],"summary":"head tus","description":"Clients use the HEAD request to determine the offset at which the upload should be continued.","operationId":"tus#head","parameters":[{"name":"id","in":"path","description":"IDs are generated using Xid: https://github.com/rs/xid","required":true,"schema":{"type":"string","description":"IDs are generated using Xid: https://github.com/rs/xid","example":"9rh2ia73s256mmjr8kpt","pattern":"[0-9a-v]{20}"},"example":"9rh2ia73s256mmjr8kpt"},{"name":"Tus-Resumable","in":"header","description":"tusResumable represents a tus protocol version.","required":true,"schema":{"type":"string","description":"tusResumable represents a tus protocol version.","example":"1.0.0","pattern":"^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(-(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(\\.(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\\+[0-9a-zA-Z-]+(\\.[0-9a-zA-Z-]+)*)?$"},"example":"1.0.0"}],"responses":{"200":{"description":"OK response.","headers":{"Tus-Resumable":{"description":"tusResumable represents a tus protocol version.","schema":{"type":"string","description":"tusResumable represents a tus protocol version.","example":"1.0.0","pattern":"^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(-(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(\\.(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\\+[0-9a-zA-Z-]+(\\.[0-9a-zA-Z-]+)*)?$"},"example":"1.0.0"},"Upload-Defer-Length":{"description":"The Upload-Defer-Length request and response header indicates that the size of the upload is not known currently and will be transferred later.","schema":{"type":"integer","description":"The Upload-Defer-Length request and response header indicates that the size of the upload is not known currently and will be transferred later.","example":1,"enum":[1],"format":"int64"},"example":1},"Upload-Length":{"description":"uploadLength represents the size of the entire upload in bytes.","schema":{"type":"integer","description":"uploadLength represents the size of the entire upload in bytes.","example":4029420343829624487,"format":"int64"},"example":4029420343829624487},"Upload-Metadata":{"description":"The Client MAY supply the Upload-Metadata header to add additional metadata to the upload creation request.","schema":{"type":"string","description":"The Client MAY supply the Upload-Metadata header to add additional metadata to the upload creation request.","example":"key1 val1,key2 val2"},"example":"key1 val1,key2 val2"},"Upload-Offset":{"description":"uploadOffset represents a byte offset within a resource.","schema":{"type":"integer","description":"uploadOffset represents a byte offset within a resource.","example":8805735883885567628,"format":"int64"},"example":8805735883885567628}}},"404":{"description":"NotFound: If the resource is not found, the Server SHOULD return either the 404 Not Found, 410 Gone or 403 Forbidden status without the Upload-Offset header.","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","schema":{"type":"boolean","description":"Is the error a server-side fault?","example":true},"example":true},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","schema":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"example":"123abc"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","schema":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"example":"parameter 'p' must be an integer"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","schema":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"example":"bad_request"},"goa-attribute-temporary":{"description":"Is the error temporary?","schema":{"type":"boolean","description":"Is the error temporary?","example":true},"example":true},"goa-attribute-timeout":{"description":"Is the error a timeout?","schema":{"type":"boolean","description":"Is the error a timeout?","example":false},"example":false}}},"410":{"description":"Gone: If the resource is not found, the Server SHOULD return either the 404 Not Found, 410 Gone or 403 Forbidden status without the Upload-Offset header.","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","schema":{"type":"boolean","description":"Is the error a server-side fault?","example":true},"example":true},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","schema":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"example":"123abc"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","schema":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"example":"parameter 'p' must be an integer"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","schema":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"example":"bad_request"},"goa-attribute-temporary":{"description":"Is the error temporary?","schema":{"type":"boolean","description":"Is the error temporary?","example":true},"example":true},"goa-attribute-timeout":{"description":"Is the error a timeout?","schema":{"type":"boolean","description":"Is the error a timeout?","example":false},"example":false}}},"412":{"description":"InvalidTusResumable: If the version specified by the Client is not supported by the Server, it MUST respond with the 412 Precondition Failed status.","headers":{"Tus-Version":{"description":"Comma separated list of supported versions.","schema":{"type":"string","description":"Comma separated list of supported versions.","example":"1.0.0","enum":["1.0.0"]},"example":"1.0.0"}}}}},"patch":{"tags":["tus"],"summary":"patch tus","description":"Clients use the PATCH method to start or resume an upload.","operationId":"tus#patch","parameters":[{"name":"id","in":"path","description":"IDs are generated using Xid: https://github.com/rs/xid","required":true,"schema":{"type":"string","description":"IDs are generated using Xid: https://github.com/rs/xid","example":"7pc6esaasn4ffl7qlrcf","pattern":"[0-9a-v]{20}"},"example":"7pc6esaasn4ffl7qlrcf"},{"name":"Tus-Resumable","in":"header","description":"tusResumable represents a tus protocol version.","required":true,"schema":{"type":"string","description":"tusResumable represents a tus protocol version.","example":"1.0.0","pattern":"^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(-(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(\\.(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\\+[0-9a-zA-Z-]+(\\.[0-9a-zA-Z-]+)*)?$"},"example":"1.0.0"},{"name":"Upload-Offset","in":"header","description":"uploadOffset represents a byte offset within a resource.","required":true,"schema":{"type":"integer","description":"uploadOffset represents a byte offset within a resource.","example":2754385183630855775,"format":"int64"},"example":2754385183630855775},{"name":"Upload-Checksum","in":"header","description":"A Client MAY include the Upload-Checksum header in a PATCH request. Once the entire request has been received, the Server MUST verify the uploaded chunk against the provided checksum using the specified algorithm.","schema":{"type":"string","description":"A Client MAY include the Upload-Checksum header in a PATCH request. Once the entire request has been received, the Server MUST verify the uploaded chunk against the provided checksum using the specified algorithm.","example":"sha1 Kq5sNclPz7QV2+lfQIuc6R7oRu0="},"example":"sha1 Kq5sNclPz7QV2+lfQIuc6R7oRu0="}],"responses":{"204":{"description":"No Content response.","headers":{"Tus-Resumable":{"description":"tusResumable represents a tus protocol version.","schema":{"type":"string","description":"tusResumable represents a tus protocol version.","example":"1.0.0","pattern":"^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(-(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(\\.(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\\+[0-9a-zA-Z-]+(\\.[0-9a-zA-Z-]+)*)?$"},"example":"1.0.0"},"Upload-Expires":{"description":"The Upload-Expires response header indicates the time after which the unfinished upload expires.","schema":{"type":"string","description":"The Upload-Expires response header indicates the time after which the unfinished upload expires.","example":"Wed, 25 Jun 2014 16:00:00 GMT"},"example":"Wed, 25 Jun 2014 16:00:00 GMT"},"Upload-Offset":{"description":"uploadOffset represents a byte offset within a resource.","schema":{"type":"integer","description":"uploadOffset represents a byte offset within a resource.","example":3831825769931087659,"format":"int64"},"example":3831825769931087659}}},"400":{"description":"InvalidChecksumAlgorithm: The checksum algorithm is not supported by the server.","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","schema":{"type":"boolean","description":"Is the error a server-side fault?","example":true},"example":true},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","schema":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"example":"123abc"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","schema":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"example":"parameter 'p' must be an integer"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","schema":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"example":"bad_request"},"goa-attribute-temporary":{"description":"Is the error temporary?","schema":{"type":"boolean","description":"Is the error temporary?","example":true},"example":true},"goa-attribute-timeout":{"description":"Is the error a timeout?","schema":{"type":"boolean","description":"Is the error a timeout?","example":false},"example":false}}},"404":{"description":"NotFound: If a Client does attempt to resume an upload which has since been removed by the Server, the Server SHOULD respond with the404 Not Found or 410 Gone status.","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","schema":{"type":"boolean","description":"Is the error a server-side fault?","example":true},"example":true},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","schema":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"example":"123abc"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","schema":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"example":"parameter 'p' must be an integer"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","schema":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"example":"bad_request"},"goa-attribute-temporary":{"description":"Is the error temporary?","schema":{"type":"boolean","description":"Is the error temporary?","example":true},"example":true},"goa-attribute-timeout":{"description":"Is the error a timeout?","schema":{"type":"boolean","description":"Is the error a timeout?","example":false},"example":false}}},"409":{"description":"InvalidOffset: If the offsets do not match, the Server MUST respond with the 409 Conflict status without modifying the upload resource.","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","schema":{"type":"boolean","description":"Is the error a server-side fault?","example":true},"example":true},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","schema":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"example":"123abc"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","schema":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"example":"parameter 'p' must be an integer"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","schema":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"example":"bad_request"},"goa-attribute-temporary":{"description":"Is the error temporary?","schema":{"type":"boolean","description":"Is the error temporary?","example":true},"example":true},"goa-attribute-timeout":{"description":"Is the error a timeout?","schema":{"type":"boolean","description":"Is the error a timeout?","example":false},"example":false}}},"410":{"description":"Gone: If a Client does attempt to resume an upload which has since been removed by the Server, the Server SHOULD respond with the404 Not Found or 410 Gone status.","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","schema":{"type":"boolean","description":"Is the error a server-side fault?","example":true},"example":true},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","schema":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"example":"123abc"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","schema":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"example":"parameter 'p' must be an integer"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","schema":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"example":"bad_request"},"goa-attribute-temporary":{"description":"Is the error temporary?","schema":{"type":"boolean","description":"Is the error temporary?","example":true},"example":true},"goa-attribute-timeout":{"description":"Is the error a timeout?","schema":{"type":"boolean","description":"Is the error a timeout?","example":false},"example":false}}},"412":{"description":"InvalidTusResumable: If the version specified by the Client is not supported by the Server, it MUST respond with the 412 Precondition Failed status.","headers":{"Tus-Version":{"description":"Comma separated list of supported versions.","schema":{"type":"string","description":"Comma separated list of supported versions.","example":"1.0.0","enum":["1.0.0"]},"example":"1.0.0"}}},"415":{"description":"InvalidContentType: All PATCH requests MUST use Content-Type: application/offset+octet-stream, otherwise the server SHOULD return a 415 Unsupported Media Type status.","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","schema":{"type":"boolean","description":"Is the error a server-side fault?","example":true},"example":true},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","schema":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"example":"123abc"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","schema":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"example":"parameter 'p' must be an integer"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","schema":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"example":"bad_request"},"goa-attribute-temporary":{"description":"Is the error temporary?","schema":{"type":"boolean","description":"Is the error temporary?","example":true},"example":true},"goa-attribute-timeout":{"description":"Is the error a timeout?","schema":{"type":"boolean","description":"Is the error a timeout?","example":false},"example":false}}},"460":{"description":"ChecksumMismatch: The checksums mismatch.","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","schema":{"type":"boolean","description":"Is the error a server-side fault?","example":true},"example":true},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","schema":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"example":"123abc"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","schema":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"example":"parameter 'p' must be an integer"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","schema":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"example":"bad_request"},"goa-attribute-temporary":{"description":"Is the error temporary?","schema":{"type":"boolean","description":"Is the error temporary?","example":true},"example":true},"goa-attribute-timeout":{"description":"Is the error a timeout?","schema":{"type":"boolean","description":"Is the error a timeout?","example":false},"example":false}}},"500":{"description":"Internal: Internal error","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","schema":{"type":"boolean","description":"Is the error a server-side fault?","example":true},"example":true},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","schema":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"example":"123abc"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","schema":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"example":"parameter 'p' must be an integer"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","schema":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"example":"bad_request"},"goa-attribute-temporary":{"description":"Is the error temporary?","schema":{"type":"boolean","description":"Is the error temporary?","example":true},"example":true},"goa-attribute-timeout":{"description":"Is the error a timeout?","schema":{"type":"boolean","description":"Is the error a timeout?","example":false},"example":false}}}}}}},"components":{},"tags":[{"name":"tus","description":"The tus service exposes the methods required to implement the tus protocol"}]} \ No newline at end of file +{"openapi":"3.2.0","info":{"title":"File Upload Service","description":"HTTP service for uploading files using the tus protocol (https://tus.io)","version":"0.0.1"},"servers":[{"url":"http://localhost:8000/upload","name":"Upload","description":"Upload hosts the upload service."}],"paths":{"/upload":{"options":{"tags":["tus"],"summary":"options tus","description":"Clients use the OPTIONS method to gather information about the Server’s current configuration.","operationId":"tus#options","responses":{"204":{"description":"No Content response.","headers":{"Tus-Checksum-Algorithm":{"description":"A Client MAY include the Upload-Checksum header in a PATCH request. Once the entire request has been received, the Server MUST verify the uploaded chunk against the provided checksum using the specified algorithm.","schema":{"type":"string","description":"A Client MAY include the Upload-Checksum header in a PATCH request. Once the entire request has been received, the Server MUST verify the uploaded chunk against the provided checksum using the specified algorithm.","example":"md5,sha1,crc32","enum":["md5,sha1,crc32"]},"example":"md5,sha1,crc32"},"Tus-Extension":{"description":"tusExtension is a comma separated list of extensions supported by the server. This implementation supports the creation, creation-with-upload, expiration, checksum and termination extensions","schema":{"type":"string","description":"tusExtension is a comma separated list of extensions supported by the server. This implementation supports the creation, creation-with-upload, expiration, checksum and termination extensions","example":"creation,creation-with-upload,creation-defer-length,expiration,checksum,termination","enum":["creation,creation-with-upload,creation-defer-length,expiration,checksum,termination"]},"example":"creation,creation-with-upload,creation-defer-length,expiration,checksum,termination"},"Tus-Max-Size":{"description":"tusMaxSize represents the maximum allowed size of an entire upload in bytes.","schema":{"type":"integer","description":"tusMaxSize represents the maximum allowed size of an entire upload in bytes.","example":8712211226016374128,"format":"int64"},"example":8712211226016374128},"Tus-Resumable":{"description":"tusResumable represents a tus protocol version.","schema":{"type":"string","description":"tusResumable represents a tus protocol version.","example":"1.0.0","pattern":"^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(-(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(\\.(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\\+[0-9a-zA-Z-]+(\\.[0-9a-zA-Z-]+)*)?$"},"example":"1.0.0"},"Tus-Version":{"description":"tusVersion is a comma separated list of protocol versions supported by the server. This implementation only supports 1.0.0.","schema":{"type":"string","description":"tusVersion is a comma separated list of protocol versions supported by the server. This implementation only supports 1.0.0.","example":"1.0.0","enum":["1.0.0"]},"example":"1.0.0"}}},"412":{"description":"InvalidTusResumable: If the version specified by the Client is not supported by the Server, it MUST respond with the 412 Precondition Failed status.","headers":{"Tus-Version":{"description":"Comma separated list of supported versions.","schema":{"type":"string","description":"Comma separated list of supported versions.","example":"1.0.0","enum":["1.0.0"]},"example":"1.0.0"}}}}},"post":{"tags":["tus"],"summary":"post tus","description":"Clients use the POST method against a known upload creation URL to request a new upload resource.","operationId":"tus#post","parameters":[{"name":"Tus-Resumable","in":"header","description":"tusResumable represents a tus protocol version.","required":true,"schema":{"type":"string","description":"tusResumable represents a tus protocol version.","example":"1.0.0","pattern":"^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(-(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(\\.(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\\+[0-9a-zA-Z-]+(\\.[0-9a-zA-Z-]+)*)?$"},"example":"1.0.0"},{"name":"Upload-Length","in":"header","description":"uploadLength represents the size of the entire upload in bytes.","schema":{"type":"integer","description":"uploadLength represents the size of the entire upload in bytes.","example":7643821282600180792,"format":"int64"},"example":7643821282600180792},{"name":"Upload-Defer-Length","in":"header","description":"The Upload-Defer-Length request and response header indicates that the size of the upload is not known currently and will be transferred later.","schema":{"type":"integer","description":"The Upload-Defer-Length request and response header indicates that the size of the upload is not known currently and will be transferred later.","example":1,"enum":[1],"format":"int64"},"example":1},{"name":"Upload-Checksum","in":"header","description":"A Client MAY include the Upload-Checksum header in a PATCH request. Once the entire request has been received, the Server MUST verify the uploaded chunk against the provided checksum using the specified algorithm.","schema":{"type":"string","description":"A Client MAY include the Upload-Checksum header in a PATCH request. Once the entire request has been received, the Server MUST verify the uploaded chunk against the provided checksum using the specified algorithm.","example":"sha1 Kq5sNclPz7QV2+lfQIuc6R7oRu0="},"example":"sha1 Kq5sNclPz7QV2+lfQIuc6R7oRu0="},{"name":"Upload-Metadata","in":"header","description":"The Client MAY supply the Upload-Metadata header to add additional metadata to the upload creation request.","schema":{"type":"string","description":"The Client MAY supply the Upload-Metadata header to add additional metadata to the upload creation request.","example":"key1 val1,key2 val2"},"example":"key1 val1,key2 val2"},{"name":"Tus-Max-Size","in":"header","description":"Length of the upload","schema":{"type":"integer","description":"Length of the upload","example":3748981059432342735,"format":"int64"},"example":3748981059432342735}],"responses":{"201":{"description":"Created response.","headers":{"Location":{"description":"URL of created resource","schema":{"type":"string","description":"URL of created resource","example":"/files/123","format":"uri"},"example":"/files/123"},"Tus-Resumable":{"description":"tusResumable represents a tus protocol version.","schema":{"type":"string","description":"tusResumable represents a tus protocol version.","example":"1.0.0","pattern":"^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(-(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(\\.(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\\+[0-9a-zA-Z-]+(\\.[0-9a-zA-Z-]+)*)?$"},"example":"1.0.0"},"Upload-Expires":{"description":"The Upload-Expires response header indicates the time after which the unfinished upload expires.","schema":{"type":"string","description":"The Upload-Expires response header indicates the time after which the unfinished upload expires.","example":"Wed, 25 Jun 2014 16:00:00 GMT"},"example":"Wed, 25 Jun 2014 16:00:00 GMT"},"Upload-Offset":{"description":"uploadOffset represents a byte offset within a resource.","schema":{"type":"integer","description":"uploadOffset represents a byte offset within a resource.","example":3875770313577187398,"format":"int64"},"example":3875770313577187398}}},"400":{"description":"InvalidChecksumAlgorithm: The checksum algorithm is not supported by the server.","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","schema":{"type":"boolean","description":"Is the error a server-side fault?","example":true},"example":true},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","schema":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"example":"123abc"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","schema":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"example":"parameter 'p' must be an integer"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","schema":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"example":"bad_request"},"goa-attribute-temporary":{"description":"Is the error temporary?","schema":{"type":"boolean","description":"Is the error temporary?","example":true},"example":true},"goa-attribute-timeout":{"description":"Is the error a timeout?","schema":{"type":"boolean","description":"Is the error a timeout?","example":false},"example":false}}},"412":{"description":"InvalidTusResumable: If the version specified by the Client is not supported by the Server, it MUST respond with the 412 Precondition Failed status.","headers":{"Tus-Version":{"description":"Comma separated list of supported versions.","schema":{"type":"string","description":"Comma separated list of supported versions.","example":"1.0.0","enum":["1.0.0"]},"example":"1.0.0"}}},"413":{"description":"MaximumSizeExceeded: If the length of the upload exceeds the maximum, which MAY be specified using the Tus-Max-Size header, the Server MUST respond with the 413 Request Entity Too Large status.","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","schema":{"type":"boolean","description":"Is the error a server-side fault?","example":true},"example":true},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","schema":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"example":"123abc"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","schema":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"example":"parameter 'p' must be an integer"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","schema":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"example":"bad_request"},"goa-attribute-temporary":{"description":"Is the error temporary?","schema":{"type":"boolean","description":"Is the error temporary?","example":true},"example":true},"goa-attribute-timeout":{"description":"Is the error a timeout?","schema":{"type":"boolean","description":"Is the error a timeout?","example":false},"example":false}}},"460":{"description":"ChecksumMismatch: The checksums mismatch.","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","schema":{"type":"boolean","description":"Is the error a server-side fault?","example":true},"example":true},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","schema":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"example":"123abc"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","schema":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"example":"parameter 'p' must be an integer"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","schema":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"example":"bad_request"},"goa-attribute-temporary":{"description":"Is the error temporary?","schema":{"type":"boolean","description":"Is the error temporary?","example":true},"example":true},"goa-attribute-timeout":{"description":"Is the error a timeout?","schema":{"type":"boolean","description":"Is the error a timeout?","example":false},"example":false}}}}}},"/upload/{id}":{"delete":{"tags":["tus"],"summary":"delete tus","description":"Clients use the DELETE method to terminate completed and unfinished uploads allowing the Server to free up used resources.","operationId":"tus#delete","parameters":[{"name":"id","in":"path","description":"IDs are generated using Xid: https://github.com/rs/xid","required":true,"schema":{"type":"string","description":"IDs are generated using Xid: https://github.com/rs/xid","example":"fgn8ncu1uo2shoc1tgd3","pattern":"[0-9a-v]{20}"},"example":"fgn8ncu1uo2shoc1tgd3"},{"name":"Tus-Resumable","in":"header","description":"tusResumable represents a tus protocol version.","required":true,"schema":{"type":"string","description":"tusResumable represents a tus protocol version.","example":"1.0.0","pattern":"^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(-(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(\\.(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\\+[0-9a-zA-Z-]+(\\.[0-9a-zA-Z-]+)*)?$"},"example":"1.0.0"}],"responses":{"204":{"description":"No Content response.","headers":{"Tus-Resumable":{"description":"tusResumable represents a tus protocol version.","schema":{"type":"string","description":"tusResumable represents a tus protocol version.","example":"1.0.0","pattern":"^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(-(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(\\.(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\\+[0-9a-zA-Z-]+(\\.[0-9a-zA-Z-]+)*)?$"},"example":"1.0.0"}}},"404":{"description":"NotFound: For all future requests to this URL, the Server SHOULD respond with the 404 Not Found or 410 Gone status.","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","schema":{"type":"boolean","description":"Is the error a server-side fault?","example":true},"example":true},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","schema":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"example":"123abc"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","schema":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"example":"parameter 'p' must be an integer"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","schema":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"example":"bad_request"},"goa-attribute-temporary":{"description":"Is the error temporary?","schema":{"type":"boolean","description":"Is the error temporary?","example":true},"example":true},"goa-attribute-timeout":{"description":"Is the error a timeout?","schema":{"type":"boolean","description":"Is the error a timeout?","example":false},"example":false}}},"410":{"description":"Gone: For all future requests to this URL, the Server SHOULD respond with the 404 Not Found or 410 Gone status.","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","schema":{"type":"boolean","description":"Is the error a server-side fault?","example":true},"example":true},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","schema":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"example":"123abc"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","schema":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"example":"parameter 'p' must be an integer"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","schema":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"example":"bad_request"},"goa-attribute-temporary":{"description":"Is the error temporary?","schema":{"type":"boolean","description":"Is the error temporary?","example":true},"example":true},"goa-attribute-timeout":{"description":"Is the error a timeout?","schema":{"type":"boolean","description":"Is the error a timeout?","example":false},"example":false}}},"412":{"description":"InvalidTusResumable: If the version specified by the Client is not supported by the Server, it MUST respond with the 412 Precondition Failed status.","headers":{"Tus-Version":{"description":"Comma separated list of supported versions.","schema":{"type":"string","description":"Comma separated list of supported versions.","example":"1.0.0","enum":["1.0.0"]},"example":"1.0.0"}}}}},"head":{"tags":["tus"],"summary":"head tus","description":"Clients use the HEAD request to determine the offset at which the upload should be continued.","operationId":"tus#head","parameters":[{"name":"id","in":"path","description":"IDs are generated using Xid: https://github.com/rs/xid","required":true,"schema":{"type":"string","description":"IDs are generated using Xid: https://github.com/rs/xid","example":"9rh2ia73s256mmjr8kpt","pattern":"[0-9a-v]{20}"},"example":"9rh2ia73s256mmjr8kpt"},{"name":"Tus-Resumable","in":"header","description":"tusResumable represents a tus protocol version.","required":true,"schema":{"type":"string","description":"tusResumable represents a tus protocol version.","example":"1.0.0","pattern":"^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(-(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(\\.(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\\+[0-9a-zA-Z-]+(\\.[0-9a-zA-Z-]+)*)?$"},"example":"1.0.0"}],"responses":{"200":{"description":"OK response.","headers":{"Tus-Resumable":{"description":"tusResumable represents a tus protocol version.","schema":{"type":"string","description":"tusResumable represents a tus protocol version.","example":"1.0.0","pattern":"^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(-(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(\\.(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\\+[0-9a-zA-Z-]+(\\.[0-9a-zA-Z-]+)*)?$"},"example":"1.0.0"},"Upload-Defer-Length":{"description":"The Upload-Defer-Length request and response header indicates that the size of the upload is not known currently and will be transferred later.","schema":{"type":"integer","description":"The Upload-Defer-Length request and response header indicates that the size of the upload is not known currently and will be transferred later.","example":1,"enum":[1],"format":"int64"},"example":1},"Upload-Length":{"description":"uploadLength represents the size of the entire upload in bytes.","schema":{"type":"integer","description":"uploadLength represents the size of the entire upload in bytes.","example":4029420343829624487,"format":"int64"},"example":4029420343829624487},"Upload-Metadata":{"description":"The Client MAY supply the Upload-Metadata header to add additional metadata to the upload creation request.","schema":{"type":"string","description":"The Client MAY supply the Upload-Metadata header to add additional metadata to the upload creation request.","example":"key1 val1,key2 val2"},"example":"key1 val1,key2 val2"},"Upload-Offset":{"description":"uploadOffset represents a byte offset within a resource.","schema":{"type":"integer","description":"uploadOffset represents a byte offset within a resource.","example":8805735883885567628,"format":"int64"},"example":8805735883885567628}}},"404":{"description":"NotFound: If the resource is not found, the Server SHOULD return either the 404 Not Found, 410 Gone or 403 Forbidden status without the Upload-Offset header.","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","schema":{"type":"boolean","description":"Is the error a server-side fault?","example":true},"example":true},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","schema":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"example":"123abc"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","schema":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"example":"parameter 'p' must be an integer"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","schema":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"example":"bad_request"},"goa-attribute-temporary":{"description":"Is the error temporary?","schema":{"type":"boolean","description":"Is the error temporary?","example":true},"example":true},"goa-attribute-timeout":{"description":"Is the error a timeout?","schema":{"type":"boolean","description":"Is the error a timeout?","example":false},"example":false}}},"410":{"description":"Gone: If the resource is not found, the Server SHOULD return either the 404 Not Found, 410 Gone or 403 Forbidden status without the Upload-Offset header.","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","schema":{"type":"boolean","description":"Is the error a server-side fault?","example":true},"example":true},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","schema":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"example":"123abc"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","schema":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"example":"parameter 'p' must be an integer"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","schema":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"example":"bad_request"},"goa-attribute-temporary":{"description":"Is the error temporary?","schema":{"type":"boolean","description":"Is the error temporary?","example":true},"example":true},"goa-attribute-timeout":{"description":"Is the error a timeout?","schema":{"type":"boolean","description":"Is the error a timeout?","example":false},"example":false}}},"412":{"description":"InvalidTusResumable: If the version specified by the Client is not supported by the Server, it MUST respond with the 412 Precondition Failed status.","headers":{"Tus-Version":{"description":"Comma separated list of supported versions.","schema":{"type":"string","description":"Comma separated list of supported versions.","example":"1.0.0","enum":["1.0.0"]},"example":"1.0.0"}}}}},"patch":{"tags":["tus"],"summary":"patch tus","description":"Clients use the PATCH method to start or resume an upload.","operationId":"tus#patch","parameters":[{"name":"id","in":"path","description":"IDs are generated using Xid: https://github.com/rs/xid","required":true,"schema":{"type":"string","description":"IDs are generated using Xid: https://github.com/rs/xid","example":"7pc6esaasn4ffl7qlrcf","pattern":"[0-9a-v]{20}"},"example":"7pc6esaasn4ffl7qlrcf"},{"name":"Content-Type","in":"header","description":"Media type of the uploaded bytes.","required":true,"schema":{"type":"string","description":"Media type of the uploaded bytes.","example":"application/offset+octet-stream"},"example":"application/offset+octet-stream"},{"name":"Tus-Resumable","in":"header","description":"tusResumable represents a tus protocol version.","required":true,"schema":{"type":"string","description":"tusResumable represents a tus protocol version.","example":"1.0.0","pattern":"^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(-(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(\\.(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\\+[0-9a-zA-Z-]+(\\.[0-9a-zA-Z-]+)*)?$"},"example":"1.0.0"},{"name":"Upload-Offset","in":"header","description":"uploadOffset represents a byte offset within a resource.","required":true,"schema":{"type":"integer","description":"uploadOffset represents a byte offset within a resource.","example":2754385183630855775,"format":"int64"},"example":2754385183630855775},{"name":"Upload-Checksum","in":"header","description":"A Client MAY include the Upload-Checksum header in a PATCH request. Once the entire request has been received, the Server MUST verify the uploaded chunk against the provided checksum using the specified algorithm.","schema":{"type":"string","description":"A Client MAY include the Upload-Checksum header in a PATCH request. Once the entire request has been received, the Server MUST verify the uploaded chunk against the provided checksum using the specified algorithm.","example":"sha1 Kq5sNclPz7QV2+lfQIuc6R7oRu0="},"example":"sha1 Kq5sNclPz7QV2+lfQIuc6R7oRu0="}],"responses":{"204":{"description":"No Content response.","headers":{"Tus-Resumable":{"description":"tusResumable represents a tus protocol version.","schema":{"type":"string","description":"tusResumable represents a tus protocol version.","example":"1.0.0","pattern":"^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(-(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(\\.(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\\+[0-9a-zA-Z-]+(\\.[0-9a-zA-Z-]+)*)?$"},"example":"1.0.0"},"Upload-Expires":{"description":"The Upload-Expires response header indicates the time after which the unfinished upload expires.","schema":{"type":"string","description":"The Upload-Expires response header indicates the time after which the unfinished upload expires.","example":"Wed, 25 Jun 2014 16:00:00 GMT"},"example":"Wed, 25 Jun 2014 16:00:00 GMT"},"Upload-Offset":{"description":"uploadOffset represents a byte offset within a resource.","schema":{"type":"integer","description":"uploadOffset represents a byte offset within a resource.","example":3831825769931087659,"format":"int64"},"example":3831825769931087659}}},"400":{"description":"InvalidChecksumAlgorithm: The checksum algorithm is not supported by the server.","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","schema":{"type":"boolean","description":"Is the error a server-side fault?","example":true},"example":true},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","schema":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"example":"123abc"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","schema":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"example":"parameter 'p' must be an integer"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","schema":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"example":"bad_request"},"goa-attribute-temporary":{"description":"Is the error temporary?","schema":{"type":"boolean","description":"Is the error temporary?","example":true},"example":true},"goa-attribute-timeout":{"description":"Is the error a timeout?","schema":{"type":"boolean","description":"Is the error a timeout?","example":false},"example":false}}},"404":{"description":"NotFound: If a Client does attempt to resume an upload which has since been removed by the Server, the Server SHOULD respond with the404 Not Found or 410 Gone status.","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","schema":{"type":"boolean","description":"Is the error a server-side fault?","example":true},"example":true},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","schema":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"example":"123abc"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","schema":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"example":"parameter 'p' must be an integer"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","schema":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"example":"bad_request"},"goa-attribute-temporary":{"description":"Is the error temporary?","schema":{"type":"boolean","description":"Is the error temporary?","example":true},"example":true},"goa-attribute-timeout":{"description":"Is the error a timeout?","schema":{"type":"boolean","description":"Is the error a timeout?","example":false},"example":false}}},"409":{"description":"InvalidOffset: If the offsets do not match, the Server MUST respond with the 409 Conflict status without modifying the upload resource.","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","schema":{"type":"boolean","description":"Is the error a server-side fault?","example":true},"example":true},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","schema":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"example":"123abc"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","schema":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"example":"parameter 'p' must be an integer"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","schema":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"example":"bad_request"},"goa-attribute-temporary":{"description":"Is the error temporary?","schema":{"type":"boolean","description":"Is the error temporary?","example":true},"example":true},"goa-attribute-timeout":{"description":"Is the error a timeout?","schema":{"type":"boolean","description":"Is the error a timeout?","example":false},"example":false}}},"410":{"description":"Gone: If a Client does attempt to resume an upload which has since been removed by the Server, the Server SHOULD respond with the404 Not Found or 410 Gone status.","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","schema":{"type":"boolean","description":"Is the error a server-side fault?","example":true},"example":true},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","schema":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"example":"123abc"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","schema":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"example":"parameter 'p' must be an integer"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","schema":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"example":"bad_request"},"goa-attribute-temporary":{"description":"Is the error temporary?","schema":{"type":"boolean","description":"Is the error temporary?","example":true},"example":true},"goa-attribute-timeout":{"description":"Is the error a timeout?","schema":{"type":"boolean","description":"Is the error a timeout?","example":false},"example":false}}},"412":{"description":"InvalidTusResumable: If the version specified by the Client is not supported by the Server, it MUST respond with the 412 Precondition Failed status.","headers":{"Tus-Version":{"description":"Comma separated list of supported versions.","schema":{"type":"string","description":"Comma separated list of supported versions.","example":"1.0.0","enum":["1.0.0"]},"example":"1.0.0"}}},"415":{"description":"InvalidContentType: All PATCH requests MUST use Content-Type: application/offset+octet-stream, otherwise the server SHOULD return a 415 Unsupported Media Type status.","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","schema":{"type":"boolean","description":"Is the error a server-side fault?","example":true},"example":true},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","schema":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"example":"123abc"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","schema":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"example":"parameter 'p' must be an integer"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","schema":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"example":"bad_request"},"goa-attribute-temporary":{"description":"Is the error temporary?","schema":{"type":"boolean","description":"Is the error temporary?","example":true},"example":true},"goa-attribute-timeout":{"description":"Is the error a timeout?","schema":{"type":"boolean","description":"Is the error a timeout?","example":false},"example":false}}},"460":{"description":"ChecksumMismatch: The checksums mismatch.","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","schema":{"type":"boolean","description":"Is the error a server-side fault?","example":true},"example":true},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","schema":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"example":"123abc"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","schema":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"example":"parameter 'p' must be an integer"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","schema":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"example":"bad_request"},"goa-attribute-temporary":{"description":"Is the error temporary?","schema":{"type":"boolean","description":"Is the error temporary?","example":true},"example":true},"goa-attribute-timeout":{"description":"Is the error a timeout?","schema":{"type":"boolean","description":"Is the error a timeout?","example":false},"example":false}}},"500":{"description":"Internal: Internal error","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","schema":{"type":"boolean","description":"Is the error a server-side fault?","example":true},"example":true},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","schema":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"example":"123abc"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","schema":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"example":"parameter 'p' must be an integer"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","schema":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"example":"bad_request"},"goa-attribute-temporary":{"description":"Is the error temporary?","schema":{"type":"boolean","description":"Is the error temporary?","example":true},"example":true},"goa-attribute-timeout":{"description":"Is the error a timeout?","schema":{"type":"boolean","description":"Is the error a timeout?","example":false},"example":false}}}}}}},"components":{},"tags":[{"name":"tus","description":"The tus service exposes the methods required to implement the tus protocol"}]} \ No newline at end of file diff --git a/tus/gen/http/openapi3.2.yaml b/tus/gen/http/openapi3.2.yaml index ab41feb7d..5ce4dec33 100644 --- a/tus/gen/http/openapi3.2.yaml +++ b/tus/gen/http/openapi3.2.yaml @@ -651,6 +651,15 @@ paths: example: 7pc6esaasn4ffl7qlrcf pattern: '[0-9a-v]{20}' example: 7pc6esaasn4ffl7qlrcf + - name: Content-Type + in: header + description: Media type of the uploaded bytes. + required: true + schema: + type: string + description: Media type of the uploaded bytes. + example: application/offset+octet-stream + example: application/offset+octet-stream - name: Tus-Resumable in: header description: tusResumable represents a tus protocol version. diff --git a/tus/gen/http/openapi3.json b/tus/gen/http/openapi3.json index 8e017ae03..ad6d0260b 100644 --- a/tus/gen/http/openapi3.json +++ b/tus/gen/http/openapi3.json @@ -1 +1 @@ -{"openapi":"3.0.3","info":{"title":"File Upload Service","description":"HTTP service for uploading files using the tus protocol (https://tus.io)","version":"0.0.1"},"servers":[{"url":"http://localhost:8000/upload","description":"Upload hosts the upload service."}],"paths":{"/upload":{"options":{"tags":["tus"],"summary":"options tus","description":"Clients use the OPTIONS method to gather information about the Server’s current configuration.","operationId":"tus#options","responses":{"204":{"description":"No Content response.","headers":{"Tus-Checksum-Algorithm":{"description":"A Client MAY include the Upload-Checksum header in a PATCH request. Once the entire request has been received, the Server MUST verify the uploaded chunk against the provided checksum using the specified algorithm.","schema":{"type":"string","description":"A Client MAY include the Upload-Checksum header in a PATCH request. Once the entire request has been received, the Server MUST verify the uploaded chunk against the provided checksum using the specified algorithm.","example":"md5,sha1,crc32","enum":["md5,sha1,crc32"]},"example":"md5,sha1,crc32"},"Tus-Extension":{"description":"tusExtension is a comma separated list of extensions supported by the server. This implementation supports the creation, creation-with-upload, expiration, checksum and termination extensions","schema":{"type":"string","description":"tusExtension is a comma separated list of extensions supported by the server. This implementation supports the creation, creation-with-upload, expiration, checksum and termination extensions","example":"creation,creation-with-upload,creation-defer-length,expiration,checksum,termination","enum":["creation,creation-with-upload,creation-defer-length,expiration,checksum,termination"]},"example":"creation,creation-with-upload,creation-defer-length,expiration,checksum,termination"},"Tus-Max-Size":{"description":"tusMaxSize represents the maximum allowed size of an entire upload in bytes.","schema":{"type":"integer","description":"tusMaxSize represents the maximum allowed size of an entire upload in bytes.","example":8712211226016374128,"format":"int64"},"example":8712211226016374128},"Tus-Resumable":{"description":"tusResumable represents a tus protocol version.","schema":{"type":"string","description":"tusResumable represents a tus protocol version.","example":"1.0.0","pattern":"^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(-(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(\\.(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\\+[0-9a-zA-Z-]+(\\.[0-9a-zA-Z-]+)*)?$"},"example":"1.0.0"},"Tus-Version":{"description":"tusVersion is a comma separated list of protocol versions supported by the server. This implementation only supports 1.0.0.","schema":{"type":"string","description":"tusVersion is a comma separated list of protocol versions supported by the server. This implementation only supports 1.0.0.","example":"1.0.0","enum":["1.0.0"]},"example":"1.0.0"}}},"412":{"description":"InvalidTusResumable: If the version specified by the Client is not supported by the Server, it MUST respond with the 412 Precondition Failed status.","headers":{"Tus-Version":{"description":"Comma separated list of supported versions.","schema":{"type":"string","description":"Comma separated list of supported versions.","example":"1.0.0","enum":["1.0.0"]},"example":"1.0.0"}}}}},"post":{"tags":["tus"],"summary":"post tus","description":"Clients use the POST method against a known upload creation URL to request a new upload resource.","operationId":"tus#post","parameters":[{"name":"Tus-Resumable","in":"header","description":"tusResumable represents a tus protocol version.","required":true,"schema":{"type":"string","description":"tusResumable represents a tus protocol version.","example":"1.0.0","pattern":"^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(-(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(\\.(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\\+[0-9a-zA-Z-]+(\\.[0-9a-zA-Z-]+)*)?$"},"example":"1.0.0"},{"name":"Upload-Length","in":"header","description":"uploadLength represents the size of the entire upload in bytes.","schema":{"type":"integer","description":"uploadLength represents the size of the entire upload in bytes.","example":7643821282600180792,"format":"int64"},"example":7643821282600180792},{"name":"Upload-Defer-Length","in":"header","description":"The Upload-Defer-Length request and response header indicates that the size of the upload is not known currently and will be transferred later.","schema":{"type":"integer","description":"The Upload-Defer-Length request and response header indicates that the size of the upload is not known currently and will be transferred later.","example":1,"enum":[1],"format":"int64"},"example":1},{"name":"Upload-Checksum","in":"header","description":"A Client MAY include the Upload-Checksum header in a PATCH request. Once the entire request has been received, the Server MUST verify the uploaded chunk against the provided checksum using the specified algorithm.","schema":{"type":"string","description":"A Client MAY include the Upload-Checksum header in a PATCH request. Once the entire request has been received, the Server MUST verify the uploaded chunk against the provided checksum using the specified algorithm.","example":"sha1 Kq5sNclPz7QV2+lfQIuc6R7oRu0="},"example":"sha1 Kq5sNclPz7QV2+lfQIuc6R7oRu0="},{"name":"Upload-Metadata","in":"header","description":"The Client MAY supply the Upload-Metadata header to add additional metadata to the upload creation request.","schema":{"type":"string","description":"The Client MAY supply the Upload-Metadata header to add additional metadata to the upload creation request.","example":"key1 val1,key2 val2"},"example":"key1 val1,key2 val2"},{"name":"Tus-Max-Size","in":"header","description":"Length of the upload","schema":{"type":"integer","description":"Length of the upload","example":3748981059432342735,"format":"int64"},"example":3748981059432342735}],"responses":{"201":{"description":"Created response.","headers":{"Location":{"description":"URL of created resource","schema":{"type":"string","description":"URL of created resource","example":"/files/123","format":"uri"},"example":"/files/123"},"Tus-Resumable":{"description":"tusResumable represents a tus protocol version.","schema":{"type":"string","description":"tusResumable represents a tus protocol version.","example":"1.0.0","pattern":"^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(-(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(\\.(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\\+[0-9a-zA-Z-]+(\\.[0-9a-zA-Z-]+)*)?$"},"example":"1.0.0"},"Upload-Expires":{"description":"The Upload-Expires response header indicates the time after which the unfinished upload expires.","schema":{"type":"string","description":"The Upload-Expires response header indicates the time after which the unfinished upload expires.","example":"Wed, 25 Jun 2014 16:00:00 GMT"},"example":"Wed, 25 Jun 2014 16:00:00 GMT"},"Upload-Offset":{"description":"uploadOffset represents a byte offset within a resource.","schema":{"type":"integer","description":"uploadOffset represents a byte offset within a resource.","example":3875770313577187398,"format":"int64"},"example":3875770313577187398}}},"400":{"description":"InvalidChecksumAlgorithm: The checksum algorithm is not supported by the server.","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","schema":{"type":"boolean","description":"Is the error a server-side fault?","example":true},"example":true},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","schema":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"example":"123abc"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","schema":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"example":"parameter 'p' must be an integer"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","schema":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"example":"bad_request"},"goa-attribute-temporary":{"description":"Is the error temporary?","schema":{"type":"boolean","description":"Is the error temporary?","example":true},"example":true},"goa-attribute-timeout":{"description":"Is the error a timeout?","schema":{"type":"boolean","description":"Is the error a timeout?","example":false},"example":false}}},"412":{"description":"InvalidTusResumable: If the version specified by the Client is not supported by the Server, it MUST respond with the 412 Precondition Failed status.","headers":{"Tus-Version":{"description":"Comma separated list of supported versions.","schema":{"type":"string","description":"Comma separated list of supported versions.","example":"1.0.0","enum":["1.0.0"]},"example":"1.0.0"}}},"413":{"description":"MaximumSizeExceeded: If the length of the upload exceeds the maximum, which MAY be specified using the Tus-Max-Size header, the Server MUST respond with the 413 Request Entity Too Large status.","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","schema":{"type":"boolean","description":"Is the error a server-side fault?","example":true},"example":true},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","schema":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"example":"123abc"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","schema":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"example":"parameter 'p' must be an integer"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","schema":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"example":"bad_request"},"goa-attribute-temporary":{"description":"Is the error temporary?","schema":{"type":"boolean","description":"Is the error temporary?","example":true},"example":true},"goa-attribute-timeout":{"description":"Is the error a timeout?","schema":{"type":"boolean","description":"Is the error a timeout?","example":false},"example":false}}},"460":{"description":"ChecksumMismatch: The checksums mismatch.","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","schema":{"type":"boolean","description":"Is the error a server-side fault?","example":true},"example":true},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","schema":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"example":"123abc"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","schema":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"example":"parameter 'p' must be an integer"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","schema":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"example":"bad_request"},"goa-attribute-temporary":{"description":"Is the error temporary?","schema":{"type":"boolean","description":"Is the error temporary?","example":true},"example":true},"goa-attribute-timeout":{"description":"Is the error a timeout?","schema":{"type":"boolean","description":"Is the error a timeout?","example":false},"example":false}}}}}},"/upload/{id}":{"delete":{"tags":["tus"],"summary":"delete tus","description":"Clients use the DELETE method to terminate completed and unfinished uploads allowing the Server to free up used resources.","operationId":"tus#delete","parameters":[{"name":"id","in":"path","description":"IDs are generated using Xid: https://github.com/rs/xid","required":true,"schema":{"type":"string","description":"IDs are generated using Xid: https://github.com/rs/xid","example":"fgn8ncu1uo2shoc1tgd3","pattern":"[0-9a-v]{20}"},"example":"fgn8ncu1uo2shoc1tgd3"},{"name":"Tus-Resumable","in":"header","description":"tusResumable represents a tus protocol version.","required":true,"schema":{"type":"string","description":"tusResumable represents a tus protocol version.","example":"1.0.0","pattern":"^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(-(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(\\.(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\\+[0-9a-zA-Z-]+(\\.[0-9a-zA-Z-]+)*)?$"},"example":"1.0.0"}],"responses":{"204":{"description":"No Content response.","headers":{"Tus-Resumable":{"description":"tusResumable represents a tus protocol version.","schema":{"type":"string","description":"tusResumable represents a tus protocol version.","example":"1.0.0","pattern":"^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(-(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(\\.(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\\+[0-9a-zA-Z-]+(\\.[0-9a-zA-Z-]+)*)?$"},"example":"1.0.0"}}},"404":{"description":"NotFound: For all future requests to this URL, the Server SHOULD respond with the 404 Not Found or 410 Gone status.","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","schema":{"type":"boolean","description":"Is the error a server-side fault?","example":true},"example":true},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","schema":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"example":"123abc"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","schema":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"example":"parameter 'p' must be an integer"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","schema":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"example":"bad_request"},"goa-attribute-temporary":{"description":"Is the error temporary?","schema":{"type":"boolean","description":"Is the error temporary?","example":true},"example":true},"goa-attribute-timeout":{"description":"Is the error a timeout?","schema":{"type":"boolean","description":"Is the error a timeout?","example":false},"example":false}}},"410":{"description":"Gone: For all future requests to this URL, the Server SHOULD respond with the 404 Not Found or 410 Gone status.","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","schema":{"type":"boolean","description":"Is the error a server-side fault?","example":true},"example":true},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","schema":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"example":"123abc"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","schema":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"example":"parameter 'p' must be an integer"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","schema":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"example":"bad_request"},"goa-attribute-temporary":{"description":"Is the error temporary?","schema":{"type":"boolean","description":"Is the error temporary?","example":true},"example":true},"goa-attribute-timeout":{"description":"Is the error a timeout?","schema":{"type":"boolean","description":"Is the error a timeout?","example":false},"example":false}}},"412":{"description":"InvalidTusResumable: If the version specified by the Client is not supported by the Server, it MUST respond with the 412 Precondition Failed status.","headers":{"Tus-Version":{"description":"Comma separated list of supported versions.","schema":{"type":"string","description":"Comma separated list of supported versions.","example":"1.0.0","enum":["1.0.0"]},"example":"1.0.0"}}}}},"head":{"tags":["tus"],"summary":"head tus","description":"Clients use the HEAD request to determine the offset at which the upload should be continued.","operationId":"tus#head","parameters":[{"name":"id","in":"path","description":"IDs are generated using Xid: https://github.com/rs/xid","required":true,"schema":{"type":"string","description":"IDs are generated using Xid: https://github.com/rs/xid","example":"9rh2ia73s256mmjr8kpt","pattern":"[0-9a-v]{20}"},"example":"9rh2ia73s256mmjr8kpt"},{"name":"Tus-Resumable","in":"header","description":"tusResumable represents a tus protocol version.","required":true,"schema":{"type":"string","description":"tusResumable represents a tus protocol version.","example":"1.0.0","pattern":"^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(-(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(\\.(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\\+[0-9a-zA-Z-]+(\\.[0-9a-zA-Z-]+)*)?$"},"example":"1.0.0"}],"responses":{"200":{"description":"OK response.","headers":{"Tus-Resumable":{"description":"tusResumable represents a tus protocol version.","schema":{"type":"string","description":"tusResumable represents a tus protocol version.","example":"1.0.0","pattern":"^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(-(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(\\.(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\\+[0-9a-zA-Z-]+(\\.[0-9a-zA-Z-]+)*)?$"},"example":"1.0.0"},"Upload-Defer-Length":{"description":"The Upload-Defer-Length request and response header indicates that the size of the upload is not known currently and will be transferred later.","schema":{"type":"integer","description":"The Upload-Defer-Length request and response header indicates that the size of the upload is not known currently and will be transferred later.","example":1,"enum":[1],"format":"int64"},"example":1},"Upload-Length":{"description":"uploadLength represents the size of the entire upload in bytes.","schema":{"type":"integer","description":"uploadLength represents the size of the entire upload in bytes.","example":4029420343829624487,"format":"int64"},"example":4029420343829624487},"Upload-Metadata":{"description":"The Client MAY supply the Upload-Metadata header to add additional metadata to the upload creation request.","schema":{"type":"string","description":"The Client MAY supply the Upload-Metadata header to add additional metadata to the upload creation request.","example":"key1 val1,key2 val2"},"example":"key1 val1,key2 val2"},"Upload-Offset":{"description":"uploadOffset represents a byte offset within a resource.","schema":{"type":"integer","description":"uploadOffset represents a byte offset within a resource.","example":8805735883885567628,"format":"int64"},"example":8805735883885567628}}},"404":{"description":"NotFound: If the resource is not found, the Server SHOULD return either the 404 Not Found, 410 Gone or 403 Forbidden status without the Upload-Offset header.","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","schema":{"type":"boolean","description":"Is the error a server-side fault?","example":true},"example":true},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","schema":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"example":"123abc"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","schema":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"example":"parameter 'p' must be an integer"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","schema":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"example":"bad_request"},"goa-attribute-temporary":{"description":"Is the error temporary?","schema":{"type":"boolean","description":"Is the error temporary?","example":true},"example":true},"goa-attribute-timeout":{"description":"Is the error a timeout?","schema":{"type":"boolean","description":"Is the error a timeout?","example":false},"example":false}}},"410":{"description":"Gone: If the resource is not found, the Server SHOULD return either the 404 Not Found, 410 Gone or 403 Forbidden status without the Upload-Offset header.","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","schema":{"type":"boolean","description":"Is the error a server-side fault?","example":true},"example":true},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","schema":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"example":"123abc"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","schema":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"example":"parameter 'p' must be an integer"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","schema":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"example":"bad_request"},"goa-attribute-temporary":{"description":"Is the error temporary?","schema":{"type":"boolean","description":"Is the error temporary?","example":true},"example":true},"goa-attribute-timeout":{"description":"Is the error a timeout?","schema":{"type":"boolean","description":"Is the error a timeout?","example":false},"example":false}}},"412":{"description":"InvalidTusResumable: If the version specified by the Client is not supported by the Server, it MUST respond with the 412 Precondition Failed status.","headers":{"Tus-Version":{"description":"Comma separated list of supported versions.","schema":{"type":"string","description":"Comma separated list of supported versions.","example":"1.0.0","enum":["1.0.0"]},"example":"1.0.0"}}}}},"patch":{"tags":["tus"],"summary":"patch tus","description":"Clients use the PATCH method to start or resume an upload.","operationId":"tus#patch","parameters":[{"name":"id","in":"path","description":"IDs are generated using Xid: https://github.com/rs/xid","required":true,"schema":{"type":"string","description":"IDs are generated using Xid: https://github.com/rs/xid","example":"7pc6esaasn4ffl7qlrcf","pattern":"[0-9a-v]{20}"},"example":"7pc6esaasn4ffl7qlrcf"},{"name":"Tus-Resumable","in":"header","description":"tusResumable represents a tus protocol version.","required":true,"schema":{"type":"string","description":"tusResumable represents a tus protocol version.","example":"1.0.0","pattern":"^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(-(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(\\.(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\\+[0-9a-zA-Z-]+(\\.[0-9a-zA-Z-]+)*)?$"},"example":"1.0.0"},{"name":"Upload-Offset","in":"header","description":"uploadOffset represents a byte offset within a resource.","required":true,"schema":{"type":"integer","description":"uploadOffset represents a byte offset within a resource.","example":2754385183630855775,"format":"int64"},"example":2754385183630855775},{"name":"Upload-Checksum","in":"header","description":"A Client MAY include the Upload-Checksum header in a PATCH request. Once the entire request has been received, the Server MUST verify the uploaded chunk against the provided checksum using the specified algorithm.","schema":{"type":"string","description":"A Client MAY include the Upload-Checksum header in a PATCH request. Once the entire request has been received, the Server MUST verify the uploaded chunk against the provided checksum using the specified algorithm.","example":"sha1 Kq5sNclPz7QV2+lfQIuc6R7oRu0="},"example":"sha1 Kq5sNclPz7QV2+lfQIuc6R7oRu0="}],"responses":{"204":{"description":"No Content response.","headers":{"Tus-Resumable":{"description":"tusResumable represents a tus protocol version.","schema":{"type":"string","description":"tusResumable represents a tus protocol version.","example":"1.0.0","pattern":"^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(-(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(\\.(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\\+[0-9a-zA-Z-]+(\\.[0-9a-zA-Z-]+)*)?$"},"example":"1.0.0"},"Upload-Expires":{"description":"The Upload-Expires response header indicates the time after which the unfinished upload expires.","schema":{"type":"string","description":"The Upload-Expires response header indicates the time after which the unfinished upload expires.","example":"Wed, 25 Jun 2014 16:00:00 GMT"},"example":"Wed, 25 Jun 2014 16:00:00 GMT"},"Upload-Offset":{"description":"uploadOffset represents a byte offset within a resource.","schema":{"type":"integer","description":"uploadOffset represents a byte offset within a resource.","example":3831825769931087659,"format":"int64"},"example":3831825769931087659}}},"400":{"description":"InvalidChecksumAlgorithm: The checksum algorithm is not supported by the server.","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","schema":{"type":"boolean","description":"Is the error a server-side fault?","example":true},"example":true},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","schema":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"example":"123abc"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","schema":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"example":"parameter 'p' must be an integer"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","schema":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"example":"bad_request"},"goa-attribute-temporary":{"description":"Is the error temporary?","schema":{"type":"boolean","description":"Is the error temporary?","example":true},"example":true},"goa-attribute-timeout":{"description":"Is the error a timeout?","schema":{"type":"boolean","description":"Is the error a timeout?","example":false},"example":false}}},"404":{"description":"NotFound: If a Client does attempt to resume an upload which has since been removed by the Server, the Server SHOULD respond with the404 Not Found or 410 Gone status.","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","schema":{"type":"boolean","description":"Is the error a server-side fault?","example":true},"example":true},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","schema":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"example":"123abc"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","schema":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"example":"parameter 'p' must be an integer"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","schema":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"example":"bad_request"},"goa-attribute-temporary":{"description":"Is the error temporary?","schema":{"type":"boolean","description":"Is the error temporary?","example":true},"example":true},"goa-attribute-timeout":{"description":"Is the error a timeout?","schema":{"type":"boolean","description":"Is the error a timeout?","example":false},"example":false}}},"409":{"description":"InvalidOffset: If the offsets do not match, the Server MUST respond with the 409 Conflict status without modifying the upload resource.","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","schema":{"type":"boolean","description":"Is the error a server-side fault?","example":true},"example":true},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","schema":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"example":"123abc"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","schema":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"example":"parameter 'p' must be an integer"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","schema":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"example":"bad_request"},"goa-attribute-temporary":{"description":"Is the error temporary?","schema":{"type":"boolean","description":"Is the error temporary?","example":true},"example":true},"goa-attribute-timeout":{"description":"Is the error a timeout?","schema":{"type":"boolean","description":"Is the error a timeout?","example":false},"example":false}}},"410":{"description":"Gone: If a Client does attempt to resume an upload which has since been removed by the Server, the Server SHOULD respond with the404 Not Found or 410 Gone status.","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","schema":{"type":"boolean","description":"Is the error a server-side fault?","example":true},"example":true},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","schema":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"example":"123abc"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","schema":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"example":"parameter 'p' must be an integer"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","schema":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"example":"bad_request"},"goa-attribute-temporary":{"description":"Is the error temporary?","schema":{"type":"boolean","description":"Is the error temporary?","example":true},"example":true},"goa-attribute-timeout":{"description":"Is the error a timeout?","schema":{"type":"boolean","description":"Is the error a timeout?","example":false},"example":false}}},"412":{"description":"InvalidTusResumable: If the version specified by the Client is not supported by the Server, it MUST respond with the 412 Precondition Failed status.","headers":{"Tus-Version":{"description":"Comma separated list of supported versions.","schema":{"type":"string","description":"Comma separated list of supported versions.","example":"1.0.0","enum":["1.0.0"]},"example":"1.0.0"}}},"415":{"description":"InvalidContentType: All PATCH requests MUST use Content-Type: application/offset+octet-stream, otherwise the server SHOULD return a 415 Unsupported Media Type status.","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","schema":{"type":"boolean","description":"Is the error a server-side fault?","example":true},"example":true},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","schema":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"example":"123abc"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","schema":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"example":"parameter 'p' must be an integer"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","schema":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"example":"bad_request"},"goa-attribute-temporary":{"description":"Is the error temporary?","schema":{"type":"boolean","description":"Is the error temporary?","example":true},"example":true},"goa-attribute-timeout":{"description":"Is the error a timeout?","schema":{"type":"boolean","description":"Is the error a timeout?","example":false},"example":false}}},"460":{"description":"ChecksumMismatch: The checksums mismatch.","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","schema":{"type":"boolean","description":"Is the error a server-side fault?","example":true},"example":true},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","schema":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"example":"123abc"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","schema":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"example":"parameter 'p' must be an integer"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","schema":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"example":"bad_request"},"goa-attribute-temporary":{"description":"Is the error temporary?","schema":{"type":"boolean","description":"Is the error temporary?","example":true},"example":true},"goa-attribute-timeout":{"description":"Is the error a timeout?","schema":{"type":"boolean","description":"Is the error a timeout?","example":false},"example":false}}},"500":{"description":"Internal: Internal error","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","schema":{"type":"boolean","description":"Is the error a server-side fault?","example":true},"example":true},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","schema":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"example":"123abc"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","schema":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"example":"parameter 'p' must be an integer"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","schema":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"example":"bad_request"},"goa-attribute-temporary":{"description":"Is the error temporary?","schema":{"type":"boolean","description":"Is the error temporary?","example":true},"example":true},"goa-attribute-timeout":{"description":"Is the error a timeout?","schema":{"type":"boolean","description":"Is the error a timeout?","example":false},"example":false}}}}}}},"components":{},"tags":[{"name":"tus","description":"The tus service exposes the methods required to implement the tus protocol"}]} \ No newline at end of file +{"openapi":"3.0.3","info":{"title":"File Upload Service","description":"HTTP service for uploading files using the tus protocol (https://tus.io)","version":"0.0.1"},"servers":[{"url":"http://localhost:8000/upload","description":"Upload hosts the upload service."}],"paths":{"/upload":{"options":{"tags":["tus"],"summary":"options tus","description":"Clients use the OPTIONS method to gather information about the Server’s current configuration.","operationId":"tus#options","responses":{"204":{"description":"No Content response.","headers":{"Tus-Checksum-Algorithm":{"description":"A Client MAY include the Upload-Checksum header in a PATCH request. Once the entire request has been received, the Server MUST verify the uploaded chunk against the provided checksum using the specified algorithm.","schema":{"type":"string","description":"A Client MAY include the Upload-Checksum header in a PATCH request. Once the entire request has been received, the Server MUST verify the uploaded chunk against the provided checksum using the specified algorithm.","example":"md5,sha1,crc32","enum":["md5,sha1,crc32"]},"example":"md5,sha1,crc32"},"Tus-Extension":{"description":"tusExtension is a comma separated list of extensions supported by the server. This implementation supports the creation, creation-with-upload, expiration, checksum and termination extensions","schema":{"type":"string","description":"tusExtension is a comma separated list of extensions supported by the server. This implementation supports the creation, creation-with-upload, expiration, checksum and termination extensions","example":"creation,creation-with-upload,creation-defer-length,expiration,checksum,termination","enum":["creation,creation-with-upload,creation-defer-length,expiration,checksum,termination"]},"example":"creation,creation-with-upload,creation-defer-length,expiration,checksum,termination"},"Tus-Max-Size":{"description":"tusMaxSize represents the maximum allowed size of an entire upload in bytes.","schema":{"type":"integer","description":"tusMaxSize represents the maximum allowed size of an entire upload in bytes.","example":8712211226016374128,"format":"int64"},"example":8712211226016374128},"Tus-Resumable":{"description":"tusResumable represents a tus protocol version.","schema":{"type":"string","description":"tusResumable represents a tus protocol version.","example":"1.0.0","pattern":"^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(-(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(\\.(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\\+[0-9a-zA-Z-]+(\\.[0-9a-zA-Z-]+)*)?$"},"example":"1.0.0"},"Tus-Version":{"description":"tusVersion is a comma separated list of protocol versions supported by the server. This implementation only supports 1.0.0.","schema":{"type":"string","description":"tusVersion is a comma separated list of protocol versions supported by the server. This implementation only supports 1.0.0.","example":"1.0.0","enum":["1.0.0"]},"example":"1.0.0"}}},"412":{"description":"InvalidTusResumable: If the version specified by the Client is not supported by the Server, it MUST respond with the 412 Precondition Failed status.","headers":{"Tus-Version":{"description":"Comma separated list of supported versions.","schema":{"type":"string","description":"Comma separated list of supported versions.","example":"1.0.0","enum":["1.0.0"]},"example":"1.0.0"}}}}},"post":{"tags":["tus"],"summary":"post tus","description":"Clients use the POST method against a known upload creation URL to request a new upload resource.","operationId":"tus#post","parameters":[{"name":"Tus-Resumable","in":"header","description":"tusResumable represents a tus protocol version.","required":true,"schema":{"type":"string","description":"tusResumable represents a tus protocol version.","example":"1.0.0","pattern":"^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(-(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(\\.(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\\+[0-9a-zA-Z-]+(\\.[0-9a-zA-Z-]+)*)?$"},"example":"1.0.0"},{"name":"Upload-Length","in":"header","description":"uploadLength represents the size of the entire upload in bytes.","schema":{"type":"integer","description":"uploadLength represents the size of the entire upload in bytes.","example":7643821282600180792,"format":"int64"},"example":7643821282600180792},{"name":"Upload-Defer-Length","in":"header","description":"The Upload-Defer-Length request and response header indicates that the size of the upload is not known currently and will be transferred later.","schema":{"type":"integer","description":"The Upload-Defer-Length request and response header indicates that the size of the upload is not known currently and will be transferred later.","example":1,"enum":[1],"format":"int64"},"example":1},{"name":"Upload-Checksum","in":"header","description":"A Client MAY include the Upload-Checksum header in a PATCH request. Once the entire request has been received, the Server MUST verify the uploaded chunk against the provided checksum using the specified algorithm.","schema":{"type":"string","description":"A Client MAY include the Upload-Checksum header in a PATCH request. Once the entire request has been received, the Server MUST verify the uploaded chunk against the provided checksum using the specified algorithm.","example":"sha1 Kq5sNclPz7QV2+lfQIuc6R7oRu0="},"example":"sha1 Kq5sNclPz7QV2+lfQIuc6R7oRu0="},{"name":"Upload-Metadata","in":"header","description":"The Client MAY supply the Upload-Metadata header to add additional metadata to the upload creation request.","schema":{"type":"string","description":"The Client MAY supply the Upload-Metadata header to add additional metadata to the upload creation request.","example":"key1 val1,key2 val2"},"example":"key1 val1,key2 val2"},{"name":"Tus-Max-Size","in":"header","description":"Length of the upload","schema":{"type":"integer","description":"Length of the upload","example":3748981059432342735,"format":"int64"},"example":3748981059432342735}],"responses":{"201":{"description":"Created response.","headers":{"Location":{"description":"URL of created resource","schema":{"type":"string","description":"URL of created resource","example":"/files/123","format":"uri"},"example":"/files/123"},"Tus-Resumable":{"description":"tusResumable represents a tus protocol version.","schema":{"type":"string","description":"tusResumable represents a tus protocol version.","example":"1.0.0","pattern":"^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(-(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(\\.(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\\+[0-9a-zA-Z-]+(\\.[0-9a-zA-Z-]+)*)?$"},"example":"1.0.0"},"Upload-Expires":{"description":"The Upload-Expires response header indicates the time after which the unfinished upload expires.","schema":{"type":"string","description":"The Upload-Expires response header indicates the time after which the unfinished upload expires.","example":"Wed, 25 Jun 2014 16:00:00 GMT"},"example":"Wed, 25 Jun 2014 16:00:00 GMT"},"Upload-Offset":{"description":"uploadOffset represents a byte offset within a resource.","schema":{"type":"integer","description":"uploadOffset represents a byte offset within a resource.","example":3875770313577187398,"format":"int64"},"example":3875770313577187398}}},"400":{"description":"InvalidChecksumAlgorithm: The checksum algorithm is not supported by the server.","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","schema":{"type":"boolean","description":"Is the error a server-side fault?","example":true},"example":true},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","schema":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"example":"123abc"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","schema":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"example":"parameter 'p' must be an integer"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","schema":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"example":"bad_request"},"goa-attribute-temporary":{"description":"Is the error temporary?","schema":{"type":"boolean","description":"Is the error temporary?","example":true},"example":true},"goa-attribute-timeout":{"description":"Is the error a timeout?","schema":{"type":"boolean","description":"Is the error a timeout?","example":false},"example":false}}},"412":{"description":"InvalidTusResumable: If the version specified by the Client is not supported by the Server, it MUST respond with the 412 Precondition Failed status.","headers":{"Tus-Version":{"description":"Comma separated list of supported versions.","schema":{"type":"string","description":"Comma separated list of supported versions.","example":"1.0.0","enum":["1.0.0"]},"example":"1.0.0"}}},"413":{"description":"MaximumSizeExceeded: If the length of the upload exceeds the maximum, which MAY be specified using the Tus-Max-Size header, the Server MUST respond with the 413 Request Entity Too Large status.","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","schema":{"type":"boolean","description":"Is the error a server-side fault?","example":true},"example":true},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","schema":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"example":"123abc"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","schema":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"example":"parameter 'p' must be an integer"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","schema":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"example":"bad_request"},"goa-attribute-temporary":{"description":"Is the error temporary?","schema":{"type":"boolean","description":"Is the error temporary?","example":true},"example":true},"goa-attribute-timeout":{"description":"Is the error a timeout?","schema":{"type":"boolean","description":"Is the error a timeout?","example":false},"example":false}}},"460":{"description":"ChecksumMismatch: The checksums mismatch.","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","schema":{"type":"boolean","description":"Is the error a server-side fault?","example":true},"example":true},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","schema":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"example":"123abc"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","schema":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"example":"parameter 'p' must be an integer"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","schema":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"example":"bad_request"},"goa-attribute-temporary":{"description":"Is the error temporary?","schema":{"type":"boolean","description":"Is the error temporary?","example":true},"example":true},"goa-attribute-timeout":{"description":"Is the error a timeout?","schema":{"type":"boolean","description":"Is the error a timeout?","example":false},"example":false}}}}}},"/upload/{id}":{"delete":{"tags":["tus"],"summary":"delete tus","description":"Clients use the DELETE method to terminate completed and unfinished uploads allowing the Server to free up used resources.","operationId":"tus#delete","parameters":[{"name":"id","in":"path","description":"IDs are generated using Xid: https://github.com/rs/xid","required":true,"schema":{"type":"string","description":"IDs are generated using Xid: https://github.com/rs/xid","example":"fgn8ncu1uo2shoc1tgd3","pattern":"[0-9a-v]{20}"},"example":"fgn8ncu1uo2shoc1tgd3"},{"name":"Tus-Resumable","in":"header","description":"tusResumable represents a tus protocol version.","required":true,"schema":{"type":"string","description":"tusResumable represents a tus protocol version.","example":"1.0.0","pattern":"^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(-(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(\\.(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\\+[0-9a-zA-Z-]+(\\.[0-9a-zA-Z-]+)*)?$"},"example":"1.0.0"}],"responses":{"204":{"description":"No Content response.","headers":{"Tus-Resumable":{"description":"tusResumable represents a tus protocol version.","schema":{"type":"string","description":"tusResumable represents a tus protocol version.","example":"1.0.0","pattern":"^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(-(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(\\.(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\\+[0-9a-zA-Z-]+(\\.[0-9a-zA-Z-]+)*)?$"},"example":"1.0.0"}}},"404":{"description":"NotFound: For all future requests to this URL, the Server SHOULD respond with the 404 Not Found or 410 Gone status.","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","schema":{"type":"boolean","description":"Is the error a server-side fault?","example":true},"example":true},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","schema":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"example":"123abc"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","schema":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"example":"parameter 'p' must be an integer"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","schema":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"example":"bad_request"},"goa-attribute-temporary":{"description":"Is the error temporary?","schema":{"type":"boolean","description":"Is the error temporary?","example":true},"example":true},"goa-attribute-timeout":{"description":"Is the error a timeout?","schema":{"type":"boolean","description":"Is the error a timeout?","example":false},"example":false}}},"410":{"description":"Gone: For all future requests to this URL, the Server SHOULD respond with the 404 Not Found or 410 Gone status.","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","schema":{"type":"boolean","description":"Is the error a server-side fault?","example":true},"example":true},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","schema":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"example":"123abc"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","schema":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"example":"parameter 'p' must be an integer"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","schema":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"example":"bad_request"},"goa-attribute-temporary":{"description":"Is the error temporary?","schema":{"type":"boolean","description":"Is the error temporary?","example":true},"example":true},"goa-attribute-timeout":{"description":"Is the error a timeout?","schema":{"type":"boolean","description":"Is the error a timeout?","example":false},"example":false}}},"412":{"description":"InvalidTusResumable: If the version specified by the Client is not supported by the Server, it MUST respond with the 412 Precondition Failed status.","headers":{"Tus-Version":{"description":"Comma separated list of supported versions.","schema":{"type":"string","description":"Comma separated list of supported versions.","example":"1.0.0","enum":["1.0.0"]},"example":"1.0.0"}}}}},"head":{"tags":["tus"],"summary":"head tus","description":"Clients use the HEAD request to determine the offset at which the upload should be continued.","operationId":"tus#head","parameters":[{"name":"id","in":"path","description":"IDs are generated using Xid: https://github.com/rs/xid","required":true,"schema":{"type":"string","description":"IDs are generated using Xid: https://github.com/rs/xid","example":"9rh2ia73s256mmjr8kpt","pattern":"[0-9a-v]{20}"},"example":"9rh2ia73s256mmjr8kpt"},{"name":"Tus-Resumable","in":"header","description":"tusResumable represents a tus protocol version.","required":true,"schema":{"type":"string","description":"tusResumable represents a tus protocol version.","example":"1.0.0","pattern":"^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(-(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(\\.(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\\+[0-9a-zA-Z-]+(\\.[0-9a-zA-Z-]+)*)?$"},"example":"1.0.0"}],"responses":{"200":{"description":"OK response.","headers":{"Tus-Resumable":{"description":"tusResumable represents a tus protocol version.","schema":{"type":"string","description":"tusResumable represents a tus protocol version.","example":"1.0.0","pattern":"^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(-(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(\\.(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\\+[0-9a-zA-Z-]+(\\.[0-9a-zA-Z-]+)*)?$"},"example":"1.0.0"},"Upload-Defer-Length":{"description":"The Upload-Defer-Length request and response header indicates that the size of the upload is not known currently and will be transferred later.","schema":{"type":"integer","description":"The Upload-Defer-Length request and response header indicates that the size of the upload is not known currently and will be transferred later.","example":1,"enum":[1],"format":"int64"},"example":1},"Upload-Length":{"description":"uploadLength represents the size of the entire upload in bytes.","schema":{"type":"integer","description":"uploadLength represents the size of the entire upload in bytes.","example":4029420343829624487,"format":"int64"},"example":4029420343829624487},"Upload-Metadata":{"description":"The Client MAY supply the Upload-Metadata header to add additional metadata to the upload creation request.","schema":{"type":"string","description":"The Client MAY supply the Upload-Metadata header to add additional metadata to the upload creation request.","example":"key1 val1,key2 val2"},"example":"key1 val1,key2 val2"},"Upload-Offset":{"description":"uploadOffset represents a byte offset within a resource.","schema":{"type":"integer","description":"uploadOffset represents a byte offset within a resource.","example":8805735883885567628,"format":"int64"},"example":8805735883885567628}}},"404":{"description":"NotFound: If the resource is not found, the Server SHOULD return either the 404 Not Found, 410 Gone or 403 Forbidden status without the Upload-Offset header.","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","schema":{"type":"boolean","description":"Is the error a server-side fault?","example":true},"example":true},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","schema":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"example":"123abc"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","schema":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"example":"parameter 'p' must be an integer"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","schema":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"example":"bad_request"},"goa-attribute-temporary":{"description":"Is the error temporary?","schema":{"type":"boolean","description":"Is the error temporary?","example":true},"example":true},"goa-attribute-timeout":{"description":"Is the error a timeout?","schema":{"type":"boolean","description":"Is the error a timeout?","example":false},"example":false}}},"410":{"description":"Gone: If the resource is not found, the Server SHOULD return either the 404 Not Found, 410 Gone or 403 Forbidden status without the Upload-Offset header.","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","schema":{"type":"boolean","description":"Is the error a server-side fault?","example":true},"example":true},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","schema":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"example":"123abc"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","schema":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"example":"parameter 'p' must be an integer"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","schema":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"example":"bad_request"},"goa-attribute-temporary":{"description":"Is the error temporary?","schema":{"type":"boolean","description":"Is the error temporary?","example":true},"example":true},"goa-attribute-timeout":{"description":"Is the error a timeout?","schema":{"type":"boolean","description":"Is the error a timeout?","example":false},"example":false}}},"412":{"description":"InvalidTusResumable: If the version specified by the Client is not supported by the Server, it MUST respond with the 412 Precondition Failed status.","headers":{"Tus-Version":{"description":"Comma separated list of supported versions.","schema":{"type":"string","description":"Comma separated list of supported versions.","example":"1.0.0","enum":["1.0.0"]},"example":"1.0.0"}}}}},"patch":{"tags":["tus"],"summary":"patch tus","description":"Clients use the PATCH method to start or resume an upload.","operationId":"tus#patch","parameters":[{"name":"id","in":"path","description":"IDs are generated using Xid: https://github.com/rs/xid","required":true,"schema":{"type":"string","description":"IDs are generated using Xid: https://github.com/rs/xid","example":"7pc6esaasn4ffl7qlrcf","pattern":"[0-9a-v]{20}"},"example":"7pc6esaasn4ffl7qlrcf"},{"name":"Content-Type","in":"header","description":"Media type of the uploaded bytes.","required":true,"schema":{"type":"string","description":"Media type of the uploaded bytes.","example":"application/offset+octet-stream"},"example":"application/offset+octet-stream"},{"name":"Tus-Resumable","in":"header","description":"tusResumable represents a tus protocol version.","required":true,"schema":{"type":"string","description":"tusResumable represents a tus protocol version.","example":"1.0.0","pattern":"^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(-(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(\\.(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\\+[0-9a-zA-Z-]+(\\.[0-9a-zA-Z-]+)*)?$"},"example":"1.0.0"},{"name":"Upload-Offset","in":"header","description":"uploadOffset represents a byte offset within a resource.","required":true,"schema":{"type":"integer","description":"uploadOffset represents a byte offset within a resource.","example":2754385183630855775,"format":"int64"},"example":2754385183630855775},{"name":"Upload-Checksum","in":"header","description":"A Client MAY include the Upload-Checksum header in a PATCH request. Once the entire request has been received, the Server MUST verify the uploaded chunk against the provided checksum using the specified algorithm.","schema":{"type":"string","description":"A Client MAY include the Upload-Checksum header in a PATCH request. Once the entire request has been received, the Server MUST verify the uploaded chunk against the provided checksum using the specified algorithm.","example":"sha1 Kq5sNclPz7QV2+lfQIuc6R7oRu0="},"example":"sha1 Kq5sNclPz7QV2+lfQIuc6R7oRu0="}],"responses":{"204":{"description":"No Content response.","headers":{"Tus-Resumable":{"description":"tusResumable represents a tus protocol version.","schema":{"type":"string","description":"tusResumable represents a tus protocol version.","example":"1.0.0","pattern":"^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(-(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(\\.(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\\+[0-9a-zA-Z-]+(\\.[0-9a-zA-Z-]+)*)?$"},"example":"1.0.0"},"Upload-Expires":{"description":"The Upload-Expires response header indicates the time after which the unfinished upload expires.","schema":{"type":"string","description":"The Upload-Expires response header indicates the time after which the unfinished upload expires.","example":"Wed, 25 Jun 2014 16:00:00 GMT"},"example":"Wed, 25 Jun 2014 16:00:00 GMT"},"Upload-Offset":{"description":"uploadOffset represents a byte offset within a resource.","schema":{"type":"integer","description":"uploadOffset represents a byte offset within a resource.","example":3831825769931087659,"format":"int64"},"example":3831825769931087659}}},"400":{"description":"InvalidChecksumAlgorithm: The checksum algorithm is not supported by the server.","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","schema":{"type":"boolean","description":"Is the error a server-side fault?","example":true},"example":true},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","schema":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"example":"123abc"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","schema":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"example":"parameter 'p' must be an integer"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","schema":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"example":"bad_request"},"goa-attribute-temporary":{"description":"Is the error temporary?","schema":{"type":"boolean","description":"Is the error temporary?","example":true},"example":true},"goa-attribute-timeout":{"description":"Is the error a timeout?","schema":{"type":"boolean","description":"Is the error a timeout?","example":false},"example":false}}},"404":{"description":"NotFound: If a Client does attempt to resume an upload which has since been removed by the Server, the Server SHOULD respond with the404 Not Found or 410 Gone status.","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","schema":{"type":"boolean","description":"Is the error a server-side fault?","example":true},"example":true},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","schema":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"example":"123abc"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","schema":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"example":"parameter 'p' must be an integer"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","schema":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"example":"bad_request"},"goa-attribute-temporary":{"description":"Is the error temporary?","schema":{"type":"boolean","description":"Is the error temporary?","example":true},"example":true},"goa-attribute-timeout":{"description":"Is the error a timeout?","schema":{"type":"boolean","description":"Is the error a timeout?","example":false},"example":false}}},"409":{"description":"InvalidOffset: If the offsets do not match, the Server MUST respond with the 409 Conflict status without modifying the upload resource.","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","schema":{"type":"boolean","description":"Is the error a server-side fault?","example":true},"example":true},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","schema":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"example":"123abc"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","schema":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"example":"parameter 'p' must be an integer"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","schema":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"example":"bad_request"},"goa-attribute-temporary":{"description":"Is the error temporary?","schema":{"type":"boolean","description":"Is the error temporary?","example":true},"example":true},"goa-attribute-timeout":{"description":"Is the error a timeout?","schema":{"type":"boolean","description":"Is the error a timeout?","example":false},"example":false}}},"410":{"description":"Gone: If a Client does attempt to resume an upload which has since been removed by the Server, the Server SHOULD respond with the404 Not Found or 410 Gone status.","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","schema":{"type":"boolean","description":"Is the error a server-side fault?","example":true},"example":true},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","schema":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"example":"123abc"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","schema":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"example":"parameter 'p' must be an integer"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","schema":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"example":"bad_request"},"goa-attribute-temporary":{"description":"Is the error temporary?","schema":{"type":"boolean","description":"Is the error temporary?","example":true},"example":true},"goa-attribute-timeout":{"description":"Is the error a timeout?","schema":{"type":"boolean","description":"Is the error a timeout?","example":false},"example":false}}},"412":{"description":"InvalidTusResumable: If the version specified by the Client is not supported by the Server, it MUST respond with the 412 Precondition Failed status.","headers":{"Tus-Version":{"description":"Comma separated list of supported versions.","schema":{"type":"string","description":"Comma separated list of supported versions.","example":"1.0.0","enum":["1.0.0"]},"example":"1.0.0"}}},"415":{"description":"InvalidContentType: All PATCH requests MUST use Content-Type: application/offset+octet-stream, otherwise the server SHOULD return a 415 Unsupported Media Type status.","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","schema":{"type":"boolean","description":"Is the error a server-side fault?","example":true},"example":true},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","schema":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"example":"123abc"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","schema":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"example":"parameter 'p' must be an integer"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","schema":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"example":"bad_request"},"goa-attribute-temporary":{"description":"Is the error temporary?","schema":{"type":"boolean","description":"Is the error temporary?","example":true},"example":true},"goa-attribute-timeout":{"description":"Is the error a timeout?","schema":{"type":"boolean","description":"Is the error a timeout?","example":false},"example":false}}},"460":{"description":"ChecksumMismatch: The checksums mismatch.","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","schema":{"type":"boolean","description":"Is the error a server-side fault?","example":true},"example":true},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","schema":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"example":"123abc"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","schema":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"example":"parameter 'p' must be an integer"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","schema":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"example":"bad_request"},"goa-attribute-temporary":{"description":"Is the error temporary?","schema":{"type":"boolean","description":"Is the error temporary?","example":true},"example":true},"goa-attribute-timeout":{"description":"Is the error a timeout?","schema":{"type":"boolean","description":"Is the error a timeout?","example":false},"example":false}}},"500":{"description":"Internal: Internal error","headers":{"goa-attribute-fault":{"description":"Is the error a server-side fault?","schema":{"type":"boolean","description":"Is the error a server-side fault?","example":true},"example":true},"goa-attribute-id":{"description":"ID is a unique identifier for this particular occurrence of the problem.","schema":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"example":"123abc"},"goa-attribute-message":{"description":"Message is a human-readable explanation specific to this occurrence of the problem.","schema":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"example":"parameter 'p' must be an integer"},"goa-attribute-name":{"description":"Name is the name of this class of errors.","schema":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"example":"bad_request"},"goa-attribute-temporary":{"description":"Is the error temporary?","schema":{"type":"boolean","description":"Is the error temporary?","example":true},"example":true},"goa-attribute-timeout":{"description":"Is the error a timeout?","schema":{"type":"boolean","description":"Is the error a timeout?","example":false},"example":false}}}}}}},"components":{},"tags":[{"name":"tus","description":"The tus service exposes the methods required to implement the tus protocol"}]} \ No newline at end of file diff --git a/tus/gen/http/openapi3.yaml b/tus/gen/http/openapi3.yaml index 49453de95..1fd0e94fb 100644 --- a/tus/gen/http/openapi3.yaml +++ b/tus/gen/http/openapi3.yaml @@ -650,6 +650,15 @@ paths: example: 7pc6esaasn4ffl7qlrcf pattern: '[0-9a-v]{20}' example: 7pc6esaasn4ffl7qlrcf + - name: Content-Type + in: header + description: Media type of the uploaded bytes. + required: true + schema: + type: string + description: Media type of the uploaded bytes. + example: application/offset+octet-stream + example: application/offset+octet-stream - name: Tus-Resumable in: header description: tusResumable represents a tus protocol version. diff --git a/tus/gen/http/tus/client/cli.go b/tus/gen/http/tus/client/cli.go index 782c93c60..ae28031ef 100644 --- a/tus/gen/http/tus/client/cli.go +++ b/tus/gen/http/tus/client/cli.go @@ -43,7 +43,7 @@ func BuildHeadPayload(tusHeadID string, tusHeadTusResumable string) (*tus.HeadPa // BuildPatchPayload builds the payload for the tus patch endpoint from CLI // flags. -func BuildPatchPayload(tusPatchID string, tusPatchTusResumable string, tusPatchUploadOffset string, tusPatchUploadChecksum string) (*tus.PatchPayload, error) { +func BuildPatchPayload(tusPatchID string, tusPatchContentType string, tusPatchTusResumable string, tusPatchUploadOffset string, tusPatchUploadChecksum string) (*tus.PatchPayload, error) { var err error var id string { @@ -53,6 +53,10 @@ func BuildPatchPayload(tusPatchID string, tusPatchTusResumable string, tusPatchU return nil, err } } + var contentType string + { + contentType = tusPatchContentType + } var tusResumable string { tusResumable = tusPatchTusResumable @@ -76,6 +80,7 @@ func BuildPatchPayload(tusPatchID string, tusPatchTusResumable string, tusPatchU } v := &tus.PatchPayload{} v.ID = id + v.ContentType = contentType v.TusResumable = tusResumable v.UploadOffset = uploadOffset v.UploadChecksum = uploadChecksum diff --git a/tus/gen/http/tus/client/encode_decode.go b/tus/gen/http/tus/client/encode_decode.go index 3de7b2091..16a56421d 100644 --- a/tus/gen/http/tus/client/encode_decode.go +++ b/tus/gen/http/tus/client/encode_decode.go @@ -341,6 +341,10 @@ func EncodePatchRequest(encoder func(*http.Request) goahttp.Encoder) func(*http. return goahttp.ErrInvalidType("tus", "patch", "*tus.PatchRequestData", v) } p := data.Payload + { + head := p.ContentType + req.Header.Set("Content-Type", head) + } { head := p.TusResumable req.Header.Set("Tus-Resumable", head) diff --git a/tus/gen/http/tus/server/encode_decode.go b/tus/gen/http/tus/server/encode_decode.go index ec70f62fb..43d9fd5cf 100644 --- a/tus/gen/http/tus/server/encode_decode.go +++ b/tus/gen/http/tus/server/encode_decode.go @@ -172,6 +172,7 @@ func DecodePatchRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp.D var payload *tus.PatchPayload var ( id string + contentType string tusResumable string uploadOffset int64 uploadChecksum *string @@ -181,6 +182,10 @@ func DecodePatchRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp.D ) id = params["id"] err = goa.MergeErrors(err, goa.ValidatePattern("id", id, "[0-9a-v]{20}")) + contentType = r.Header.Get("Content-Type") + if contentType == "" { + err = goa.MergeErrors(err, goa.MissingFieldError("contentType", "header")) + } tusResumable = r.Header.Get("Tus-Resumable") if tusResumable == "" { err = goa.MergeErrors(err, goa.MissingFieldError("tusResumable", "header")) @@ -204,7 +209,7 @@ func DecodePatchRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp.D if err != nil { return payload, err } - payload = NewPatchPayload(id, tusResumable, uploadOffset, uploadChecksum) + payload = NewPatchPayload(id, contentType, tusResumable, uploadOffset, uploadChecksum) return payload, nil } diff --git a/tus/gen/http/tus/server/types.go b/tus/gen/http/tus/server/types.go index 3a1e7babe..dd66bb763 100644 --- a/tus/gen/http/tus/server/types.go +++ b/tus/gen/http/tus/server/types.go @@ -21,9 +21,10 @@ func NewHeadPayload(id string, tusResumable string) *tus.HeadPayload { } // NewPatchPayload builds a tus service patch endpoint payload. -func NewPatchPayload(id string, tusResumable string, uploadOffset int64, uploadChecksum *string) *tus.PatchPayload { +func NewPatchPayload(id string, contentType string, tusResumable string, uploadOffset int64, uploadChecksum *string) *tus.PatchPayload { v := &tus.PatchPayload{} v.ID = id + v.ContentType = contentType v.TusResumable = tusResumable v.UploadOffset = uploadOffset v.UploadChecksum = uploadChecksum diff --git a/tus/gen/tus/service.go b/tus/gen/tus/service.go index cc23e8c5d..b8c230119 100644 --- a/tus/gen/tus/service.go +++ b/tus/gen/tus/service.go @@ -116,6 +116,8 @@ type OptionsResult struct { type PatchPayload struct { // IDs are generated using Xid: https://github.com/rs/xid ID string + // Media type of the uploaded bytes. + ContentType string // tusResumable represents a tus protocol version. TusResumable string // uploadOffset represents a byte offset within a resource. diff --git a/tus/tus.go b/tus/tus.go index 8846e6604..87188554f 100644 --- a/tus/tus.go +++ b/tus/tus.go @@ -12,7 +12,6 @@ import ( "goa.design/examples/tus/gen/http/tus/server" "goa.design/examples/tus/gen/tus" "goa.design/examples/tus/persist" - goahttp "goa.design/goa/v3/http" ) // upload service @@ -76,8 +75,7 @@ func (s *tussvc) Patch(ctx context.Context, p *tus.PatchPayload, body io.ReadClo // All PATCH requests MUST use Content-Type: // application/offset+octet-stream, otherwise the server SHOULD return a 415 // Unsupported Media Type status. - ct := ctx.Value(goahttp.ContentTypeKey).(string) - if ct != "application/offset+octet-stream" { + if p.ContentType != "application/offset+octet-stream" { return nil, tus.MakeInvalidContentType(fmt.Errorf("Content-Type header must be application/offset+octet-stream")) } @@ -119,7 +117,7 @@ func (s *tussvc) Options(ctx context.Context) (res *tus.OptionsResult, err error res = &tus.OptionsResult{ TusVersion: TusResumable, TusExtension: "creation,creation-with-upload,creation-defer-length,expiration,checksum,termination", - TusChecksumAlgorithm: "sha1,md5,crc32", + TusChecksumAlgorithm: "md5,sha1,crc32", } if s.maxSize > 0 { res.TusMaxSize = &s.maxSize @@ -199,12 +197,7 @@ func (s *tussvc) Delete(ctx context.Context, p *tus.DeletePayload) (res *tus.Del if up == nil { return nil, tus.MakeNotFound(fmt.Errorf("no ongoing upload with id %q or upload expired", p.ID)) } - if !up.Active() { - return nil, tus.MakeGone(fmt.Errorf("upload with id %q %s", p.ID, up.Status.String())) - } - - up.Status = persist.Completed - if err := s.store.Save(p.ID, up); err != nil { + if err := s.store.Save(p.ID, nil); err != nil { return nil, tus.MakeInternal(err) } diff --git a/tus/tus_test.go b/tus/tus_test.go new file mode 100644 index 000000000..272c6c877 --- /dev/null +++ b/tus/tus_test.go @@ -0,0 +1,34 @@ +// These tests verify that terminating an upload removes its resumable state. +package tus + +import ( + "context" + "errors" + "testing" + + gentus "goa.design/examples/tus/gen/tus" + "goa.design/examples/tus/persist" + goa "goa.design/goa/v3/pkg" +) + +func TestDeleteRemovesUpload(t *testing.T) { + for _, status := range []persist.Status{persist.Started, persist.Completed} { + t.Run(status.String(), func(t *testing.T) { + store := persist.NewInMemory() + if err := store.Save("upload", &persist.Upload{ID: "upload", Status: status}); err != nil { + t.Fatalf("save upload: %v", err) + } + svc := &tussvc{store: store} + payload := &gentus.DeletePayload{ID: "upload", TusResumable: TusResumable} + + if _, err := svc.Delete(context.Background(), payload); err != nil { + t.Fatalf("delete upload: %v", err) + } + _, err := svc.Head(context.Background(), &gentus.HeadPayload{ID: "upload", TusResumable: TusResumable}) + var serviceErr *goa.ServiceError + if !errors.As(err, &serviceErr) || serviceErr.Name != "NotFound" { + t.Fatalf("head deleted upload: got %v, expected NotFound", err) + } + }) + } +} From cc259b62968e5b5c00e658dcf521ccc9952a6dfb Mon Sep 17 00:00:00 2001 From: "Raphael (manual office deploy after cloud-state fix)" Date: Mon, 24 Aug 2026 17:21:18 -0700 Subject: [PATCH 04/28] chore: regenerate examples with final Goa fixes --- basic/gen/grpc/calc/client/cli.go | 8 +- basic/gen/grpc/calc/client/encode_decode.go | 3 + basic/gen/grpc/calc/client/types.go | 31 +- .../gen/grpc/calc/pb/goagen_basic_calc.pb.go | 35 +- .../gen/grpc/calc/pb/goagen_basic_calc.proto | 6 +- basic/gen/grpc/calc/server/encode_decode.go | 3 + basic/gen/grpc/calc/server/types.go | 19 +- basic/go.mod | 2 +- basic/go.sum | 4 +- .../grpc/sommelier/client/encode_decode.go | 3 + cellar/gen/grpc/sommelier/client/types.go | 54 ++- .../pb/goagen_cellar_sommelier.pb.go | 89 ++-- .../pb/goagen_cellar_sommelier.proto | 14 +- cellar/gen/grpc/sommelier/server/types.go | 10 +- cellar/gen/grpc/storage/client/cli.go | 51 ++- cellar/gen/grpc/storage/client/client.go | 3 + .../gen/grpc/storage/client/encode_decode.go | 12 + cellar/gen/grpc/storage/client/types.go | 387 ++++++++++++++---- .../storage/pb/goagen_cellar_storage.pb.go | 244 ++++++----- .../storage/pb/goagen_cellar_storage.proto | 38 +- .../gen/grpc/storage/server/encode_decode.go | 9 +- cellar/gen/grpc/storage/server/types.go | 182 ++++---- cellar/go.mod | 2 +- cellar/go.sum | 4 +- concerts/go.mod | 3 +- concerts/go.sum | 6 +- cookies/go.mod | 3 +- cookies/go.sum | 6 +- encodings/cbor/go.mod | 2 +- encodings/cbor/go.sum | 4 +- encodings/text/go.mod | 2 +- encodings/text/go.sum | 4 +- error/gen/grpc/calc/client/cli.go | 8 +- error/gen/grpc/calc/client/client.go | 3 + error/gen/grpc/calc/client/encode_decode.go | 3 + error/gen/grpc/calc/client/types.go | 47 ++- .../gen/grpc/calc/pb/goagen_error_calc.pb.go | 57 +-- .../gen/grpc/calc/pb/goagen_error_calc.proto | 10 +- error/gen/grpc/calc/server/encode_decode.go | 3 + error/gen/grpc/calc/server/types.go | 27 +- error/go.mod | 2 +- error/go.sum | 4 +- files/go.mod | 3 +- files/go.sum | 6 +- go.work.sum | 1 + httpstatus/go.mod | 8 +- httpstatus/go.sum | 16 +- .../gen/grpc/interceptors/client/cli.go | 10 +- .../gen/grpc/interceptors/client/types.go | 68 ++- .../pb/goagen_interceptors_interceptors.pb.go | 101 +++-- .../pb/goagen_interceptors_interceptors.proto | 18 +- .../gen/grpc/interceptors/server/types.go | 38 +- .../gen/interceptors/client_interceptors.go | 28 +- .../gen/interceptors/interceptor_wrappers.go | 40 +- .../gen/interceptors/service_interceptors.go | 80 +--- interceptors/go.mod | 2 +- interceptors/go.sum | 4 +- multipart/go.mod | 3 +- multipart/go.sum | 6 +- retry/gen/grpc/retry/client/cli.go | 6 +- retry/gen/grpc/retry/client/encode_decode.go | 3 + retry/gen/grpc/retry/client/types.go | 22 +- .../grpc/retry/pb/goagen_retry_retry.pb.go | 26 +- .../grpc/retry/pb/goagen_retry_retry.proto | 4 +- retry/gen/grpc/retry/server/encode_decode.go | 3 + retry/gen/grpc/retry/server/types.go | 13 +- retry/go.mod | 2 +- retry/go.sum | 4 +- security/hierarchy/go.mod | 3 +- security/hierarchy/go.sum | 6 +- .../gen/grpc/secured_service/client/cli.go | 6 +- .../secured_service/client/encode_decode.go | 12 + .../gen/grpc/secured_service/client/types.go | 64 ++- .../pb/goagen_multiauth_secured_service.pb.go | 87 ++-- .../pb/goagen_multiauth_secured_service.proto | 14 +- .../secured_service/server/encode_decode.go | 3 + .../gen/grpc/secured_service/server/types.go | 27 +- security/multiauth/go.mod | 2 +- security/multiauth/go.sum | 4 +- sse/go.mod | 2 +- sse/go.sum | 4 +- streaming/gen/grpc/chatter/client/client.go | 12 + .../gen/grpc/chatter/client/encode_decode.go | 3 + streaming/gen/grpc/chatter/client/types.go | 92 ++++- .../chatter/pb/goagen_streaming_chatter.pb.go | 150 ++++--- .../chatter/pb/goagen_streaming_chatter.proto | 24 +- streaming/gen/grpc/chatter/server/server.go | 9 + streaming/gen/grpc/chatter/server/types.go | 56 ++- streaming/go.mod | 2 +- streaming/go.sum | 4 +- tracing/go.mod | 6 +- tracing/go.sum | 22 +- tus/go.mod | 3 +- tus/go.sum | 6 +- upload_download/go.mod | 3 +- upload_download/go.sum | 6 +- 96 files changed, 1665 insertions(+), 889 deletions(-) diff --git a/basic/gen/grpc/calc/client/cli.go b/basic/gen/grpc/calc/client/cli.go index 4efd0690a..151544097 100644 --- a/basic/gen/grpc/calc/client/cli.go +++ b/basic/gen/grpc/calc/client/cli.go @@ -28,9 +28,13 @@ func BuildMultiplyPayload(calcMultiplyMessage string) (*calc.MultiplyPayload, er } } } + if err := ValidateMultiplyRequest(&message); err != nil { + var zero *calc.MultiplyPayload + return zero, err + } v := &calc.MultiplyPayload{ - A: int(message.A), - B: int(message.B), + A: int(*message.A), + B: int(*message.B), } return v, nil diff --git a/basic/gen/grpc/calc/client/encode_decode.go b/basic/gen/grpc/calc/client/encode_decode.go index b2b505207..0c102e6be 100644 --- a/basic/gen/grpc/calc/client/encode_decode.go +++ b/basic/gen/grpc/calc/client/encode_decode.go @@ -46,6 +46,9 @@ func DecodeMultiplyResponse(ctx context.Context, v any, hdr, trlr metadata.MD) ( if !ok { return nil, goagrpc.ErrInvalidType("calc", "multiply", "*calcpb.MultiplyResponse", v) } + if err := ValidateMultiplyResponse(message); err != nil { + return nil, err + } res := NewMultiplyResult(message) return res, nil } diff --git a/basic/gen/grpc/calc/client/types.go b/basic/gen/grpc/calc/client/types.go index 079e02838..58f984d46 100644 --- a/basic/gen/grpc/calc/client/types.go +++ b/basic/gen/grpc/calc/client/types.go @@ -10,20 +10,41 @@ package client import ( calc "goa.design/examples/basic/gen/calc" calcpb "goa.design/examples/basic/gen/grpc/calc/pb" + goa "goa.design/goa/v3/pkg" ) // NewProtoMultiplyRequest builds *calcpb.MultiplyRequest from // *calc.MultiplyPayload. func NewProtoMultiplyRequest(payload *calc.MultiplyPayload) *calcpb.MultiplyRequest { - message := &calcpb.MultiplyRequest{ - A: int32(payload.A), - B: int32(payload.B), - } + message := &calcpb.MultiplyRequest{} + a := int32(payload.A) + message.A = &a + b := int32(payload.B) + message.B = &b return message } // NewMultiplyResult builds int from *calcpb.MultiplyResponse. func NewMultiplyResult(message *calcpb.MultiplyResponse) int { - result := int(message.Field) + result := int(*message.Field) return result } + +// ValidateMultiplyRequest runs the validations defined on MultiplyRequest. +func ValidateMultiplyRequest(message *calcpb.MultiplyRequest) (err error) { + if message.A == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("a", "message")) + } + if message.B == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("b", "message")) + } + return +} + +// ValidateMultiplyResponse runs the validations defined on MultiplyResponse. +func ValidateMultiplyResponse(message *calcpb.MultiplyResponse) (err error) { + if message.Field == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("field", "message")) + } + return +} diff --git a/basic/gen/grpc/calc/pb/goagen_basic_calc.pb.go b/basic/gen/grpc/calc/pb/goagen_basic_calc.pb.go index bb3e0290e..bd13aa53b 100644 --- a/basic/gen/grpc/calc/pb/goagen_basic_calc.pb.go +++ b/basic/gen/grpc/calc/pb/goagen_basic_calc.pb.go @@ -31,9 +31,9 @@ const ( type MultiplyRequest struct { state protoimpl.MessageState `protogen:"open.v1"` // Left operand - A int32 `protobuf:"zigzag32,1,opt,name=a,proto3" json:"a,omitempty"` + A *int32 `protobuf:"zigzag32,1,opt,name=a,proto3,oneof" json:"a,omitempty"` // Right operand - B int32 `protobuf:"zigzag32,2,opt,name=b,proto3" json:"b,omitempty"` + B *int32 `protobuf:"zigzag32,2,opt,name=b,proto3,oneof" json:"b,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -69,22 +69,22 @@ func (*MultiplyRequest) Descriptor() ([]byte, []int) { } func (x *MultiplyRequest) GetA() int32 { - if x != nil { - return x.A + if x != nil && x.A != nil { + return *x.A } return 0 } func (x *MultiplyRequest) GetB() int32 { - if x != nil { - return x.B + if x != nil && x.B != nil { + return *x.B } return 0 } type MultiplyResponse struct { state protoimpl.MessageState `protogen:"open.v1"` - Field int32 `protobuf:"zigzag32,1,opt,name=field,proto3" json:"field,omitempty"` + Field *int32 `protobuf:"zigzag32,1,opt,name=field,proto3,oneof" json:"field,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -120,8 +120,8 @@ func (*MultiplyResponse) Descriptor() ([]byte, []int) { } func (x *MultiplyResponse) GetField() int32 { - if x != nil { - return x.Field + if x != nil && x.Field != nil { + return *x.Field } return 0 } @@ -130,12 +130,15 @@ var File_goagen_basic_calc_proto protoreflect.FileDescriptor const file_goagen_basic_calc_proto_rawDesc = "" + "\n" + - "\x17goagen_basic_calc.proto\x12\x04calc\"-\n" + - "\x0fMultiplyRequest\x12\f\n" + - "\x01a\x18\x01 \x01(\x11R\x01a\x12\f\n" + - "\x01b\x18\x02 \x01(\x11R\x01b\"(\n" + - "\x10MultiplyResponse\x12\x14\n" + - "\x05field\x18\x01 \x01(\x11R\x05field2A\n" + + "\x17goagen_basic_calc.proto\x12\x04calc\"C\n" + + "\x0fMultiplyRequest\x12\x11\n" + + "\x01a\x18\x01 \x01(\x11H\x00R\x01a\x88\x01\x01\x12\x11\n" + + "\x01b\x18\x02 \x01(\x11H\x01R\x01b\x88\x01\x01B\x04\n" + + "\x02_aB\x04\n" + + "\x02_b\"7\n" + + "\x10MultiplyResponse\x12\x19\n" + + "\x05field\x18\x01 \x01(\x11H\x00R\x05field\x88\x01\x01B\b\n" + + "\x06_field2A\n" + "\x04Calc\x129\n" + "\bMultiply\x12\x15.calc.MultiplyRequest\x1a\x16.calc.MultiplyResponseB\tZ\a/calcpbb\x06proto3" @@ -171,6 +174,8 @@ func file_goagen_basic_calc_proto_init() { if File_goagen_basic_calc_proto != nil { return } + file_goagen_basic_calc_proto_msgTypes[0].OneofWrappers = []any{} + file_goagen_basic_calc_proto_msgTypes[1].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/basic/gen/grpc/calc/pb/goagen_basic_calc.proto b/basic/gen/grpc/calc/pb/goagen_basic_calc.proto index 76ae5b1fc..981d68e05 100644 --- a/basic/gen/grpc/calc/pb/goagen_basic_calc.proto +++ b/basic/gen/grpc/calc/pb/goagen_basic_calc.proto @@ -19,11 +19,11 @@ service Calc { message MultiplyRequest { // Left operand - sint32 a = 1; + optional sint32 a = 1; // Right operand - sint32 b = 2; + optional sint32 b = 2; } message MultiplyResponse { - sint32 field = 1; + optional sint32 field = 1; } diff --git a/basic/gen/grpc/calc/server/encode_decode.go b/basic/gen/grpc/calc/server/encode_decode.go index 97856c86c..d34f5cbf2 100644 --- a/basic/gen/grpc/calc/server/encode_decode.go +++ b/basic/gen/grpc/calc/server/encode_decode.go @@ -38,6 +38,9 @@ func DecodeMultiplyRequest(ctx context.Context, v any, md metadata.MD) (any, err if message, ok = v.(*calcpb.MultiplyRequest); !ok { return nil, goagrpc.ErrInvalidType("calc", "multiply", "*calcpb.MultiplyRequest", v) } + if err := ValidateMultiplyRequest(message); err != nil { + return nil, err + } } var payload *calc.MultiplyPayload { diff --git a/basic/gen/grpc/calc/server/types.go b/basic/gen/grpc/calc/server/types.go index 4ff1c9655..27fa51fba 100644 --- a/basic/gen/grpc/calc/server/types.go +++ b/basic/gen/grpc/calc/server/types.go @@ -10,13 +10,14 @@ package server import ( calc "goa.design/examples/basic/gen/calc" calcpb "goa.design/examples/basic/gen/grpc/calc/pb" + goa "goa.design/goa/v3/pkg" ) // NewMultiplyPayload builds *calc.MultiplyPayload from *calcpb.MultiplyRequest. func NewMultiplyPayload(message *calcpb.MultiplyRequest) *calc.MultiplyPayload { v := &calc.MultiplyPayload{ - A: int(message.A), - B: int(message.B), + A: int(*message.A), + B: int(*message.B), } return v } @@ -24,6 +25,18 @@ func NewMultiplyPayload(message *calcpb.MultiplyRequest) *calc.MultiplyPayload { // NewProtoMultiplyResponse builds *calcpb.MultiplyResponse from int. func NewProtoMultiplyResponse(result int) *calcpb.MultiplyResponse { message := &calcpb.MultiplyResponse{} - message.Field = int32(result) + message.Field = new(int32) + *message.Field = int32(result) return message } + +// ValidateMultiplyRequest runs the validations defined on MultiplyRequest. +func ValidateMultiplyRequest(message *calcpb.MultiplyRequest) (err error) { + if message.A == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("a", "message")) + } + if message.B == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("b", "message")) + } + return +} diff --git a/basic/go.mod b/basic/go.mod index 4c1e94784..e78fc427a 100644 --- a/basic/go.mod +++ b/basic/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( goa.design/clue v1.2.6 - goa.design/goa/v3 v3.30.0 + goa.design/goa/v3 v3.30.1-0.20260825000358-70a27fd82e81 google.golang.org/grpc v1.83.1 google.golang.org/protobuf v1.36.12 ) diff --git a/basic/go.sum b/basic/go.sum index a0f32c059..40fc45d57 100644 --- a/basic/go.sum +++ b/basic/go.sum @@ -55,8 +55,8 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/clue v1.2.6 h1:ensyUkwlvEbNy8FuTGMldKuvaNouh8YoDY9QaE+EtYg= goa.design/clue v1.2.6/go.mod h1:Y4RS5o2k6MZiGk2PT3XbKyntjR2xkr8dYOKQ591dIDM= -goa.design/goa/v3 v3.30.0 h1:KXfAR5qlUCJLVPlHTZ6pHdC5b013BB78PLbDf2fFhfY= -goa.design/goa/v3 v3.30.0/go.mod h1:Is2byRdJddS20jhGT3Ql80N5hQyAc4HgAl7H/A0ZmJ4= +goa.design/goa/v3 v3.30.1-0.20260825000358-70a27fd82e81 h1:LeU5jBnRZV7r/a56FAiGbqptG345Bi/9yE5M1zQjSYY= +goa.design/goa/v3 v3.30.1-0.20260825000358-70a27fd82e81/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/cellar/gen/grpc/sommelier/client/encode_decode.go b/cellar/gen/grpc/sommelier/client/encode_decode.go index 62e55e44b..a28b1dd5f 100644 --- a/cellar/gen/grpc/sommelier/client/encode_decode.go +++ b/cellar/gen/grpc/sommelier/client/encode_decode.go @@ -47,6 +47,9 @@ func DecodePickResponse(ctx context.Context, v any, hdr, trlr metadata.MD) (any, if !ok { return nil, goagrpc.ErrInvalidType("sommelier", "pick", "*sommelierpb.StoredBottleCollection", v) } + if err := ValidateStoredBottleCollection(message); err != nil { + return nil, err + } res := NewPickResult(message) vres := sommelierviews.StoredBottleCollection{Projected: res, View: "default"} if err := sommelierviews.ValidateStoredBottleCollection(vres); err != nil { diff --git a/cellar/gen/grpc/sommelier/client/types.go b/cellar/gen/grpc/sommelier/client/types.go index 77ecc4d7b..8f014b7df 100644 --- a/cellar/gen/grpc/sommelier/client/types.go +++ b/cellar/gen/grpc/sommelier/client/types.go @@ -37,9 +37,9 @@ func NewPickResult(message *sommelierpb.StoredBottleCollection) sommelierviews.S result := make([]*sommelierviews.StoredBottleView, len(message.Field)) for i, val := range message.Field { result[i] = &sommelierviews.StoredBottleView{ - ID: &val.Id, - Name: &val.Name, - Vintage: &val.Vintage, + ID: val.Id, + Name: val.Name, + Vintage: val.Vintage, Description: val.Description, Rating: val.Rating, } @@ -50,7 +50,7 @@ func NewPickResult(message *sommelierpb.StoredBottleCollection) sommelierviews.S result[i].Composition = make([]*sommelierviews.ComponentView, len(val.Composition)) for j, val := range val.Composition { result[i].Composition[j] = &sommelierviews.ComponentView{ - Varietal: &val.Varietal, + Varietal: val.Varietal, Percentage: val.Percentage, } } @@ -74,22 +74,35 @@ func ValidateStoredBottleCollection(message *sommelierpb.StoredBottleCollection) // ValidateStoredBottle runs the validations defined on StoredBottle. func ValidateStoredBottle(elem *sommelierpb.StoredBottle) (err error) { + if elem.Id == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("id", "elem")) + } + if elem.Name == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("name", "elem")) + } if elem.Winery == nil { err = goa.MergeErrors(err, goa.MissingFieldError("winery", "elem")) } - if utf8.RuneCountInString(elem.Name) > 100 { - err = goa.MergeErrors(err, goa.InvalidLengthError("elem.name", elem.Name, utf8.RuneCountInString(elem.Name), 100, false)) + if elem.Vintage == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("vintage", "elem")) + } + if elem.Name != nil { + if utf8.RuneCountInString(*elem.Name) > 100 { + err = goa.MergeErrors(err, goa.InvalidLengthError("elem.name", *elem.Name, utf8.RuneCountInString(*elem.Name), 100, false)) + } } if elem.Winery != nil { if err2 := ValidateWinery(elem.Winery); err2 != nil { err = goa.MergeErrors(err, err2) } } - if elem.Vintage < 1900 { - err = goa.MergeErrors(err, goa.InvalidRangeError("elem.vintage", elem.Vintage, 1900, true)) - } - if elem.Vintage > 2020 { - err = goa.MergeErrors(err, goa.InvalidRangeError("elem.vintage", elem.Vintage, 2020, false)) + if elem.Vintage != nil { + if *elem.Vintage < 1900 { + err = goa.MergeErrors(err, goa.InvalidRangeError("elem.vintage", *elem.Vintage, 1900, true)) + } + if *elem.Vintage > 2020 { + err = goa.MergeErrors(err, goa.InvalidRangeError("elem.vintage", *elem.Vintage, 2020, false)) + } } for _, e := range elem.Composition { if e != nil { @@ -116,19 +129,22 @@ func ValidateStoredBottle(elem *sommelierpb.StoredBottle) (err error) { // ValidateWinery runs the validations defined on Winery. func ValidateWinery(winery *sommelierpb.Winery) (err error) { - err = goa.MergeErrors(err, goa.ValidatePattern("winery.region", winery.Region, "[a-zA-Z '\\.]+")) - err = goa.MergeErrors(err, goa.ValidatePattern("winery.country", winery.Country, "[a-zA-Z '\\.]+")) - if winery.Url != nil { - err = goa.MergeErrors(err, goa.ValidatePattern("winery.url", *winery.Url, "^(https?|ftp)://[^\\s/$.?#].[^\\s]*$")) + if winery.Name == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("name", "winery")) } return } // ValidateComponent runs the validations defined on Component. func ValidateComponent(elem *sommelierpb.Component) (err error) { - err = goa.MergeErrors(err, goa.ValidatePattern("elem.varietal", elem.Varietal, "[A-Za-z' ]+")) - if utf8.RuneCountInString(elem.Varietal) > 100 { - err = goa.MergeErrors(err, goa.InvalidLengthError("elem.varietal", elem.Varietal, utf8.RuneCountInString(elem.Varietal), 100, false)) + if elem.Varietal == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("varietal", "elem")) + } + if elem.Varietal != nil { + err = goa.MergeErrors(err, goa.ValidatePattern("elem.varietal", *elem.Varietal, "[A-Za-z' ]+")) + if utf8.RuneCountInString(*elem.Varietal) > 100 { + err = goa.MergeErrors(err, goa.InvalidLengthError("elem.varietal", *elem.Varietal, utf8.RuneCountInString(*elem.Varietal), 100, false)) + } } if elem.Percentage != nil { if *elem.Percentage < 1 { @@ -145,7 +161,7 @@ func ValidateComponent(elem *sommelierpb.Component) (err error) { // *sommelierviews.WineryView from a value of type *sommelierpb.Winery. func transformProtoWineryToWineryView(v *sommelierpb.Winery) *sommelierviews.WineryView { res := &sommelierviews.WineryView{ - Name: &v.Name, + Name: v.Name, } return res diff --git a/cellar/gen/grpc/sommelier/pb/goagen_cellar_sommelier.pb.go b/cellar/gen/grpc/sommelier/pb/goagen_cellar_sommelier.pb.go index b38dc5e68..82d6f2cad 100644 --- a/cellar/gen/grpc/sommelier/pb/goagen_cellar_sommelier.pb.go +++ b/cellar/gen/grpc/sommelier/pb/goagen_cellar_sommelier.pb.go @@ -139,13 +139,13 @@ func (x *StoredBottleCollection) GetField() []*StoredBottle { type StoredBottle struct { state protoimpl.MessageState `protogen:"open.v1"` // ID is the unique id of the bottle. - Id string `protobuf:"bytes,8,opt,name=id,proto3" json:"id,omitempty"` + Id *string `protobuf:"bytes,8,opt,name=id,proto3,oneof" json:"id,omitempty"` // Name of bottle - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + Name *string `protobuf:"bytes,2,opt,name=name,proto3,oneof" json:"name,omitempty"` // Winery that produces wine Winery *Winery `protobuf:"bytes,3,opt,name=winery,proto3" json:"winery,omitempty"` // Vintage of bottle - Vintage uint32 `protobuf:"varint,4,opt,name=vintage,proto3" json:"vintage,omitempty"` + Vintage *uint32 `protobuf:"varint,4,opt,name=vintage,proto3,oneof" json:"vintage,omitempty"` // Composition is the list of grape varietals and associated percentage. Composition []*Component `protobuf:"bytes,5,rep,name=composition,proto3" json:"composition,omitempty"` // Description of bottle @@ -187,15 +187,15 @@ func (*StoredBottle) Descriptor() ([]byte, []int) { } func (x *StoredBottle) GetId() string { - if x != nil { - return x.Id + if x != nil && x.Id != nil { + return *x.Id } return "" } func (x *StoredBottle) GetName() string { - if x != nil { - return x.Name + if x != nil && x.Name != nil { + return *x.Name } return "" } @@ -208,8 +208,8 @@ func (x *StoredBottle) GetWinery() *Winery { } func (x *StoredBottle) GetVintage() uint32 { - if x != nil { - return x.Vintage + if x != nil && x.Vintage != nil { + return *x.Vintage } return 0 } @@ -238,11 +238,11 @@ func (x *StoredBottle) GetRating() uint32 { type Winery struct { state protoimpl.MessageState `protogen:"open.v1"` // Name of winery - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"` // Region of winery - Region string `protobuf:"bytes,2,opt,name=region,proto3" json:"region,omitempty"` + Region *string `protobuf:"bytes,2,opt,name=region,proto3,oneof" json:"region,omitempty"` // Country of winery - Country string `protobuf:"bytes,3,opt,name=country,proto3" json:"country,omitempty"` + Country *string `protobuf:"bytes,3,opt,name=country,proto3,oneof" json:"country,omitempty"` // Winery website URL Url *string `protobuf:"bytes,4,opt,name=url,proto3,oneof" json:"url,omitempty"` unknownFields protoimpl.UnknownFields @@ -280,22 +280,22 @@ func (*Winery) Descriptor() ([]byte, []int) { } func (x *Winery) GetName() string { - if x != nil { - return x.Name + if x != nil && x.Name != nil { + return *x.Name } return "" } func (x *Winery) GetRegion() string { - if x != nil { - return x.Region + if x != nil && x.Region != nil { + return *x.Region } return "" } func (x *Winery) GetCountry() string { - if x != nil { - return x.Country + if x != nil && x.Country != nil { + return *x.Country } return "" } @@ -310,7 +310,7 @@ func (x *Winery) GetUrl() string { type Component struct { state protoimpl.MessageState `protogen:"open.v1"` // Grape varietal - Varietal string `protobuf:"bytes,1,opt,name=varietal,proto3" json:"varietal,omitempty"` + Varietal *string `protobuf:"bytes,1,opt,name=varietal,proto3,oneof" json:"varietal,omitempty"` // Percentage of varietal in wine Percentage *uint32 `protobuf:"varint,2,opt,name=percentage,proto3,oneof" json:"percentage,omitempty"` unknownFields protoimpl.UnknownFields @@ -348,8 +348,8 @@ func (*Component) Descriptor() ([]byte, []int) { } func (x *Component) GetVarietal() string { - if x != nil { - return x.Varietal + if x != nil && x.Varietal != nil { + return *x.Varietal } return "" } @@ -373,28 +373,37 @@ const file_goagen_cellar_sommelier_proto_rawDesc = "" + "\x05_nameB\t\n" + "\a_winery\"G\n" + "\x16StoredBottleCollection\x12-\n" + - "\x05field\x18\x01 \x03(\v2\x17.sommelier.StoredBottleR\x05field\"\x8e\x02\n" + - "\fStoredBottle\x12\x0e\n" + - "\x02id\x18\b \x01(\tR\x02id\x12\x12\n" + - "\x04name\x18\x02 \x01(\tR\x04name\x12)\n" + - "\x06winery\x18\x03 \x01(\v2\x11.sommelier.WineryR\x06winery\x12\x18\n" + - "\avintage\x18\x04 \x01(\rR\avintage\x126\n" + + "\x05field\x18\x01 \x03(\v2\x17.sommelier.StoredBottleR\x05field\"\xb9\x02\n" + + "\fStoredBottle\x12\x13\n" + + "\x02id\x18\b \x01(\tH\x00R\x02id\x88\x01\x01\x12\x17\n" + + "\x04name\x18\x02 \x01(\tH\x01R\x04name\x88\x01\x01\x12)\n" + + "\x06winery\x18\x03 \x01(\v2\x11.sommelier.WineryR\x06winery\x12\x1d\n" + + "\avintage\x18\x04 \x01(\rH\x02R\avintage\x88\x01\x01\x126\n" + "\vcomposition\x18\x05 \x03(\v2\x14.sommelier.ComponentR\vcomposition\x12%\n" + - "\vdescription\x18\x06 \x01(\tH\x00R\vdescription\x88\x01\x01\x12\x1b\n" + - "\x06rating\x18\a \x01(\rH\x01R\x06rating\x88\x01\x01B\x0e\n" + + "\vdescription\x18\x06 \x01(\tH\x03R\vdescription\x88\x01\x01\x12\x1b\n" + + "\x06rating\x18\a \x01(\rH\x04R\x06rating\x88\x01\x01B\x05\n" + + "\x03_idB\a\n" + + "\x05_nameB\n" + + "\n" + + "\b_vintageB\x0e\n" + "\f_descriptionB\t\n" + - "\a_rating\"m\n" + - "\x06Winery\x12\x12\n" + - "\x04name\x18\x01 \x01(\tR\x04name\x12\x16\n" + - "\x06region\x18\x02 \x01(\tR\x06region\x12\x18\n" + - "\acountry\x18\x03 \x01(\tR\acountry\x12\x15\n" + - "\x03url\x18\x04 \x01(\tH\x00R\x03url\x88\x01\x01B\x06\n" + - "\x04_url\"[\n" + - "\tComponent\x12\x1a\n" + - "\bvarietal\x18\x01 \x01(\tR\bvarietal\x12#\n" + + "\a_rating\"\x9c\x01\n" + + "\x06Winery\x12\x17\n" + + "\x04name\x18\x01 \x01(\tH\x00R\x04name\x88\x01\x01\x12\x1b\n" + + "\x06region\x18\x02 \x01(\tH\x01R\x06region\x88\x01\x01\x12\x1d\n" + + "\acountry\x18\x03 \x01(\tH\x02R\acountry\x88\x01\x01\x12\x15\n" + + "\x03url\x18\x04 \x01(\tH\x03R\x03url\x88\x01\x01B\a\n" + + "\x05_nameB\t\n" + + "\a_regionB\n" + + "\n" + + "\b_countryB\x06\n" + + "\x04_url\"m\n" + + "\tComponent\x12\x1f\n" + + "\bvarietal\x18\x01 \x01(\tH\x00R\bvarietal\x88\x01\x01\x12#\n" + "\n" + - "percentage\x18\x02 \x01(\rH\x00R\n" + - "percentage\x88\x01\x01B\r\n" + + "percentage\x18\x02 \x01(\rH\x01R\n" + + "percentage\x88\x01\x01B\v\n" + + "\t_varietalB\r\n" + "\v_percentage2N\n" + "\tSommelier\x12A\n" + "\x04Pick\x12\x16.sommelier.PickRequest\x1a!.sommelier.StoredBottleCollectionB\x0eZ\f/sommelierpbb\x06proto3" diff --git a/cellar/gen/grpc/sommelier/pb/goagen_cellar_sommelier.proto b/cellar/gen/grpc/sommelier/pb/goagen_cellar_sommelier.proto index df2217d2d..34a71f8a0 100644 --- a/cellar/gen/grpc/sommelier/pb/goagen_cellar_sommelier.proto +++ b/cellar/gen/grpc/sommelier/pb/goagen_cellar_sommelier.proto @@ -32,13 +32,13 @@ message StoredBottleCollection { // A StoredBottle describes a bottle retrieved by the storage service. message StoredBottle { // ID is the unique id of the bottle. - string id = 8; + optional string id = 8; // Name of bottle - string name = 2; + optional string name = 2; // Winery that produces wine Winery winery = 3; // Vintage of bottle - uint32 vintage = 4; + optional uint32 vintage = 4; // Composition is the list of grape varietals and associated percentage. repeated Component composition = 5; // Description of bottle @@ -49,18 +49,18 @@ message StoredBottle { message Winery { // Name of winery - string name = 1; + optional string name = 1; // Region of winery - string region = 2; + optional string region = 2; // Country of winery - string country = 3; + optional string country = 3; // Winery website URL optional string url = 4; } message Component { // Grape varietal - string varietal = 1; + optional string varietal = 1; // Percentage of varietal in wine optional uint32 percentage = 2; } diff --git a/cellar/gen/grpc/sommelier/server/types.go b/cellar/gen/grpc/sommelier/server/types.go index 31d31b9b9..cd20b6beb 100644 --- a/cellar/gen/grpc/sommelier/server/types.go +++ b/cellar/gen/grpc/sommelier/server/types.go @@ -35,9 +35,9 @@ func NewProtoStoredBottleCollection(result sommelierviews.StoredBottleCollection message.Field = make([]*sommelierpb.StoredBottle, len(result)) for i, val := range result { message.Field[i] = &sommelierpb.StoredBottle{ - Id: *val.ID, - Name: *val.Name, - Vintage: *val.Vintage, + Id: val.ID, + Name: val.Name, + Vintage: val.Vintage, Description: val.Description, Rating: val.Rating, } @@ -48,7 +48,7 @@ func NewProtoStoredBottleCollection(result sommelierviews.StoredBottleCollection message.Field[i].Composition = make([]*sommelierpb.Component, len(val.Composition)) for j, val := range val.Composition { message.Field[i].Composition[j] = &sommelierpb.Component{ - Varietal: *val.Varietal, + Varietal: val.Varietal, Percentage: val.Percentage, } } @@ -61,7 +61,7 @@ func NewProtoStoredBottleCollection(result sommelierviews.StoredBottleCollection // from a value of type *sommelierviews.WineryView. func transformWineryViewToProtoWinery(v *sommelierviews.WineryView) *sommelierpb.Winery { res := &sommelierpb.Winery{ - Name: *v.Name, + Name: v.Name, } return res diff --git a/cellar/gen/grpc/storage/client/cli.go b/cellar/gen/grpc/storage/client/cli.go index bd09f10c3..2eb8462ab 100644 --- a/cellar/gen/grpc/storage/client/cli.go +++ b/cellar/gen/grpc/storage/client/cli.go @@ -41,8 +41,12 @@ func BuildShowPayload(storageShowMessage string, storageShowView string) (*stora } } } + if err := ValidateShowRequest(&message); err != nil { + var zero *storage.ShowPayload + return zero, err + } v := &storage.ShowPayload{ - ID: message.Id, + ID: *message.Id, } v.View = view @@ -62,9 +66,13 @@ func BuildAddPayload(storageAddMessage string) (*storage.Bottle, error) { } } } + if err := ValidateAddRequest(&message); err != nil { + var zero *storage.Bottle + return zero, err + } v := &storage.Bottle{ - Name: message.Name, - Vintage: message.Vintage, + Name: *message.Name, + Vintage: *message.Vintage, Description: message.Description, Rating: message.Rating, } @@ -75,7 +83,7 @@ func BuildAddPayload(storageAddMessage string) (*storage.Bottle, error) { v.Composition = make([]*storage.Component, len(message.Composition)) for i, val := range message.Composition { v.Composition[i] = &storage.Component{ - Varietal: val.Varietal, + Varietal: *val.Varietal, Percentage: val.Percentage, } } @@ -97,8 +105,12 @@ func BuildRemovePayload(storageRemoveMessage string) (*storage.RemovePayload, er } } } + if err := ValidateRemoveRequest(&message); err != nil { + var zero *storage.RemovePayload + return zero, err + } v := &storage.RemovePayload{ - ID: message.Id, + ID: *message.Id, } return v, nil @@ -120,9 +132,12 @@ func BuildRatePayload(storageRateMessage string) (map[uint32][]string, error) { v := make(map[uint32][]string, len(message.Field)) for key, val := range message.Field { tk := key - tv := make([]string, len(val.Field)) - for i, val := range val.Field { - tv[i] = val + var tv []string + if val != nil { + tv = make([]string, len(val.Field)) + for i, val := range val.Field { + tv[i] = val + } } v[tk] = tv } @@ -142,11 +157,15 @@ func BuildMultiAddPayload(storageMultiAddMessage string) ([]*storage.Bottle, err } } } + if err := ValidateMultiAddRequest(&message); err != nil { + var zero []*storage.Bottle + return zero, err + } v := make([]*storage.Bottle, len(message.Field)) for i, val := range message.Field { v[i] = &storage.Bottle{ - Name: val.Name, - Vintage: val.Vintage, + Name: *val.Name, + Vintage: *val.Vintage, Description: val.Description, Rating: val.Rating, } @@ -157,7 +176,7 @@ func BuildMultiAddPayload(storageMultiAddMessage string) ([]*storage.Bottle, err v[i].Composition = make([]*storage.Component, len(val.Composition)) for j, val := range val.Composition { v[i].Composition[j] = &storage.Component{ - Varietal: val.Varietal, + Varietal: *val.Varietal, Percentage: val.Percentage, } } @@ -179,6 +198,10 @@ func BuildMultiUpdatePayload(storageMultiUpdateMessage string) (*storage.MultiUp } } } + if err := ValidateMultiUpdateRequest(&message); err != nil { + var zero *storage.MultiUpdatePayload + return zero, err + } v := &storage.MultiUpdatePayload{} if message.Ids != nil { v.Ids = make([]string, len(message.Ids)) @@ -190,8 +213,8 @@ func BuildMultiUpdatePayload(storageMultiUpdateMessage string) (*storage.MultiUp v.Bottles = make([]*storage.Bottle, len(message.Bottles)) for i, val := range message.Bottles { v.Bottles[i] = &storage.Bottle{ - Name: val.Name, - Vintage: val.Vintage, + Name: *val.Name, + Vintage: *val.Vintage, Description: val.Description, Rating: val.Rating, } @@ -202,7 +225,7 @@ func BuildMultiUpdatePayload(storageMultiUpdateMessage string) (*storage.MultiUp v.Bottles[i].Composition = make([]*storage.Component, len(val.Composition)) for j, val := range val.Composition { v.Bottles[i].Composition[j] = &storage.Component{ - Varietal: val.Varietal, + Varietal: *val.Varietal, Percentage: val.Percentage, } } diff --git a/cellar/gen/grpc/storage/client/client.go b/cellar/gen/grpc/storage/client/client.go index 445aae544..4dfba05dc 100644 --- a/cellar/gen/grpc/storage/client/client.go +++ b/cellar/gen/grpc/storage/client/client.go @@ -63,6 +63,9 @@ func (c *Client) Show() goa.Endpoint { resp := goagrpc.DecodeError(err) switch message := resp.(type) { case *storagepb.ShowNotFoundError: + if err := ValidateShowNotFoundError(message); err != nil { + return nil, err + } return nil, NewShowNotFoundError(message) case *goapb.ErrorResponse: return nil, goagrpc.NewServiceError(message) diff --git a/cellar/gen/grpc/storage/client/encode_decode.go b/cellar/gen/grpc/storage/client/encode_decode.go index 0f1ed46f3..003bc62a0 100644 --- a/cellar/gen/grpc/storage/client/encode_decode.go +++ b/cellar/gen/grpc/storage/client/encode_decode.go @@ -38,6 +38,9 @@ func DecodeListResponse(ctx context.Context, v any, hdr, trlr metadata.MD) (any, if !ok { return nil, goagrpc.ErrInvalidType("storage", "list", "*storagepb.StoredBottleCollection", v) } + if err := ValidateStoredBottleCollectionTiny(message); err != nil { + return nil, err + } res := NewListResult(message) vres := storageviews.StoredBottleCollection{Projected: res, View: "tiny"} if err := storageviews.ValidateStoredBottleCollection(vres); err != nil { @@ -88,8 +91,14 @@ func DecodeShowResponse(ctx context.Context, v any, hdr, trlr metadata.MD) (any, var res *storageviews.StoredBottleView switch view { case "default", "": + if err := ValidateShowResponse(message); err != nil { + return nil, err + } res = NewShowResult(message) case "tiny": + if err := ValidateShowResponseTiny(message); err != nil { + return nil, err + } res = NewShowResultTiny(message) } vres := &storageviews.StoredBottle{Projected: res, View: view} @@ -128,6 +137,9 @@ func DecodeAddResponse(ctx context.Context, v any, hdr, trlr metadata.MD) (any, if !ok { return nil, goagrpc.ErrInvalidType("storage", "add", "*storagepb.AddResponse", v) } + if err := ValidateAddResponse(message); err != nil { + return nil, err + } res := NewAddResult(message) return res, nil } diff --git a/cellar/gen/grpc/storage/client/types.go b/cellar/gen/grpc/storage/client/types.go index bfb182a5c..81936718c 100644 --- a/cellar/gen/grpc/storage/client/types.go +++ b/cellar/gen/grpc/storage/client/types.go @@ -28,8 +28,8 @@ func NewListResult(message *storagepb.StoredBottleCollection) storageviews.Store result := make([]*storageviews.StoredBottleView, len(message.Field)) for i, val := range message.Field { result[i] = &storageviews.StoredBottleView{ - ID: &val.Id, - Name: &val.Name, + ID: val.Id, + Name: val.Name, } if val.Winery != nil { result[i].Winery = transformProtoStoredBottleCollectionWineryToStoredBottleCollectionViewWineryView(val.Winery) @@ -41,7 +41,7 @@ func NewListResult(message *storagepb.StoredBottleCollection) storageviews.Store // NewProtoShowRequest builds *storagepb.ShowRequest from *storage.ShowPayload. func NewProtoShowRequest(payload *storage.ShowPayload) *storagepb.ShowRequest { message := &storagepb.ShowRequest{ - Id: payload.ID, + Id: &payload.ID, } return message } @@ -50,9 +50,9 @@ func NewProtoShowRequest(payload *storage.ShowPayload) *storagepb.ShowRequest { // *storagepb.ShowResponse. func NewShowResult(message *storagepb.ShowResponse) *storageviews.StoredBottleView { result := &storageviews.StoredBottleView{ - ID: &message.Id, - Name: &message.Name, - Vintage: &message.Vintage, + ID: message.Id, + Name: message.Name, + Vintage: message.Vintage, Description: message.Description, Rating: message.Rating, } @@ -63,7 +63,7 @@ func NewShowResult(message *storagepb.ShowResponse) *storageviews.StoredBottleVi result.Composition = make([]*storageviews.ComponentView, len(message.Composition)) for i, val := range message.Composition { result.Composition[i] = &storageviews.ComponentView{ - Varietal: &val.Varietal, + Varietal: val.Varietal, Percentage: val.Percentage, } } @@ -75,8 +75,8 @@ func NewShowResult(message *storagepb.ShowResponse) *storageviews.StoredBottleVi // *storagepb.ShowResponse. func NewShowResultTiny(message *storagepb.ShowResponse) *storageviews.StoredBottleView { result := &storageviews.StoredBottleView{ - ID: &message.Id, - Name: &message.Name, + ID: message.Id, + Name: message.Name, } if message.Winery != nil { result.Winery = transformProtoWineryToWineryViewTiny(message.Winery) @@ -88,8 +88,8 @@ func NewShowResultTiny(message *storagepb.ShowResponse) *storageviews.StoredBott // *storagepb.ShowNotFoundError. func NewShowNotFoundError(message *storagepb.ShowNotFoundError) *storage.NotFound { er := &storage.NotFound{ - Message: message.Message_, - ID: message.Id, + Message: *message.Message_, + ID: *message.Id, } return er } @@ -97,8 +97,8 @@ func NewShowNotFoundError(message *storagepb.ShowNotFoundError) *storage.NotFoun // NewProtoAddRequest builds *storagepb.AddRequest from *storage.Bottle. func NewProtoAddRequest(payload *storage.Bottle) *storagepb.AddRequest { message := &storagepb.AddRequest{ - Name: payload.Name, - Vintage: payload.Vintage, + Name: &payload.Name, + Vintage: &payload.Vintage, Description: payload.Description, Rating: payload.Rating, } @@ -109,7 +109,7 @@ func NewProtoAddRequest(payload *storage.Bottle) *storagepb.AddRequest { message.Composition = make([]*storagepb.Component, len(payload.Composition)) for i, val := range payload.Composition { message.Composition[i] = &storagepb.Component{ - Varietal: val.Varietal, + Varietal: &val.Varietal, Percentage: val.Percentage, } } @@ -119,7 +119,7 @@ func NewProtoAddRequest(payload *storage.Bottle) *storagepb.AddRequest { // NewAddResult builds string from *storagepb.AddResponse. func NewAddResult(message *storagepb.AddResponse) string { - result := message.Field + result := *message.Field return result } @@ -127,7 +127,7 @@ func NewAddResult(message *storagepb.AddResponse) string { // *storage.RemovePayload. func NewProtoRemoveRequest(payload *storage.RemovePayload) *storagepb.RemoveRequest { message := &storagepb.RemoveRequest{ - Id: payload.ID, + Id: &payload.ID, } return message } @@ -155,8 +155,8 @@ func NewProtoMultiAddRequest(payload []*storage.Bottle) *storagepb.MultiAddReque message.Field = make([]*storagepb.Bottle, len(payload)) for i, val := range payload { message.Field[i] = &storagepb.Bottle{ - Name: val.Name, - Vintage: val.Vintage, + Name: &val.Name, + Vintage: &val.Vintage, Description: val.Description, Rating: val.Rating, } @@ -167,7 +167,7 @@ func NewProtoMultiAddRequest(payload []*storage.Bottle) *storagepb.MultiAddReque message.Field[i].Composition = make([]*storagepb.Component, len(val.Composition)) for j, val := range val.Composition { message.Field[i].Composition[j] = &storagepb.Component{ - Varietal: val.Varietal, + Varietal: &val.Varietal, Percentage: val.Percentage, } } @@ -199,8 +199,8 @@ func NewProtoMultiUpdateRequest(payload *storage.MultiUpdatePayload) *storagepb. message.Bottles = make([]*storagepb.Bottle, len(payload.Bottles)) for i, val := range payload.Bottles { message.Bottles[i] = &storagepb.Bottle{ - Name: val.Name, - Vintage: val.Vintage, + Name: &val.Name, + Vintage: &val.Vintage, Description: val.Description, Rating: val.Rating, } @@ -211,7 +211,7 @@ func NewProtoMultiUpdateRequest(payload *storage.MultiUpdatePayload) *storagepb. message.Bottles[i].Composition = make([]*storagepb.Component, len(val.Composition)) for j, val := range val.Composition { message.Bottles[i].Composition[j] = &storagepb.Component{ - Varietal: val.Varietal, + Varietal: &val.Varietal, Percentage: val.Percentage, } } @@ -221,12 +221,12 @@ func NewProtoMultiUpdateRequest(payload *storage.MultiUpdatePayload) *storagepb. return message } -// ValidateStoredBottleCollection runs the validations defined on +// ValidateStoredBottleCollectionTiny runs the validations defined on // StoredBottleCollection. -func ValidateStoredBottleCollection(message *storagepb.StoredBottleCollection) (err error) { +func ValidateStoredBottleCollectionTiny(message *storagepb.StoredBottleCollection) (err error) { for _, e := range message.Field { if e != nil { - if err2 := ValidateStoredBottle(e); err2 != nil { + if err2 := ValidateStoredBottleTiny(e); err2 != nil { err = goa.MergeErrors(err, err2) } } @@ -234,63 +234,111 @@ func ValidateStoredBottleCollection(message *storagepb.StoredBottleCollection) ( return } -// ValidateStoredBottle runs the validations defined on StoredBottle. -func ValidateStoredBottle(elem *storagepb.StoredBottle) (err error) { +// ValidateStoredBottleTiny runs the validations defined on StoredBottle. +func ValidateStoredBottleTiny(elem *storagepb.StoredBottle) (err error) { + if elem.Id == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("id", "elem")) + } + if elem.Name == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("name", "elem")) + } if elem.Winery == nil { err = goa.MergeErrors(err, goa.MissingFieldError("winery", "elem")) } - if utf8.RuneCountInString(elem.Name) > 100 { - err = goa.MergeErrors(err, goa.InvalidLengthError("elem.name", elem.Name, utf8.RuneCountInString(elem.Name), 100, false)) + if elem.Name != nil { + if utf8.RuneCountInString(*elem.Name) > 100 { + err = goa.MergeErrors(err, goa.InvalidLengthError("elem.name", *elem.Name, utf8.RuneCountInString(*elem.Name), 100, false)) + } } if elem.Winery != nil { - if err2 := ValidateWinery(elem.Winery); err2 != nil { + if err2 := ValidateWineryTiny(elem.Winery); err2 != nil { err = goa.MergeErrors(err, err2) } } - if elem.Vintage < 1900 { - err = goa.MergeErrors(err, goa.InvalidRangeError("elem.vintage", elem.Vintage, 1900, true)) + return +} + +// ValidateWineryTiny runs the validations defined on Winery. +func ValidateWineryTiny(winery *storagepb.Winery) (err error) { + if winery.Name == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("name", "winery")) } - if elem.Vintage > 2020 { - err = goa.MergeErrors(err, goa.InvalidRangeError("elem.vintage", elem.Vintage, 2020, false)) + return +} + +// ValidateShowRequest runs the validations defined on ShowRequest. +func ValidateShowRequest(message *storagepb.ShowRequest) (err error) { + if message.Id == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("id", "message")) } - for _, e := range elem.Composition { + return +} + +// ValidateShowResponse runs the validations defined on ShowResponse. +func ValidateShowResponse(message *storagepb.ShowResponse) (err error) { + if message.Id == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("id", "message")) + } + if message.Name == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("name", "message")) + } + if message.Winery == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("winery", "message")) + } + if message.Vintage == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("vintage", "message")) + } + if message.Name != nil { + if utf8.RuneCountInString(*message.Name) > 100 { + err = goa.MergeErrors(err, goa.InvalidLengthError("message.name", *message.Name, utf8.RuneCountInString(*message.Name), 100, false)) + } + } + if message.Winery != nil { + if err2 := ValidateWineryTiny(message.Winery); err2 != nil { + err = goa.MergeErrors(err, err2) + } + } + if message.Vintage != nil { + if *message.Vintage < 1900 { + err = goa.MergeErrors(err, goa.InvalidRangeError("message.vintage", *message.Vintage, 1900, true)) + } + if *message.Vintage > 2020 { + err = goa.MergeErrors(err, goa.InvalidRangeError("message.vintage", *message.Vintage, 2020, false)) + } + } + for _, e := range message.Composition { if e != nil { if err2 := ValidateComponent(e); err2 != nil { err = goa.MergeErrors(err, err2) } } } - if elem.Description != nil { - if utf8.RuneCountInString(*elem.Description) > 2000 { - err = goa.MergeErrors(err, goa.InvalidLengthError("elem.description", *elem.Description, utf8.RuneCountInString(*elem.Description), 2000, false)) + if message.Description != nil { + if utf8.RuneCountInString(*message.Description) > 2000 { + err = goa.MergeErrors(err, goa.InvalidLengthError("message.description", *message.Description, utf8.RuneCountInString(*message.Description), 2000, false)) } } - if elem.Rating != nil { - if *elem.Rating < 1 { - err = goa.MergeErrors(err, goa.InvalidRangeError("elem.rating", *elem.Rating, 1, true)) + if message.Rating != nil { + if *message.Rating < 1 { + err = goa.MergeErrors(err, goa.InvalidRangeError("message.rating", *message.Rating, 1, true)) } - if *elem.Rating > 5 { - err = goa.MergeErrors(err, goa.InvalidRangeError("elem.rating", *elem.Rating, 5, false)) + if *message.Rating > 5 { + err = goa.MergeErrors(err, goa.InvalidRangeError("message.rating", *message.Rating, 5, false)) } } return } -// ValidateWinery runs the validations defined on Winery. -func ValidateWinery(winery *storagepb.Winery) (err error) { - err = goa.MergeErrors(err, goa.ValidatePattern("winery.region", winery.Region, "[a-zA-Z '\\.]+")) - err = goa.MergeErrors(err, goa.ValidatePattern("winery.country", winery.Country, "[a-zA-Z '\\.]+")) - if winery.Url != nil { - err = goa.MergeErrors(err, goa.ValidatePattern("winery.url", *winery.Url, "^(https?|ftp)://[^\\s/$.?#].[^\\s]*$")) - } - return -} - // ValidateComponent runs the validations defined on Component. func ValidateComponent(elem *storagepb.Component) (err error) { - err = goa.MergeErrors(err, goa.ValidatePattern("elem.varietal", elem.Varietal, "[A-Za-z' ]+")) - if utf8.RuneCountInString(elem.Varietal) > 100 { - err = goa.MergeErrors(err, goa.InvalidLengthError("elem.varietal", elem.Varietal, utf8.RuneCountInString(elem.Varietal), 100, false)) + if elem.Varietal == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("varietal", "elem")) + } + if elem.Varietal != nil { + err = goa.MergeErrors(err, goa.ValidatePattern("elem.varietal", *elem.Varietal, "[A-Za-z' ]+")) + if utf8.RuneCountInString(*elem.Varietal) > 100 { + err = goa.MergeErrors(err, goa.InvalidLengthError("elem.varietal", *elem.Varietal, utf8.RuneCountInString(*elem.Varietal), 100, false)) + } } if elem.Percentage != nil { if *elem.Percentage < 1 { @@ -303,24 +351,69 @@ func ValidateComponent(elem *storagepb.Component) (err error) { return } -// ValidateShowResponse runs the validations defined on ShowResponse. -func ValidateShowResponse(message *storagepb.ShowResponse) (err error) { +// ValidateShowResponseTiny runs the validations defined on ShowResponse. +func ValidateShowResponseTiny(message *storagepb.ShowResponse) (err error) { + if message.Id == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("id", "message")) + } + if message.Name == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("name", "message")) + } if message.Winery == nil { err = goa.MergeErrors(err, goa.MissingFieldError("winery", "message")) } - if utf8.RuneCountInString(message.Name) > 100 { - err = goa.MergeErrors(err, goa.InvalidLengthError("message.name", message.Name, utf8.RuneCountInString(message.Name), 100, false)) + if message.Name != nil { + if utf8.RuneCountInString(*message.Name) > 100 { + err = goa.MergeErrors(err, goa.InvalidLengthError("message.name", *message.Name, utf8.RuneCountInString(*message.Name), 100, false)) + } } if message.Winery != nil { - if err2 := ValidateWinery(message.Winery); err2 != nil { + if err2 := ValidateWineryTiny(message.Winery); err2 != nil { err = goa.MergeErrors(err, err2) } } - if message.Vintage < 1900 { - err = goa.MergeErrors(err, goa.InvalidRangeError("message.vintage", message.Vintage, 1900, true)) + return +} + +// ValidateShowNotFoundError runs the validations defined on ShowNotFoundError. +func ValidateShowNotFoundError(errmsg *storagepb.ShowNotFoundError) (err error) { + if errmsg.Message_ == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("message", "errmsg")) } - if message.Vintage > 2020 { - err = goa.MergeErrors(err, goa.InvalidRangeError("message.vintage", message.Vintage, 2020, false)) + if errmsg.Id == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("id", "errmsg")) + } + return +} + +// ValidateAddRequest runs the validations defined on AddRequest. +func ValidateAddRequest(message *storagepb.AddRequest) (err error) { + if message.Name == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("name", "message")) + } + if message.Winery == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("winery", "message")) + } + if message.Vintage == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("vintage", "message")) + } + if message.Name != nil { + if utf8.RuneCountInString(*message.Name) > 100 { + err = goa.MergeErrors(err, goa.InvalidLengthError("message.name", *message.Name, utf8.RuneCountInString(*message.Name), 100, false)) + } + } + if message.Winery != nil { + if err2 := ValidateWinery(message.Winery); err2 != nil { + err = goa.MergeErrors(err, err2) + } + } + if message.Vintage != nil { + if *message.Vintage < 1900 { + err = goa.MergeErrors(err, goa.InvalidRangeError("message.vintage", *message.Vintage, 1900, true)) + } + if *message.Vintage > 2020 { + err = goa.MergeErrors(err, goa.InvalidRangeError("message.vintage", *message.Vintage, 2020, false)) + } } for _, e := range message.Composition { if e != nil { @@ -345,12 +438,134 @@ func ValidateShowResponse(message *storagepb.ShowResponse) (err error) { return } +// ValidateWinery runs the validations defined on Winery. +func ValidateWinery(winery *storagepb.Winery) (err error) { + if winery.Name == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("name", "winery")) + } + if winery.Region == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("region", "winery")) + } + if winery.Country == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("country", "winery")) + } + if winery.Region != nil { + err = goa.MergeErrors(err, goa.ValidatePattern("winery.region", *winery.Region, "[a-zA-Z '\\.]+")) + } + if winery.Country != nil { + err = goa.MergeErrors(err, goa.ValidatePattern("winery.country", *winery.Country, "[a-zA-Z '\\.]+")) + } + if winery.Url != nil { + err = goa.MergeErrors(err, goa.ValidatePattern("winery.url", *winery.Url, "^(https?|ftp)://[^\\s/$.?#].[^\\s]*$")) + } + return +} + +// ValidateAddResponse runs the validations defined on AddResponse. +func ValidateAddResponse(message *storagepb.AddResponse) (err error) { + if message.Field == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("field", "message")) + } + return +} + +// ValidateRemoveRequest runs the validations defined on RemoveRequest. +func ValidateRemoveRequest(message *storagepb.RemoveRequest) (err error) { + if message.Id == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("id", "message")) + } + return +} + +// ValidateMultiAddRequest runs the validations defined on MultiAddRequest. +func ValidateMultiAddRequest(message *storagepb.MultiAddRequest) (err error) { + for _, e := range message.Field { + if e != nil { + if err2 := ValidateBottle(e); err2 != nil { + err = goa.MergeErrors(err, err2) + } + } + } + return +} + +// ValidateBottle runs the validations defined on Bottle. +func ValidateBottle(elem *storagepb.Bottle) (err error) { + if elem.Name == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("name", "elem")) + } + if elem.Winery == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("winery", "elem")) + } + if elem.Vintage == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("vintage", "elem")) + } + if elem.Name != nil { + if utf8.RuneCountInString(*elem.Name) > 100 { + err = goa.MergeErrors(err, goa.InvalidLengthError("elem.name", *elem.Name, utf8.RuneCountInString(*elem.Name), 100, false)) + } + } + if elem.Winery != nil { + if err2 := ValidateWinery(elem.Winery); err2 != nil { + err = goa.MergeErrors(err, err2) + } + } + if elem.Vintage != nil { + if *elem.Vintage < 1900 { + err = goa.MergeErrors(err, goa.InvalidRangeError("elem.vintage", *elem.Vintage, 1900, true)) + } + if *elem.Vintage > 2020 { + err = goa.MergeErrors(err, goa.InvalidRangeError("elem.vintage", *elem.Vintage, 2020, false)) + } + } + for _, e := range elem.Composition { + if e != nil { + if err2 := ValidateComponent(e); err2 != nil { + err = goa.MergeErrors(err, err2) + } + } + } + if elem.Description != nil { + if utf8.RuneCountInString(*elem.Description) > 2000 { + err = goa.MergeErrors(err, goa.InvalidLengthError("elem.description", *elem.Description, utf8.RuneCountInString(*elem.Description), 2000, false)) + } + } + if elem.Rating != nil { + if *elem.Rating < 1 { + err = goa.MergeErrors(err, goa.InvalidRangeError("elem.rating", *elem.Rating, 1, true)) + } + if *elem.Rating > 5 { + err = goa.MergeErrors(err, goa.InvalidRangeError("elem.rating", *elem.Rating, 5, false)) + } + } + return +} + +// ValidateMultiUpdateRequest runs the validations defined on +// MultiUpdateRequest. +func ValidateMultiUpdateRequest(message *storagepb.MultiUpdateRequest) (err error) { + if message.Ids == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("ids", "message")) + } + if message.Bottles == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("bottles", "message")) + } + for _, e := range message.Bottles { + if e != nil { + if err2 := ValidateBottle(e); err2 != nil { + err = goa.MergeErrors(err, err2) + } + } + } + return +} + // transformProtoStoredBottleCollectionWineryToStoredBottleCollectionViewWineryView // builds a value of type *storageviews.WineryView from a value of type // *storagepb.Winery. func transformProtoStoredBottleCollectionWineryToStoredBottleCollectionViewWineryView(v *storagepb.Winery) *storageviews.WineryView { res := &storageviews.WineryView{ - Name: &v.Name, + Name: v.Name, } return res @@ -360,7 +575,7 @@ func transformProtoStoredBottleCollectionWineryToStoredBottleCollectionViewWiner // of type *storageviews.WineryView from a value of type *storagepb.Winery. func transformProtoShowResponseWineryToStoredBottleViewWineryView(v *storagepb.Winery) *storageviews.WineryView { res := &storageviews.WineryView{ - Name: &v.Name, + Name: v.Name, } return res @@ -370,7 +585,7 @@ func transformProtoShowResponseWineryToStoredBottleViewWineryView(v *storagepb.W // *storageviews.WineryView from a value of type *storagepb.Winery. func transformProtoWineryToWineryViewTiny(v *storagepb.Winery) *storageviews.WineryView { res := &storageviews.WineryView{ - Name: &v.Name, + Name: v.Name, } return res @@ -380,9 +595,9 @@ func transformProtoWineryToWineryViewTiny(v *storagepb.Winery) *storageviews.Win // *storagepb.Winery from a value of type *storage.Winery. func transformBottleWineryToProtoAddRequestWinery(v *storage.Winery) *storagepb.Winery { res := &storagepb.Winery{ - Name: v.Name, - Region: v.Region, - Country: v.Country, + Name: &v.Name, + Region: &v.Region, + Country: &v.Country, Url: v.URL, } @@ -393,9 +608,9 @@ func transformBottleWineryToProtoAddRequestWinery(v *storage.Winery) *storagepb. // *storage.Winery from a value of type *storagepb.Winery. func transformProtoAddRequestWineryToBottleWinery(v *storagepb.Winery) *storage.Winery { res := &storage.Winery{ - Name: v.Name, - Region: v.Region, - Country: v.Country, + Name: *v.Name, + Region: *v.Region, + Country: *v.Country, URL: v.Url, } @@ -406,9 +621,9 @@ func transformProtoAddRequestWineryToBottleWinery(v *storagepb.Winery) *storage. // type *storagepb.Winery from a value of type *storage.Winery. func transformMultiAddRequestWineryToProtoMultiAddRequestWinery(v *storage.Winery) *storagepb.Winery { res := &storagepb.Winery{ - Name: v.Name, - Region: v.Region, - Country: v.Country, + Name: &v.Name, + Region: &v.Region, + Country: &v.Country, Url: v.URL, } @@ -419,9 +634,9 @@ func transformMultiAddRequestWineryToProtoMultiAddRequestWinery(v *storage.Winer // type *storage.Winery from a value of type *storagepb.Winery. func transformProtoMultiAddRequestWineryToMultiAddRequestWinery(v *storagepb.Winery) *storage.Winery { res := &storage.Winery{ - Name: v.Name, - Region: v.Region, - Country: v.Country, + Name: *v.Name, + Region: *v.Region, + Country: *v.Country, URL: v.Url, } @@ -432,9 +647,9 @@ func transformProtoMultiAddRequestWineryToMultiAddRequestWinery(v *storagepb.Win // value of type *storagepb.Winery from a value of type *storage.Winery. func transformMultiUpdatePayloadWineryToProtoMultiUpdateRequestWinery(v *storage.Winery) *storagepb.Winery { res := &storagepb.Winery{ - Name: v.Name, - Region: v.Region, - Country: v.Country, + Name: &v.Name, + Region: &v.Region, + Country: &v.Country, Url: v.URL, } @@ -445,9 +660,9 @@ func transformMultiUpdatePayloadWineryToProtoMultiUpdateRequestWinery(v *storage // value of type *storage.Winery from a value of type *storagepb.Winery. func transformProtoMultiUpdateRequestWineryToMultiUpdatePayloadWinery(v *storagepb.Winery) *storage.Winery { res := &storage.Winery{ - Name: v.Name, - Region: v.Region, - Country: v.Country, + Name: *v.Name, + Region: *v.Region, + Country: *v.Country, URL: v.Url, } diff --git a/cellar/gen/grpc/storage/pb/goagen_cellar_storage.pb.go b/cellar/gen/grpc/storage/pb/goagen_cellar_storage.pb.go index 0a83eb083..e848dd0eb 100644 --- a/cellar/gen/grpc/storage/pb/goagen_cellar_storage.pb.go +++ b/cellar/gen/grpc/storage/pb/goagen_cellar_storage.pb.go @@ -112,13 +112,13 @@ func (x *StoredBottleCollection) GetField() []*StoredBottle { type StoredBottle struct { state protoimpl.MessageState `protogen:"open.v1"` // ID is the unique id of the bottle. - Id string `protobuf:"bytes,8,opt,name=id,proto3" json:"id,omitempty"` + Id *string `protobuf:"bytes,8,opt,name=id,proto3,oneof" json:"id,omitempty"` // Name of bottle - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + Name *string `protobuf:"bytes,2,opt,name=name,proto3,oneof" json:"name,omitempty"` // Winery that produces wine Winery *Winery `protobuf:"bytes,3,opt,name=winery,proto3" json:"winery,omitempty"` // Vintage of bottle - Vintage uint32 `protobuf:"varint,4,opt,name=vintage,proto3" json:"vintage,omitempty"` + Vintage *uint32 `protobuf:"varint,4,opt,name=vintage,proto3,oneof" json:"vintage,omitempty"` // Composition is the list of grape varietals and associated percentage. Composition []*Component `protobuf:"bytes,5,rep,name=composition,proto3" json:"composition,omitempty"` // Description of bottle @@ -160,15 +160,15 @@ func (*StoredBottle) Descriptor() ([]byte, []int) { } func (x *StoredBottle) GetId() string { - if x != nil { - return x.Id + if x != nil && x.Id != nil { + return *x.Id } return "" } func (x *StoredBottle) GetName() string { - if x != nil { - return x.Name + if x != nil && x.Name != nil { + return *x.Name } return "" } @@ -181,8 +181,8 @@ func (x *StoredBottle) GetWinery() *Winery { } func (x *StoredBottle) GetVintage() uint32 { - if x != nil { - return x.Vintage + if x != nil && x.Vintage != nil { + return *x.Vintage } return 0 } @@ -211,11 +211,11 @@ func (x *StoredBottle) GetRating() uint32 { type Winery struct { state protoimpl.MessageState `protogen:"open.v1"` // Name of winery - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"` // Region of winery - Region string `protobuf:"bytes,2,opt,name=region,proto3" json:"region,omitempty"` + Region *string `protobuf:"bytes,2,opt,name=region,proto3,oneof" json:"region,omitempty"` // Country of winery - Country string `protobuf:"bytes,3,opt,name=country,proto3" json:"country,omitempty"` + Country *string `protobuf:"bytes,3,opt,name=country,proto3,oneof" json:"country,omitempty"` // Winery website URL Url *string `protobuf:"bytes,4,opt,name=url,proto3,oneof" json:"url,omitempty"` unknownFields protoimpl.UnknownFields @@ -253,22 +253,22 @@ func (*Winery) Descriptor() ([]byte, []int) { } func (x *Winery) GetName() string { - if x != nil { - return x.Name + if x != nil && x.Name != nil { + return *x.Name } return "" } func (x *Winery) GetRegion() string { - if x != nil { - return x.Region + if x != nil && x.Region != nil { + return *x.Region } return "" } func (x *Winery) GetCountry() string { - if x != nil { - return x.Country + if x != nil && x.Country != nil { + return *x.Country } return "" } @@ -283,7 +283,7 @@ func (x *Winery) GetUrl() string { type Component struct { state protoimpl.MessageState `protogen:"open.v1"` // Grape varietal - Varietal string `protobuf:"bytes,1,opt,name=varietal,proto3" json:"varietal,omitempty"` + Varietal *string `protobuf:"bytes,1,opt,name=varietal,proto3,oneof" json:"varietal,omitempty"` // Percentage of varietal in wine Percentage *uint32 `protobuf:"varint,2,opt,name=percentage,proto3,oneof" json:"percentage,omitempty"` unknownFields protoimpl.UnknownFields @@ -321,8 +321,8 @@ func (*Component) Descriptor() ([]byte, []int) { } func (x *Component) GetVarietal() string { - if x != nil { - return x.Varietal + if x != nil && x.Varietal != nil { + return *x.Varietal } return "" } @@ -337,9 +337,9 @@ func (x *Component) GetPercentage() uint32 { type ShowNotFoundError struct { state protoimpl.MessageState `protogen:"open.v1"` // Message of error - Message_ string `protobuf:"bytes,1,opt,name=message_,json=message,proto3" json:"message_,omitempty"` + Message_ *string `protobuf:"bytes,1,opt,name=message_,json=message,proto3,oneof" json:"message_,omitempty"` // ID of missing bottle - Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` + Id *string `protobuf:"bytes,2,opt,name=id,proto3,oneof" json:"id,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -375,15 +375,15 @@ func (*ShowNotFoundError) Descriptor() ([]byte, []int) { } func (x *ShowNotFoundError) GetMessage_() string { - if x != nil { - return x.Message_ + if x != nil && x.Message_ != nil { + return *x.Message_ } return "" } func (x *ShowNotFoundError) GetId() string { - if x != nil { - return x.Id + if x != nil && x.Id != nil { + return *x.Id } return "" } @@ -391,7 +391,7 @@ func (x *ShowNotFoundError) GetId() string { type ShowRequest struct { state protoimpl.MessageState `protogen:"open.v1"` // ID of bottle to show - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Id *string `protobuf:"bytes,1,opt,name=id,proto3,oneof" json:"id,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -427,8 +427,8 @@ func (*ShowRequest) Descriptor() ([]byte, []int) { } func (x *ShowRequest) GetId() string { - if x != nil { - return x.Id + if x != nil && x.Id != nil { + return *x.Id } return "" } @@ -436,13 +436,13 @@ func (x *ShowRequest) GetId() string { type ShowResponse struct { state protoimpl.MessageState `protogen:"open.v1"` // ID is the unique id of the bottle. - Id string `protobuf:"bytes,8,opt,name=id,proto3" json:"id,omitempty"` + Id *string `protobuf:"bytes,8,opt,name=id,proto3,oneof" json:"id,omitempty"` // Name of bottle - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + Name *string `protobuf:"bytes,2,opt,name=name,proto3,oneof" json:"name,omitempty"` // Winery that produces wine Winery *Winery `protobuf:"bytes,3,opt,name=winery,proto3" json:"winery,omitempty"` // Vintage of bottle - Vintage uint32 `protobuf:"varint,4,opt,name=vintage,proto3" json:"vintage,omitempty"` + Vintage *uint32 `protobuf:"varint,4,opt,name=vintage,proto3,oneof" json:"vintage,omitempty"` // Composition is the list of grape varietals and associated percentage. Composition []*Component `protobuf:"bytes,5,rep,name=composition,proto3" json:"composition,omitempty"` // Description of bottle @@ -484,15 +484,15 @@ func (*ShowResponse) Descriptor() ([]byte, []int) { } func (x *ShowResponse) GetId() string { - if x != nil { - return x.Id + if x != nil && x.Id != nil { + return *x.Id } return "" } func (x *ShowResponse) GetName() string { - if x != nil { - return x.Name + if x != nil && x.Name != nil { + return *x.Name } return "" } @@ -505,8 +505,8 @@ func (x *ShowResponse) GetWinery() *Winery { } func (x *ShowResponse) GetVintage() uint32 { - if x != nil { - return x.Vintage + if x != nil && x.Vintage != nil { + return *x.Vintage } return 0 } @@ -535,11 +535,11 @@ func (x *ShowResponse) GetRating() uint32 { type AddRequest struct { state protoimpl.MessageState `protogen:"open.v1"` // Name of bottle - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"` // Winery that produces wine Winery *Winery `protobuf:"bytes,2,opt,name=winery,proto3" json:"winery,omitempty"` // Vintage of bottle - Vintage uint32 `protobuf:"varint,3,opt,name=vintage,proto3" json:"vintage,omitempty"` + Vintage *uint32 `protobuf:"varint,3,opt,name=vintage,proto3,oneof" json:"vintage,omitempty"` // Composition is the list of grape varietals and associated percentage. Composition []*Component `protobuf:"bytes,4,rep,name=composition,proto3" json:"composition,omitempty"` // Description of bottle @@ -581,8 +581,8 @@ func (*AddRequest) Descriptor() ([]byte, []int) { } func (x *AddRequest) GetName() string { - if x != nil { - return x.Name + if x != nil && x.Name != nil { + return *x.Name } return "" } @@ -595,8 +595,8 @@ func (x *AddRequest) GetWinery() *Winery { } func (x *AddRequest) GetVintage() uint32 { - if x != nil { - return x.Vintage + if x != nil && x.Vintage != nil { + return *x.Vintage } return 0 } @@ -624,7 +624,7 @@ func (x *AddRequest) GetRating() uint32 { type AddResponse struct { state protoimpl.MessageState `protogen:"open.v1"` - Field string `protobuf:"bytes,1,opt,name=field,proto3" json:"field,omitempty"` + Field *string `protobuf:"bytes,1,opt,name=field,proto3,oneof" json:"field,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -660,8 +660,8 @@ func (*AddResponse) Descriptor() ([]byte, []int) { } func (x *AddResponse) GetField() string { - if x != nil { - return x.Field + if x != nil && x.Field != nil { + return *x.Field } return "" } @@ -669,7 +669,7 @@ func (x *AddResponse) GetField() string { type RemoveRequest struct { state protoimpl.MessageState `protogen:"open.v1"` // ID of bottle to remove - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Id *string `protobuf:"bytes,1,opt,name=id,proto3,oneof" json:"id,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -705,8 +705,8 @@ func (*RemoveRequest) Descriptor() ([]byte, []int) { } func (x *RemoveRequest) GetId() string { - if x != nil { - return x.Id + if x != nil && x.Id != nil { + return *x.Id } return "" } @@ -919,11 +919,11 @@ func (x *MultiAddRequest) GetField() []*Bottle { type Bottle struct { state protoimpl.MessageState `protogen:"open.v1"` // Name of bottle - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"` // Winery that produces wine Winery *Winery `protobuf:"bytes,2,opt,name=winery,proto3" json:"winery,omitempty"` // Vintage of bottle - Vintage uint32 `protobuf:"varint,3,opt,name=vintage,proto3" json:"vintage,omitempty"` + Vintage *uint32 `protobuf:"varint,3,opt,name=vintage,proto3,oneof" json:"vintage,omitempty"` // Composition is the list of grape varietals and associated percentage. Composition []*Component `protobuf:"bytes,4,rep,name=composition,proto3" json:"composition,omitempty"` // Description of bottle @@ -965,8 +965,8 @@ func (*Bottle) Descriptor() ([]byte, []int) { } func (x *Bottle) GetName() string { - if x != nil { - return x.Name + if x != nil && x.Name != nil { + return *x.Name } return "" } @@ -979,8 +979,8 @@ func (x *Bottle) GetWinery() *Winery { } func (x *Bottle) GetVintage() uint32 { - if x != nil { - return x.Vintage + if x != nil && x.Vintage != nil { + return *x.Vintage } return 0 } @@ -1147,58 +1147,79 @@ const file_goagen_cellar_storage_proto_rawDesc = "" + "\x1bgoagen_cellar_storage.proto\x12\astorage\"\r\n" + "\vListRequest\"E\n" + "\x16StoredBottleCollection\x12+\n" + - "\x05field\x18\x01 \x03(\v2\x15.storage.StoredBottleR\x05field\"\x8a\x02\n" + - "\fStoredBottle\x12\x0e\n" + - "\x02id\x18\b \x01(\tR\x02id\x12\x12\n" + - "\x04name\x18\x02 \x01(\tR\x04name\x12'\n" + - "\x06winery\x18\x03 \x01(\v2\x0f.storage.WineryR\x06winery\x12\x18\n" + - "\avintage\x18\x04 \x01(\rR\avintage\x124\n" + + "\x05field\x18\x01 \x03(\v2\x15.storage.StoredBottleR\x05field\"\xb5\x02\n" + + "\fStoredBottle\x12\x13\n" + + "\x02id\x18\b \x01(\tH\x00R\x02id\x88\x01\x01\x12\x17\n" + + "\x04name\x18\x02 \x01(\tH\x01R\x04name\x88\x01\x01\x12'\n" + + "\x06winery\x18\x03 \x01(\v2\x0f.storage.WineryR\x06winery\x12\x1d\n" + + "\avintage\x18\x04 \x01(\rH\x02R\avintage\x88\x01\x01\x124\n" + "\vcomposition\x18\x05 \x03(\v2\x12.storage.ComponentR\vcomposition\x12%\n" + - "\vdescription\x18\x06 \x01(\tH\x00R\vdescription\x88\x01\x01\x12\x1b\n" + - "\x06rating\x18\a \x01(\rH\x01R\x06rating\x88\x01\x01B\x0e\n" + + "\vdescription\x18\x06 \x01(\tH\x03R\vdescription\x88\x01\x01\x12\x1b\n" + + "\x06rating\x18\a \x01(\rH\x04R\x06rating\x88\x01\x01B\x05\n" + + "\x03_idB\a\n" + + "\x05_nameB\n" + + "\n" + + "\b_vintageB\x0e\n" + "\f_descriptionB\t\n" + - "\a_rating\"m\n" + - "\x06Winery\x12\x12\n" + - "\x04name\x18\x01 \x01(\tR\x04name\x12\x16\n" + - "\x06region\x18\x02 \x01(\tR\x06region\x12\x18\n" + - "\acountry\x18\x03 \x01(\tR\acountry\x12\x15\n" + - "\x03url\x18\x04 \x01(\tH\x00R\x03url\x88\x01\x01B\x06\n" + - "\x04_url\"[\n" + - "\tComponent\x12\x1a\n" + - "\bvarietal\x18\x01 \x01(\tR\bvarietal\x12#\n" + + "\a_rating\"\x9c\x01\n" + + "\x06Winery\x12\x17\n" + + "\x04name\x18\x01 \x01(\tH\x00R\x04name\x88\x01\x01\x12\x1b\n" + + "\x06region\x18\x02 \x01(\tH\x01R\x06region\x88\x01\x01\x12\x1d\n" + + "\acountry\x18\x03 \x01(\tH\x02R\acountry\x88\x01\x01\x12\x15\n" + + "\x03url\x18\x04 \x01(\tH\x03R\x03url\x88\x01\x01B\a\n" + + "\x05_nameB\t\n" + + "\a_regionB\n" + + "\n" + + "\b_countryB\x06\n" + + "\x04_url\"m\n" + + "\tComponent\x12\x1f\n" + + "\bvarietal\x18\x01 \x01(\tH\x00R\bvarietal\x88\x01\x01\x12#\n" + "\n" + - "percentage\x18\x02 \x01(\rH\x00R\n" + - "percentage\x88\x01\x01B\r\n" + - "\v_percentage\">\n" + - "\x11ShowNotFoundError\x12\x19\n" + - "\bmessage_\x18\x01 \x01(\tR\amessage\x12\x0e\n" + - "\x02id\x18\x02 \x01(\tR\x02id\"\x1d\n" + - "\vShowRequest\x12\x0e\n" + - "\x02id\x18\x01 \x01(\tR\x02id\"\x8a\x02\n" + - "\fShowResponse\x12\x0e\n" + - "\x02id\x18\b \x01(\tR\x02id\x12\x12\n" + - "\x04name\x18\x02 \x01(\tR\x04name\x12'\n" + - "\x06winery\x18\x03 \x01(\v2\x0f.storage.WineryR\x06winery\x12\x18\n" + - "\avintage\x18\x04 \x01(\rR\avintage\x124\n" + + "percentage\x18\x02 \x01(\rH\x01R\n" + + "percentage\x88\x01\x01B\v\n" + + "\t_varietalB\r\n" + + "\v_percentage\"\\\n" + + "\x11ShowNotFoundError\x12\x1e\n" + + "\bmessage_\x18\x01 \x01(\tH\x00R\amessage\x88\x01\x01\x12\x13\n" + + "\x02id\x18\x02 \x01(\tH\x01R\x02id\x88\x01\x01B\v\n" + + "\t_message_B\x05\n" + + "\x03_id\")\n" + + "\vShowRequest\x12\x13\n" + + "\x02id\x18\x01 \x01(\tH\x00R\x02id\x88\x01\x01B\x05\n" + + "\x03_id\"\xb5\x02\n" + + "\fShowResponse\x12\x13\n" + + "\x02id\x18\b \x01(\tH\x00R\x02id\x88\x01\x01\x12\x17\n" + + "\x04name\x18\x02 \x01(\tH\x01R\x04name\x88\x01\x01\x12'\n" + + "\x06winery\x18\x03 \x01(\v2\x0f.storage.WineryR\x06winery\x12\x1d\n" + + "\avintage\x18\x04 \x01(\rH\x02R\avintage\x88\x01\x01\x124\n" + "\vcomposition\x18\x05 \x03(\v2\x12.storage.ComponentR\vcomposition\x12%\n" + - "\vdescription\x18\x06 \x01(\tH\x00R\vdescription\x88\x01\x01\x12\x1b\n" + - "\x06rating\x18\a \x01(\rH\x01R\x06rating\x88\x01\x01B\x0e\n" + + "\vdescription\x18\x06 \x01(\tH\x03R\vdescription\x88\x01\x01\x12\x1b\n" + + "\x06rating\x18\a \x01(\rH\x04R\x06rating\x88\x01\x01B\x05\n" + + "\x03_idB\a\n" + + "\x05_nameB\n" + + "\n" + + "\b_vintageB\x0e\n" + "\f_descriptionB\t\n" + - "\a_rating\"\xf8\x01\n" + + "\a_rating\"\x97\x02\n" + "\n" + - "AddRequest\x12\x12\n" + - "\x04name\x18\x01 \x01(\tR\x04name\x12'\n" + - "\x06winery\x18\x02 \x01(\v2\x0f.storage.WineryR\x06winery\x12\x18\n" + - "\avintage\x18\x03 \x01(\rR\avintage\x124\n" + + "AddRequest\x12\x17\n" + + "\x04name\x18\x01 \x01(\tH\x00R\x04name\x88\x01\x01\x12'\n" + + "\x06winery\x18\x02 \x01(\v2\x0f.storage.WineryR\x06winery\x12\x1d\n" + + "\avintage\x18\x03 \x01(\rH\x01R\avintage\x88\x01\x01\x124\n" + "\vcomposition\x18\x04 \x03(\v2\x12.storage.ComponentR\vcomposition\x12%\n" + - "\vdescription\x18\x05 \x01(\tH\x00R\vdescription\x88\x01\x01\x12\x1b\n" + - "\x06rating\x18\x06 \x01(\rH\x01R\x06rating\x88\x01\x01B\x0e\n" + + "\vdescription\x18\x05 \x01(\tH\x02R\vdescription\x88\x01\x01\x12\x1b\n" + + "\x06rating\x18\x06 \x01(\rH\x03R\x06rating\x88\x01\x01B\a\n" + + "\x05_nameB\n" + + "\n" + + "\b_vintageB\x0e\n" + "\f_descriptionB\t\n" + - "\a_rating\"#\n" + - "\vAddResponse\x12\x14\n" + - "\x05field\x18\x01 \x01(\tR\x05field\"\x1f\n" + - "\rRemoveRequest\x12\x0e\n" + - "\x02id\x18\x01 \x01(\tR\x02id\"\x10\n" + + "\a_rating\"2\n" + + "\vAddResponse\x12\x19\n" + + "\x05field\x18\x01 \x01(\tH\x00R\x05field\x88\x01\x01B\b\n" + + "\x06_field\"+\n" + + "\rRemoveRequest\x12\x13\n" + + "\x02id\x18\x01 \x01(\tH\x00R\x02id\x88\x01\x01B\x05\n" + + "\x03_id\"\x10\n" + "\x0eRemoveResponse\"\x96\x01\n" + "\vRateRequest\x125\n" + "\x05field\x18\x01 \x03(\v2\x1f.storage.RateRequest.FieldEntryR\x05field\x1aP\n" + @@ -1210,14 +1231,17 @@ const file_goagen_cellar_storage_proto_rawDesc = "" + "\x05field\x18\x01 \x03(\tR\x05field\"\x0e\n" + "\fRateResponse\"8\n" + "\x0fMultiAddRequest\x12%\n" + - "\x05field\x18\x01 \x03(\v2\x0f.storage.BottleR\x05field\"\xf4\x01\n" + - "\x06Bottle\x12\x12\n" + - "\x04name\x18\x01 \x01(\tR\x04name\x12'\n" + - "\x06winery\x18\x02 \x01(\v2\x0f.storage.WineryR\x06winery\x12\x18\n" + - "\avintage\x18\x03 \x01(\rR\avintage\x124\n" + + "\x05field\x18\x01 \x03(\v2\x0f.storage.BottleR\x05field\"\x93\x02\n" + + "\x06Bottle\x12\x17\n" + + "\x04name\x18\x01 \x01(\tH\x00R\x04name\x88\x01\x01\x12'\n" + + "\x06winery\x18\x02 \x01(\v2\x0f.storage.WineryR\x06winery\x12\x1d\n" + + "\avintage\x18\x03 \x01(\rH\x01R\avintage\x88\x01\x01\x124\n" + "\vcomposition\x18\x04 \x03(\v2\x12.storage.ComponentR\vcomposition\x12%\n" + - "\vdescription\x18\x05 \x01(\tH\x00R\vdescription\x88\x01\x01\x12\x1b\n" + - "\x06rating\x18\x06 \x01(\rH\x01R\x06rating\x88\x01\x01B\x0e\n" + + "\vdescription\x18\x05 \x01(\tH\x02R\vdescription\x88\x01\x01\x12\x1b\n" + + "\x06rating\x18\x06 \x01(\rH\x03R\x06rating\x88\x01\x01B\a\n" + + "\x05_nameB\n" + + "\n" + + "\b_vintageB\x0e\n" + "\f_descriptionB\t\n" + "\a_rating\"(\n" + "\x10MultiAddResponse\x12\x14\n" + @@ -1315,8 +1339,12 @@ func file_goagen_cellar_storage_proto_init() { file_goagen_cellar_storage_proto_msgTypes[2].OneofWrappers = []any{} file_goagen_cellar_storage_proto_msgTypes[3].OneofWrappers = []any{} file_goagen_cellar_storage_proto_msgTypes[4].OneofWrappers = []any{} + file_goagen_cellar_storage_proto_msgTypes[5].OneofWrappers = []any{} + file_goagen_cellar_storage_proto_msgTypes[6].OneofWrappers = []any{} file_goagen_cellar_storage_proto_msgTypes[7].OneofWrappers = []any{} file_goagen_cellar_storage_proto_msgTypes[8].OneofWrappers = []any{} + file_goagen_cellar_storage_proto_msgTypes[9].OneofWrappers = []any{} + file_goagen_cellar_storage_proto_msgTypes[10].OneofWrappers = []any{} file_goagen_cellar_storage_proto_msgTypes[16].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ diff --git a/cellar/gen/grpc/storage/pb/goagen_cellar_storage.proto b/cellar/gen/grpc/storage/pb/goagen_cellar_storage.proto index 1f7b99ae9..c63fffe79 100644 --- a/cellar/gen/grpc/storage/pb/goagen_cellar_storage.proto +++ b/cellar/gen/grpc/storage/pb/goagen_cellar_storage.proto @@ -42,13 +42,13 @@ message StoredBottleCollection { // A StoredBottle describes a bottle retrieved by the storage service. message StoredBottle { // ID is the unique id of the bottle. - string id = 8; + optional string id = 8; // Name of bottle - string name = 2; + optional string name = 2; // Winery that produces wine Winery winery = 3; // Vintage of bottle - uint32 vintage = 4; + optional uint32 vintage = 4; // Composition is the list of grape varietals and associated percentage. repeated Component composition = 5; // Description of bottle @@ -59,43 +59,43 @@ message StoredBottle { message Winery { // Name of winery - string name = 1; + optional string name = 1; // Region of winery - string region = 2; + optional string region = 2; // Country of winery - string country = 3; + optional string country = 3; // Winery website URL optional string url = 4; } message Component { // Grape varietal - string varietal = 1; + optional string varietal = 1; // Percentage of varietal in wine optional uint32 percentage = 2; } message ShowNotFoundError { // Message of error - string message_ = 1; + optional string message_ = 1; // ID of missing bottle - string id = 2; + optional string id = 2; } message ShowRequest { // ID of bottle to show - string id = 1; + optional string id = 1; } message ShowResponse { // ID is the unique id of the bottle. - string id = 8; + optional string id = 8; // Name of bottle - string name = 2; + optional string name = 2; // Winery that produces wine Winery winery = 3; // Vintage of bottle - uint32 vintage = 4; + optional uint32 vintage = 4; // Composition is the list of grape varietals and associated percentage. repeated Component composition = 5; // Description of bottle @@ -106,11 +106,11 @@ message ShowResponse { message AddRequest { // Name of bottle - string name = 1; + optional string name = 1; // Winery that produces wine Winery winery = 2; // Vintage of bottle - uint32 vintage = 3; + optional uint32 vintage = 3; // Composition is the list of grape varietals and associated percentage. repeated Component composition = 4; // Description of bottle @@ -120,12 +120,12 @@ message AddRequest { } message AddResponse { - string field = 1; + optional string field = 1; } message RemoveRequest { // ID of bottle to remove - string id = 1; + optional string id = 1; } message RemoveResponse { @@ -148,11 +148,11 @@ message MultiAddRequest { // Bottle describes a bottle of wine to be stored. message Bottle { // Name of bottle - string name = 1; + optional string name = 1; // Winery that produces wine Winery winery = 2; // Vintage of bottle - uint32 vintage = 3; + optional uint32 vintage = 3; // Composition is the list of grape varietals and associated percentage. repeated Component composition = 4; // Description of bottle diff --git a/cellar/gen/grpc/storage/server/encode_decode.go b/cellar/gen/grpc/storage/server/encode_decode.go index f0548287a..a11d3ff3c 100644 --- a/cellar/gen/grpc/storage/server/encode_decode.go +++ b/cellar/gen/grpc/storage/server/encode_decode.go @@ -79,6 +79,9 @@ func DecodeShowRequest(ctx context.Context, v any, md metadata.MD) (any, error) if message, ok = v.(*storagepb.ShowRequest); !ok { return nil, goagrpc.ErrInvalidType("storage", "show", "*storagepb.ShowRequest", v) } + if err = ValidateShowRequest(message); err != nil { + return nil, err + } } var payload *storage.ShowPayload { @@ -137,6 +140,9 @@ func DecodeRemoveRequest(ctx context.Context, v any, md metadata.MD) (any, error if message, ok = v.(*storagepb.RemoveRequest); !ok { return nil, goagrpc.ErrInvalidType("storage", "remove", "*storagepb.RemoveRequest", v) } + if err := ValidateRemoveRequest(message); err != nil { + return nil, err + } } var payload *storage.RemovePayload { @@ -162,9 +168,6 @@ func DecodeRateRequest(ctx context.Context, v any, md metadata.MD) (any, error) if message, ok = v.(*storagepb.RateRequest); !ok { return nil, goagrpc.ErrInvalidType("storage", "rate", "*storagepb.RateRequest", v) } - if err := ValidateRateRequest(message); err != nil { - return nil, err - } } var payload map[uint32][]string { diff --git a/cellar/gen/grpc/storage/server/types.go b/cellar/gen/grpc/storage/server/types.go index 6fc304689..e1ee5d11e 100644 --- a/cellar/gen/grpc/storage/server/types.go +++ b/cellar/gen/grpc/storage/server/types.go @@ -23,8 +23,8 @@ func NewProtoStoredBottleCollection(result storageviews.StoredBottleCollectionVi message.Field = make([]*storagepb.StoredBottle, len(result)) for i, val := range result { message.Field[i] = &storagepb.StoredBottle{ - Id: *val.ID, - Name: *val.Name, + Id: val.ID, + Name: val.Name, } if val.Winery != nil { message.Field[i].Winery = transformStoredBottleCollectionViewWineryViewToProtoStoredBottleCollectionWinery(val.Winery) @@ -36,7 +36,7 @@ func NewProtoStoredBottleCollection(result storageviews.StoredBottleCollectionVi // NewShowPayload builds *storage.ShowPayload from *storagepb.ShowRequest. func NewShowPayload(message *storagepb.ShowRequest, view *string) *storage.ShowPayload { v := &storage.ShowPayload{ - ID: message.Id, + ID: *message.Id, } if view != nil { viewService := *view @@ -50,9 +50,9 @@ func NewShowPayload(message *storagepb.ShowRequest, view *string) *storage.ShowP // *storageviews.StoredBottleView. func NewProtoShowResponse(result *storageviews.StoredBottleView) *storagepb.ShowResponse { message := &storagepb.ShowResponse{ - Id: *result.ID, - Name: *result.Name, - Vintage: *result.Vintage, + Id: result.ID, + Name: result.Name, + Vintage: result.Vintage, Description: result.Description, Rating: result.Rating, } @@ -63,7 +63,7 @@ func NewProtoShowResponse(result *storageviews.StoredBottleView) *storagepb.Show message.Composition = make([]*storagepb.Component, len(result.Composition)) for i, val := range result.Composition { message.Composition[i] = &storagepb.Component{ - Varietal: *val.Varietal, + Varietal: val.Varietal, Percentage: val.Percentage, } } @@ -75,8 +75,8 @@ func NewProtoShowResponse(result *storageviews.StoredBottleView) *storagepb.Show // *storageviews.StoredBottleView. func NewProtoShowResponseTiny(result *storageviews.StoredBottleView) *storagepb.ShowResponse { message := &storagepb.ShowResponse{ - Id: *result.ID, - Name: *result.Name, + Id: result.ID, + Name: result.Name, } if result.Winery != nil { message.Winery = transformWineryViewToProtoWineryTiny(result.Winery) @@ -88,8 +88,8 @@ func NewProtoShowResponseTiny(result *storageviews.StoredBottleView) *storagepb. // *storage.NotFound. func NewShowNotFoundError(er *storage.NotFound) *storagepb.ShowNotFoundError { message := &storagepb.ShowNotFoundError{ - Message_: er.Message, - Id: er.ID, + Message_: &er.Message, + Id: &er.ID, } return message } @@ -97,8 +97,8 @@ func NewShowNotFoundError(er *storage.NotFound) *storagepb.ShowNotFoundError { // NewAddPayload builds *storage.Bottle from *storagepb.AddRequest. func NewAddPayload(message *storagepb.AddRequest) *storage.Bottle { v := &storage.Bottle{ - Name: message.Name, - Vintage: message.Vintage, + Name: *message.Name, + Vintage: *message.Vintage, Description: message.Description, Rating: message.Rating, } @@ -109,7 +109,7 @@ func NewAddPayload(message *storagepb.AddRequest) *storage.Bottle { v.Composition = make([]*storage.Component, len(message.Composition)) for i, val := range message.Composition { v.Composition[i] = &storage.Component{ - Varietal: val.Varietal, + Varietal: *val.Varietal, Percentage: val.Percentage, } } @@ -120,14 +120,15 @@ func NewAddPayload(message *storagepb.AddRequest) *storage.Bottle { // NewProtoAddResponse builds *storagepb.AddResponse from string. func NewProtoAddResponse(result string) *storagepb.AddResponse { message := &storagepb.AddResponse{} - message.Field = result + message.Field = new(string) + *message.Field = result return message } // NewRemovePayload builds *storage.RemovePayload from *storagepb.RemoveRequest. func NewRemovePayload(message *storagepb.RemoveRequest) *storage.RemovePayload { v := &storage.RemovePayload{ - ID: message.Id, + ID: *message.Id, } return v } @@ -143,9 +144,12 @@ func NewRatePayload(message *storagepb.RateRequest) map[uint32][]string { v := make(map[uint32][]string, len(message.Field)) for key, val := range message.Field { tk := key - tv := make([]string, len(val.Field)) - for i, val := range val.Field { - tv[i] = val + var tv []string + if val != nil { + tv = make([]string, len(val.Field)) + for i, val := range val.Field { + tv[i] = val + } } v[tk] = tv } @@ -163,8 +167,8 @@ func NewMultiAddPayload(message *storagepb.MultiAddRequest) []*storage.Bottle { v := make([]*storage.Bottle, len(message.Field)) for i, val := range message.Field { v[i] = &storage.Bottle{ - Name: val.Name, - Vintage: val.Vintage, + Name: *val.Name, + Vintage: *val.Vintage, Description: val.Description, Rating: val.Rating, } @@ -175,7 +179,7 @@ func NewMultiAddPayload(message *storagepb.MultiAddRequest) []*storage.Bottle { v[i].Composition = make([]*storage.Component, len(val.Composition)) for j, val := range val.Composition { v[i].Composition[j] = &storage.Component{ - Varietal: val.Varietal, + Varietal: *val.Varietal, Percentage: val.Percentage, } } @@ -208,8 +212,8 @@ func NewMultiUpdatePayload(message *storagepb.MultiUpdateRequest) *storage.Multi v.Bottles = make([]*storage.Bottle, len(message.Bottles)) for i, val := range message.Bottles { v.Bottles[i] = &storage.Bottle{ - Name: val.Name, - Vintage: val.Vintage, + Name: *val.Name, + Vintage: *val.Vintage, Description: val.Description, Rating: val.Rating, } @@ -220,7 +224,7 @@ func NewMultiUpdatePayload(message *storagepb.MultiUpdateRequest) *storage.Multi v.Bottles[i].Composition = make([]*storage.Component, len(val.Composition)) for j, val := range val.Composition { v.Bottles[i].Composition[j] = &storage.Component{ - Varietal: val.Varietal, + Varietal: *val.Varietal, Percentage: val.Percentage, } } @@ -237,24 +241,42 @@ func NewProtoMultiUpdateResponse() *storagepb.MultiUpdateResponse { return message } +// ValidateShowRequest runs the validations defined on ShowRequest. +func ValidateShowRequest(message *storagepb.ShowRequest) (err error) { + if message.Id == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("id", "message")) + } + return +} + // ValidateAddRequest runs the validations defined on AddRequest. func ValidateAddRequest(message *storagepb.AddRequest) (err error) { + if message.Name == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("name", "message")) + } if message.Winery == nil { err = goa.MergeErrors(err, goa.MissingFieldError("winery", "message")) } - if utf8.RuneCountInString(message.Name) > 100 { - err = goa.MergeErrors(err, goa.InvalidLengthError("message.name", message.Name, utf8.RuneCountInString(message.Name), 100, false)) + if message.Vintage == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("vintage", "message")) + } + if message.Name != nil { + if utf8.RuneCountInString(*message.Name) > 100 { + err = goa.MergeErrors(err, goa.InvalidLengthError("message.name", *message.Name, utf8.RuneCountInString(*message.Name), 100, false)) + } } if message.Winery != nil { if err2 := ValidateWinery(message.Winery); err2 != nil { err = goa.MergeErrors(err, err2) } } - if message.Vintage < 1900 { - err = goa.MergeErrors(err, goa.InvalidRangeError("message.vintage", message.Vintage, 1900, true)) - } - if message.Vintage > 2020 { - err = goa.MergeErrors(err, goa.InvalidRangeError("message.vintage", message.Vintage, 2020, false)) + if message.Vintage != nil { + if *message.Vintage < 1900 { + err = goa.MergeErrors(err, goa.InvalidRangeError("message.vintage", *message.Vintage, 1900, true)) + } + if *message.Vintage > 2020 { + err = goa.MergeErrors(err, goa.InvalidRangeError("message.vintage", *message.Vintage, 2020, false)) + } } for _, e := range message.Composition { if e != nil { @@ -281,8 +303,21 @@ func ValidateAddRequest(message *storagepb.AddRequest) (err error) { // ValidateWinery runs the validations defined on Winery. func ValidateWinery(winery *storagepb.Winery) (err error) { - err = goa.MergeErrors(err, goa.ValidatePattern("winery.region", winery.Region, "[a-zA-Z '\\.]+")) - err = goa.MergeErrors(err, goa.ValidatePattern("winery.country", winery.Country, "[a-zA-Z '\\.]+")) + if winery.Name == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("name", "winery")) + } + if winery.Region == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("region", "winery")) + } + if winery.Country == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("country", "winery")) + } + if winery.Region != nil { + err = goa.MergeErrors(err, goa.ValidatePattern("winery.region", *winery.Region, "[a-zA-Z '\\.]+")) + } + if winery.Country != nil { + err = goa.MergeErrors(err, goa.ValidatePattern("winery.country", *winery.Country, "[a-zA-Z '\\.]+")) + } if winery.Url != nil { err = goa.MergeErrors(err, goa.ValidatePattern("winery.url", *winery.Url, "^(https?|ftp)://[^\\s/$.?#].[^\\s]*$")) } @@ -291,9 +326,14 @@ func ValidateWinery(winery *storagepb.Winery) (err error) { // ValidateComponent runs the validations defined on Component. func ValidateComponent(elem *storagepb.Component) (err error) { - err = goa.MergeErrors(err, goa.ValidatePattern("elem.varietal", elem.Varietal, "[A-Za-z' ]+")) - if utf8.RuneCountInString(elem.Varietal) > 100 { - err = goa.MergeErrors(err, goa.InvalidLengthError("elem.varietal", elem.Varietal, utf8.RuneCountInString(elem.Varietal), 100, false)) + if elem.Varietal == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("varietal", "elem")) + } + if elem.Varietal != nil { + err = goa.MergeErrors(err, goa.ValidatePattern("elem.varietal", *elem.Varietal, "[A-Za-z' ]+")) + if utf8.RuneCountInString(*elem.Varietal) > 100 { + err = goa.MergeErrors(err, goa.InvalidLengthError("elem.varietal", *elem.Varietal, utf8.RuneCountInString(*elem.Varietal), 100, false)) + } } if elem.Percentage != nil { if *elem.Percentage < 1 { @@ -306,22 +346,10 @@ func ValidateComponent(elem *storagepb.Component) (err error) { return } -// ValidateRateRequest runs the validations defined on RateRequest. -func ValidateRateRequest(message *storagepb.RateRequest) (err error) { - for _, v := range message.Field { - if v != nil { - if err2 := ValidateArrayOfString(v); err2 != nil { - err = goa.MergeErrors(err, err2) - } - } - } - return -} - -// ValidateArrayOfString runs the validations defined on ArrayOfString. -func ValidateArrayOfString(val *storagepb.ArrayOfString) (err error) { - if val.Field == nil { - err = goa.MergeErrors(err, goa.MissingFieldError("field", "val")) +// ValidateRemoveRequest runs the validations defined on RemoveRequest. +func ValidateRemoveRequest(message *storagepb.RemoveRequest) (err error) { + if message.Id == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("id", "message")) } return } @@ -340,22 +368,32 @@ func ValidateMultiAddRequest(message *storagepb.MultiAddRequest) (err error) { // ValidateBottle runs the validations defined on Bottle. func ValidateBottle(elem *storagepb.Bottle) (err error) { + if elem.Name == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("name", "elem")) + } if elem.Winery == nil { err = goa.MergeErrors(err, goa.MissingFieldError("winery", "elem")) } - if utf8.RuneCountInString(elem.Name) > 100 { - err = goa.MergeErrors(err, goa.InvalidLengthError("elem.name", elem.Name, utf8.RuneCountInString(elem.Name), 100, false)) + if elem.Vintage == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("vintage", "elem")) + } + if elem.Name != nil { + if utf8.RuneCountInString(*elem.Name) > 100 { + err = goa.MergeErrors(err, goa.InvalidLengthError("elem.name", *elem.Name, utf8.RuneCountInString(*elem.Name), 100, false)) + } } if elem.Winery != nil { if err2 := ValidateWinery(elem.Winery); err2 != nil { err = goa.MergeErrors(err, err2) } } - if elem.Vintage < 1900 { - err = goa.MergeErrors(err, goa.InvalidRangeError("elem.vintage", elem.Vintage, 1900, true)) - } - if elem.Vintage > 2020 { - err = goa.MergeErrors(err, goa.InvalidRangeError("elem.vintage", elem.Vintage, 2020, false)) + if elem.Vintage != nil { + if *elem.Vintage < 1900 { + err = goa.MergeErrors(err, goa.InvalidRangeError("elem.vintage", *elem.Vintage, 1900, true)) + } + if *elem.Vintage > 2020 { + err = goa.MergeErrors(err, goa.InvalidRangeError("elem.vintage", *elem.Vintage, 2020, false)) + } } for _, e := range elem.Composition { if e != nil { @@ -404,7 +442,7 @@ func ValidateMultiUpdateRequest(message *storagepb.MultiUpdateRequest) (err erro // *storageviews.WineryView. func transformStoredBottleCollectionViewWineryViewToProtoStoredBottleCollectionWinery(v *storageviews.WineryView) *storagepb.Winery { res := &storagepb.Winery{ - Name: *v.Name, + Name: v.Name, } return res @@ -414,7 +452,7 @@ func transformStoredBottleCollectionViewWineryViewToProtoStoredBottleCollectionW // of type *storagepb.Winery from a value of type *storageviews.WineryView. func transformStoredBottleViewWineryViewToProtoShowResponseWinery(v *storageviews.WineryView) *storagepb.Winery { res := &storagepb.Winery{ - Name: *v.Name, + Name: v.Name, } return res @@ -424,7 +462,7 @@ func transformStoredBottleViewWineryViewToProtoShowResponseWinery(v *storageview // *storagepb.Winery from a value of type *storageviews.WineryView. func transformWineryViewToProtoWineryTiny(v *storageviews.WineryView) *storagepb.Winery { res := &storagepb.Winery{ - Name: *v.Name, + Name: v.Name, } return res @@ -434,9 +472,9 @@ func transformWineryViewToProtoWineryTiny(v *storageviews.WineryView) *storagepb // *storage.Winery from a value of type *storagepb.Winery. func transformProtoAddRequestWineryToBottleWinery(v *storagepb.Winery) *storage.Winery { res := &storage.Winery{ - Name: v.Name, - Region: v.Region, - Country: v.Country, + Name: *v.Name, + Region: *v.Region, + Country: *v.Country, URL: v.Url, } @@ -447,9 +485,9 @@ func transformProtoAddRequestWineryToBottleWinery(v *storagepb.Winery) *storage. // type *storage.Winery from a value of type *storagepb.Winery. func transformProtoMultiAddRequestWineryToMultiAddRequestWinery(v *storagepb.Winery) *storage.Winery { res := &storage.Winery{ - Name: v.Name, - Region: v.Region, - Country: v.Country, + Name: *v.Name, + Region: *v.Region, + Country: *v.Country, URL: v.Url, } @@ -460,9 +498,9 @@ func transformProtoMultiAddRequestWineryToMultiAddRequestWinery(v *storagepb.Win // value of type *storage.Winery from a value of type *storagepb.Winery. func transformProtoMultiUpdateRequestWineryToMultiUpdatePayloadWinery(v *storagepb.Winery) *storage.Winery { res := &storage.Winery{ - Name: v.Name, - Region: v.Region, - Country: v.Country, + Name: *v.Name, + Region: *v.Region, + Country: *v.Country, URL: v.Url, } diff --git a/cellar/go.mod b/cellar/go.mod index cffe8d5fe..b09a4d1e7 100644 --- a/cellar/go.mod +++ b/cellar/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( github.com/boltdb/bolt v1.3.1 - goa.design/goa/v3 v3.30.0 + goa.design/goa/v3 v3.30.1-0.20260825000358-70a27fd82e81 google.golang.org/grpc v1.83.1 google.golang.org/protobuf v1.36.12 ) diff --git a/cellar/go.sum b/cellar/go.sum index 6b70c851d..9202f4a81 100644 --- a/cellar/go.sum +++ b/cellar/go.sum @@ -51,8 +51,8 @@ go.opentelemetry.io/otel/trace v1.44.0 h1:jxF5CsGYCe74MCRx2X4g7WsY/VBKRqqpNvXlX/ go.opentelemetry.io/otel/trace v1.44.0/go.mod h1:oLl1jrMQAVo6v3GAggN+1VH9VIz9iUSvW53sW1Q8PIE= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.0 h1:KXfAR5qlUCJLVPlHTZ6pHdC5b013BB78PLbDf2fFhfY= -goa.design/goa/v3 v3.30.0/go.mod h1:Is2byRdJddS20jhGT3Ql80N5hQyAc4HgAl7H/A0ZmJ4= +goa.design/goa/v3 v3.30.1-0.20260825000358-70a27fd82e81 h1:LeU5jBnRZV7r/a56FAiGbqptG345Bi/9yE5M1zQjSYY= +goa.design/goa/v3 v3.30.1-0.20260825000358-70a27fd82e81/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/concerts/go.mod b/concerts/go.mod index 9c1a6cb9d..cc96c057c 100644 --- a/concerts/go.mod +++ b/concerts/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( github.com/google/uuid v1.6.0 - goa.design/goa/v3 v3.30.0 + goa.design/goa/v3 v3.30.1-0.20260825000358-70a27fd82e81 ) require ( @@ -21,6 +21,7 @@ require ( golang.org/x/sync v0.22.0 // indirect golang.org/x/text v0.41.0 // indirect golang.org/x/tools v0.49.0 // indirect + google.golang.org/protobuf v1.36.12 // indirect gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/concerts/go.sum b/concerts/go.sum index 75dec1d03..032a1d87f 100644 --- a/concerts/go.sum +++ b/concerts/go.sum @@ -31,8 +31,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.0 h1:KXfAR5qlUCJLVPlHTZ6pHdC5b013BB78PLbDf2fFhfY= -goa.design/goa/v3 v3.30.0/go.mod h1:Is2byRdJddS20jhGT3Ql80N5hQyAc4HgAl7H/A0ZmJ4= +goa.design/goa/v3 v3.30.1-0.20260825000358-70a27fd82e81 h1:LeU5jBnRZV7r/a56FAiGbqptG345Bi/9yE5M1zQjSYY= +goa.design/goa/v3 v3.30.1-0.20260825000358-70a27fd82e81/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= @@ -41,6 +41,8 @@ golang.org/x/text v0.41.0 h1:vz/seA0lnX87Othu2f/0L24RcgrXD9/YFTSuGjj3rH8= golang.org/x/text v0.41.0/go.mod h1:jvf1O8ajNzZqhSrQBPbutR/EB83Cc0CFrezNQIwbb5M= golang.org/x/tools v0.49.0 h1:3NI7VXzL9+1WZD52Dx2ttoPwD5DWrFGpl9mFZDlmisI= golang.org/x/tools v0.49.0/go.mod h1:SJNXV9DBKT0UbdttsQjbfJlAE/q+y36++zo3uL3N0Oo= +google.golang.org/protobuf v1.36.12 h1:pJOKDDOyeXErUroCihFAd5LQuwXBSpVnKGrj5o/fwxc= +google.golang.org/protobuf v1.36.12/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= diff --git a/cookies/go.mod b/cookies/go.mod index 9102153da..9045a012b 100644 --- a/cookies/go.mod +++ b/cookies/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( github.com/rs/xid v1.6.0 - goa.design/goa/v3 v3.30.0 + goa.design/goa/v3 v3.30.1-0.20260825000358-70a27fd82e81 ) require ( @@ -22,6 +22,7 @@ require ( golang.org/x/sync v0.22.0 // indirect golang.org/x/text v0.41.0 // indirect golang.org/x/tools v0.49.0 // indirect + google.golang.org/protobuf v1.36.12 // indirect gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/cookies/go.sum b/cookies/go.sum index aae23c4f3..5ee68b2c9 100644 --- a/cookies/go.sum +++ b/cookies/go.sum @@ -33,8 +33,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.0 h1:KXfAR5qlUCJLVPlHTZ6pHdC5b013BB78PLbDf2fFhfY= -goa.design/goa/v3 v3.30.0/go.mod h1:Is2byRdJddS20jhGT3Ql80N5hQyAc4HgAl7H/A0ZmJ4= +goa.design/goa/v3 v3.30.1-0.20260825000358-70a27fd82e81 h1:LeU5jBnRZV7r/a56FAiGbqptG345Bi/9yE5M1zQjSYY= +goa.design/goa/v3 v3.30.1-0.20260825000358-70a27fd82e81/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= @@ -43,6 +43,8 @@ golang.org/x/text v0.41.0 h1:vz/seA0lnX87Othu2f/0L24RcgrXD9/YFTSuGjj3rH8= golang.org/x/text v0.41.0/go.mod h1:jvf1O8ajNzZqhSrQBPbutR/EB83Cc0CFrezNQIwbb5M= golang.org/x/tools v0.49.0 h1:3NI7VXzL9+1WZD52Dx2ttoPwD5DWrFGpl9mFZDlmisI= golang.org/x/tools v0.49.0/go.mod h1:SJNXV9DBKT0UbdttsQjbfJlAE/q+y36++zo3uL3N0Oo= +google.golang.org/protobuf v1.36.12 h1:pJOKDDOyeXErUroCihFAd5LQuwXBSpVnKGrj5o/fwxc= +google.golang.org/protobuf v1.36.12/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= diff --git a/encodings/cbor/go.mod b/encodings/cbor/go.mod index bdbffc3d2..b9999382f 100644 --- a/encodings/cbor/go.mod +++ b/encodings/cbor/go.mod @@ -5,7 +5,7 @@ go 1.26.0 require ( github.com/fxamacker/cbor/v2 v2.9.2 goa.design/clue v1.2.6 - goa.design/goa/v3 v3.30.0 + goa.design/goa/v3 v3.30.1-0.20260825000358-70a27fd82e81 ) require ( diff --git a/encodings/cbor/go.sum b/encodings/cbor/go.sum index cf2989e3f..81efd4af2 100644 --- a/encodings/cbor/go.sum +++ b/encodings/cbor/go.sum @@ -59,8 +59,8 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/clue v1.2.6 h1:ensyUkwlvEbNy8FuTGMldKuvaNouh8YoDY9QaE+EtYg= goa.design/clue v1.2.6/go.mod h1:Y4RS5o2k6MZiGk2PT3XbKyntjR2xkr8dYOKQ591dIDM= -goa.design/goa/v3 v3.30.0 h1:KXfAR5qlUCJLVPlHTZ6pHdC5b013BB78PLbDf2fFhfY= -goa.design/goa/v3 v3.30.0/go.mod h1:Is2byRdJddS20jhGT3Ql80N5hQyAc4HgAl7H/A0ZmJ4= +goa.design/goa/v3 v3.30.1-0.20260825000358-70a27fd82e81 h1:LeU5jBnRZV7r/a56FAiGbqptG345Bi/9yE5M1zQjSYY= +goa.design/goa/v3 v3.30.1-0.20260825000358-70a27fd82e81/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/encodings/text/go.mod b/encodings/text/go.mod index f0b51aece..a5cad0f24 100644 --- a/encodings/text/go.mod +++ b/encodings/text/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( goa.design/clue v1.2.6 - goa.design/goa/v3 v3.30.0 + goa.design/goa/v3 v3.30.1-0.20260825000358-70a27fd82e81 ) require ( diff --git a/encodings/text/go.sum b/encodings/text/go.sum index a0f32c059..40fc45d57 100644 --- a/encodings/text/go.sum +++ b/encodings/text/go.sum @@ -55,8 +55,8 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/clue v1.2.6 h1:ensyUkwlvEbNy8FuTGMldKuvaNouh8YoDY9QaE+EtYg= goa.design/clue v1.2.6/go.mod h1:Y4RS5o2k6MZiGk2PT3XbKyntjR2xkr8dYOKQ591dIDM= -goa.design/goa/v3 v3.30.0 h1:KXfAR5qlUCJLVPlHTZ6pHdC5b013BB78PLbDf2fFhfY= -goa.design/goa/v3 v3.30.0/go.mod h1:Is2byRdJddS20jhGT3Ql80N5hQyAc4HgAl7H/A0ZmJ4= +goa.design/goa/v3 v3.30.1-0.20260825000358-70a27fd82e81 h1:LeU5jBnRZV7r/a56FAiGbqptG345Bi/9yE5M1zQjSYY= +goa.design/goa/v3 v3.30.1-0.20260825000358-70a27fd82e81/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/error/gen/grpc/calc/client/cli.go b/error/gen/grpc/calc/client/cli.go index e055633f1..1999434ee 100644 --- a/error/gen/grpc/calc/client/cli.go +++ b/error/gen/grpc/calc/client/cli.go @@ -28,9 +28,13 @@ func BuildDividePayload(calcDivideMessage string) (*calc.DividePayload, error) { } } } + if err := ValidateDivideRequest(&message); err != nil { + var zero *calc.DividePayload + return zero, err + } v := &calc.DividePayload{ - Dividend: int(message.Dividend), - Divisor: int(message.Divisor), + Dividend: int(*message.Dividend), + Divisor: int(*message.Divisor), } return v, nil diff --git a/error/gen/grpc/calc/client/client.go b/error/gen/grpc/calc/client/client.go index 83268a1ca..97a3105c1 100644 --- a/error/gen/grpc/calc/client/client.go +++ b/error/gen/grpc/calc/client/client.go @@ -43,6 +43,9 @@ func (c *Client) Divide() goa.Endpoint { resp := goagrpc.DecodeError(err) switch message := resp.(type) { case *calcpb.DivideDivByZeroError: + if err := ValidateDivideDivByZeroError(message); err != nil { + return nil, err + } return nil, NewDivideDivByZeroError(message) case *goapb.ErrorResponse: return nil, goagrpc.NewServiceError(message) diff --git a/error/gen/grpc/calc/client/encode_decode.go b/error/gen/grpc/calc/client/encode_decode.go index 7d59b2f2e..83187572a 100644 --- a/error/gen/grpc/calc/client/encode_decode.go +++ b/error/gen/grpc/calc/client/encode_decode.go @@ -46,6 +46,9 @@ func DecodeDivideResponse(ctx context.Context, v any, hdr, trlr metadata.MD) (an if !ok { return nil, goagrpc.ErrInvalidType("calc", "divide", "*calcpb.DivideResponse", v) } + if err := ValidateDivideResponse(message); err != nil { + return nil, err + } res := NewDivideResult(message) return res, nil } diff --git a/error/gen/grpc/calc/client/types.go b/error/gen/grpc/calc/client/types.go index c560fb2ac..c141022bb 100644 --- a/error/gen/grpc/calc/client/types.go +++ b/error/gen/grpc/calc/client/types.go @@ -10,22 +10,24 @@ package client import ( calc "goa.design/examples/error/gen/calc" calcpb "goa.design/examples/error/gen/grpc/calc/pb" + goa "goa.design/goa/v3/pkg" ) // NewProtoDivideRequest builds *calcpb.DivideRequest from *calc.DividePayload. func NewProtoDivideRequest(payload *calc.DividePayload) *calcpb.DivideRequest { - message := &calcpb.DivideRequest{ - Dividend: int32(payload.Dividend), - Divisor: int32(payload.Divisor), - } + message := &calcpb.DivideRequest{} + dividend := int32(payload.Dividend) + message.Dividend = ÷nd + divisor := int32(payload.Divisor) + message.Divisor = &divisor return message } // NewDivideResult builds *calc.DivideResult from *calcpb.DivideResponse. func NewDivideResult(message *calcpb.DivideResponse) *calc.DivideResult { result := &calc.DivideResult{ - Quotient: int(message.Quotient), - Reminder: int(message.Reminder), + Quotient: int(*message.Quotient), + Reminder: int(*message.Reminder), } return result } @@ -34,7 +36,38 @@ func NewDivideResult(message *calcpb.DivideResponse) *calc.DivideResult { // *calcpb.DivideDivByZeroError. func NewDivideDivByZeroError(message *calcpb.DivideDivByZeroError) *calc.DivByZero { er := &calc.DivByZero{ - Message: message.Message_, + Message: *message.Message_, } return er } + +// ValidateDivideRequest runs the validations defined on DivideRequest. +func ValidateDivideRequest(message *calcpb.DivideRequest) (err error) { + if message.Dividend == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("dividend", "message")) + } + if message.Divisor == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("divisor", "message")) + } + return +} + +// ValidateDivideResponse runs the validations defined on DivideResponse. +func ValidateDivideResponse(message *calcpb.DivideResponse) (err error) { + if message.Quotient == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("quotient", "message")) + } + if message.Reminder == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("reminder", "message")) + } + return +} + +// ValidateDivideDivByZeroError runs the validations defined on +// DivideDivByZeroError. +func ValidateDivideDivByZeroError(errmsg *calcpb.DivideDivByZeroError) (err error) { + if errmsg.Message_ == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("message", "errmsg")) + } + return +} diff --git a/error/gen/grpc/calc/pb/goagen_error_calc.pb.go b/error/gen/grpc/calc/pb/goagen_error_calc.pb.go index 0fbf7cdbe..055aa1c38 100644 --- a/error/gen/grpc/calc/pb/goagen_error_calc.pb.go +++ b/error/gen/grpc/calc/pb/goagen_error_calc.pb.go @@ -31,7 +31,7 @@ const ( type DivideDivByZeroError struct { state protoimpl.MessageState `protogen:"open.v1"` // division by zero leads to infinity. - Message_ string `protobuf:"bytes,1,opt,name=message_,json=message,proto3" json:"message_,omitempty"` + Message_ *string `protobuf:"bytes,1,opt,name=message_,json=message,proto3,oneof" json:"message_,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -67,16 +67,16 @@ func (*DivideDivByZeroError) Descriptor() ([]byte, []int) { } func (x *DivideDivByZeroError) GetMessage_() string { - if x != nil { - return x.Message_ + if x != nil && x.Message_ != nil { + return *x.Message_ } return "" } type DivideRequest struct { state protoimpl.MessageState `protogen:"open.v1"` - Dividend int32 `protobuf:"zigzag32,1,opt,name=dividend,proto3" json:"dividend,omitempty"` - Divisor int32 `protobuf:"zigzag32,2,opt,name=divisor,proto3" json:"divisor,omitempty"` + Dividend *int32 `protobuf:"zigzag32,1,opt,name=dividend,proto3,oneof" json:"dividend,omitempty"` + Divisor *int32 `protobuf:"zigzag32,2,opt,name=divisor,proto3,oneof" json:"divisor,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -112,23 +112,23 @@ func (*DivideRequest) Descriptor() ([]byte, []int) { } func (x *DivideRequest) GetDividend() int32 { - if x != nil { - return x.Dividend + if x != nil && x.Dividend != nil { + return *x.Dividend } return 0 } func (x *DivideRequest) GetDivisor() int32 { - if x != nil { - return x.Divisor + if x != nil && x.Divisor != nil { + return *x.Divisor } return 0 } type DivideResponse struct { state protoimpl.MessageState `protogen:"open.v1"` - Quotient int32 `protobuf:"zigzag32,1,opt,name=quotient,proto3" json:"quotient,omitempty"` - Reminder int32 `protobuf:"zigzag32,2,opt,name=reminder,proto3" json:"reminder,omitempty"` + Quotient *int32 `protobuf:"zigzag32,1,opt,name=quotient,proto3,oneof" json:"quotient,omitempty"` + Reminder *int32 `protobuf:"zigzag32,2,opt,name=reminder,proto3,oneof" json:"reminder,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -164,15 +164,15 @@ func (*DivideResponse) Descriptor() ([]byte, []int) { } func (x *DivideResponse) GetQuotient() int32 { - if x != nil { - return x.Quotient + if x != nil && x.Quotient != nil { + return *x.Quotient } return 0 } func (x *DivideResponse) GetReminder() int32 { - if x != nil { - return x.Reminder + if x != nil && x.Reminder != nil { + return *x.Reminder } return 0 } @@ -181,15 +181,21 @@ var File_goagen_error_calc_proto protoreflect.FileDescriptor const file_goagen_error_calc_proto_rawDesc = "" + "\n" + - "\x17goagen_error_calc.proto\x12\x04calc\"1\n" + - "\x14DivideDivByZeroError\x12\x19\n" + - "\bmessage_\x18\x01 \x01(\tR\amessage\"E\n" + - "\rDivideRequest\x12\x1a\n" + - "\bdividend\x18\x01 \x01(\x11R\bdividend\x12\x18\n" + - "\adivisor\x18\x02 \x01(\x11R\adivisor\"H\n" + - "\x0eDivideResponse\x12\x1a\n" + - "\bquotient\x18\x01 \x01(\x11R\bquotient\x12\x1a\n" + - "\breminder\x18\x02 \x01(\x11R\breminder2;\n" + + "\x17goagen_error_calc.proto\x12\x04calc\"C\n" + + "\x14DivideDivByZeroError\x12\x1e\n" + + "\bmessage_\x18\x01 \x01(\tH\x00R\amessage\x88\x01\x01B\v\n" + + "\t_message_\"h\n" + + "\rDivideRequest\x12\x1f\n" + + "\bdividend\x18\x01 \x01(\x11H\x00R\bdividend\x88\x01\x01\x12\x1d\n" + + "\adivisor\x18\x02 \x01(\x11H\x01R\adivisor\x88\x01\x01B\v\n" + + "\t_dividendB\n" + + "\n" + + "\b_divisor\"l\n" + + "\x0eDivideResponse\x12\x1f\n" + + "\bquotient\x18\x01 \x01(\x11H\x00R\bquotient\x88\x01\x01\x12\x1f\n" + + "\breminder\x18\x02 \x01(\x11H\x01R\breminder\x88\x01\x01B\v\n" + + "\t_quotientB\v\n" + + "\t_reminder2;\n" + "\x04Calc\x123\n" + "\x06Divide\x12\x13.calc.DivideRequest\x1a\x14.calc.DivideResponseB\tZ\a/calcpbb\x06proto3" @@ -226,6 +232,9 @@ func file_goagen_error_calc_proto_init() { if File_goagen_error_calc_proto != nil { return } + file_goagen_error_calc_proto_msgTypes[0].OneofWrappers = []any{} + file_goagen_error_calc_proto_msgTypes[1].OneofWrappers = []any{} + file_goagen_error_calc_proto_msgTypes[2].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/error/gen/grpc/calc/pb/goagen_error_calc.proto b/error/gen/grpc/calc/pb/goagen_error_calc.proto index 761bbf30b..8e06f68b7 100644 --- a/error/gen/grpc/calc/pb/goagen_error_calc.proto +++ b/error/gen/grpc/calc/pb/goagen_error_calc.proto @@ -19,15 +19,15 @@ service Calc { message DivideDivByZeroError { // division by zero leads to infinity. - string message_ = 1; + optional string message_ = 1; } message DivideRequest { - sint32 dividend = 1; - sint32 divisor = 2; + optional sint32 dividend = 1; + optional sint32 divisor = 2; } message DivideResponse { - sint32 quotient = 1; - sint32 reminder = 2; + optional sint32 quotient = 1; + optional sint32 reminder = 2; } diff --git a/error/gen/grpc/calc/server/encode_decode.go b/error/gen/grpc/calc/server/encode_decode.go index f81f4adc8..f5e661dd0 100644 --- a/error/gen/grpc/calc/server/encode_decode.go +++ b/error/gen/grpc/calc/server/encode_decode.go @@ -38,6 +38,9 @@ func DecodeDivideRequest(ctx context.Context, v any, md metadata.MD) (any, error if message, ok = v.(*calcpb.DivideRequest); !ok { return nil, goagrpc.ErrInvalidType("calc", "divide", "*calcpb.DivideRequest", v) } + if err := ValidateDivideRequest(message); err != nil { + return nil, err + } } var payload *calc.DividePayload { diff --git a/error/gen/grpc/calc/server/types.go b/error/gen/grpc/calc/server/types.go index 1e734a24d..884187982 100644 --- a/error/gen/grpc/calc/server/types.go +++ b/error/gen/grpc/calc/server/types.go @@ -10,23 +10,25 @@ package server import ( calc "goa.design/examples/error/gen/calc" calcpb "goa.design/examples/error/gen/grpc/calc/pb" + goa "goa.design/goa/v3/pkg" ) // NewDividePayload builds *calc.DividePayload from *calcpb.DivideRequest. func NewDividePayload(message *calcpb.DivideRequest) *calc.DividePayload { v := &calc.DividePayload{ - Dividend: int(message.Dividend), - Divisor: int(message.Divisor), + Dividend: int(*message.Dividend), + Divisor: int(*message.Divisor), } return v } // NewProtoDivideResponse builds *calcpb.DivideResponse from *calc.DivideResult. func NewProtoDivideResponse(result *calc.DivideResult) *calcpb.DivideResponse { - message := &calcpb.DivideResponse{ - Quotient: int32(result.Quotient), - Reminder: int32(result.Reminder), - } + message := &calcpb.DivideResponse{} + quotient := int32(result.Quotient) + message.Quotient = "ient + reminder := int32(result.Reminder) + message.Reminder = &reminder return message } @@ -34,7 +36,18 @@ func NewProtoDivideResponse(result *calc.DivideResult) *calcpb.DivideResponse { // *calc.DivByZero. func NewDivideDivByZeroError(er *calc.DivByZero) *calcpb.DivideDivByZeroError { message := &calcpb.DivideDivByZeroError{ - Message_: er.Message, + Message_: &er.Message, } return message } + +// ValidateDivideRequest runs the validations defined on DivideRequest. +func ValidateDivideRequest(message *calcpb.DivideRequest) (err error) { + if message.Dividend == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("dividend", "message")) + } + if message.Divisor == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("divisor", "message")) + } + return +} diff --git a/error/go.mod b/error/go.mod index 949a60cf1..5a667e598 100644 --- a/error/go.mod +++ b/error/go.mod @@ -3,7 +3,7 @@ module goa.design/examples/error go 1.26.0 require ( - goa.design/goa/v3 v3.30.0 + goa.design/goa/v3 v3.30.1-0.20260825000358-70a27fd82e81 google.golang.org/genproto v0.0.0-20260810153831-ec0a7760b754 google.golang.org/grpc v1.83.1 google.golang.org/protobuf v1.36.12 diff --git a/error/go.sum b/error/go.sum index 7169cdf99..78a671eea 100644 --- a/error/go.sum +++ b/error/go.sum @@ -49,8 +49,8 @@ go.opentelemetry.io/otel/trace v1.44.0 h1:jxF5CsGYCe74MCRx2X4g7WsY/VBKRqqpNvXlX/ go.opentelemetry.io/otel/trace v1.44.0/go.mod h1:oLl1jrMQAVo6v3GAggN+1VH9VIz9iUSvW53sW1Q8PIE= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.0 h1:KXfAR5qlUCJLVPlHTZ6pHdC5b013BB78PLbDf2fFhfY= -goa.design/goa/v3 v3.30.0/go.mod h1:Is2byRdJddS20jhGT3Ql80N5hQyAc4HgAl7H/A0ZmJ4= +goa.design/goa/v3 v3.30.1-0.20260825000358-70a27fd82e81 h1:LeU5jBnRZV7r/a56FAiGbqptG345Bi/9yE5M1zQjSYY= +goa.design/goa/v3 v3.30.1-0.20260825000358-70a27fd82e81/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/files/go.mod b/files/go.mod index 651752c0a..d75f9cc23 100644 --- a/files/go.mod +++ b/files/go.mod @@ -2,7 +2,7 @@ module goa.design/examples/files go 1.26.0 -require goa.design/goa/v3 v3.30.0 +require goa.design/goa/v3 v3.30.1-0.20260825000358-70a27fd82e81 require ( github.com/dimfeld/httppath v0.0.0-20170720192232-ee938bf73598 // indirect @@ -19,6 +19,7 @@ require ( golang.org/x/sync v0.22.0 // indirect golang.org/x/text v0.41.0 // indirect golang.org/x/tools v0.49.0 // indirect + google.golang.org/protobuf v1.36.12 // indirect gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/files/go.sum b/files/go.sum index 75dec1d03..032a1d87f 100644 --- a/files/go.sum +++ b/files/go.sum @@ -31,8 +31,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.0 h1:KXfAR5qlUCJLVPlHTZ6pHdC5b013BB78PLbDf2fFhfY= -goa.design/goa/v3 v3.30.0/go.mod h1:Is2byRdJddS20jhGT3Ql80N5hQyAc4HgAl7H/A0ZmJ4= +goa.design/goa/v3 v3.30.1-0.20260825000358-70a27fd82e81 h1:LeU5jBnRZV7r/a56FAiGbqptG345Bi/9yE5M1zQjSYY= +goa.design/goa/v3 v3.30.1-0.20260825000358-70a27fd82e81/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= @@ -41,6 +41,8 @@ golang.org/x/text v0.41.0 h1:vz/seA0lnX87Othu2f/0L24RcgrXD9/YFTSuGjj3rH8= golang.org/x/text v0.41.0/go.mod h1:jvf1O8ajNzZqhSrQBPbutR/EB83Cc0CFrezNQIwbb5M= golang.org/x/tools v0.49.0 h1:3NI7VXzL9+1WZD52Dx2ttoPwD5DWrFGpl9mFZDlmisI= golang.org/x/tools v0.49.0/go.mod h1:SJNXV9DBKT0UbdttsQjbfJlAE/q+y36++zo3uL3N0Oo= +google.golang.org/protobuf v1.36.12 h1:pJOKDDOyeXErUroCihFAd5LQuwXBSpVnKGrj5o/fwxc= +google.golang.org/protobuf v1.36.12/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= diff --git a/go.work.sum b/go.work.sum index e67cfdfbc..2224f5c17 100644 --- a/go.work.sum +++ b/go.work.sum @@ -421,6 +421,7 @@ github.com/spiffe/go-spiffe/v2 v2.6.0/go.mod h1:gm2SeUoMZEtpnzPNs2Csc0D/gX33k1xI github.com/spiffe/go-spiffe/v2 v2.7.0/go.mod h1:47Q0Q9/AqGha8QLHp+kxpH4Wca7X7EnOtlIJy3mxZ3U= github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= github.com/stretchr/objx v0.5.3/go.mod h1:rDQraq+vQZU7Fde9LOZLr8Tax6zZvy4kuNKF+QYS+U0= +github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= github.com/ugorji/go/codec v1.2.7 h1:YPXUKf7fYbp/y8xloBqZOw2qaVggbfwMlI8WM3wZUJ0= github.com/ugorji/go/codec v1.2.7/go.mod h1:WGN1fab3R1fzQlVQTkfxVtIBhWDRqOviHU95kRgeqEY= github.com/woodsbury/decimal128 v1.3.0/go.mod h1:C5UTmyTjW3JftjUFzOVhC20BEQa2a4ZKOB5I6Zjb+ds= diff --git a/httpstatus/go.mod b/httpstatus/go.mod index d9ac56144..810774bfc 100644 --- a/httpstatus/go.mod +++ b/httpstatus/go.mod @@ -2,10 +2,9 @@ module goa.design/examples/httpstatus go 1.26.0 -require goa.design/goa/v3 v3.29.1 +require goa.design/goa/v3 v3.30.1-0.20260825000358-70a27fd82e81 require ( - github.com/davecgh/go-spew v1.1.1 // indirect github.com/dimfeld/httppath v0.0.0-20170720192232-ee938bf73598 // indirect github.com/go-chi/chi/v5 v5.3.1 // indirect github.com/gohugoio/hashstructure v1.0.0 // indirect @@ -13,13 +12,14 @@ require ( github.com/google/uuid v1.6.0 // indirect github.com/gorilla/websocket v1.5.3 // indirect github.com/manveru/faker v0.0.0-20171103152722-9fbc68a78c4d // indirect - github.com/pmezard/go-difflib v1.0.0 // indirect github.com/rogpeppe/go-internal v1.14.1 // indirect - github.com/stretchr/testify v1.11.1 // indirect + github.com/stretchr/testify v1.12.1 // indirect + go.yaml.in/yaml/v3 v3.0.5 // indirect golang.org/x/mod v0.40.0 // indirect golang.org/x/sync v0.22.0 // indirect golang.org/x/text v0.41.0 // indirect golang.org/x/tools v0.49.0 // indirect + google.golang.org/protobuf v1.36.12 // indirect gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/httpstatus/go.sum b/httpstatus/go.sum index b5eb6eb0f..032a1d87f 100644 --- a/httpstatus/go.sum +++ b/httpstatus/go.sum @@ -1,7 +1,5 @@ github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/dimfeld/httppath v0.0.0-20170720192232-ee938bf73598 h1:MGKhKyiYrvMDZsmLR/+RGffQSXwEkXgfLSA08qDn9AI= github.com/dimfeld/httppath v0.0.0-20170720192232-ee938bf73598/go.mod h1:0FpDmbrt36utu8jEmeU05dPC9AB5tsLYVVi+ZHfyuwI= github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8= @@ -27,14 +25,14 @@ github.com/manveru/faker v0.0.0-20171103152722-9fbc68a78c4d h1:Zj+PHjnhRYWBK6RqC github.com/manveru/faker v0.0.0-20171103152722-9fbc68a78c4d/go.mod h1:WZy8Q5coAB1zhY9AOBJP0O6J4BuDfbupUDavKY+I3+s= github.com/manveru/gobdd v0.0.0-20131210092515-f1a17fdd710b h1:3E44bLeN8uKYdfQqVQycPnaVviZdBLbizFhU49mtbe4= github.com/manveru/gobdd v0.0.0-20131210092515-f1a17fdd710b/go.mod h1:Bj8LjjP0ReT1eKt5QlKjwgi5AFm5mI6O1A2G4ChI0Ag= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ= github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7so1lCWt35ZSgc= -github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U= -github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= -goa.design/goa/v3 v3.29.1 h1:O/FtqeWRI73e6EU6fuODelhLuSI40eSD7Cxn5fmoU5g= -goa.design/goa/v3 v3.29.1/go.mod h1:FpTADA0Z2onOoZZD2YLWrA2IeXmaBEbs/FeFYag6hxg= +github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWDWE= +github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= +go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= +go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= +goa.design/goa/v3 v3.30.1-0.20260825000358-70a27fd82e81 h1:LeU5jBnRZV7r/a56FAiGbqptG345Bi/9yE5M1zQjSYY= +goa.design/goa/v3 v3.30.1-0.20260825000358-70a27fd82e81/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= @@ -43,6 +41,8 @@ golang.org/x/text v0.41.0 h1:vz/seA0lnX87Othu2f/0L24RcgrXD9/YFTSuGjj3rH8= golang.org/x/text v0.41.0/go.mod h1:jvf1O8ajNzZqhSrQBPbutR/EB83Cc0CFrezNQIwbb5M= golang.org/x/tools v0.49.0 h1:3NI7VXzL9+1WZD52Dx2ttoPwD5DWrFGpl9mFZDlmisI= golang.org/x/tools v0.49.0/go.mod h1:SJNXV9DBKT0UbdttsQjbfJlAE/q+y36++zo3uL3N0Oo= +google.golang.org/protobuf v1.36.12 h1:pJOKDDOyeXErUroCihFAd5LQuwXBSpVnKGrj5o/fwxc= +google.golang.org/protobuf v1.36.12/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= diff --git a/interceptors/gen/grpc/interceptors/client/cli.go b/interceptors/gen/grpc/interceptors/client/cli.go index 5310a11e8..057879d68 100644 --- a/interceptors/gen/grpc/interceptors/client/cli.go +++ b/interceptors/gen/grpc/interceptors/client/cli.go @@ -28,10 +28,14 @@ func BuildGetPayload(interceptorsGetMessage string) (*interceptors.GetPayload, e } } } + if err := ValidateGetRequest(&message); err != nil { + var zero *interceptors.GetPayload + return zero, err + } v := &interceptors.GetPayload{ - TenantID: interceptors.UUID(message.TenantId), - RecordID: interceptors.UUID(message.RecordId), - Auth: message.Auth, + TenantID: interceptors.UUID(*message.TenantId), + RecordID: interceptors.UUID(*message.RecordId), + Auth: *message.Auth, } if message.TraceId != nil { traceID := interceptors.UUID(*message.TraceId) diff --git a/interceptors/gen/grpc/interceptors/client/types.go b/interceptors/gen/grpc/interceptors/client/types.go index 75ba3fafa..af9ab2112 100644 --- a/interceptors/gen/grpc/interceptors/client/types.go +++ b/interceptors/gen/grpc/interceptors/client/types.go @@ -17,10 +17,12 @@ import ( // *interceptors.GetPayload. func NewProtoGetRequest(payload *interceptors.GetPayload) *interceptorspb.GetRequest { message := &interceptorspb.GetRequest{ - TenantId: string(payload.TenantID), - RecordId: string(payload.RecordID), - Auth: payload.Auth, + Auth: &payload.Auth, } + tenantID := string(payload.TenantID) + message.TenantId = &tenantID + recordID := string(payload.RecordID) + message.RecordId = &recordID if payload.TraceID != nil { traceID := string(*payload.TraceID) message.TraceId = &traceID @@ -35,12 +37,12 @@ func NewProtoGetRequest(payload *interceptors.GetPayload) *interceptorspb.GetReq // NewGetResult builds *interceptors.GetResult from *interceptorspb.GetResponse. func NewGetResult(message *interceptorspb.GetResponse) *interceptors.GetResult { result := &interceptors.GetResult{ - ID: interceptors.UUID(message.Id), - Value: message.Value, - Tenant: message.Tenant, - Status: int(message.Status), - ProcessedAt: message.ProcessedAt, - Duration: int(message.Duration), + ID: interceptors.UUID(*message.Id), + Value: *message.Value, + Tenant: *message.Tenant, + Status: int(*message.Status), + ProcessedAt: *message.ProcessedAt, + Duration: int(*message.Duration), CachedAt: message.CachedAt, } if message.RetryCount != nil { @@ -54,8 +56,54 @@ func NewGetResult(message *interceptorspb.GetResponse) *interceptors.GetResult { return result } +// ValidateGetRequest runs the validations defined on GetRequest. +func ValidateGetRequest(message *interceptorspb.GetRequest) (err error) { + if message.TenantId == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("tenantID", "message")) + } + if message.RecordId == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("recordID", "message")) + } + if message.Auth == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("auth", "message")) + } + if message.TenantId != nil { + err = goa.MergeErrors(err, goa.ValidateFormat("message.tenantID", string(*message.TenantId), goa.FormatUUID)) + } + if message.RecordId != nil { + err = goa.MergeErrors(err, goa.ValidateFormat("message.recordID", string(*message.RecordId), goa.FormatUUID)) + } + if message.TraceId != nil { + err = goa.MergeErrors(err, goa.ValidateFormat("message.traceID", string(*message.TraceId), goa.FormatUUID)) + } + if message.SpanId != nil { + err = goa.MergeErrors(err, goa.ValidateFormat("message.spanID", string(*message.SpanId), goa.FormatUUID)) + } + return +} + // ValidateGetResponse runs the validations defined on GetResponse. func ValidateGetResponse(message *interceptorspb.GetResponse) (err error) { - err = goa.MergeErrors(err, goa.ValidateFormat("message.id", string(message.Id), goa.FormatUUID)) + if message.Id == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("id", "message")) + } + if message.Value == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("value", "message")) + } + if message.Tenant == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("tenant", "message")) + } + if message.Status == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("status", "message")) + } + if message.ProcessedAt == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("processedAt", "message")) + } + if message.Duration == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("duration", "message")) + } + if message.Id != nil { + err = goa.MergeErrors(err, goa.ValidateFormat("message.id", string(*message.Id), goa.FormatUUID)) + } return } diff --git a/interceptors/gen/grpc/interceptors/pb/goagen_interceptors_interceptors.pb.go b/interceptors/gen/grpc/interceptors/pb/goagen_interceptors_interceptors.pb.go index cfcd9d8f5..9a4208d59 100644 --- a/interceptors/gen/grpc/interceptors/pb/goagen_interceptors_interceptors.pb.go +++ b/interceptors/gen/grpc/interceptors/pb/goagen_interceptors_interceptors.pb.go @@ -31,11 +31,11 @@ const ( type GetRequest struct { state protoimpl.MessageState `protogen:"open.v1"` // Tenant ID for the request - TenantId string `protobuf:"bytes,1,opt,name=tenant_id,json=tenantId,proto3" json:"tenant_id,omitempty"` + TenantId *string `protobuf:"bytes,1,opt,name=tenant_id,json=tenantId,proto3,oneof" json:"tenant_id,omitempty"` // ID of the record to retrieve - RecordId string `protobuf:"bytes,2,opt,name=record_id,json=recordId,proto3" json:"record_id,omitempty"` + RecordId *string `protobuf:"bytes,2,opt,name=record_id,json=recordId,proto3,oneof" json:"record_id,omitempty"` // JWT auth token - Auth string `protobuf:"bytes,3,opt,name=auth,proto3" json:"auth,omitempty"` + Auth *string `protobuf:"bytes,3,opt,name=auth,proto3,oneof" json:"auth,omitempty"` // Unique trace ID for request, initialized by the TraceRequest interceptor TraceId *string `protobuf:"bytes,4,opt,name=trace_id,json=traceId,proto3,oneof" json:"trace_id,omitempty"` // Unique span ID for request, initialized by the TraceRequest interceptor @@ -75,22 +75,22 @@ func (*GetRequest) Descriptor() ([]byte, []int) { } func (x *GetRequest) GetTenantId() string { - if x != nil { - return x.TenantId + if x != nil && x.TenantId != nil { + return *x.TenantId } return "" } func (x *GetRequest) GetRecordId() string { - if x != nil { - return x.RecordId + if x != nil && x.RecordId != nil { + return *x.RecordId } return "" } func (x *GetRequest) GetAuth() string { - if x != nil { - return x.Auth + if x != nil && x.Auth != nil { + return *x.Auth } return "" } @@ -112,17 +112,17 @@ func (x *GetRequest) GetSpanId() string { type GetResponse struct { state protoimpl.MessageState `protogen:"open.v1"` // ID of the record - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Id *string `protobuf:"bytes,1,opt,name=id,proto3,oneof" json:"id,omitempty"` // Value of the record - Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` + Value *string `protobuf:"bytes,2,opt,name=value,proto3,oneof" json:"value,omitempty"` // Tenant the record belongs to - Tenant string `protobuf:"bytes,3,opt,name=tenant,proto3" json:"tenant,omitempty"` + Tenant *string `protobuf:"bytes,3,opt,name=tenant,proto3,oneof" json:"tenant,omitempty"` // Response status code - Status int32 `protobuf:"zigzag32,4,opt,name=status,proto3" json:"status,omitempty"` + Status *int32 `protobuf:"zigzag32,4,opt,name=status,proto3,oneof" json:"status,omitempty"` // Timestamp when processed, written by the RequestAudit interceptor - ProcessedAt string `protobuf:"bytes,5,opt,name=processed_at,json=processedAt,proto3" json:"processed_at,omitempty"` + ProcessedAt *string `protobuf:"bytes,5,opt,name=processed_at,json=processedAt,proto3,oneof" json:"processed_at,omitempty"` // Processing duration in ms, written by the RequestAudit interceptor - Duration int32 `protobuf:"zigzag32,6,opt,name=duration,proto3" json:"duration,omitempty"` + Duration *int32 `protobuf:"zigzag32,6,opt,name=duration,proto3,oneof" json:"duration,omitempty"` // Time at which the record was cached, written by the Cache interceptor CachedAt *string `protobuf:"bytes,7,opt,name=cached_at,json=cachedAt,proto3,oneof" json:"cached_at,omitempty"` // Number of retry attempts made, written client-side by the Retry interceptor @@ -164,43 +164,43 @@ func (*GetResponse) Descriptor() ([]byte, []int) { } func (x *GetResponse) GetId() string { - if x != nil { - return x.Id + if x != nil && x.Id != nil { + return *x.Id } return "" } func (x *GetResponse) GetValue() string { - if x != nil { - return x.Value + if x != nil && x.Value != nil { + return *x.Value } return "" } func (x *GetResponse) GetTenant() string { - if x != nil { - return x.Tenant + if x != nil && x.Tenant != nil { + return *x.Tenant } return "" } func (x *GetResponse) GetStatus() int32 { - if x != nil { - return x.Status + if x != nil && x.Status != nil { + return *x.Status } return 0 } func (x *GetResponse) GetProcessedAt() string { - if x != nil { - return x.ProcessedAt + if x != nil && x.ProcessedAt != nil { + return *x.ProcessedAt } return "" } func (x *GetResponse) GetDuration() int32 { - if x != nil { - return x.Duration + if x != nil && x.Duration != nil { + return *x.Duration } return 0 } @@ -230,28 +230,39 @@ var File_goagen_interceptors_interceptors_proto protoreflect.FileDescriptor const file_goagen_interceptors_interceptors_proto_rawDesc = "" + "\n" + - "&goagen_interceptors_interceptors.proto\x12\finterceptors\"\xb1\x01\n" + + "&goagen_interceptors_interceptors.proto\x12\finterceptors\"\xe5\x01\n" + + "\n" + + "GetRequest\x12 \n" + + "\ttenant_id\x18\x01 \x01(\tH\x00R\btenantId\x88\x01\x01\x12 \n" + + "\trecord_id\x18\x02 \x01(\tH\x01R\brecordId\x88\x01\x01\x12\x17\n" + + "\x04auth\x18\x03 \x01(\tH\x02R\x04auth\x88\x01\x01\x12\x1e\n" + + "\btrace_id\x18\x04 \x01(\tH\x03R\atraceId\x88\x01\x01\x12\x1c\n" + + "\aspan_id\x18\x05 \x01(\tH\x04R\x06spanId\x88\x01\x01B\f\n" + + "\n" + + "_tenant_idB\f\n" + "\n" + - "GetRequest\x12\x1b\n" + - "\ttenant_id\x18\x01 \x01(\tR\btenantId\x12\x1b\n" + - "\trecord_id\x18\x02 \x01(\tR\brecordId\x12\x12\n" + - "\x04auth\x18\x03 \x01(\tR\x04auth\x12\x1e\n" + - "\btrace_id\x18\x04 \x01(\tH\x00R\atraceId\x88\x01\x01\x12\x1c\n" + - "\aspan_id\x18\x05 \x01(\tH\x01R\x06spanId\x88\x01\x01B\v\n" + + "_record_idB\a\n" + + "\x05_authB\v\n" + "\t_trace_idB\n" + "\n" + - "\b_span_id\"\xc7\x02\n" + - "\vGetResponse\x12\x0e\n" + - "\x02id\x18\x01 \x01(\tR\x02id\x12\x14\n" + - "\x05value\x18\x02 \x01(\tR\x05value\x12\x16\n" + - "\x06tenant\x18\x03 \x01(\tR\x06tenant\x12\x16\n" + - "\x06status\x18\x04 \x01(\x11R\x06status\x12!\n" + - "\fprocessed_at\x18\x05 \x01(\tR\vprocessedAt\x12\x1a\n" + - "\bduration\x18\x06 \x01(\x11R\bduration\x12 \n" + - "\tcached_at\x18\a \x01(\tH\x00R\bcachedAt\x88\x01\x01\x12$\n" + - "\vretry_count\x18\b \x01(\x11H\x01R\n" + + "\b_span_id\"\xaa\x03\n" + + "\vGetResponse\x12\x13\n" + + "\x02id\x18\x01 \x01(\tH\x00R\x02id\x88\x01\x01\x12\x19\n" + + "\x05value\x18\x02 \x01(\tH\x01R\x05value\x88\x01\x01\x12\x1b\n" + + "\x06tenant\x18\x03 \x01(\tH\x02R\x06tenant\x88\x01\x01\x12\x1b\n" + + "\x06status\x18\x04 \x01(\x11H\x03R\x06status\x88\x01\x01\x12&\n" + + "\fprocessed_at\x18\x05 \x01(\tH\x04R\vprocessedAt\x88\x01\x01\x12\x1f\n" + + "\bduration\x18\x06 \x01(\x11H\x05R\bduration\x88\x01\x01\x12 \n" + + "\tcached_at\x18\a \x01(\tH\x06R\bcachedAt\x88\x01\x01\x12$\n" + + "\vretry_count\x18\b \x01(\x11H\aR\n" + "retryCount\x88\x01\x01\x12*\n" + - "\x0eretry_duration\x18\t \x01(\x11H\x02R\rretryDuration\x88\x01\x01B\f\n" + + "\x0eretry_duration\x18\t \x01(\x11H\bR\rretryDuration\x88\x01\x01B\x05\n" + + "\x03_idB\b\n" + + "\x06_valueB\t\n" + + "\a_tenantB\t\n" + + "\a_statusB\x0f\n" + + "\r_processed_atB\v\n" + + "\t_durationB\f\n" + "\n" + "_cached_atB\x0e\n" + "\f_retry_countB\x11\n" + diff --git a/interceptors/gen/grpc/interceptors/pb/goagen_interceptors_interceptors.proto b/interceptors/gen/grpc/interceptors/pb/goagen_interceptors_interceptors.proto index 40d4387b2..a984449ea 100644 --- a/interceptors/gen/grpc/interceptors/pb/goagen_interceptors_interceptors.proto +++ b/interceptors/gen/grpc/interceptors/pb/goagen_interceptors_interceptors.proto @@ -24,11 +24,11 @@ service Interceptors { message GetRequest { // Tenant ID for the request - string tenant_id = 1; + optional string tenant_id = 1; // ID of the record to retrieve - string record_id = 2; + optional string record_id = 2; // JWT auth token - string auth = 3; + optional string auth = 3; // Unique trace ID for request, initialized by the TraceRequest interceptor optional string trace_id = 4; // Unique span ID for request, initialized by the TraceRequest interceptor @@ -37,17 +37,17 @@ message GetRequest { message GetResponse { // ID of the record - string id = 1; + optional string id = 1; // Value of the record - string value = 2; + optional string value = 2; // Tenant the record belongs to - string tenant = 3; + optional string tenant = 3; // Response status code - sint32 status = 4; + optional sint32 status = 4; // Timestamp when processed, written by the RequestAudit interceptor - string processed_at = 5; + optional string processed_at = 5; // Processing duration in ms, written by the RequestAudit interceptor - sint32 duration = 6; + optional sint32 duration = 6; // Time at which the record was cached, written by the Cache interceptor optional string cached_at = 7; // Number of retry attempts made, written client-side by the Retry interceptor diff --git a/interceptors/gen/grpc/interceptors/server/types.go b/interceptors/gen/grpc/interceptors/server/types.go index 4faa159fb..a3f2602f6 100644 --- a/interceptors/gen/grpc/interceptors/server/types.go +++ b/interceptors/gen/grpc/interceptors/server/types.go @@ -17,9 +17,9 @@ import ( // *interceptorspb.GetRequest. func NewGetPayload(message *interceptorspb.GetRequest) *interceptors.GetPayload { v := &interceptors.GetPayload{ - TenantID: interceptors.UUID(message.TenantId), - RecordID: interceptors.UUID(message.RecordId), - Auth: message.Auth, + TenantID: interceptors.UUID(*message.TenantId), + RecordID: interceptors.UUID(*message.RecordId), + Auth: *message.Auth, } if message.TraceId != nil { traceID := interceptors.UUID(*message.TraceId) @@ -36,14 +36,17 @@ func NewGetPayload(message *interceptorspb.GetRequest) *interceptors.GetPayload // *interceptors.GetResult. func NewProtoGetResponse(result *interceptors.GetResult) *interceptorspb.GetResponse { message := &interceptorspb.GetResponse{ - Id: string(result.ID), - Value: result.Value, - Tenant: result.Tenant, - Status: int32(result.Status), - ProcessedAt: result.ProcessedAt, - Duration: int32(result.Duration), + Value: &result.Value, + Tenant: &result.Tenant, + ProcessedAt: &result.ProcessedAt, CachedAt: result.CachedAt, } + id := string(result.ID) + message.Id = &id + status := int32(result.Status) + message.Status = &status + duration := int32(result.Duration) + message.Duration = &duration if result.RetryCount != nil { retryCount := int32(*result.RetryCount) message.RetryCount = &retryCount @@ -57,8 +60,21 @@ func NewProtoGetResponse(result *interceptors.GetResult) *interceptorspb.GetResp // ValidateGetRequest runs the validations defined on GetRequest. func ValidateGetRequest(message *interceptorspb.GetRequest) (err error) { - err = goa.MergeErrors(err, goa.ValidateFormat("message.tenantID", string(message.TenantId), goa.FormatUUID)) - err = goa.MergeErrors(err, goa.ValidateFormat("message.recordID", string(message.RecordId), goa.FormatUUID)) + if message.TenantId == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("tenantID", "message")) + } + if message.RecordId == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("recordID", "message")) + } + if message.Auth == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("auth", "message")) + } + if message.TenantId != nil { + err = goa.MergeErrors(err, goa.ValidateFormat("message.tenantID", string(*message.TenantId), goa.FormatUUID)) + } + if message.RecordId != nil { + err = goa.MergeErrors(err, goa.ValidateFormat("message.recordID", string(*message.RecordId), goa.FormatUUID)) + } if message.TraceId != nil { err = goa.MergeErrors(err, goa.ValidateFormat("message.traceID", string(*message.TraceId), goa.FormatUUID)) } diff --git a/interceptors/gen/interceptors/client_interceptors.go b/interceptors/gen/interceptors/client_interceptors.go index e42bf5c66..5e26e987c 100644 --- a/interceptors/gen/interceptors/client_interceptors.go +++ b/interceptors/gen/interceptors/client_interceptors.go @@ -33,14 +33,7 @@ type ClientInterceptors interface { type ( // EncodeTenantInfo describes the service call currently passed to the interceptor. EncodeTenantInfo interface { - // Service returns the service selected for this call. - Service() string - // Method returns the method selected for this call. - Method() string - // CallType returns whether this is an endpoint call, stream send, or stream receive. - CallType() goa.InterceptorCallType - // RawPayload returns the value passed to the interceptor. - RawPayload() any + goa.InterceptorInfo // Payload returns the selected fields from the method payload. Payload() EncodeTenantPayload } @@ -54,14 +47,7 @@ type ( } // RetryInfo describes the service call currently passed to the interceptor. RetryInfo interface { - // Service returns the service selected for this call. - Service() string - // Method returns the method selected for this call. - Method() string - // CallType returns whether this is an endpoint call, stream send, or stream receive. - CallType() goa.InterceptorCallType - // RawPayload returns the value passed to the interceptor. - RawPayload() any + goa.InterceptorInfo // Result returns the selected fields from the method result. Result(any) RetryResult } @@ -82,31 +68,31 @@ type ( rawPayload any } encodeTenantGetClientUnaryInfo struct { - *encodeTenantGetInfo + encodeTenantGetInfo } encodeTenantCreateInfo struct { rawPayload any } encodeTenantCreateClientUnaryInfo struct { - *encodeTenantCreateInfo + encodeTenantCreateInfo } encodeTenantStreamInfo struct { rawPayload any } encodeTenantStreamClientUnaryInfo struct { - *encodeTenantStreamInfo + encodeTenantStreamInfo } retryGetInfo struct { rawPayload any } retryGetClientUnaryInfo struct { - *retryGetInfo + retryGetInfo } retryCreateInfo struct { rawPayload any } retryCreateClientUnaryInfo struct { - *retryCreateInfo + retryCreateInfo } encodeTenantGetPayload struct { payload *GetPayload diff --git a/interceptors/gen/interceptors/interceptor_wrappers.go b/interceptors/gen/interceptors/interceptor_wrappers.go index e8e34bf27..901b55604 100644 --- a/interceptors/gen/interceptors/interceptor_wrappers.go +++ b/interceptors/gen/interceptors/interceptor_wrappers.go @@ -35,7 +35,7 @@ type wrappedStreamClientStream struct { func wrapGetCache(endpoint goa.Endpoint, i ServerInterceptors) goa.Endpoint { return func(ctx context.Context, req any) (any, error) { info := &cacheGetServerUnaryInfo{ - cacheGetInfo: &cacheGetInfo{rawPayload: req}, + cacheGetInfo: cacheGetInfo{rawPayload: req}, } return i.Cache(ctx, info, endpoint) } @@ -45,7 +45,7 @@ func wrapGetCache(endpoint goa.Endpoint, i ServerInterceptors) goa.Endpoint { func wrapGetJWTAuth(endpoint goa.Endpoint, i ServerInterceptors) goa.Endpoint { return func(ctx context.Context, req any) (any, error) { info := &jwtAuthGetServerUnaryInfo{ - jwtAuthGetInfo: &jwtAuthGetInfo{rawPayload: req}, + jwtAuthGetInfo: jwtAuthGetInfo{rawPayload: req}, } return i.JWTAuth(ctx, info, endpoint) } @@ -55,7 +55,7 @@ func wrapGetJWTAuth(endpoint goa.Endpoint, i ServerInterceptors) goa.Endpoint { func wrapCreateJWTAuth(endpoint goa.Endpoint, i ServerInterceptors) goa.Endpoint { return func(ctx context.Context, req any) (any, error) { info := &jwtAuthCreateServerUnaryInfo{ - jwtAuthCreateInfo: &jwtAuthCreateInfo{rawPayload: req}, + jwtAuthCreateInfo: jwtAuthCreateInfo{rawPayload: req}, } return i.JWTAuth(ctx, info, endpoint) } @@ -65,7 +65,7 @@ func wrapCreateJWTAuth(endpoint goa.Endpoint, i ServerInterceptors) goa.Endpoint func wrapStreamJWTAuth(endpoint goa.Endpoint, i ServerInterceptors) goa.Endpoint { return func(ctx context.Context, req any) (any, error) { info := &jwtAuthStreamServerUnaryInfo{ - jwtAuthStreamInfo: &jwtAuthStreamInfo{rawPayload: req}, + jwtAuthStreamInfo: jwtAuthStreamInfo{rawPayload: req}, } return i.JWTAuth(ctx, info, endpoint) } @@ -75,7 +75,7 @@ func wrapStreamJWTAuth(endpoint goa.Endpoint, i ServerInterceptors) goa.Endpoint func wrapGetRequestAudit(endpoint goa.Endpoint, i ServerInterceptors) goa.Endpoint { return func(ctx context.Context, req any) (any, error) { info := &requestAuditGetServerUnaryInfo{ - requestAuditGetInfo: &requestAuditGetInfo{rawPayload: req}, + requestAuditGetInfo: requestAuditGetInfo{rawPayload: req}, } return i.RequestAudit(ctx, info, endpoint) } @@ -86,7 +86,7 @@ func wrapGetRequestAudit(endpoint goa.Endpoint, i ServerInterceptors) goa.Endpoi func wrapCreateRequestAudit(endpoint goa.Endpoint, i ServerInterceptors) goa.Endpoint { return func(ctx context.Context, req any) (any, error) { info := &requestAuditCreateServerUnaryInfo{ - requestAuditCreateInfo: &requestAuditCreateInfo{rawPayload: req}, + requestAuditCreateInfo: requestAuditCreateInfo{rawPayload: req}, } return i.RequestAudit(ctx, info, endpoint) } @@ -96,7 +96,7 @@ func wrapCreateRequestAudit(endpoint goa.Endpoint, i ServerInterceptors) goa.End func wrapGetSetDeadline(endpoint goa.Endpoint, i ServerInterceptors) goa.Endpoint { return func(ctx context.Context, req any) (any, error) { info := &setDeadlineGetServerUnaryInfo{ - setDeadlineGetInfo: &setDeadlineGetInfo{rawPayload: req}, + setDeadlineGetInfo: setDeadlineGetInfo{rawPayload: req}, } return i.SetDeadline(ctx, info, endpoint) } @@ -107,7 +107,7 @@ func wrapGetSetDeadline(endpoint goa.Endpoint, i ServerInterceptors) goa.Endpoin func wrapCreateSetDeadline(endpoint goa.Endpoint, i ServerInterceptors) goa.Endpoint { return func(ctx context.Context, req any) (any, error) { info := &setDeadlineCreateServerUnaryInfo{ - setDeadlineCreateInfo: &setDeadlineCreateInfo{rawPayload: req}, + setDeadlineCreateInfo: setDeadlineCreateInfo{rawPayload: req}, } return i.SetDeadline(ctx, info, endpoint) } @@ -118,7 +118,7 @@ func wrapCreateSetDeadline(endpoint goa.Endpoint, i ServerInterceptors) goa.Endp func wrapStreamSetDeadline(endpoint goa.Endpoint, i ServerInterceptors) goa.Endpoint { return func(ctx context.Context, req any) (any, error) { info := &setDeadlineStreamServerUnaryInfo{ - setDeadlineStreamInfo: &setDeadlineStreamInfo{rawPayload: req}, + setDeadlineStreamInfo: setDeadlineStreamInfo{rawPayload: req}, } return i.SetDeadline(ctx, info, endpoint) } @@ -133,7 +133,7 @@ func wrapStreamTraceBidirectionalStream(endpoint goa.Endpoint, i ServerIntercept ctx: ctx, sendWithContext: func(ctx context.Context, req *StreamResult) error { info := &traceBidirectionalStreamStreamStreamingSendInfo{ - traceBidirectionalStreamStreamInfo: &traceBidirectionalStreamStreamInfo{rawPayload: req}, + traceBidirectionalStreamStreamInfo: traceBidirectionalStreamStreamInfo{rawPayload: req}, } _, err := i.TraceBidirectionalStream(ctx, info, func(ctx context.Context, req any) (any, error) { castReq, _ := req.(*StreamResult) @@ -143,7 +143,7 @@ func wrapStreamTraceBidirectionalStream(endpoint goa.Endpoint, i ServerIntercept }, recvWithContext: func(ctx context.Context) (*StreamStreamingPayload, error) { info := &traceBidirectionalStreamStreamStreamingRecvInfo{ - traceBidirectionalStreamStreamInfo: &traceBidirectionalStreamStreamInfo{}, + traceBidirectionalStreamStreamInfo: traceBidirectionalStreamStreamInfo{}, } res, err := i.TraceBidirectionalStream(ctx, info, func(ctx context.Context, _ any) (any, error) { return stream.RecvWithContext(ctx) @@ -161,7 +161,7 @@ func wrapStreamTraceBidirectionalStream(endpoint goa.Endpoint, i ServerIntercept func wrapGetTraceRequest(endpoint goa.Endpoint, i ServerInterceptors) goa.Endpoint { return func(ctx context.Context, req any) (any, error) { info := &traceRequestGetServerUnaryInfo{ - traceRequestGetInfo: &traceRequestGetInfo{rawPayload: req}, + traceRequestGetInfo: traceRequestGetInfo{rawPayload: req}, } return i.TraceRequest(ctx, info, endpoint) } @@ -172,7 +172,7 @@ func wrapGetTraceRequest(endpoint goa.Endpoint, i ServerInterceptors) goa.Endpoi func wrapCreateTraceRequest(endpoint goa.Endpoint, i ServerInterceptors) goa.Endpoint { return func(ctx context.Context, req any) (any, error) { info := &traceRequestCreateServerUnaryInfo{ - traceRequestCreateInfo: &traceRequestCreateInfo{rawPayload: req}, + traceRequestCreateInfo: traceRequestCreateInfo{rawPayload: req}, } return i.TraceRequest(ctx, info, endpoint) } @@ -183,7 +183,7 @@ func wrapCreateTraceRequest(endpoint goa.Endpoint, i ServerInterceptors) goa.End func wrapClientGetEncodeTenant(endpoint goa.Endpoint, i ClientInterceptors) goa.Endpoint { return func(ctx context.Context, req any) (any, error) { info := &encodeTenantGetClientUnaryInfo{ - encodeTenantGetInfo: &encodeTenantGetInfo{rawPayload: req}, + encodeTenantGetInfo: encodeTenantGetInfo{rawPayload: req}, } return i.EncodeTenant(ctx, info, endpoint) } @@ -194,7 +194,7 @@ func wrapClientGetEncodeTenant(endpoint goa.Endpoint, i ClientInterceptors) goa. func wrapClientCreateEncodeTenant(endpoint goa.Endpoint, i ClientInterceptors) goa.Endpoint { return func(ctx context.Context, req any) (any, error) { info := &encodeTenantCreateClientUnaryInfo{ - encodeTenantCreateInfo: &encodeTenantCreateInfo{rawPayload: req}, + encodeTenantCreateInfo: encodeTenantCreateInfo{rawPayload: req}, } return i.EncodeTenant(ctx, info, endpoint) } @@ -205,7 +205,7 @@ func wrapClientCreateEncodeTenant(endpoint goa.Endpoint, i ClientInterceptors) g func wrapClientStreamEncodeTenant(endpoint goa.Endpoint, i ClientInterceptors) goa.Endpoint { return func(ctx context.Context, req any) (any, error) { info := &encodeTenantStreamClientUnaryInfo{ - encodeTenantStreamInfo: &encodeTenantStreamInfo{rawPayload: req}, + encodeTenantStreamInfo: encodeTenantStreamInfo{rawPayload: req}, } return i.EncodeTenant(ctx, info, endpoint) } @@ -215,7 +215,7 @@ func wrapClientStreamEncodeTenant(endpoint goa.Endpoint, i ClientInterceptors) g func wrapClientGetRetry(endpoint goa.Endpoint, i ClientInterceptors) goa.Endpoint { return func(ctx context.Context, req any) (any, error) { info := &retryGetClientUnaryInfo{ - retryGetInfo: &retryGetInfo{rawPayload: req}, + retryGetInfo: retryGetInfo{rawPayload: req}, } return i.Retry(ctx, info, endpoint) } @@ -225,7 +225,7 @@ func wrapClientGetRetry(endpoint goa.Endpoint, i ClientInterceptors) goa.Endpoin func wrapClientCreateRetry(endpoint goa.Endpoint, i ClientInterceptors) goa.Endpoint { return func(ctx context.Context, req any) (any, error) { info := &retryCreateClientUnaryInfo{ - retryCreateInfo: &retryCreateInfo{rawPayload: req}, + retryCreateInfo: retryCreateInfo{rawPayload: req}, } return i.Retry(ctx, info, endpoint) } @@ -244,7 +244,7 @@ func wrapClientStreamTraceBidirectionalStream(endpoint goa.Endpoint, i ClientInt ctx: ctx, sendWithContext: func(ctx context.Context, req *StreamStreamingPayload) error { info := &traceBidirectionalStreamStreamStreamingSendInfo{ - traceBidirectionalStreamStreamInfo: &traceBidirectionalStreamStreamInfo{rawPayload: req}, + traceBidirectionalStreamStreamInfo: traceBidirectionalStreamStreamInfo{rawPayload: req}, } _, err := i.TraceBidirectionalStream(ctx, info, func(ctx context.Context, req any) (any, error) { castReq, _ := req.(*StreamStreamingPayload) @@ -254,7 +254,7 @@ func wrapClientStreamTraceBidirectionalStream(endpoint goa.Endpoint, i ClientInt }, recvWithContext: func(ctx context.Context) (*StreamResult, error) { info := &traceBidirectionalStreamStreamStreamingRecvInfo{ - traceBidirectionalStreamStreamInfo: &traceBidirectionalStreamStreamInfo{}, + traceBidirectionalStreamStreamInfo: traceBidirectionalStreamStreamInfo{}, } res, err := i.TraceBidirectionalStream(ctx, info, func(ctx context.Context, _ any) (any, error) { return stream.RecvWithContext(ctx) diff --git a/interceptors/gen/interceptors/service_interceptors.go b/interceptors/gen/interceptors/service_interceptors.go index 018db9bf1..257340f95 100644 --- a/interceptors/gen/interceptors/service_interceptors.go +++ b/interceptors/gen/interceptors/service_interceptors.go @@ -39,14 +39,7 @@ type ServerInterceptors interface { type ( // CacheInfo describes the service call currently passed to the interceptor. CacheInfo interface { - // Service returns the service selected for this call. - Service() string - // Method returns the method selected for this call. - Method() string - // CallType returns whether this is an endpoint call, stream send, or stream receive. - CallType() goa.InterceptorCallType - // RawPayload returns the value passed to the interceptor. - RawPayload() any + goa.InterceptorInfo // Payload returns the selected fields from the method payload. Payload() CachePayload // Result returns the selected fields from the method result. @@ -68,14 +61,7 @@ type ( } // JWTAuthInfo describes the service call currently passed to the interceptor. JWTAuthInfo interface { - // Service returns the service selected for this call. - Service() string - // Method returns the method selected for this call. - Method() string - // CallType returns whether this is an endpoint call, stream send, or stream receive. - CallType() goa.InterceptorCallType - // RawPayload returns the value passed to the interceptor. - RawPayload() any + goa.InterceptorInfo // Payload returns the selected fields from the method payload. Payload() JWTAuthPayload } @@ -89,14 +75,7 @@ type ( } // RequestAuditInfo describes the service call currently passed to the interceptor. RequestAuditInfo interface { - // Service returns the service selected for this call. - Service() string - // Method returns the method selected for this call. - Method() string - // CallType returns whether this is an endpoint call, stream send, or stream receive. - CallType() goa.InterceptorCallType - // RawPayload returns the value passed to the interceptor. - RawPayload() any + goa.InterceptorInfo // Result returns the selected fields from the method result. Result(any) RequestAuditResult } @@ -111,25 +90,11 @@ type ( } // SetDeadlineInfo describes the service call currently passed to the interceptor. SetDeadlineInfo interface { - // Service returns the service selected for this call. - Service() string - // Method returns the method selected for this call. - Method() string - // CallType returns whether this is an endpoint call, stream send, or stream receive. - CallType() goa.InterceptorCallType - // RawPayload returns the value passed to the interceptor. - RawPayload() any + goa.InterceptorInfo } // TraceBidirectionalStreamInfo describes the service call currently passed to the interceptor. TraceBidirectionalStreamInfo interface { - // Service returns the service selected for this call. - Service() string - // Method returns the method selected for this call. - Method() string - // CallType returns whether this is an endpoint call, stream send, or stream receive. - CallType() goa.InterceptorCallType - // RawPayload returns the value passed to the interceptor. - RawPayload() any + goa.InterceptorInfo // ClientStreamingPayload returns selected fields from the outgoing stream payload. ClientStreamingPayload() TraceBidirectionalStreamStreamingPayload // ServerStreamingPayload returns selected fields from the incoming stream payload. @@ -161,14 +126,7 @@ type ( } // TraceRequestInfo describes the service call currently passed to the interceptor. TraceRequestInfo interface { - // Service returns the service selected for this call. - Service() string - // Method returns the method selected for this call. - Method() string - // CallType returns whether this is an endpoint call, stream send, or stream receive. - CallType() goa.InterceptorCallType - // RawPayload returns the value passed to the interceptor. - RawPayload() any + goa.InterceptorInfo // Payload returns the selected fields from the method payload. Payload() TraceRequestPayload } @@ -188,76 +146,76 @@ type ( rawPayload any } cacheGetServerUnaryInfo struct { - *cacheGetInfo + cacheGetInfo } jwtAuthGetInfo struct { rawPayload any } jwtAuthGetServerUnaryInfo struct { - *jwtAuthGetInfo + jwtAuthGetInfo } jwtAuthCreateInfo struct { rawPayload any } jwtAuthCreateServerUnaryInfo struct { - *jwtAuthCreateInfo + jwtAuthCreateInfo } jwtAuthStreamInfo struct { rawPayload any } jwtAuthStreamServerUnaryInfo struct { - *jwtAuthStreamInfo + jwtAuthStreamInfo } requestAuditGetInfo struct { rawPayload any } requestAuditGetServerUnaryInfo struct { - *requestAuditGetInfo + requestAuditGetInfo } requestAuditCreateInfo struct { rawPayload any } requestAuditCreateServerUnaryInfo struct { - *requestAuditCreateInfo + requestAuditCreateInfo } setDeadlineGetInfo struct { rawPayload any } setDeadlineGetServerUnaryInfo struct { - *setDeadlineGetInfo + setDeadlineGetInfo } setDeadlineCreateInfo struct { rawPayload any } setDeadlineCreateServerUnaryInfo struct { - *setDeadlineCreateInfo + setDeadlineCreateInfo } setDeadlineStreamInfo struct { rawPayload any } setDeadlineStreamServerUnaryInfo struct { - *setDeadlineStreamInfo + setDeadlineStreamInfo } traceBidirectionalStreamStreamInfo struct { rawPayload any } traceBidirectionalStreamStreamStreamingSendInfo struct { - *traceBidirectionalStreamStreamInfo + traceBidirectionalStreamStreamInfo } traceBidirectionalStreamStreamStreamingRecvInfo struct { - *traceBidirectionalStreamStreamInfo + traceBidirectionalStreamStreamInfo } traceRequestGetInfo struct { rawPayload any } traceRequestGetServerUnaryInfo struct { - *traceRequestGetInfo + traceRequestGetInfo } traceRequestCreateInfo struct { rawPayload any } traceRequestCreateServerUnaryInfo struct { - *traceRequestCreateInfo + traceRequestCreateInfo } cacheGetPayload struct { payload *GetPayload diff --git a/interceptors/go.mod b/interceptors/go.mod index 3f7302f2c..ec4fb7594 100644 --- a/interceptors/go.mod +++ b/interceptors/go.mod @@ -6,7 +6,7 @@ require ( github.com/google/uuid v1.6.0 github.com/gorilla/websocket v1.5.3 goa.design/clue v1.2.6 - goa.design/goa/v3 v3.30.0 + goa.design/goa/v3 v3.30.1-0.20260825000358-70a27fd82e81 google.golang.org/grpc v1.83.1 google.golang.org/protobuf v1.36.12 ) diff --git a/interceptors/go.sum b/interceptors/go.sum index a0f32c059..40fc45d57 100644 --- a/interceptors/go.sum +++ b/interceptors/go.sum @@ -55,8 +55,8 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/clue v1.2.6 h1:ensyUkwlvEbNy8FuTGMldKuvaNouh8YoDY9QaE+EtYg= goa.design/clue v1.2.6/go.mod h1:Y4RS5o2k6MZiGk2PT3XbKyntjR2xkr8dYOKQ591dIDM= -goa.design/goa/v3 v3.30.0 h1:KXfAR5qlUCJLVPlHTZ6pHdC5b013BB78PLbDf2fFhfY= -goa.design/goa/v3 v3.30.0/go.mod h1:Is2byRdJddS20jhGT3Ql80N5hQyAc4HgAl7H/A0ZmJ4= +goa.design/goa/v3 v3.30.1-0.20260825000358-70a27fd82e81 h1:LeU5jBnRZV7r/a56FAiGbqptG345Bi/9yE5M1zQjSYY= +goa.design/goa/v3 v3.30.1-0.20260825000358-70a27fd82e81/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/multipart/go.mod b/multipart/go.mod index 4b9c4f822..f598c2cce 100644 --- a/multipart/go.mod +++ b/multipart/go.mod @@ -2,7 +2,7 @@ module goa.design/examples/multipart go 1.26.0 -require goa.design/goa/v3 v3.30.0 +require goa.design/goa/v3 v3.30.1-0.20260825000358-70a27fd82e81 require ( github.com/dimfeld/httppath v0.0.0-20170720192232-ee938bf73598 // indirect @@ -19,6 +19,7 @@ require ( golang.org/x/sync v0.22.0 // indirect golang.org/x/text v0.41.0 // indirect golang.org/x/tools v0.49.0 // indirect + google.golang.org/protobuf v1.36.12 // indirect gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/multipart/go.sum b/multipart/go.sum index 75dec1d03..032a1d87f 100644 --- a/multipart/go.sum +++ b/multipart/go.sum @@ -31,8 +31,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.0 h1:KXfAR5qlUCJLVPlHTZ6pHdC5b013BB78PLbDf2fFhfY= -goa.design/goa/v3 v3.30.0/go.mod h1:Is2byRdJddS20jhGT3Ql80N5hQyAc4HgAl7H/A0ZmJ4= +goa.design/goa/v3 v3.30.1-0.20260825000358-70a27fd82e81 h1:LeU5jBnRZV7r/a56FAiGbqptG345Bi/9yE5M1zQjSYY= +goa.design/goa/v3 v3.30.1-0.20260825000358-70a27fd82e81/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= @@ -41,6 +41,8 @@ golang.org/x/text v0.41.0 h1:vz/seA0lnX87Othu2f/0L24RcgrXD9/YFTSuGjj3rH8= golang.org/x/text v0.41.0/go.mod h1:jvf1O8ajNzZqhSrQBPbutR/EB83Cc0CFrezNQIwbb5M= golang.org/x/tools v0.49.0 h1:3NI7VXzL9+1WZD52Dx2ttoPwD5DWrFGpl9mFZDlmisI= golang.org/x/tools v0.49.0/go.mod h1:SJNXV9DBKT0UbdttsQjbfJlAE/q+y36++zo3uL3N0Oo= +google.golang.org/protobuf v1.36.12 h1:pJOKDDOyeXErUroCihFAd5LQuwXBSpVnKGrj5o/fwxc= +google.golang.org/protobuf v1.36.12/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= diff --git a/retry/gen/grpc/retry/client/cli.go b/retry/gen/grpc/retry/client/cli.go index fb2d1b72b..7248e7d4a 100644 --- a/retry/gen/grpc/retry/client/cli.go +++ b/retry/gen/grpc/retry/client/cli.go @@ -28,8 +28,12 @@ func BuildGetMessagePayload(retryGetMessageMessage string) (*retry.GetMessagePay } } } + if err := ValidateGetMessageRequest(&message); err != nil { + var zero *retry.GetMessagePayload + return zero, err + } v := &retry.GetMessagePayload{ - ID: message.Id, + ID: *message.Id, } return v, nil diff --git a/retry/gen/grpc/retry/client/encode_decode.go b/retry/gen/grpc/retry/client/encode_decode.go index c9af17e8a..746b002dc 100644 --- a/retry/gen/grpc/retry/client/encode_decode.go +++ b/retry/gen/grpc/retry/client/encode_decode.go @@ -47,6 +47,9 @@ func DecodeGetMessageResponse(ctx context.Context, v any, hdr, trlr metadata.MD) if !ok { return nil, goagrpc.ErrInvalidType("retry", "get_message", "*retrypb.GetMessageResponse", v) } + if err := ValidateGetMessageResponse(message); err != nil { + return nil, err + } res := NewGetMessageResult(message) return res, nil } diff --git a/retry/gen/grpc/retry/client/types.go b/retry/gen/grpc/retry/client/types.go index 422d1d6c6..3dcbebbd8 100644 --- a/retry/gen/grpc/retry/client/types.go +++ b/retry/gen/grpc/retry/client/types.go @@ -10,13 +10,14 @@ package client import ( retrypb "goa.design/examples/retry/gen/grpc/retry/pb" retry "goa.design/examples/retry/gen/retry" + goa "goa.design/goa/v3/pkg" ) // NewProtoGetMessageRequest builds *retrypb.GetMessageRequest from // *retry.GetMessagePayload. func NewProtoGetMessageRequest(payload *retry.GetMessagePayload) *retrypb.GetMessageRequest { message := &retrypb.GetMessageRequest{ - Id: payload.ID, + Id: &payload.ID, } return message } @@ -25,7 +26,24 @@ func NewProtoGetMessageRequest(payload *retry.GetMessagePayload) *retrypb.GetMes // *retrypb.GetMessageResponse. func NewGetMessageResult(message *retrypb.GetMessageResponse) *retry.GetMessageResult { result := &retry.GetMessageResult{ - Message: message.Message_, + Message: *message.Message_, } return result } + +// ValidateGetMessageRequest runs the validations defined on GetMessageRequest. +func ValidateGetMessageRequest(message *retrypb.GetMessageRequest) (err error) { + if message.Id == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("id", "message")) + } + return +} + +// ValidateGetMessageResponse runs the validations defined on +// GetMessageResponse. +func ValidateGetMessageResponse(message *retrypb.GetMessageResponse) (err error) { + if message.Message_ == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("message", "message")) + } + return +} diff --git a/retry/gen/grpc/retry/pb/goagen_retry_retry.pb.go b/retry/gen/grpc/retry/pb/goagen_retry_retry.pb.go index 7b60a2748..c56e5f061 100644 --- a/retry/gen/grpc/retry/pb/goagen_retry_retry.pb.go +++ b/retry/gen/grpc/retry/pb/goagen_retry_retry.pb.go @@ -31,7 +31,7 @@ const ( type GetMessageRequest struct { state protoimpl.MessageState `protogen:"open.v1"` // Identifies one demonstration request. - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Id *string `protobuf:"bytes,1,opt,name=id,proto3,oneof" json:"id,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -67,8 +67,8 @@ func (*GetMessageRequest) Descriptor() ([]byte, []int) { } func (x *GetMessageRequest) GetId() string { - if x != nil { - return x.Id + if x != nil && x.Id != nil { + return *x.Id } return "" } @@ -76,7 +76,7 @@ func (x *GetMessageRequest) GetId() string { type GetMessageResponse struct { state protoimpl.MessageState `protogen:"open.v1"` // Message returned after the retry succeeds. - Message_ string `protobuf:"bytes,1,opt,name=message_,json=message,proto3" json:"message_,omitempty"` + Message_ *string `protobuf:"bytes,1,opt,name=message_,json=message,proto3,oneof" json:"message_,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -112,8 +112,8 @@ func (*GetMessageResponse) Descriptor() ([]byte, []int) { } func (x *GetMessageResponse) GetMessage_() string { - if x != nil { - return x.Message_ + if x != nil && x.Message_ != nil { + return *x.Message_ } return "" } @@ -122,11 +122,13 @@ var File_goagen_retry_retry_proto protoreflect.FileDescriptor const file_goagen_retry_retry_proto_rawDesc = "" + "\n" + - "\x18goagen_retry_retry.proto\x12\x05retry\"#\n" + - "\x11GetMessageRequest\x12\x0e\n" + - "\x02id\x18\x01 \x01(\tR\x02id\"/\n" + - "\x12GetMessageResponse\x12\x19\n" + - "\bmessage_\x18\x01 \x01(\tR\amessage2O\n" + + "\x18goagen_retry_retry.proto\x12\x05retry\"/\n" + + "\x11GetMessageRequest\x12\x13\n" + + "\x02id\x18\x01 \x01(\tH\x00R\x02id\x88\x01\x01B\x05\n" + + "\x03_id\"A\n" + + "\x12GetMessageResponse\x12\x1e\n" + + "\bmessage_\x18\x01 \x01(\tH\x00R\amessage\x88\x01\x01B\v\n" + + "\t_message_2O\n" + "\x05Retry\x12F\n" + "\n" + "GetMessage\x12\x18.retry.GetMessageRequest\x1a\x19.retry.GetMessageResponse\"\x03\x90\x02\x02B\n" + @@ -164,6 +166,8 @@ func file_goagen_retry_retry_proto_init() { if File_goagen_retry_retry_proto != nil { return } + file_goagen_retry_retry_proto_msgTypes[0].OneofWrappers = []any{} + file_goagen_retry_retry_proto_msgTypes[1].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/retry/gen/grpc/retry/pb/goagen_retry_retry.proto b/retry/gen/grpc/retry/pb/goagen_retry_retry.proto index 084ba6056..c2fd0f28e 100644 --- a/retry/gen/grpc/retry/pb/goagen_retry_retry.proto +++ b/retry/gen/grpc/retry/pb/goagen_retry_retry.proto @@ -21,10 +21,10 @@ service Retry { message GetMessageRequest { // Identifies one demonstration request. - string id = 1; + optional string id = 1; } message GetMessageResponse { // Message returned after the retry succeeds. - string message_ = 1; + optional string message_ = 1; } diff --git a/retry/gen/grpc/retry/server/encode_decode.go b/retry/gen/grpc/retry/server/encode_decode.go index 76550f5c6..ba1008341 100644 --- a/retry/gen/grpc/retry/server/encode_decode.go +++ b/retry/gen/grpc/retry/server/encode_decode.go @@ -38,6 +38,9 @@ func DecodeGetMessageRequest(ctx context.Context, v any, md metadata.MD) (any, e if message, ok = v.(*retrypb.GetMessageRequest); !ok { return nil, goagrpc.ErrInvalidType("retry", "get_message", "*retrypb.GetMessageRequest", v) } + if err := ValidateGetMessageRequest(message); err != nil { + return nil, err + } } var payload *retry.GetMessagePayload { diff --git a/retry/gen/grpc/retry/server/types.go b/retry/gen/grpc/retry/server/types.go index 2e1188dc0..1feeff5ac 100644 --- a/retry/gen/grpc/retry/server/types.go +++ b/retry/gen/grpc/retry/server/types.go @@ -10,13 +10,14 @@ package server import ( retrypb "goa.design/examples/retry/gen/grpc/retry/pb" retry "goa.design/examples/retry/gen/retry" + goa "goa.design/goa/v3/pkg" ) // NewGetMessagePayload builds *retry.GetMessagePayload from // *retrypb.GetMessageRequest. func NewGetMessagePayload(message *retrypb.GetMessageRequest) *retry.GetMessagePayload { v := &retry.GetMessagePayload{ - ID: message.Id, + ID: *message.Id, } return v } @@ -25,7 +26,15 @@ func NewGetMessagePayload(message *retrypb.GetMessageRequest) *retry.GetMessageP // *retry.GetMessageResult. func NewProtoGetMessageResponse(result *retry.GetMessageResult) *retrypb.GetMessageResponse { message := &retrypb.GetMessageResponse{ - Message_: result.Message, + Message_: &result.Message, } return message } + +// ValidateGetMessageRequest runs the validations defined on GetMessageRequest. +func ValidateGetMessageRequest(message *retrypb.GetMessageRequest) (err error) { + if message.Id == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("id", "message")) + } + return +} diff --git a/retry/go.mod b/retry/go.mod index cb16735ff..073aa56bd 100644 --- a/retry/go.mod +++ b/retry/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( goa.design/clue v1.2.6 - goa.design/goa/v3 v3.30.0 + goa.design/goa/v3 v3.30.1-0.20260825000358-70a27fd82e81 google.golang.org/grpc v1.83.1 google.golang.org/protobuf v1.36.12 ) diff --git a/retry/go.sum b/retry/go.sum index c66ade38b..883940fd0 100644 --- a/retry/go.sum +++ b/retry/go.sum @@ -52,8 +52,8 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/clue v1.2.6 h1:ensyUkwlvEbNy8FuTGMldKuvaNouh8YoDY9QaE+EtYg= goa.design/clue v1.2.6/go.mod h1:Y4RS5o2k6MZiGk2PT3XbKyntjR2xkr8dYOKQ591dIDM= -goa.design/goa/v3 v3.30.0 h1:KXfAR5qlUCJLVPlHTZ6pHdC5b013BB78PLbDf2fFhfY= -goa.design/goa/v3 v3.30.0/go.mod h1:Is2byRdJddS20jhGT3Ql80N5hQyAc4HgAl7H/A0ZmJ4= +goa.design/goa/v3 v3.30.1-0.20260825000358-70a27fd82e81 h1:LeU5jBnRZV7r/a56FAiGbqptG345Bi/9yE5M1zQjSYY= +goa.design/goa/v3 v3.30.1-0.20260825000358-70a27fd82e81/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/security/hierarchy/go.mod b/security/hierarchy/go.mod index 24f1e7ca0..c076408fe 100644 --- a/security/hierarchy/go.mod +++ b/security/hierarchy/go.mod @@ -2,7 +2,7 @@ module goa.design/examples/security/hierarchy go 1.26.0 -require goa.design/goa/v3 v3.30.0 +require goa.design/goa/v3 v3.30.1-0.20260825000358-70a27fd82e81 require ( github.com/dimfeld/httppath v0.0.0-20170720192232-ee938bf73598 // indirect @@ -19,6 +19,7 @@ require ( golang.org/x/sync v0.22.0 // indirect golang.org/x/text v0.41.0 // indirect golang.org/x/tools v0.49.0 // indirect + google.golang.org/protobuf v1.36.12 // indirect gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/security/hierarchy/go.sum b/security/hierarchy/go.sum index 75dec1d03..032a1d87f 100644 --- a/security/hierarchy/go.sum +++ b/security/hierarchy/go.sum @@ -31,8 +31,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.0 h1:KXfAR5qlUCJLVPlHTZ6pHdC5b013BB78PLbDf2fFhfY= -goa.design/goa/v3 v3.30.0/go.mod h1:Is2byRdJddS20jhGT3Ql80N5hQyAc4HgAl7H/A0ZmJ4= +goa.design/goa/v3 v3.30.1-0.20260825000358-70a27fd82e81 h1:LeU5jBnRZV7r/a56FAiGbqptG345Bi/9yE5M1zQjSYY= +goa.design/goa/v3 v3.30.1-0.20260825000358-70a27fd82e81/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= @@ -41,6 +41,8 @@ golang.org/x/text v0.41.0 h1:vz/seA0lnX87Othu2f/0L24RcgrXD9/YFTSuGjj3rH8= golang.org/x/text v0.41.0/go.mod h1:jvf1O8ajNzZqhSrQBPbutR/EB83Cc0CFrezNQIwbb5M= golang.org/x/tools v0.49.0 h1:3NI7VXzL9+1WZD52Dx2ttoPwD5DWrFGpl9mFZDlmisI= golang.org/x/tools v0.49.0/go.mod h1:SJNXV9DBKT0UbdttsQjbfJlAE/q+y36++zo3uL3N0Oo= +google.golang.org/protobuf v1.36.12 h1:pJOKDDOyeXErUroCihFAd5LQuwXBSpVnKGrj5o/fwxc= +google.golang.org/protobuf v1.36.12/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= diff --git a/security/multiauth/gen/grpc/secured_service/client/cli.go b/security/multiauth/gen/grpc/secured_service/client/cli.go index 736518b1c..1a85bf63e 100644 --- a/security/multiauth/gen/grpc/secured_service/client/cli.go +++ b/security/multiauth/gen/grpc/secured_service/client/cli.go @@ -75,8 +75,12 @@ func BuildDoublySecurePayload(securedServiceDoublySecureMessage string, securedS { token = securedServiceDoublySecureToken } + if err := ValidateDoublySecureRequest(&message); err != nil { + var zero *securedservice.DoublySecurePayload + return zero, err + } v := &securedservice.DoublySecurePayload{ - Key: message.Key, + Key: *message.Key, } v.Token = token diff --git a/security/multiauth/gen/grpc/secured_service/client/encode_decode.go b/security/multiauth/gen/grpc/secured_service/client/encode_decode.go index a59790c12..f1bfdbf69 100644 --- a/security/multiauth/gen/grpc/secured_service/client/encode_decode.go +++ b/security/multiauth/gen/grpc/secured_service/client/encode_decode.go @@ -51,6 +51,9 @@ func DecodeSigninResponse(ctx context.Context, v any, hdr, trlr metadata.MD) (an if !ok { return nil, goagrpc.ErrInvalidType("secured_service", "signin", "*secured_servicepb.SigninResponse", v) } + if err := ValidateSigninResponse(message); err != nil { + return nil, err + } res := NewSigninResult(message) return res, nil } @@ -87,6 +90,9 @@ func DecodeSecureResponse(ctx context.Context, v any, hdr, trlr metadata.MD) (an if !ok { return nil, goagrpc.ErrInvalidType("secured_service", "secure", "*secured_servicepb.SecureResponse", v) } + if err := ValidateSecureResponse(message); err != nil { + return nil, err + } res := NewSecureResult(message) return res, nil } @@ -124,6 +130,9 @@ func DecodeDoublySecureResponse(ctx context.Context, v any, hdr, trlr metadata.M if !ok { return nil, goagrpc.ErrInvalidType("secured_service", "doubly_secure", "*secured_servicepb.DoublySecureResponse", v) } + if err := ValidateDoublySecureResponse(message); err != nil { + return nil, err + } res := NewDoublySecureResult(message) return res, nil } @@ -167,6 +176,9 @@ func DecodeAlsoDoublySecureResponse(ctx context.Context, v any, hdr, trlr metada if !ok { return nil, goagrpc.ErrInvalidType("secured_service", "also_doubly_secure", "*secured_servicepb.AlsoDoublySecureResponse", v) } + if err := ValidateAlsoDoublySecureResponse(message); err != nil { + return nil, err + } res := NewAlsoDoublySecureResult(message) return res, nil } diff --git a/security/multiauth/gen/grpc/secured_service/client/types.go b/security/multiauth/gen/grpc/secured_service/client/types.go index 671ce1e52..562106334 100644 --- a/security/multiauth/gen/grpc/secured_service/client/types.go +++ b/security/multiauth/gen/grpc/secured_service/client/types.go @@ -10,6 +10,7 @@ package client import ( secured_servicepb "goa.design/examples/security/multiauth/gen/grpc/secured_service/pb" securedservice "goa.design/examples/security/multiauth/gen/secured_service" + goa "goa.design/goa/v3/pkg" ) // NewProtoSigninRequest builds *secured_servicepb.SigninRequest from @@ -23,9 +24,9 @@ func NewProtoSigninRequest() *secured_servicepb.SigninRequest { // *secured_servicepb.SigninResponse. func NewSigninResult(message *secured_servicepb.SigninResponse) *securedservice.Creds { result := &securedservice.Creds{ - JWT: message.Jwt, - APIKey: message.ApiKey, - OauthToken: message.OauthToken, + JWT: *message.Jwt, + APIKey: *message.ApiKey, + OauthToken: *message.OauthToken, } return result } @@ -41,7 +42,7 @@ func NewProtoSecureRequest(payload *securedservice.SecurePayload) *secured_servi // NewSecureResult builds string from *secured_servicepb.SecureResponse. func NewSecureResult(message *secured_servicepb.SecureResponse) string { - result := message.Field + result := *message.Field return result } @@ -49,7 +50,7 @@ func NewSecureResult(message *secured_servicepb.SecureResponse) string { // from *securedservice.DoublySecurePayload. func NewProtoDoublySecureRequest(payload *securedservice.DoublySecurePayload) *secured_servicepb.DoublySecureRequest { message := &secured_servicepb.DoublySecureRequest{ - Key: payload.Key, + Key: &payload.Key, } return message } @@ -57,7 +58,7 @@ func NewProtoDoublySecureRequest(payload *securedservice.DoublySecurePayload) *s // NewDoublySecureResult builds string from // *secured_servicepb.DoublySecureResponse. func NewDoublySecureResult(message *secured_servicepb.DoublySecureResponse) string { - result := message.Field + result := *message.Field return result } @@ -76,6 +77,55 @@ func NewProtoAlsoDoublySecureRequest(payload *securedservice.AlsoDoublySecurePay // NewAlsoDoublySecureResult builds string from // *secured_servicepb.AlsoDoublySecureResponse. func NewAlsoDoublySecureResult(message *secured_servicepb.AlsoDoublySecureResponse) string { - result := message.Field + result := *message.Field return result } + +// ValidateSigninResponse runs the validations defined on SigninResponse. +func ValidateSigninResponse(message *secured_servicepb.SigninResponse) (err error) { + if message.Jwt == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("jwt", "message")) + } + if message.ApiKey == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("api_key", "message")) + } + if message.OauthToken == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("oauth_token", "message")) + } + return +} + +// ValidateSecureResponse runs the validations defined on SecureResponse. +func ValidateSecureResponse(message *secured_servicepb.SecureResponse) (err error) { + if message.Field == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("field", "message")) + } + return +} + +// ValidateDoublySecureRequest runs the validations defined on +// DoublySecureRequest. +func ValidateDoublySecureRequest(message *secured_servicepb.DoublySecureRequest) (err error) { + if message.Key == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("key", "message")) + } + return +} + +// ValidateDoublySecureResponse runs the validations defined on +// DoublySecureResponse. +func ValidateDoublySecureResponse(message *secured_servicepb.DoublySecureResponse) (err error) { + if message.Field == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("field", "message")) + } + return +} + +// ValidateAlsoDoublySecureResponse runs the validations defined on +// AlsoDoublySecureResponse. +func ValidateAlsoDoublySecureResponse(message *secured_servicepb.AlsoDoublySecureResponse) (err error) { + if message.Field == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("field", "message")) + } + return +} diff --git a/security/multiauth/gen/grpc/secured_service/pb/goagen_multiauth_secured_service.pb.go b/security/multiauth/gen/grpc/secured_service/pb/goagen_multiauth_secured_service.pb.go index de28baadf..05e09d369 100644 --- a/security/multiauth/gen/grpc/secured_service/pb/goagen_multiauth_secured_service.pb.go +++ b/security/multiauth/gen/grpc/secured_service/pb/goagen_multiauth_secured_service.pb.go @@ -67,11 +67,11 @@ func (*SigninRequest) Descriptor() ([]byte, []int) { type SigninResponse struct { state protoimpl.MessageState `protogen:"open.v1"` // JWT token - Jwt string `protobuf:"bytes,1,opt,name=jwt,proto3" json:"jwt,omitempty"` + Jwt *string `protobuf:"bytes,1,opt,name=jwt,proto3,oneof" json:"jwt,omitempty"` // API Key - ApiKey string `protobuf:"bytes,2,opt,name=api_key,json=apiKey,proto3" json:"api_key,omitempty"` + ApiKey *string `protobuf:"bytes,2,opt,name=api_key,json=apiKey,proto3,oneof" json:"api_key,omitempty"` // OAuth2 token - OauthToken string `protobuf:"bytes,3,opt,name=oauth_token,json=oauthToken,proto3" json:"oauth_token,omitempty"` + OauthToken *string `protobuf:"bytes,3,opt,name=oauth_token,json=oauthToken,proto3,oneof" json:"oauth_token,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -107,22 +107,22 @@ func (*SigninResponse) Descriptor() ([]byte, []int) { } func (x *SigninResponse) GetJwt() string { - if x != nil { - return x.Jwt + if x != nil && x.Jwt != nil { + return *x.Jwt } return "" } func (x *SigninResponse) GetApiKey() string { - if x != nil { - return x.ApiKey + if x != nil && x.ApiKey != nil { + return *x.ApiKey } return "" } func (x *SigninResponse) GetOauthToken() string { - if x != nil { - return x.OauthToken + if x != nil && x.OauthToken != nil { + return *x.OauthToken } return "" } @@ -174,7 +174,7 @@ func (x *SecureRequest) GetFail() bool { type SecureResponse struct { state protoimpl.MessageState `protogen:"open.v1"` - Field string `protobuf:"bytes,1,opt,name=field,proto3" json:"field,omitempty"` + Field *string `protobuf:"bytes,1,opt,name=field,proto3,oneof" json:"field,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -210,8 +210,8 @@ func (*SecureResponse) Descriptor() ([]byte, []int) { } func (x *SecureResponse) GetField() string { - if x != nil { - return x.Field + if x != nil && x.Field != nil { + return *x.Field } return "" } @@ -219,7 +219,7 @@ func (x *SecureResponse) GetField() string { type DoublySecureRequest struct { state protoimpl.MessageState `protogen:"open.v1"` // API key - Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` + Key *string `protobuf:"bytes,1,opt,name=key,proto3,oneof" json:"key,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -255,15 +255,15 @@ func (*DoublySecureRequest) Descriptor() ([]byte, []int) { } func (x *DoublySecureRequest) GetKey() string { - if x != nil { - return x.Key + if x != nil && x.Key != nil { + return *x.Key } return "" } type DoublySecureResponse struct { state protoimpl.MessageState `protogen:"open.v1"` - Field string `protobuf:"bytes,1,opt,name=field,proto3" json:"field,omitempty"` + Field *string `protobuf:"bytes,1,opt,name=field,proto3,oneof" json:"field,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -299,8 +299,8 @@ func (*DoublySecureResponse) Descriptor() ([]byte, []int) { } func (x *DoublySecureResponse) GetField() string { - if x != nil { - return x.Field + if x != nil && x.Field != nil { + return *x.Field } return "" } @@ -370,7 +370,7 @@ func (x *AlsoDoublySecureRequest) GetKey() string { type AlsoDoublySecureResponse struct { state protoimpl.MessageState `protogen:"open.v1"` - Field string `protobuf:"bytes,1,opt,name=field,proto3" json:"field,omitempty"` + Field *string `protobuf:"bytes,1,opt,name=field,proto3,oneof" json:"field,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -406,8 +406,8 @@ func (*AlsoDoublySecureResponse) Descriptor() ([]byte, []int) { } func (x *AlsoDoublySecureResponse) GetField() string { - if x != nil { - return x.Field + if x != nil && x.Field != nil { + return *x.Field } return "" } @@ -417,30 +417,38 @@ var File_goagen_multiauth_secured_service_proto protoreflect.FileDescriptor const file_goagen_multiauth_secured_service_proto_rawDesc = "" + "\n" + "&goagen_multiauth_secured_service.proto\x12\x0fsecured_service\"\x0f\n" + - "\rSigninRequest\"\\\n" + - "\x0eSigninResponse\x12\x10\n" + - "\x03jwt\x18\x01 \x01(\tR\x03jwt\x12\x17\n" + - "\aapi_key\x18\x02 \x01(\tR\x06apiKey\x12\x1f\n" + - "\voauth_token\x18\x03 \x01(\tR\n" + - "oauthToken\"1\n" + + "\rSigninRequest\"\x8f\x01\n" + + "\x0eSigninResponse\x12\x15\n" + + "\x03jwt\x18\x01 \x01(\tH\x00R\x03jwt\x88\x01\x01\x12\x1c\n" + + "\aapi_key\x18\x02 \x01(\tH\x01R\x06apiKey\x88\x01\x01\x12$\n" + + "\voauth_token\x18\x03 \x01(\tH\x02R\n" + + "oauthToken\x88\x01\x01B\x06\n" + + "\x04_jwtB\n" + + "\n" + + "\b_api_keyB\x0e\n" + + "\f_oauth_token\"1\n" + "\rSecureRequest\x12\x17\n" + "\x04fail\x18\x01 \x01(\bH\x00R\x04fail\x88\x01\x01B\a\n" + - "\x05_fail\"&\n" + - "\x0eSecureResponse\x12\x14\n" + - "\x05field\x18\x01 \x01(\tR\x05field\"'\n" + - "\x13DoublySecureRequest\x12\x10\n" + - "\x03key\x18\x01 \x01(\tR\x03key\",\n" + - "\x14DoublySecureResponse\x12\x14\n" + - "\x05field\x18\x01 \x01(\tR\x05field\"\x94\x01\n" + + "\x05_fail\"5\n" + + "\x0eSecureResponse\x12\x19\n" + + "\x05field\x18\x01 \x01(\tH\x00R\x05field\x88\x01\x01B\b\n" + + "\x06_field\"4\n" + + "\x13DoublySecureRequest\x12\x15\n" + + "\x03key\x18\x01 \x01(\tH\x00R\x03key\x88\x01\x01B\x06\n" + + "\x04_key\";\n" + + "\x14DoublySecureResponse\x12\x19\n" + + "\x05field\x18\x01 \x01(\tH\x00R\x05field\x88\x01\x01B\b\n" + + "\x06_field\"\x94\x01\n" + "\x17AlsoDoublySecureRequest\x12\x1f\n" + "\busername\x18\x01 \x01(\tH\x00R\busername\x88\x01\x01\x12\x1f\n" + "\bpassword\x18\x02 \x01(\tH\x01R\bpassword\x88\x01\x01\x12\x15\n" + "\x03key\x18\x03 \x01(\tH\x02R\x03key\x88\x01\x01B\v\n" + "\t_usernameB\v\n" + "\t_passwordB\x06\n" + - "\x04_key\"0\n" + - "\x18AlsoDoublySecureResponse\x12\x14\n" + - "\x05field\x18\x01 \x01(\tR\x05field2\xec\x02\n" + + "\x04_key\"?\n" + + "\x18AlsoDoublySecureResponse\x12\x19\n" + + "\x05field\x18\x01 \x01(\tH\x00R\x05field\x88\x01\x01B\b\n" + + "\x06_field2\xec\x02\n" + "\x0eSecuredService\x12I\n" + "\x06Signin\x12\x1e.secured_service.SigninRequest\x1a\x1f.secured_service.SigninResponse\x12I\n" + "\x06Secure\x12\x1e.secured_service.SecureRequest\x1a\x1f.secured_service.SecureResponse\x12[\n" + @@ -491,8 +499,13 @@ func file_goagen_multiauth_secured_service_proto_init() { if File_goagen_multiauth_secured_service_proto != nil { return } + file_goagen_multiauth_secured_service_proto_msgTypes[1].OneofWrappers = []any{} file_goagen_multiauth_secured_service_proto_msgTypes[2].OneofWrappers = []any{} + file_goagen_multiauth_secured_service_proto_msgTypes[3].OneofWrappers = []any{} + file_goagen_multiauth_secured_service_proto_msgTypes[4].OneofWrappers = []any{} + file_goagen_multiauth_secured_service_proto_msgTypes[5].OneofWrappers = []any{} file_goagen_multiauth_secured_service_proto_msgTypes[6].OneofWrappers = []any{} + file_goagen_multiauth_secured_service_proto_msgTypes[7].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/security/multiauth/gen/grpc/secured_service/pb/goagen_multiauth_secured_service.proto b/security/multiauth/gen/grpc/secured_service/pb/goagen_multiauth_secured_service.proto index fe34e8542..3008a51ac 100644 --- a/security/multiauth/gen/grpc/secured_service/pb/goagen_multiauth_secured_service.proto +++ b/security/multiauth/gen/grpc/secured_service/pb/goagen_multiauth_secured_service.proto @@ -31,11 +31,11 @@ message SigninRequest { message SigninResponse { // JWT token - string jwt = 1; + optional string jwt = 1; // API Key - string api_key = 2; + optional string api_key = 2; // OAuth2 token - string oauth_token = 3; + optional string oauth_token = 3; } message SecureRequest { @@ -44,16 +44,16 @@ message SecureRequest { } message SecureResponse { - string field = 1; + optional string field = 1; } message DoublySecureRequest { // API key - string key = 1; + optional string key = 1; } message DoublySecureResponse { - string field = 1; + optional string field = 1; } message AlsoDoublySecureRequest { @@ -66,5 +66,5 @@ message AlsoDoublySecureRequest { } message AlsoDoublySecureResponse { - string field = 1; + optional string field = 1; } diff --git a/security/multiauth/gen/grpc/secured_service/server/encode_decode.go b/security/multiauth/gen/grpc/secured_service/server/encode_decode.go index b09a324b1..788ead6c8 100644 --- a/security/multiauth/gen/grpc/secured_service/server/encode_decode.go +++ b/security/multiauth/gen/grpc/secured_service/server/encode_decode.go @@ -144,6 +144,9 @@ func DecodeDoublySecureRequest(ctx context.Context, v any, md metadata.MD) (any, if message, ok = v.(*secured_servicepb.DoublySecureRequest); !ok { return nil, goagrpc.ErrInvalidType("secured_service", "doubly_secure", "*secured_servicepb.DoublySecureRequest", v) } + if err = ValidateDoublySecureRequest(message); err != nil { + return nil, err + } } var payload *securedservice.DoublySecurePayload { diff --git a/security/multiauth/gen/grpc/secured_service/server/types.go b/security/multiauth/gen/grpc/secured_service/server/types.go index f7ef06f23..f4cefc875 100644 --- a/security/multiauth/gen/grpc/secured_service/server/types.go +++ b/security/multiauth/gen/grpc/secured_service/server/types.go @@ -10,6 +10,7 @@ package server import ( secured_servicepb "goa.design/examples/security/multiauth/gen/grpc/secured_service/pb" securedservice "goa.design/examples/security/multiauth/gen/secured_service" + goa "goa.design/goa/v3/pkg" ) // NewSigninPayload builds *securedservice.SigninPayload from metadata values. @@ -24,9 +25,9 @@ func NewSigninPayload(username string, password string) *securedservice.SigninPa // *securedservice.Creds. func NewProtoSigninResponse(result *securedservice.Creds) *secured_servicepb.SigninResponse { message := &secured_servicepb.SigninResponse{ - Jwt: result.JWT, - ApiKey: result.APIKey, - OauthToken: result.OauthToken, + Jwt: &result.JWT, + ApiKey: &result.APIKey, + OauthToken: &result.OauthToken, } return message } @@ -44,7 +45,8 @@ func NewSecurePayload(message *secured_servicepb.SecureRequest, token string) *s // NewProtoSecureResponse builds *secured_servicepb.SecureResponse from string. func NewProtoSecureResponse(result string) *secured_servicepb.SecureResponse { message := &secured_servicepb.SecureResponse{} - message.Field = result + message.Field = new(string) + *message.Field = result return message } @@ -52,7 +54,7 @@ func NewProtoSecureResponse(result string) *secured_servicepb.SecureResponse { // *secured_servicepb.DoublySecureRequest. func NewDoublySecurePayload(message *secured_servicepb.DoublySecureRequest, token string) *securedservice.DoublySecurePayload { v := &securedservice.DoublySecurePayload{ - Key: message.Key, + Key: *message.Key, } v.Token = token return v @@ -62,7 +64,8 @@ func NewDoublySecurePayload(message *secured_servicepb.DoublySecureRequest, toke // from string. func NewProtoDoublySecureResponse(result string) *secured_servicepb.DoublySecureResponse { message := &secured_servicepb.DoublySecureResponse{} - message.Field = result + message.Field = new(string) + *message.Field = result return message } @@ -91,6 +94,16 @@ func NewAlsoDoublySecurePayload(message *secured_servicepb.AlsoDoublySecureReque // *secured_servicepb.AlsoDoublySecureResponse from string. func NewProtoAlsoDoublySecureResponse(result string) *secured_servicepb.AlsoDoublySecureResponse { message := &secured_servicepb.AlsoDoublySecureResponse{} - message.Field = result + message.Field = new(string) + *message.Field = result return message } + +// ValidateDoublySecureRequest runs the validations defined on +// DoublySecureRequest. +func ValidateDoublySecureRequest(message *secured_servicepb.DoublySecureRequest) (err error) { + if message.Key == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("key", "message")) + } + return +} diff --git a/security/multiauth/go.mod b/security/multiauth/go.mod index da7c49c18..74be1df00 100644 --- a/security/multiauth/go.mod +++ b/security/multiauth/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( github.com/golang-jwt/jwt/v4 v4.5.2 - goa.design/goa/v3 v3.30.0 + goa.design/goa/v3 v3.30.1-0.20260825000358-70a27fd82e81 google.golang.org/grpc v1.83.1 google.golang.org/protobuf v1.36.12 ) diff --git a/security/multiauth/go.sum b/security/multiauth/go.sum index 9ad9c06e3..d05b07aec 100644 --- a/security/multiauth/go.sum +++ b/security/multiauth/go.sum @@ -51,8 +51,8 @@ go.opentelemetry.io/otel/trace v1.44.0 h1:jxF5CsGYCe74MCRx2X4g7WsY/VBKRqqpNvXlX/ go.opentelemetry.io/otel/trace v1.44.0/go.mod h1:oLl1jrMQAVo6v3GAggN+1VH9VIz9iUSvW53sW1Q8PIE= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.0 h1:KXfAR5qlUCJLVPlHTZ6pHdC5b013BB78PLbDf2fFhfY= -goa.design/goa/v3 v3.30.0/go.mod h1:Is2byRdJddS20jhGT3Ql80N5hQyAc4HgAl7H/A0ZmJ4= +goa.design/goa/v3 v3.30.1-0.20260825000358-70a27fd82e81 h1:LeU5jBnRZV7r/a56FAiGbqptG345Bi/9yE5M1zQjSYY= +goa.design/goa/v3 v3.30.1-0.20260825000358-70a27fd82e81/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/sse/go.mod b/sse/go.mod index 6a52fa042..2581038ab 100644 --- a/sse/go.mod +++ b/sse/go.mod @@ -5,7 +5,7 @@ go 1.26.0 require ( github.com/shirou/gopsutil/v3 v3.24.5 goa.design/clue v1.2.6 - goa.design/goa/v3 v3.30.0 + goa.design/goa/v3 v3.30.1-0.20260825000358-70a27fd82e81 ) require ( diff --git a/sse/go.sum b/sse/go.sum index c8e9dba61..a6039b9c1 100644 --- a/sse/go.sum +++ b/sse/go.sum @@ -74,8 +74,8 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/clue v1.2.6 h1:ensyUkwlvEbNy8FuTGMldKuvaNouh8YoDY9QaE+EtYg= goa.design/clue v1.2.6/go.mod h1:Y4RS5o2k6MZiGk2PT3XbKyntjR2xkr8dYOKQ591dIDM= -goa.design/goa/v3 v3.30.0 h1:KXfAR5qlUCJLVPlHTZ6pHdC5b013BB78PLbDf2fFhfY= -goa.design/goa/v3 v3.30.0/go.mod h1:Is2byRdJddS20jhGT3Ql80N5hQyAc4HgAl7H/A0ZmJ4= +goa.design/goa/v3 v3.30.1-0.20260825000358-70a27fd82e81 h1:LeU5jBnRZV7r/a56FAiGbqptG345Bi/9yE5M1zQjSYY= +goa.design/goa/v3 v3.30.1-0.20260825000358-70a27fd82e81/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/streaming/gen/grpc/chatter/client/client.go b/streaming/gen/grpc/chatter/client/client.go index e09123a23..6b80f40e1 100644 --- a/streaming/gen/grpc/chatter/client/client.go +++ b/streaming/gen/grpc/chatter/client/client.go @@ -201,6 +201,9 @@ func (s *EchoerClientStream) Recv() (string, error) { return res, err } } + if err = ValidateEchoerResponse(v); err != nil { + return res, err + } return NewEchoerResponseEchoerResponse(v), nil } @@ -261,6 +264,9 @@ func (s *SummaryClientStream) CloseAndRecv() (chatter.ChatSummaryCollection, err return res, err } } + if err := ValidateChatSummaryCollection(v); err != nil { + return res, err + } proj := NewChatSummaryCollectionChatSummaryCollection(v) vres := chatterviews.ChatSummaryCollection{Projected: proj, View: "default"} if err := chatterviews.ValidateChatSummaryCollection(vres); err != nil { @@ -343,8 +349,14 @@ func (s *HistoryClientStream) Recv() (*chatter.ChatSummary, error) { var proj *chatterviews.ChatSummaryView switch s.view { case "tiny": + if err := ValidateHistoryResponseTiny(v); err != nil { + return res, err + } proj = NewHistoryResponseChatSummaryViewTiny(v) case "default", "": + if err := ValidateHistoryResponse(v); err != nil { + return res, err + } proj = NewHistoryResponseChatSummaryView(v) } vres := &chatterviews.ChatSummary{Projected: proj, View: s.view} diff --git a/streaming/gen/grpc/chatter/client/encode_decode.go b/streaming/gen/grpc/chatter/client/encode_decode.go index a0952696f..5099aed31 100644 --- a/streaming/gen/grpc/chatter/client/encode_decode.go +++ b/streaming/gen/grpc/chatter/client/encode_decode.go @@ -50,6 +50,9 @@ func DecodeLoginResponse(ctx context.Context, v any, hdr, trlr metadata.MD) (any if !ok { return nil, goagrpc.ErrInvalidType("chatter", "login", "*chatterpb.LoginResponse", v) } + if err := ValidateLoginResponse(message); err != nil { + return nil, err + } res := NewLoginResult(message) return res, nil } diff --git a/streaming/gen/grpc/chatter/client/types.go b/streaming/gen/grpc/chatter/client/types.go index 1392fa33e..7d1fb3bfc 100644 --- a/streaming/gen/grpc/chatter/client/types.go +++ b/streaming/gen/grpc/chatter/client/types.go @@ -23,13 +23,13 @@ func NewProtoLoginRequest() *chatterpb.LoginRequest { // NewLoginResult builds string from *chatterpb.LoginResponse. func NewLoginResult(message *chatterpb.LoginResponse) string { - result := message.Field + result := *message.Field return result } // NewEchoerResponseEchoerResponse builds string from *chatterpb.EchoerResponse. func NewEchoerResponseEchoerResponse(v *chatterpb.EchoerResponse) string { - result := v.Field + result := *v.Field return result } @@ -37,7 +37,8 @@ func NewEchoerResponseEchoerResponse(v *chatterpb.EchoerResponse) string { // string. func NewProtoEchoerStreamingRequest(spayload string) *chatterpb.EchoerStreamingRequest { v := &chatterpb.EchoerStreamingRequest{} - v.Field = spayload + v.Field = new(string) + *v.Field = spayload return v } @@ -45,7 +46,8 @@ func NewProtoEchoerStreamingRequest(spayload string) *chatterpb.EchoerStreamingR // from string. func NewProtoListenerStreamingRequest(spayload string) *chatterpb.ListenerStreamingRequest { v := &chatterpb.ListenerStreamingRequest{} - v.Field = spayload + v.Field = new(string) + *v.Field = spayload return v } @@ -55,8 +57,8 @@ func NewChatSummaryCollectionChatSummaryCollection(v *chatterpb.ChatSummaryColle vresult := make([]*chatterviews.ChatSummaryView, len(v.Field)) for i, val := range v.Field { vresult[i] = &chatterviews.ChatSummaryView{ - Message: &val.Message_, - SentAt: &val.SentAt, + Message: val.Message_, + SentAt: val.SentAt, } if val.Length != nil { length := int(*val.Length) @@ -70,7 +72,8 @@ func NewChatSummaryCollectionChatSummaryCollection(v *chatterpb.ChatSummaryColle // from string. func NewProtoSummaryStreamingRequest(spayload string) *chatterpb.SummaryStreamingRequest { v := &chatterpb.SummaryStreamingRequest{} - v.Field = spayload + v.Field = new(string) + *v.Field = spayload return v } @@ -85,9 +88,9 @@ func NewProtoSubscribeRequest() *chatterpb.SubscribeRequest { // *chatterpb.SubscribeResponse. func NewSubscribeResponseEvent(v *chatterpb.SubscribeResponse) *chatter.Event { result := &chatter.Event{ - Message: v.Message_, - Action: v.Action, - AddedAt: v.AddedAt, + Message: *v.Message_, + Action: *v.Action, + AddedAt: *v.AddedAt, } return result } @@ -103,8 +106,8 @@ func NewProtoHistoryRequest() *chatterpb.HistoryRequest { // *chatterpb.HistoryResponse. func NewHistoryResponseChatSummaryView(v *chatterpb.HistoryResponse) *chatterviews.ChatSummaryView { vresult := &chatterviews.ChatSummaryView{ - Message: &v.Message_, - SentAt: &v.SentAt, + Message: v.Message_, + SentAt: v.SentAt, } if v.Length != nil { length := int(*v.Length) @@ -117,11 +120,27 @@ func NewHistoryResponseChatSummaryView(v *chatterpb.HistoryResponse) *chattervie // from *chatterpb.HistoryResponse. func NewHistoryResponseChatSummaryViewTiny(v *chatterpb.HistoryResponse) *chatterviews.ChatSummaryView { vresult := &chatterviews.ChatSummaryView{ - Message: &v.Message_, + Message: v.Message_, } return vresult } +// ValidateLoginResponse runs the validations defined on LoginResponse. +func ValidateLoginResponse(message *chatterpb.LoginResponse) (err error) { + if message.Field == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("field", "message")) + } + return +} + +// ValidateEchoerResponse runs the validations defined on EchoerResponse. +func ValidateEchoerResponse(message *chatterpb.EchoerResponse) (err error) { + if message.Field == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("field", "message")) + } + return +} + // ValidateChatSummaryCollection runs the validations defined on // ChatSummaryCollection. func ValidateChatSummaryCollection(message *chatterpb.ChatSummaryCollection) (err error) { @@ -137,21 +156,58 @@ func ValidateChatSummaryCollection(message *chatterpb.ChatSummaryCollection) (er // ValidateChatSummary runs the validations defined on ChatSummary. func ValidateChatSummary(elem *chatterpb.ChatSummary) (err error) { - err = goa.MergeErrors(err, goa.ValidateFormat("elem.sent_at", elem.SentAt, goa.FormatDateTime)) + if elem.Message_ == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("message", "elem")) + } + if elem.SentAt == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("sent_at", "elem")) + } + if elem.SentAt != nil { + err = goa.MergeErrors(err, goa.ValidateFormat("elem.sent_at", *elem.SentAt, goa.FormatDateTime)) + } return } // ValidateSubscribeResponse runs the validations defined on SubscribeResponse. func ValidateSubscribeResponse(message *chatterpb.SubscribeResponse) (err error) { - if !(message.Action == "added") { - err = goa.MergeErrors(err, goa.InvalidEnumValueError("message.action", message.Action, []any{"added"})) + if message.Message_ == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("message", "message")) + } + if message.Action == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("action", "message")) + } + if message.AddedAt == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("added_at", "message")) + } + if message.Action != nil { + if !(*message.Action == "added") { + err = goa.MergeErrors(err, goa.InvalidEnumValueError("message.action", *message.Action, []any{"added"})) + } + } + if message.AddedAt != nil { + err = goa.MergeErrors(err, goa.ValidateFormat("message.added_at", *message.AddedAt, goa.FormatDateTime)) + } + return +} + +// ValidateHistoryResponseTiny runs the validations defined on HistoryResponse. +func ValidateHistoryResponseTiny(message *chatterpb.HistoryResponse) (err error) { + if message.Message_ == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("message", "message")) } - err = goa.MergeErrors(err, goa.ValidateFormat("message.added_at", message.AddedAt, goa.FormatDateTime)) return } // ValidateHistoryResponse runs the validations defined on HistoryResponse. func ValidateHistoryResponse(message *chatterpb.HistoryResponse) (err error) { - err = goa.MergeErrors(err, goa.ValidateFormat("message.sent_at", message.SentAt, goa.FormatDateTime)) + if message.Message_ == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("message", "message")) + } + if message.SentAt == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("sent_at", "message")) + } + if message.SentAt != nil { + err = goa.MergeErrors(err, goa.ValidateFormat("message.sent_at", *message.SentAt, goa.FormatDateTime)) + } return } diff --git a/streaming/gen/grpc/chatter/pb/goagen_streaming_chatter.pb.go b/streaming/gen/grpc/chatter/pb/goagen_streaming_chatter.pb.go index 57714e7e5..9eeefd291 100644 --- a/streaming/gen/grpc/chatter/pb/goagen_streaming_chatter.pb.go +++ b/streaming/gen/grpc/chatter/pb/goagen_streaming_chatter.pb.go @@ -66,7 +66,7 @@ func (*LoginRequest) Descriptor() ([]byte, []int) { type LoginResponse struct { state protoimpl.MessageState `protogen:"open.v1"` - Field string `protobuf:"bytes,1,opt,name=field,proto3" json:"field,omitempty"` + Field *string `protobuf:"bytes,1,opt,name=field,proto3,oneof" json:"field,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -102,15 +102,15 @@ func (*LoginResponse) Descriptor() ([]byte, []int) { } func (x *LoginResponse) GetField() string { - if x != nil { - return x.Field + if x != nil && x.Field != nil { + return *x.Field } return "" } type EchoerStreamingRequest struct { state protoimpl.MessageState `protogen:"open.v1"` - Field string `protobuf:"bytes,1,opt,name=field,proto3" json:"field,omitempty"` + Field *string `protobuf:"bytes,1,opt,name=field,proto3,oneof" json:"field,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -146,15 +146,15 @@ func (*EchoerStreamingRequest) Descriptor() ([]byte, []int) { } func (x *EchoerStreamingRequest) GetField() string { - if x != nil { - return x.Field + if x != nil && x.Field != nil { + return *x.Field } return "" } type EchoerResponse struct { state protoimpl.MessageState `protogen:"open.v1"` - Field string `protobuf:"bytes,1,opt,name=field,proto3" json:"field,omitempty"` + Field *string `protobuf:"bytes,1,opt,name=field,proto3,oneof" json:"field,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -190,15 +190,15 @@ func (*EchoerResponse) Descriptor() ([]byte, []int) { } func (x *EchoerResponse) GetField() string { - if x != nil { - return x.Field + if x != nil && x.Field != nil { + return *x.Field } return "" } type ListenerStreamingRequest struct { state protoimpl.MessageState `protogen:"open.v1"` - Field string `protobuf:"bytes,1,opt,name=field,proto3" json:"field,omitempty"` + Field *string `protobuf:"bytes,1,opt,name=field,proto3,oneof" json:"field,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -234,8 +234,8 @@ func (*ListenerStreamingRequest) Descriptor() ([]byte, []int) { } func (x *ListenerStreamingRequest) GetField() string { - if x != nil { - return x.Field + if x != nil && x.Field != nil { + return *x.Field } return "" } @@ -278,7 +278,7 @@ func (*ListenerResponse) Descriptor() ([]byte, []int) { type SummaryStreamingRequest struct { state protoimpl.MessageState `protogen:"open.v1"` - Field string `protobuf:"bytes,1,opt,name=field,proto3" json:"field,omitempty"` + Field *string `protobuf:"bytes,1,opt,name=field,proto3,oneof" json:"field,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -314,8 +314,8 @@ func (*SummaryStreamingRequest) Descriptor() ([]byte, []int) { } func (x *SummaryStreamingRequest) GetField() string { - if x != nil { - return x.Field + if x != nil && x.Field != nil { + return *x.Field } return "" } @@ -367,11 +367,11 @@ func (x *ChatSummaryCollection) GetField() []*ChatSummary { type ChatSummary struct { state protoimpl.MessageState `protogen:"open.v1"` // Message sent to the server - Message_ string `protobuf:"bytes,1,opt,name=message_,json=message,proto3" json:"message_,omitempty"` + Message_ *string `protobuf:"bytes,1,opt,name=message_,json=message,proto3,oneof" json:"message_,omitempty"` // Length of the message sent Length *int32 `protobuf:"zigzag32,2,opt,name=length,proto3,oneof" json:"length,omitempty"` // Time at which the message was sent - SentAt string `protobuf:"bytes,3,opt,name=sent_at,json=sentAt,proto3" json:"sent_at,omitempty"` + SentAt *string `protobuf:"bytes,3,opt,name=sent_at,json=sentAt,proto3,oneof" json:"sent_at,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -407,8 +407,8 @@ func (*ChatSummary) Descriptor() ([]byte, []int) { } func (x *ChatSummary) GetMessage_() string { - if x != nil { - return x.Message_ + if x != nil && x.Message_ != nil { + return *x.Message_ } return "" } @@ -421,8 +421,8 @@ func (x *ChatSummary) GetLength() int32 { } func (x *ChatSummary) GetSentAt() string { - if x != nil { - return x.SentAt + if x != nil && x.SentAt != nil { + return *x.SentAt } return "" } @@ -466,10 +466,10 @@ func (*SubscribeRequest) Descriptor() ([]byte, []int) { type SubscribeResponse struct { state protoimpl.MessageState `protogen:"open.v1"` // Message sent to the server - Message_ string `protobuf:"bytes,1,opt,name=message_,json=message,proto3" json:"message_,omitempty"` - Action string `protobuf:"bytes,2,opt,name=action,proto3" json:"action,omitempty"` + Message_ *string `protobuf:"bytes,1,opt,name=message_,json=message,proto3,oneof" json:"message_,omitempty"` + Action *string `protobuf:"bytes,2,opt,name=action,proto3,oneof" json:"action,omitempty"` // Time at which the message was added - AddedAt string `protobuf:"bytes,3,opt,name=added_at,json=addedAt,proto3" json:"added_at,omitempty"` + AddedAt *string `protobuf:"bytes,3,opt,name=added_at,json=addedAt,proto3,oneof" json:"added_at,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -505,22 +505,22 @@ func (*SubscribeResponse) Descriptor() ([]byte, []int) { } func (x *SubscribeResponse) GetMessage_() string { - if x != nil { - return x.Message_ + if x != nil && x.Message_ != nil { + return *x.Message_ } return "" } func (x *SubscribeResponse) GetAction() string { - if x != nil { - return x.Action + if x != nil && x.Action != nil { + return *x.Action } return "" } func (x *SubscribeResponse) GetAddedAt() string { - if x != nil { - return x.AddedAt + if x != nil && x.AddedAt != nil { + return *x.AddedAt } return "" } @@ -564,11 +564,11 @@ func (*HistoryRequest) Descriptor() ([]byte, []int) { type HistoryResponse struct { state protoimpl.MessageState `protogen:"open.v1"` // Message sent to the server - Message_ string `protobuf:"bytes,1,opt,name=message_,json=message,proto3" json:"message_,omitempty"` + Message_ *string `protobuf:"bytes,1,opt,name=message_,json=message,proto3,oneof" json:"message_,omitempty"` // Length of the message sent Length *int32 `protobuf:"zigzag32,2,opt,name=length,proto3,oneof" json:"length,omitempty"` // Time at which the message was sent - SentAt string `protobuf:"bytes,3,opt,name=sent_at,json=sentAt,proto3" json:"sent_at,omitempty"` + SentAt *string `protobuf:"bytes,3,opt,name=sent_at,json=sentAt,proto3,oneof" json:"sent_at,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -604,8 +604,8 @@ func (*HistoryResponse) Descriptor() ([]byte, []int) { } func (x *HistoryResponse) GetMessage_() string { - if x != nil { - return x.Message_ + if x != nil && x.Message_ != nil { + return *x.Message_ } return "" } @@ -618,8 +618,8 @@ func (x *HistoryResponse) GetLength() int32 { } func (x *HistoryResponse) GetSentAt() string { - if x != nil { - return x.SentAt + if x != nil && x.SentAt != nil { + return *x.SentAt } return "" } @@ -629,36 +629,50 @@ var File_goagen_streaming_chatter_proto protoreflect.FileDescriptor const file_goagen_streaming_chatter_proto_rawDesc = "" + "\n" + "\x1egoagen_streaming_chatter.proto\x12\achatter\"\x0e\n" + - "\fLoginRequest\"%\n" + - "\rLoginResponse\x12\x14\n" + - "\x05field\x18\x01 \x01(\tR\x05field\".\n" + - "\x16EchoerStreamingRequest\x12\x14\n" + - "\x05field\x18\x01 \x01(\tR\x05field\"&\n" + - "\x0eEchoerResponse\x12\x14\n" + - "\x05field\x18\x01 \x01(\tR\x05field\"0\n" + - "\x18ListenerStreamingRequest\x12\x14\n" + - "\x05field\x18\x01 \x01(\tR\x05field\"\x12\n" + - "\x10ListenerResponse\"/\n" + - "\x17SummaryStreamingRequest\x12\x14\n" + - "\x05field\x18\x01 \x01(\tR\x05field\"C\n" + + "\fLoginRequest\"4\n" + + "\rLoginResponse\x12\x19\n" + + "\x05field\x18\x01 \x01(\tH\x00R\x05field\x88\x01\x01B\b\n" + + "\x06_field\"=\n" + + "\x16EchoerStreamingRequest\x12\x19\n" + + "\x05field\x18\x01 \x01(\tH\x00R\x05field\x88\x01\x01B\b\n" + + "\x06_field\"5\n" + + "\x0eEchoerResponse\x12\x19\n" + + "\x05field\x18\x01 \x01(\tH\x00R\x05field\x88\x01\x01B\b\n" + + "\x06_field\"?\n" + + "\x18ListenerStreamingRequest\x12\x19\n" + + "\x05field\x18\x01 \x01(\tH\x00R\x05field\x88\x01\x01B\b\n" + + "\x06_field\"\x12\n" + + "\x10ListenerResponse\">\n" + + "\x17SummaryStreamingRequest\x12\x19\n" + + "\x05field\x18\x01 \x01(\tH\x00R\x05field\x88\x01\x01B\b\n" + + "\x06_field\"C\n" + "\x15ChatSummaryCollection\x12*\n" + - "\x05field\x18\x01 \x03(\v2\x14.chatter.ChatSummaryR\x05field\"i\n" + - "\vChatSummary\x12\x19\n" + - "\bmessage_\x18\x01 \x01(\tR\amessage\x12\x1b\n" + - "\x06length\x18\x02 \x01(\x11H\x00R\x06length\x88\x01\x01\x12\x17\n" + - "\asent_at\x18\x03 \x01(\tR\x06sentAtB\t\n" + - "\a_length\"\x12\n" + - "\x10SubscribeRequest\"a\n" + - "\x11SubscribeResponse\x12\x19\n" + - "\bmessage_\x18\x01 \x01(\tR\amessage\x12\x16\n" + - "\x06action\x18\x02 \x01(\tR\x06action\x12\x19\n" + - "\badded_at\x18\x03 \x01(\tR\aaddedAt\"\x10\n" + - "\x0eHistoryRequest\"m\n" + - "\x0fHistoryResponse\x12\x19\n" + - "\bmessage_\x18\x01 \x01(\tR\amessage\x12\x1b\n" + - "\x06length\x18\x02 \x01(\x11H\x00R\x06length\x88\x01\x01\x12\x17\n" + - "\asent_at\x18\x03 \x01(\tR\x06sentAtB\t\n" + - "\a_length2\xaa\x03\n" + + "\x05field\x18\x01 \x03(\v2\x14.chatter.ChatSummaryR\x05field\"\x8c\x01\n" + + "\vChatSummary\x12\x1e\n" + + "\bmessage_\x18\x01 \x01(\tH\x00R\amessage\x88\x01\x01\x12\x1b\n" + + "\x06length\x18\x02 \x01(\x11H\x01R\x06length\x88\x01\x01\x12\x1c\n" + + "\asent_at\x18\x03 \x01(\tH\x02R\x06sentAt\x88\x01\x01B\v\n" + + "\t_message_B\t\n" + + "\a_lengthB\n" + + "\n" + + "\b_sent_at\"\x12\n" + + "\x10SubscribeRequest\"\x95\x01\n" + + "\x11SubscribeResponse\x12\x1e\n" + + "\bmessage_\x18\x01 \x01(\tH\x00R\amessage\x88\x01\x01\x12\x1b\n" + + "\x06action\x18\x02 \x01(\tH\x01R\x06action\x88\x01\x01\x12\x1e\n" + + "\badded_at\x18\x03 \x01(\tH\x02R\aaddedAt\x88\x01\x01B\v\n" + + "\t_message_B\t\n" + + "\a_actionB\v\n" + + "\t_added_at\"\x10\n" + + "\x0eHistoryRequest\"\x90\x01\n" + + "\x0fHistoryResponse\x12\x1e\n" + + "\bmessage_\x18\x01 \x01(\tH\x00R\amessage\x88\x01\x01\x12\x1b\n" + + "\x06length\x18\x02 \x01(\x11H\x01R\x06length\x88\x01\x01\x12\x1c\n" + + "\asent_at\x18\x03 \x01(\tH\x02R\x06sentAt\x88\x01\x01B\v\n" + + "\t_message_B\t\n" + + "\a_lengthB\n" + + "\n" + + "\b_sent_at2\xaa\x03\n" + "\aChatter\x126\n" + "\x05Login\x12\x15.chatter.LoginRequest\x1a\x16.chatter.LoginResponse\x12F\n" + "\x06Echoer\x12\x1f.chatter.EchoerStreamingRequest\x1a\x17.chatter.EchoerResponse(\x010\x01\x12J\n" + @@ -722,7 +736,13 @@ func file_goagen_streaming_chatter_proto_init() { if File_goagen_streaming_chatter_proto != nil { return } + file_goagen_streaming_chatter_proto_msgTypes[1].OneofWrappers = []any{} + file_goagen_streaming_chatter_proto_msgTypes[2].OneofWrappers = []any{} + file_goagen_streaming_chatter_proto_msgTypes[3].OneofWrappers = []any{} + file_goagen_streaming_chatter_proto_msgTypes[4].OneofWrappers = []any{} + file_goagen_streaming_chatter_proto_msgTypes[6].OneofWrappers = []any{} file_goagen_streaming_chatter_proto_msgTypes[8].OneofWrappers = []any{} + file_goagen_streaming_chatter_proto_msgTypes[10].OneofWrappers = []any{} file_goagen_streaming_chatter_proto_msgTypes[12].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ diff --git a/streaming/gen/grpc/chatter/pb/goagen_streaming_chatter.proto b/streaming/gen/grpc/chatter/pb/goagen_streaming_chatter.proto index 602454126..8553a1338 100644 --- a/streaming/gen/grpc/chatter/pb/goagen_streaming_chatter.proto +++ b/streaming/gen/grpc/chatter/pb/goagen_streaming_chatter.proto @@ -31,26 +31,26 @@ message LoginRequest { } message LoginResponse { - string field = 1; + optional string field = 1; } message EchoerStreamingRequest { - string field = 1; + optional string field = 1; } message EchoerResponse { - string field = 1; + optional string field = 1; } message ListenerStreamingRequest { - string field = 1; + optional string field = 1; } message ListenerResponse { } message SummaryStreamingRequest { - string field = 1; + optional string field = 1; } message ChatSummaryCollection { @@ -59,11 +59,11 @@ message ChatSummaryCollection { message ChatSummary { // Message sent to the server - string message_ = 1; + optional string message_ = 1; // Length of the message sent optional sint32 length = 2; // Time at which the message was sent - string sent_at = 3; + optional string sent_at = 3; } message SubscribeRequest { @@ -71,10 +71,10 @@ message SubscribeRequest { message SubscribeResponse { // Message sent to the server - string message_ = 1; - string action = 2; + optional string message_ = 1; + optional string action = 2; // Time at which the message was added - string added_at = 3; + optional string added_at = 3; } message HistoryRequest { @@ -82,9 +82,9 @@ message HistoryRequest { message HistoryResponse { // Message sent to the server - string message_ = 1; + optional string message_ = 1; // Length of the message sent optional sint32 length = 2; // Time at which the message was sent - string sent_at = 3; + optional string sent_at = 3; } diff --git a/streaming/gen/grpc/chatter/server/server.go b/streaming/gen/grpc/chatter/server/server.go index 6f5eb450e..8530d26db 100644 --- a/streaming/gen/grpc/chatter/server/server.go +++ b/streaming/gen/grpc/chatter/server/server.go @@ -356,6 +356,9 @@ func (s *EchoerServerStream) Recv() (string, error) { if err != nil { return res, err } + if err = ValidateEchoerStreamingRequest(v); err != nil { + return res, err + } return NewEchoerStreamingRequestEchoerStreamingRequest(v), nil } @@ -378,6 +381,9 @@ func (s *ListenerServerStream) Recv() (string, error) { if err != nil { return res, err } + if err = ValidateListenerStreamingRequest(v); err != nil { + return res, err + } return NewListenerStreamingRequestListenerStreamingRequest(v), nil } @@ -415,6 +421,9 @@ func (s *SummaryServerStream) Recv() (string, error) { if err != nil { return res, err } + if err = ValidateSummaryStreamingRequest(v); err != nil { + return res, err + } return NewSummaryStreamingRequestSummaryStreamingRequest(v), nil } diff --git a/streaming/gen/grpc/chatter/server/types.go b/streaming/gen/grpc/chatter/server/types.go index 2a953206e..b6a11a257 100644 --- a/streaming/gen/grpc/chatter/server/types.go +++ b/streaming/gen/grpc/chatter/server/types.go @@ -11,6 +11,7 @@ import ( chatter "goa.design/examples/streaming/gen/chatter" chatterviews "goa.design/examples/streaming/gen/chatter/views" chatterpb "goa.design/examples/streaming/gen/grpc/chatter/pb" + goa "goa.design/goa/v3/pkg" ) // NewLoginPayload builds *chatter.LoginPayload from metadata values. @@ -24,7 +25,8 @@ func NewLoginPayload(user string, password string) *chatter.LoginPayload { // NewProtoLoginResponse builds *chatterpb.LoginResponse from string. func NewProtoLoginResponse(result string) *chatterpb.LoginResponse { message := &chatterpb.LoginResponse{} - message.Field = result + message.Field = new(string) + *message.Field = result return message } @@ -38,14 +40,15 @@ func NewEchoerPayload(token string) *chatter.EchoerPayload { // NewProtoEchoerResponse builds *chatterpb.EchoerResponse from string. func NewProtoEchoerResponse(result string) *chatterpb.EchoerResponse { message := &chatterpb.EchoerResponse{} - message.Field = result + message.Field = new(string) + *message.Field = result return message } // NewEchoerStreamingRequestEchoerStreamingRequest builds string from // *chatterpb.EchoerStreamingRequest. func NewEchoerStreamingRequestEchoerStreamingRequest(v *chatterpb.EchoerStreamingRequest) string { - spayload := v.Field + spayload := *v.Field return spayload } @@ -66,7 +69,7 @@ func NewProtoListenerResponse() *chatterpb.ListenerResponse { // NewListenerStreamingRequestListenerStreamingRequest builds string from // *chatterpb.ListenerStreamingRequest. func NewListenerStreamingRequestListenerStreamingRequest(v *chatterpb.ListenerStreamingRequest) string { - spayload := v.Field + spayload := *v.Field return spayload } @@ -84,8 +87,8 @@ func NewProtoChatSummaryCollection(result chatterviews.ChatSummaryCollectionView message.Field = make([]*chatterpb.ChatSummary, len(result)) for i, val := range result { message.Field[i] = &chatterpb.ChatSummary{ - Message_: *val.Message, - SentAt: *val.SentAt, + Message_: val.Message, + SentAt: val.SentAt, } if val.Length != nil { length := int32(*val.Length) @@ -98,7 +101,7 @@ func NewProtoChatSummaryCollection(result chatterviews.ChatSummaryCollectionView // NewSummaryStreamingRequestSummaryStreamingRequest builds string from // *chatterpb.SummaryStreamingRequest. func NewSummaryStreamingRequestSummaryStreamingRequest(v *chatterpb.SummaryStreamingRequest) string { - spayload := v.Field + spayload := *v.Field return spayload } @@ -113,9 +116,9 @@ func NewSubscribePayload(token string) *chatter.SubscribePayload { // *chatter.Event. func NewProtoSubscribeResponse(result *chatter.Event) *chatterpb.SubscribeResponse { message := &chatterpb.SubscribeResponse{ - Message_: result.Message, - Action: result.Action, - AddedAt: result.AddedAt, + Message_: &result.Message, + Action: &result.Action, + AddedAt: &result.AddedAt, } return message } @@ -136,8 +139,8 @@ func NewHistoryPayload(view *string, token string) *chatter.HistoryPayload { // *chatterviews.ChatSummaryView. func NewProtoHistoryResponse(result *chatterviews.ChatSummaryView) *chatterpb.HistoryResponse { message := &chatterpb.HistoryResponse{ - Message_: *result.Message, - SentAt: *result.SentAt, + Message_: result.Message, + SentAt: result.SentAt, } if result.Length != nil { length := int32(*result.Length) @@ -150,7 +153,34 @@ func NewProtoHistoryResponse(result *chatterviews.ChatSummaryView) *chatterpb.Hi // *chatterviews.ChatSummaryView. func NewProtoHistoryResponseTiny(result *chatterviews.ChatSummaryView) *chatterpb.HistoryResponse { message := &chatterpb.HistoryResponse{ - Message_: *result.Message, + Message_: result.Message, } return message } + +// ValidateEchoerStreamingRequest runs the validations defined on +// EchoerStreamingRequest. +func ValidateEchoerStreamingRequest(stream *chatterpb.EchoerStreamingRequest) (err error) { + if stream.Field == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("field", "stream")) + } + return +} + +// ValidateListenerStreamingRequest runs the validations defined on +// ListenerStreamingRequest. +func ValidateListenerStreamingRequest(stream *chatterpb.ListenerStreamingRequest) (err error) { + if stream.Field == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("field", "stream")) + } + return +} + +// ValidateSummaryStreamingRequest runs the validations defined on +// SummaryStreamingRequest. +func ValidateSummaryStreamingRequest(stream *chatterpb.SummaryStreamingRequest) (err error) { + if stream.Field == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("field", "stream")) + } + return +} diff --git a/streaming/go.mod b/streaming/go.mod index 792e4691d..b06aa1f29 100644 --- a/streaming/go.mod +++ b/streaming/go.mod @@ -5,7 +5,7 @@ go 1.26.0 require ( github.com/golang-jwt/jwt/v4 v4.5.2 github.com/gorilla/websocket v1.5.3 - goa.design/goa/v3 v3.30.0 + goa.design/goa/v3 v3.30.1-0.20260825000358-70a27fd82e81 google.golang.org/grpc v1.83.1 google.golang.org/protobuf v1.36.12 ) diff --git a/streaming/go.sum b/streaming/go.sum index 9ad9c06e3..d05b07aec 100644 --- a/streaming/go.sum +++ b/streaming/go.sum @@ -51,8 +51,8 @@ go.opentelemetry.io/otel/trace v1.44.0 h1:jxF5CsGYCe74MCRx2X4g7WsY/VBKRqqpNvXlX/ go.opentelemetry.io/otel/trace v1.44.0/go.mod h1:oLl1jrMQAVo6v3GAggN+1VH9VIz9iUSvW53sW1Q8PIE= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.0 h1:KXfAR5qlUCJLVPlHTZ6pHdC5b013BB78PLbDf2fFhfY= -goa.design/goa/v3 v3.30.0/go.mod h1:Is2byRdJddS20jhGT3Ql80N5hQyAc4HgAl7H/A0ZmJ4= +goa.design/goa/v3 v3.30.1-0.20260825000358-70a27fd82e81 h1:LeU5jBnRZV7r/a56FAiGbqptG345Bi/9yE5M1zQjSYY= +goa.design/goa/v3 v3.30.1-0.20260825000358-70a27fd82e81/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/tracing/go.mod b/tracing/go.mod index 019284fb0..a4a7f76a7 100644 --- a/tracing/go.mod +++ b/tracing/go.mod @@ -5,8 +5,8 @@ go 1.26.0 require ( github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 goa.design/examples/basic v0.0.0-20260810182504-f834f43955c5 - goa.design/goa/v3 v3.29.1 - google.golang.org/grpc v1.83.0 + goa.design/goa/v3 v3.30.1-0.20260825000358-70a27fd82e81 + google.golang.org/grpc v1.83.1 ) require ( @@ -17,6 +17,6 @@ require ( golang.org/x/net v0.58.0 // indirect golang.org/x/sys v0.47.0 // indirect golang.org/x/text v0.41.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20260810153831-ec0a7760b754 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20260819154853-08b0e4226688 // indirect google.golang.org/protobuf v1.36.12 // indirect ) diff --git a/tracing/go.sum b/tracing/go.sum index 425aa272d..1d2e0a857 100644 --- a/tracing/go.sum +++ b/tracing/go.sum @@ -7,7 +7,6 @@ github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XL github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= @@ -49,7 +48,6 @@ github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFSt github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= @@ -59,8 +57,8 @@ github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXf github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U= -github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= +github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWDWE= +github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= go.opentelemetry.io/auto/sdk v1.2.1 h1:jXsnJ4Lmnqd11kwkBV2LgLoFMZKizbCi5fNZ/ipaZ64= @@ -79,10 +77,12 @@ go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= go.uber.org/zap v1.18.1/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI= +go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= +go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/examples/basic v0.0.0-20260810182504-f834f43955c5 h1:SRSrUaLTTdA4bUXb8+zA5MDhMEx8YaP+Knd+pddBcrg= goa.design/examples/basic v0.0.0-20260810182504-f834f43955c5/go.mod h1:XRziIzNcLb9fk7ZrfiHx5FIeAj+orJ4fkzLG0nXpiAo= -goa.design/goa/v3 v3.29.1 h1:O/FtqeWRI73e6EU6fuODelhLuSI40eSD7Cxn5fmoU5g= -goa.design/goa/v3 v3.29.1/go.mod h1:FpTADA0Z2onOoZZD2YLWrA2IeXmaBEbs/FeFYag6hxg= +goa.design/goa/v3 v3.30.1-0.20260825000358-70a27fd82e81 h1:LeU5jBnRZV7r/a56FAiGbqptG345Bi/9yE5M1zQjSYY= +goa.design/goa/v3 v3.30.1-0.20260825000358-70a27fd82e81/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= @@ -141,15 +141,15 @@ google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7 google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20200423170343-7949de9c1215/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto/googleapis/rpc v0.0.0-20260810153831-ec0a7760b754 h1:k5CJw9e5ONCcA/u0webKt092npXuY+KeGh3Q8NAVf0g= -google.golang.org/genproto/googleapis/rpc v0.0.0-20260810153831-ec0a7760b754/go.mod h1:4Hqkh8ycfw05ld/3BWL7rJOSfebL2Q+DVDeRgYgxUU8= +google.golang.org/genproto/googleapis/rpc v0.0.0-20260819154853-08b0e4226688 h1:cYNAzI2sUwhmCcoj9TxvihSrqsxt6uIkj3rDRhSDmW4= +google.golang.org/genproto/googleapis/rpc v0.0.0-20260819154853-08b0e4226688/go.mod h1:DjtHYE8FKJLivXcBEjGwndXfIC23G0VpXiXKqG179uA= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= -google.golang.org/grpc v1.83.0 h1:JeNZEKJFbQxArAMl+hiytHauacDNqJUllNfmIMmpqnQ= -google.golang.org/grpc v1.83.0/go.mod h1:kDyl6SKsiHKt0uylY5gtn5cEjkrIOhQOGDgIc4JGwzQ= +google.golang.org/grpc v1.83.1 h1:HIO0+BEtBP6soyqvqC8sNUjZ7bTs+0hFQuFF+RAy++Y= +google.golang.org/grpc v1.83.1/go.mod h1:kDyl6SKsiHKt0uylY5gtn5cEjkrIOhQOGDgIc4JGwzQ= google.golang.org/protobuf v1.36.12 h1:pJOKDDOyeXErUroCihFAd5LQuwXBSpVnKGrj5o/fwxc= google.golang.org/protobuf v1.36.12/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -158,7 +158,5 @@ gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= -gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= diff --git a/tus/go.mod b/tus/go.mod index e1e321f64..ef16a086b 100644 --- a/tus/go.mod +++ b/tus/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( github.com/rs/xid v1.6.0 - goa.design/goa/v3 v3.30.0 + goa.design/goa/v3 v3.30.1-0.20260825000358-70a27fd82e81 ) require ( @@ -22,6 +22,7 @@ require ( golang.org/x/sync v0.22.0 // indirect golang.org/x/text v0.41.0 // indirect golang.org/x/tools v0.49.0 // indirect + google.golang.org/protobuf v1.36.12 // indirect gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/tus/go.sum b/tus/go.sum index aae23c4f3..5ee68b2c9 100644 --- a/tus/go.sum +++ b/tus/go.sum @@ -33,8 +33,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.0 h1:KXfAR5qlUCJLVPlHTZ6pHdC5b013BB78PLbDf2fFhfY= -goa.design/goa/v3 v3.30.0/go.mod h1:Is2byRdJddS20jhGT3Ql80N5hQyAc4HgAl7H/A0ZmJ4= +goa.design/goa/v3 v3.30.1-0.20260825000358-70a27fd82e81 h1:LeU5jBnRZV7r/a56FAiGbqptG345Bi/9yE5M1zQjSYY= +goa.design/goa/v3 v3.30.1-0.20260825000358-70a27fd82e81/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= @@ -43,6 +43,8 @@ golang.org/x/text v0.41.0 h1:vz/seA0lnX87Othu2f/0L24RcgrXD9/YFTSuGjj3rH8= golang.org/x/text v0.41.0/go.mod h1:jvf1O8ajNzZqhSrQBPbutR/EB83Cc0CFrezNQIwbb5M= golang.org/x/tools v0.49.0 h1:3NI7VXzL9+1WZD52Dx2ttoPwD5DWrFGpl9mFZDlmisI= golang.org/x/tools v0.49.0/go.mod h1:SJNXV9DBKT0UbdttsQjbfJlAE/q+y36++zo3uL3N0Oo= +google.golang.org/protobuf v1.36.12 h1:pJOKDDOyeXErUroCihFAd5LQuwXBSpVnKGrj5o/fwxc= +google.golang.org/protobuf v1.36.12/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= diff --git a/upload_download/go.mod b/upload_download/go.mod index 1ddd11708..61228b683 100644 --- a/upload_download/go.mod +++ b/upload_download/go.mod @@ -2,7 +2,7 @@ module goa.design/examples/upload_download go 1.26.0 -require goa.design/goa/v3 v3.30.0 +require goa.design/goa/v3 v3.30.1-0.20260825000358-70a27fd82e81 require ( github.com/dimfeld/httppath v0.0.0-20170720192232-ee938bf73598 // indirect @@ -19,6 +19,7 @@ require ( golang.org/x/sync v0.22.0 // indirect golang.org/x/text v0.41.0 // indirect golang.org/x/tools v0.49.0 // indirect + google.golang.org/protobuf v1.36.12 // indirect gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/upload_download/go.sum b/upload_download/go.sum index 75dec1d03..032a1d87f 100644 --- a/upload_download/go.sum +++ b/upload_download/go.sum @@ -31,8 +31,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.0 h1:KXfAR5qlUCJLVPlHTZ6pHdC5b013BB78PLbDf2fFhfY= -goa.design/goa/v3 v3.30.0/go.mod h1:Is2byRdJddS20jhGT3Ql80N5hQyAc4HgAl7H/A0ZmJ4= +goa.design/goa/v3 v3.30.1-0.20260825000358-70a27fd82e81 h1:LeU5jBnRZV7r/a56FAiGbqptG345Bi/9yE5M1zQjSYY= +goa.design/goa/v3 v3.30.1-0.20260825000358-70a27fd82e81/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= @@ -41,6 +41,8 @@ golang.org/x/text v0.41.0 h1:vz/seA0lnX87Othu2f/0L24RcgrXD9/YFTSuGjj3rH8= golang.org/x/text v0.41.0/go.mod h1:jvf1O8ajNzZqhSrQBPbutR/EB83Cc0CFrezNQIwbb5M= golang.org/x/tools v0.49.0 h1:3NI7VXzL9+1WZD52Dx2ttoPwD5DWrFGpl9mFZDlmisI= golang.org/x/tools v0.49.0/go.mod h1:SJNXV9DBKT0UbdttsQjbfJlAE/q+y36++zo3uL3N0Oo= +google.golang.org/protobuf v1.36.12 h1:pJOKDDOyeXErUroCihFAd5LQuwXBSpVnKGrj5o/fwxc= +google.golang.org/protobuf v1.36.12/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= From c7cdcbe8ee3e76cba23396ad2f61c07ff911f6c3 Mon Sep 17 00:00:00 2001 From: "Raphael (manual office deploy after cloud-state fix)" Date: Mon, 24 Aug 2026 18:16:13 -0700 Subject: [PATCH 05/28] chore: regenerate examples with restored Goa names --- basic/go.mod | 2 +- basic/go.sum | 4 ++-- cellar/go.mod | 2 +- cellar/go.sum | 4 ++-- concerts/go.mod | 2 +- concerts/go.sum | 4 ++-- cookies/go.mod | 2 +- cookies/go.sum | 4 ++-- encodings/cbor/go.mod | 2 +- encodings/cbor/go.sum | 4 ++-- encodings/text/go.mod | 2 +- encodings/text/go.sum | 4 ++-- error/go.mod | 2 +- error/go.sum | 4 ++-- files/go.mod | 2 +- files/go.sum | 4 ++-- httpstatus/gen/http/hello/client/encode_decode.go | 6 +++--- httpstatus/gen/http/hello/client/types.go | 14 +++++++------- httpstatus/go.mod | 2 +- httpstatus/go.sum | 4 ++-- interceptors/go.mod | 2 +- interceptors/go.sum | 4 ++-- multipart/go.mod | 2 +- multipart/go.sum | 4 ++-- retry/go.mod | 2 +- retry/go.sum | 4 ++-- security/hierarchy/go.mod | 2 +- security/hierarchy/go.sum | 4 ++-- security/multiauth/go.mod | 2 +- security/multiauth/go.sum | 4 ++-- sse/go.mod | 2 +- sse/go.sum | 4 ++-- streaming/go.mod | 2 +- streaming/go.sum | 4 ++-- tracing/go.mod | 2 +- tracing/go.sum | 4 ++-- tus/go.mod | 2 +- tus/go.sum | 4 ++-- upload_download/go.mod | 2 +- upload_download/go.sum | 4 ++-- 40 files changed, 67 insertions(+), 67 deletions(-) diff --git a/basic/go.mod b/basic/go.mod index e78fc427a..5d237901c 100644 --- a/basic/go.mod +++ b/basic/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( goa.design/clue v1.2.6 - goa.design/goa/v3 v3.30.1-0.20260825000358-70a27fd82e81 + goa.design/goa/v3 v3.30.1-0.20260825005549-6e7f0cbd9e6c google.golang.org/grpc v1.83.1 google.golang.org/protobuf v1.36.12 ) diff --git a/basic/go.sum b/basic/go.sum index 40fc45d57..e7892faae 100644 --- a/basic/go.sum +++ b/basic/go.sum @@ -55,8 +55,8 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/clue v1.2.6 h1:ensyUkwlvEbNy8FuTGMldKuvaNouh8YoDY9QaE+EtYg= goa.design/clue v1.2.6/go.mod h1:Y4RS5o2k6MZiGk2PT3XbKyntjR2xkr8dYOKQ591dIDM= -goa.design/goa/v3 v3.30.1-0.20260825000358-70a27fd82e81 h1:LeU5jBnRZV7r/a56FAiGbqptG345Bi/9yE5M1zQjSYY= -goa.design/goa/v3 v3.30.1-0.20260825000358-70a27fd82e81/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260825005549-6e7f0cbd9e6c h1:Vx1gpjJwT+dh+JYA2L7zHH9r1Y5nT/9KYQ4YnSA6l7Q= +goa.design/goa/v3 v3.30.1-0.20260825005549-6e7f0cbd9e6c/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/cellar/go.mod b/cellar/go.mod index b09a4d1e7..96765c97c 100644 --- a/cellar/go.mod +++ b/cellar/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( github.com/boltdb/bolt v1.3.1 - goa.design/goa/v3 v3.30.1-0.20260825000358-70a27fd82e81 + goa.design/goa/v3 v3.30.1-0.20260825005549-6e7f0cbd9e6c google.golang.org/grpc v1.83.1 google.golang.org/protobuf v1.36.12 ) diff --git a/cellar/go.sum b/cellar/go.sum index 9202f4a81..5aa61c6e0 100644 --- a/cellar/go.sum +++ b/cellar/go.sum @@ -51,8 +51,8 @@ go.opentelemetry.io/otel/trace v1.44.0 h1:jxF5CsGYCe74MCRx2X4g7WsY/VBKRqqpNvXlX/ go.opentelemetry.io/otel/trace v1.44.0/go.mod h1:oLl1jrMQAVo6v3GAggN+1VH9VIz9iUSvW53sW1Q8PIE= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260825000358-70a27fd82e81 h1:LeU5jBnRZV7r/a56FAiGbqptG345Bi/9yE5M1zQjSYY= -goa.design/goa/v3 v3.30.1-0.20260825000358-70a27fd82e81/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260825005549-6e7f0cbd9e6c h1:Vx1gpjJwT+dh+JYA2L7zHH9r1Y5nT/9KYQ4YnSA6l7Q= +goa.design/goa/v3 v3.30.1-0.20260825005549-6e7f0cbd9e6c/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/concerts/go.mod b/concerts/go.mod index cc96c057c..d5c659738 100644 --- a/concerts/go.mod +++ b/concerts/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( github.com/google/uuid v1.6.0 - goa.design/goa/v3 v3.30.1-0.20260825000358-70a27fd82e81 + goa.design/goa/v3 v3.30.1-0.20260825005549-6e7f0cbd9e6c ) require ( diff --git a/concerts/go.sum b/concerts/go.sum index 032a1d87f..96f08a63d 100644 --- a/concerts/go.sum +++ b/concerts/go.sum @@ -31,8 +31,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260825000358-70a27fd82e81 h1:LeU5jBnRZV7r/a56FAiGbqptG345Bi/9yE5M1zQjSYY= -goa.design/goa/v3 v3.30.1-0.20260825000358-70a27fd82e81/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260825005549-6e7f0cbd9e6c h1:Vx1gpjJwT+dh+JYA2L7zHH9r1Y5nT/9KYQ4YnSA6l7Q= +goa.design/goa/v3 v3.30.1-0.20260825005549-6e7f0cbd9e6c/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= diff --git a/cookies/go.mod b/cookies/go.mod index 9045a012b..c13602d96 100644 --- a/cookies/go.mod +++ b/cookies/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( github.com/rs/xid v1.6.0 - goa.design/goa/v3 v3.30.1-0.20260825000358-70a27fd82e81 + goa.design/goa/v3 v3.30.1-0.20260825005549-6e7f0cbd9e6c ) require ( diff --git a/cookies/go.sum b/cookies/go.sum index 5ee68b2c9..4ef0c3df5 100644 --- a/cookies/go.sum +++ b/cookies/go.sum @@ -33,8 +33,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260825000358-70a27fd82e81 h1:LeU5jBnRZV7r/a56FAiGbqptG345Bi/9yE5M1zQjSYY= -goa.design/goa/v3 v3.30.1-0.20260825000358-70a27fd82e81/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260825005549-6e7f0cbd9e6c h1:Vx1gpjJwT+dh+JYA2L7zHH9r1Y5nT/9KYQ4YnSA6l7Q= +goa.design/goa/v3 v3.30.1-0.20260825005549-6e7f0cbd9e6c/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= diff --git a/encodings/cbor/go.mod b/encodings/cbor/go.mod index b9999382f..6b73208d1 100644 --- a/encodings/cbor/go.mod +++ b/encodings/cbor/go.mod @@ -5,7 +5,7 @@ go 1.26.0 require ( github.com/fxamacker/cbor/v2 v2.9.2 goa.design/clue v1.2.6 - goa.design/goa/v3 v3.30.1-0.20260825000358-70a27fd82e81 + goa.design/goa/v3 v3.30.1-0.20260825005549-6e7f0cbd9e6c ) require ( diff --git a/encodings/cbor/go.sum b/encodings/cbor/go.sum index 81efd4af2..e33d02396 100644 --- a/encodings/cbor/go.sum +++ b/encodings/cbor/go.sum @@ -59,8 +59,8 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/clue v1.2.6 h1:ensyUkwlvEbNy8FuTGMldKuvaNouh8YoDY9QaE+EtYg= goa.design/clue v1.2.6/go.mod h1:Y4RS5o2k6MZiGk2PT3XbKyntjR2xkr8dYOKQ591dIDM= -goa.design/goa/v3 v3.30.1-0.20260825000358-70a27fd82e81 h1:LeU5jBnRZV7r/a56FAiGbqptG345Bi/9yE5M1zQjSYY= -goa.design/goa/v3 v3.30.1-0.20260825000358-70a27fd82e81/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260825005549-6e7f0cbd9e6c h1:Vx1gpjJwT+dh+JYA2L7zHH9r1Y5nT/9KYQ4YnSA6l7Q= +goa.design/goa/v3 v3.30.1-0.20260825005549-6e7f0cbd9e6c/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/encodings/text/go.mod b/encodings/text/go.mod index a5cad0f24..ef143501e 100644 --- a/encodings/text/go.mod +++ b/encodings/text/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( goa.design/clue v1.2.6 - goa.design/goa/v3 v3.30.1-0.20260825000358-70a27fd82e81 + goa.design/goa/v3 v3.30.1-0.20260825005549-6e7f0cbd9e6c ) require ( diff --git a/encodings/text/go.sum b/encodings/text/go.sum index 40fc45d57..e7892faae 100644 --- a/encodings/text/go.sum +++ b/encodings/text/go.sum @@ -55,8 +55,8 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/clue v1.2.6 h1:ensyUkwlvEbNy8FuTGMldKuvaNouh8YoDY9QaE+EtYg= goa.design/clue v1.2.6/go.mod h1:Y4RS5o2k6MZiGk2PT3XbKyntjR2xkr8dYOKQ591dIDM= -goa.design/goa/v3 v3.30.1-0.20260825000358-70a27fd82e81 h1:LeU5jBnRZV7r/a56FAiGbqptG345Bi/9yE5M1zQjSYY= -goa.design/goa/v3 v3.30.1-0.20260825000358-70a27fd82e81/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260825005549-6e7f0cbd9e6c h1:Vx1gpjJwT+dh+JYA2L7zHH9r1Y5nT/9KYQ4YnSA6l7Q= +goa.design/goa/v3 v3.30.1-0.20260825005549-6e7f0cbd9e6c/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/error/go.mod b/error/go.mod index 5a667e598..0f5a185d2 100644 --- a/error/go.mod +++ b/error/go.mod @@ -3,7 +3,7 @@ module goa.design/examples/error go 1.26.0 require ( - goa.design/goa/v3 v3.30.1-0.20260825000358-70a27fd82e81 + goa.design/goa/v3 v3.30.1-0.20260825005549-6e7f0cbd9e6c google.golang.org/genproto v0.0.0-20260810153831-ec0a7760b754 google.golang.org/grpc v1.83.1 google.golang.org/protobuf v1.36.12 diff --git a/error/go.sum b/error/go.sum index 78a671eea..d7bcf0983 100644 --- a/error/go.sum +++ b/error/go.sum @@ -49,8 +49,8 @@ go.opentelemetry.io/otel/trace v1.44.0 h1:jxF5CsGYCe74MCRx2X4g7WsY/VBKRqqpNvXlX/ go.opentelemetry.io/otel/trace v1.44.0/go.mod h1:oLl1jrMQAVo6v3GAggN+1VH9VIz9iUSvW53sW1Q8PIE= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260825000358-70a27fd82e81 h1:LeU5jBnRZV7r/a56FAiGbqptG345Bi/9yE5M1zQjSYY= -goa.design/goa/v3 v3.30.1-0.20260825000358-70a27fd82e81/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260825005549-6e7f0cbd9e6c h1:Vx1gpjJwT+dh+JYA2L7zHH9r1Y5nT/9KYQ4YnSA6l7Q= +goa.design/goa/v3 v3.30.1-0.20260825005549-6e7f0cbd9e6c/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/files/go.mod b/files/go.mod index d75f9cc23..fe0cc1eef 100644 --- a/files/go.mod +++ b/files/go.mod @@ -2,7 +2,7 @@ module goa.design/examples/files go 1.26.0 -require goa.design/goa/v3 v3.30.1-0.20260825000358-70a27fd82e81 +require goa.design/goa/v3 v3.30.1-0.20260825005549-6e7f0cbd9e6c require ( github.com/dimfeld/httppath v0.0.0-20170720192232-ee938bf73598 // indirect diff --git a/files/go.sum b/files/go.sum index 032a1d87f..96f08a63d 100644 --- a/files/go.sum +++ b/files/go.sum @@ -31,8 +31,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260825000358-70a27fd82e81 h1:LeU5jBnRZV7r/a56FAiGbqptG345Bi/9yE5M1zQjSYY= -goa.design/goa/v3 v3.30.1-0.20260825000358-70a27fd82e81/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260825005549-6e7f0cbd9e6c h1:Vx1gpjJwT+dh+JYA2L7zHH9r1Y5nT/9KYQ4YnSA6l7Q= +goa.design/goa/v3 v3.30.1-0.20260825005549-6e7f0cbd9e6c/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= diff --git a/httpstatus/gen/http/hello/client/encode_decode.go b/httpstatus/gen/http/hello/client/encode_decode.go index f52b81e28..32f70e869 100644 --- a/httpstatus/gen/http/hello/client/encode_decode.go +++ b/httpstatus/gen/http/hello/client/encode_decode.go @@ -78,7 +78,7 @@ func DecodeHelloResponse(decoder func(*http.Response) goahttp.Decoder, restoreBo if err != nil { return nil, goahttp.ErrDecodingError("hello", "hello", err) } - p := NewHelloHelloCreated(&body) + p := NewHelloViewCreated(&body) tmp := "created" p.Outcome = &tmp view := "default" @@ -97,7 +97,7 @@ func DecodeHelloResponse(decoder func(*http.Response) goahttp.Decoder, restoreBo if err != nil { return nil, goahttp.ErrDecodingError("hello", "hello", err) } - p := NewHelloHelloAccepted(&body) + p := NewHelloViewAccepted(&body) tmp := "accepted" p.Outcome = &tmp view := "default" @@ -116,7 +116,7 @@ func DecodeHelloResponse(decoder func(*http.Response) goahttp.Decoder, restoreBo if err != nil { return nil, goahttp.ErrDecodingError("hello", "hello", err) } - p := NewHelloHelloOK(&body) + p := NewHelloViewOK(&body) view := "default" vres := &helloviews.Hello{Projected: p, View: view} if err = helloviews.ValidateHello(vres); err != nil { diff --git a/httpstatus/gen/http/hello/client/types.go b/httpstatus/gen/http/hello/client/types.go index 7db20ff41..89fbee716 100644 --- a/httpstatus/gen/http/hello/client/types.go +++ b/httpstatus/gen/http/hello/client/types.go @@ -35,9 +35,9 @@ type HelloOKResponseBody struct { Outcome *string `json:"-"` } -// NewHelloHelloCreated builds a "hello" service "hello" endpoint result from a +// NewHelloViewCreated builds a "hello" service "hello" endpoint result from a // HTTP "Created" response. -func NewHelloHelloCreated(body *HelloCreatedResponseBody) *helloviews.HelloView { +func NewHelloViewCreated(body *HelloCreatedResponseBody) *helloviews.HelloView { v := &helloviews.HelloView{ Greeting: body.Greeting, Outcome: body.Outcome, @@ -46,9 +46,9 @@ func NewHelloHelloCreated(body *HelloCreatedResponseBody) *helloviews.HelloView return v } -// NewHelloHelloAccepted builds a "hello" service "hello" endpoint result from -// a HTTP "Accepted" response. -func NewHelloHelloAccepted(body *HelloAcceptedResponseBody) *helloviews.HelloView { +// NewHelloViewAccepted builds a "hello" service "hello" endpoint result from a +// HTTP "Accepted" response. +func NewHelloViewAccepted(body *HelloAcceptedResponseBody) *helloviews.HelloView { v := &helloviews.HelloView{ Greeting: body.Greeting, Outcome: body.Outcome, @@ -57,9 +57,9 @@ func NewHelloHelloAccepted(body *HelloAcceptedResponseBody) *helloviews.HelloVie return v } -// NewHelloHelloOK builds a "hello" service "hello" endpoint result from a HTTP +// NewHelloViewOK builds a "hello" service "hello" endpoint result from a HTTP // "OK" response. -func NewHelloHelloOK(body *HelloOKResponseBody) *helloviews.HelloView { +func NewHelloViewOK(body *HelloOKResponseBody) *helloviews.HelloView { v := &helloviews.HelloView{ Greeting: body.Greeting, Outcome: body.Outcome, diff --git a/httpstatus/go.mod b/httpstatus/go.mod index 810774bfc..b8c5f1b3d 100644 --- a/httpstatus/go.mod +++ b/httpstatus/go.mod @@ -2,7 +2,7 @@ module goa.design/examples/httpstatus go 1.26.0 -require goa.design/goa/v3 v3.30.1-0.20260825000358-70a27fd82e81 +require goa.design/goa/v3 v3.30.1-0.20260825005549-6e7f0cbd9e6c require ( github.com/dimfeld/httppath v0.0.0-20170720192232-ee938bf73598 // indirect diff --git a/httpstatus/go.sum b/httpstatus/go.sum index 032a1d87f..96f08a63d 100644 --- a/httpstatus/go.sum +++ b/httpstatus/go.sum @@ -31,8 +31,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260825000358-70a27fd82e81 h1:LeU5jBnRZV7r/a56FAiGbqptG345Bi/9yE5M1zQjSYY= -goa.design/goa/v3 v3.30.1-0.20260825000358-70a27fd82e81/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260825005549-6e7f0cbd9e6c h1:Vx1gpjJwT+dh+JYA2L7zHH9r1Y5nT/9KYQ4YnSA6l7Q= +goa.design/goa/v3 v3.30.1-0.20260825005549-6e7f0cbd9e6c/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= diff --git a/interceptors/go.mod b/interceptors/go.mod index ec4fb7594..3cd21f8e7 100644 --- a/interceptors/go.mod +++ b/interceptors/go.mod @@ -6,7 +6,7 @@ require ( github.com/google/uuid v1.6.0 github.com/gorilla/websocket v1.5.3 goa.design/clue v1.2.6 - goa.design/goa/v3 v3.30.1-0.20260825000358-70a27fd82e81 + goa.design/goa/v3 v3.30.1-0.20260825005549-6e7f0cbd9e6c google.golang.org/grpc v1.83.1 google.golang.org/protobuf v1.36.12 ) diff --git a/interceptors/go.sum b/interceptors/go.sum index 40fc45d57..e7892faae 100644 --- a/interceptors/go.sum +++ b/interceptors/go.sum @@ -55,8 +55,8 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/clue v1.2.6 h1:ensyUkwlvEbNy8FuTGMldKuvaNouh8YoDY9QaE+EtYg= goa.design/clue v1.2.6/go.mod h1:Y4RS5o2k6MZiGk2PT3XbKyntjR2xkr8dYOKQ591dIDM= -goa.design/goa/v3 v3.30.1-0.20260825000358-70a27fd82e81 h1:LeU5jBnRZV7r/a56FAiGbqptG345Bi/9yE5M1zQjSYY= -goa.design/goa/v3 v3.30.1-0.20260825000358-70a27fd82e81/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260825005549-6e7f0cbd9e6c h1:Vx1gpjJwT+dh+JYA2L7zHH9r1Y5nT/9KYQ4YnSA6l7Q= +goa.design/goa/v3 v3.30.1-0.20260825005549-6e7f0cbd9e6c/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/multipart/go.mod b/multipart/go.mod index f598c2cce..37297ad73 100644 --- a/multipart/go.mod +++ b/multipart/go.mod @@ -2,7 +2,7 @@ module goa.design/examples/multipart go 1.26.0 -require goa.design/goa/v3 v3.30.1-0.20260825000358-70a27fd82e81 +require goa.design/goa/v3 v3.30.1-0.20260825005549-6e7f0cbd9e6c require ( github.com/dimfeld/httppath v0.0.0-20170720192232-ee938bf73598 // indirect diff --git a/multipart/go.sum b/multipart/go.sum index 032a1d87f..96f08a63d 100644 --- a/multipart/go.sum +++ b/multipart/go.sum @@ -31,8 +31,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260825000358-70a27fd82e81 h1:LeU5jBnRZV7r/a56FAiGbqptG345Bi/9yE5M1zQjSYY= -goa.design/goa/v3 v3.30.1-0.20260825000358-70a27fd82e81/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260825005549-6e7f0cbd9e6c h1:Vx1gpjJwT+dh+JYA2L7zHH9r1Y5nT/9KYQ4YnSA6l7Q= +goa.design/goa/v3 v3.30.1-0.20260825005549-6e7f0cbd9e6c/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= diff --git a/retry/go.mod b/retry/go.mod index 073aa56bd..2974ef1a7 100644 --- a/retry/go.mod +++ b/retry/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( goa.design/clue v1.2.6 - goa.design/goa/v3 v3.30.1-0.20260825000358-70a27fd82e81 + goa.design/goa/v3 v3.30.1-0.20260825005549-6e7f0cbd9e6c google.golang.org/grpc v1.83.1 google.golang.org/protobuf v1.36.12 ) diff --git a/retry/go.sum b/retry/go.sum index 883940fd0..3779af7e7 100644 --- a/retry/go.sum +++ b/retry/go.sum @@ -52,8 +52,8 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/clue v1.2.6 h1:ensyUkwlvEbNy8FuTGMldKuvaNouh8YoDY9QaE+EtYg= goa.design/clue v1.2.6/go.mod h1:Y4RS5o2k6MZiGk2PT3XbKyntjR2xkr8dYOKQ591dIDM= -goa.design/goa/v3 v3.30.1-0.20260825000358-70a27fd82e81 h1:LeU5jBnRZV7r/a56FAiGbqptG345Bi/9yE5M1zQjSYY= -goa.design/goa/v3 v3.30.1-0.20260825000358-70a27fd82e81/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260825005549-6e7f0cbd9e6c h1:Vx1gpjJwT+dh+JYA2L7zHH9r1Y5nT/9KYQ4YnSA6l7Q= +goa.design/goa/v3 v3.30.1-0.20260825005549-6e7f0cbd9e6c/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/security/hierarchy/go.mod b/security/hierarchy/go.mod index c076408fe..54b2430a2 100644 --- a/security/hierarchy/go.mod +++ b/security/hierarchy/go.mod @@ -2,7 +2,7 @@ module goa.design/examples/security/hierarchy go 1.26.0 -require goa.design/goa/v3 v3.30.1-0.20260825000358-70a27fd82e81 +require goa.design/goa/v3 v3.30.1-0.20260825005549-6e7f0cbd9e6c require ( github.com/dimfeld/httppath v0.0.0-20170720192232-ee938bf73598 // indirect diff --git a/security/hierarchy/go.sum b/security/hierarchy/go.sum index 032a1d87f..96f08a63d 100644 --- a/security/hierarchy/go.sum +++ b/security/hierarchy/go.sum @@ -31,8 +31,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260825000358-70a27fd82e81 h1:LeU5jBnRZV7r/a56FAiGbqptG345Bi/9yE5M1zQjSYY= -goa.design/goa/v3 v3.30.1-0.20260825000358-70a27fd82e81/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260825005549-6e7f0cbd9e6c h1:Vx1gpjJwT+dh+JYA2L7zHH9r1Y5nT/9KYQ4YnSA6l7Q= +goa.design/goa/v3 v3.30.1-0.20260825005549-6e7f0cbd9e6c/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= diff --git a/security/multiauth/go.mod b/security/multiauth/go.mod index 74be1df00..6dca4f54b 100644 --- a/security/multiauth/go.mod +++ b/security/multiauth/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( github.com/golang-jwt/jwt/v4 v4.5.2 - goa.design/goa/v3 v3.30.1-0.20260825000358-70a27fd82e81 + goa.design/goa/v3 v3.30.1-0.20260825005549-6e7f0cbd9e6c google.golang.org/grpc v1.83.1 google.golang.org/protobuf v1.36.12 ) diff --git a/security/multiauth/go.sum b/security/multiauth/go.sum index d05b07aec..df644752b 100644 --- a/security/multiauth/go.sum +++ b/security/multiauth/go.sum @@ -51,8 +51,8 @@ go.opentelemetry.io/otel/trace v1.44.0 h1:jxF5CsGYCe74MCRx2X4g7WsY/VBKRqqpNvXlX/ go.opentelemetry.io/otel/trace v1.44.0/go.mod h1:oLl1jrMQAVo6v3GAggN+1VH9VIz9iUSvW53sW1Q8PIE= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260825000358-70a27fd82e81 h1:LeU5jBnRZV7r/a56FAiGbqptG345Bi/9yE5M1zQjSYY= -goa.design/goa/v3 v3.30.1-0.20260825000358-70a27fd82e81/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260825005549-6e7f0cbd9e6c h1:Vx1gpjJwT+dh+JYA2L7zHH9r1Y5nT/9KYQ4YnSA6l7Q= +goa.design/goa/v3 v3.30.1-0.20260825005549-6e7f0cbd9e6c/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/sse/go.mod b/sse/go.mod index 2581038ab..d089e49b4 100644 --- a/sse/go.mod +++ b/sse/go.mod @@ -5,7 +5,7 @@ go 1.26.0 require ( github.com/shirou/gopsutil/v3 v3.24.5 goa.design/clue v1.2.6 - goa.design/goa/v3 v3.30.1-0.20260825000358-70a27fd82e81 + goa.design/goa/v3 v3.30.1-0.20260825005549-6e7f0cbd9e6c ) require ( diff --git a/sse/go.sum b/sse/go.sum index a6039b9c1..fe85d66cf 100644 --- a/sse/go.sum +++ b/sse/go.sum @@ -74,8 +74,8 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/clue v1.2.6 h1:ensyUkwlvEbNy8FuTGMldKuvaNouh8YoDY9QaE+EtYg= goa.design/clue v1.2.6/go.mod h1:Y4RS5o2k6MZiGk2PT3XbKyntjR2xkr8dYOKQ591dIDM= -goa.design/goa/v3 v3.30.1-0.20260825000358-70a27fd82e81 h1:LeU5jBnRZV7r/a56FAiGbqptG345Bi/9yE5M1zQjSYY= -goa.design/goa/v3 v3.30.1-0.20260825000358-70a27fd82e81/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260825005549-6e7f0cbd9e6c h1:Vx1gpjJwT+dh+JYA2L7zHH9r1Y5nT/9KYQ4YnSA6l7Q= +goa.design/goa/v3 v3.30.1-0.20260825005549-6e7f0cbd9e6c/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/streaming/go.mod b/streaming/go.mod index b06aa1f29..2b1cee9e5 100644 --- a/streaming/go.mod +++ b/streaming/go.mod @@ -5,7 +5,7 @@ go 1.26.0 require ( github.com/golang-jwt/jwt/v4 v4.5.2 github.com/gorilla/websocket v1.5.3 - goa.design/goa/v3 v3.30.1-0.20260825000358-70a27fd82e81 + goa.design/goa/v3 v3.30.1-0.20260825005549-6e7f0cbd9e6c google.golang.org/grpc v1.83.1 google.golang.org/protobuf v1.36.12 ) diff --git a/streaming/go.sum b/streaming/go.sum index d05b07aec..df644752b 100644 --- a/streaming/go.sum +++ b/streaming/go.sum @@ -51,8 +51,8 @@ go.opentelemetry.io/otel/trace v1.44.0 h1:jxF5CsGYCe74MCRx2X4g7WsY/VBKRqqpNvXlX/ go.opentelemetry.io/otel/trace v1.44.0/go.mod h1:oLl1jrMQAVo6v3GAggN+1VH9VIz9iUSvW53sW1Q8PIE= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260825000358-70a27fd82e81 h1:LeU5jBnRZV7r/a56FAiGbqptG345Bi/9yE5M1zQjSYY= -goa.design/goa/v3 v3.30.1-0.20260825000358-70a27fd82e81/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260825005549-6e7f0cbd9e6c h1:Vx1gpjJwT+dh+JYA2L7zHH9r1Y5nT/9KYQ4YnSA6l7Q= +goa.design/goa/v3 v3.30.1-0.20260825005549-6e7f0cbd9e6c/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/tracing/go.mod b/tracing/go.mod index a4a7f76a7..6830312c9 100644 --- a/tracing/go.mod +++ b/tracing/go.mod @@ -5,7 +5,7 @@ go 1.26.0 require ( github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 goa.design/examples/basic v0.0.0-20260810182504-f834f43955c5 - goa.design/goa/v3 v3.30.1-0.20260825000358-70a27fd82e81 + goa.design/goa/v3 v3.30.1-0.20260825005549-6e7f0cbd9e6c google.golang.org/grpc v1.83.1 ) diff --git a/tracing/go.sum b/tracing/go.sum index 1d2e0a857..07ec0e6cb 100644 --- a/tracing/go.sum +++ b/tracing/go.sum @@ -81,8 +81,8 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/examples/basic v0.0.0-20260810182504-f834f43955c5 h1:SRSrUaLTTdA4bUXb8+zA5MDhMEx8YaP+Knd+pddBcrg= goa.design/examples/basic v0.0.0-20260810182504-f834f43955c5/go.mod h1:XRziIzNcLb9fk7ZrfiHx5FIeAj+orJ4fkzLG0nXpiAo= -goa.design/goa/v3 v3.30.1-0.20260825000358-70a27fd82e81 h1:LeU5jBnRZV7r/a56FAiGbqptG345Bi/9yE5M1zQjSYY= -goa.design/goa/v3 v3.30.1-0.20260825000358-70a27fd82e81/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260825005549-6e7f0cbd9e6c h1:Vx1gpjJwT+dh+JYA2L7zHH9r1Y5nT/9KYQ4YnSA6l7Q= +goa.design/goa/v3 v3.30.1-0.20260825005549-6e7f0cbd9e6c/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= diff --git a/tus/go.mod b/tus/go.mod index ef16a086b..2039c5006 100644 --- a/tus/go.mod +++ b/tus/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( github.com/rs/xid v1.6.0 - goa.design/goa/v3 v3.30.1-0.20260825000358-70a27fd82e81 + goa.design/goa/v3 v3.30.1-0.20260825005549-6e7f0cbd9e6c ) require ( diff --git a/tus/go.sum b/tus/go.sum index 5ee68b2c9..4ef0c3df5 100644 --- a/tus/go.sum +++ b/tus/go.sum @@ -33,8 +33,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260825000358-70a27fd82e81 h1:LeU5jBnRZV7r/a56FAiGbqptG345Bi/9yE5M1zQjSYY= -goa.design/goa/v3 v3.30.1-0.20260825000358-70a27fd82e81/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260825005549-6e7f0cbd9e6c h1:Vx1gpjJwT+dh+JYA2L7zHH9r1Y5nT/9KYQ4YnSA6l7Q= +goa.design/goa/v3 v3.30.1-0.20260825005549-6e7f0cbd9e6c/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= diff --git a/upload_download/go.mod b/upload_download/go.mod index 61228b683..4534da22d 100644 --- a/upload_download/go.mod +++ b/upload_download/go.mod @@ -2,7 +2,7 @@ module goa.design/examples/upload_download go 1.26.0 -require goa.design/goa/v3 v3.30.1-0.20260825000358-70a27fd82e81 +require goa.design/goa/v3 v3.30.1-0.20260825005549-6e7f0cbd9e6c require ( github.com/dimfeld/httppath v0.0.0-20170720192232-ee938bf73598 // indirect diff --git a/upload_download/go.sum b/upload_download/go.sum index 032a1d87f..96f08a63d 100644 --- a/upload_download/go.sum +++ b/upload_download/go.sum @@ -31,8 +31,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260825000358-70a27fd82e81 h1:LeU5jBnRZV7r/a56FAiGbqptG345Bi/9yE5M1zQjSYY= -goa.design/goa/v3 v3.30.1-0.20260825000358-70a27fd82e81/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260825005549-6e7f0cbd9e6c h1:Vx1gpjJwT+dh+JYA2L7zHH9r1Y5nT/9KYQ4YnSA6l7Q= +goa.design/goa/v3 v3.30.1-0.20260825005549-6e7f0cbd9e6c/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= From c6a7ebbcbccc287daea70c059991d993151c06e6 Mon Sep 17 00:00:00 2001 From: "Raphael (manual office deploy after cloud-state fix)" Date: Mon, 24 Aug 2026 19:25:08 -0700 Subject: [PATCH 06/28] chore: update examples to final Goa generator --- basic/go.mod | 2 +- basic/go.sum | 4 ++-- cellar/go.mod | 2 +- cellar/go.sum | 4 ++-- concerts/go.mod | 2 +- concerts/go.sum | 4 ++-- cookies/go.mod | 2 +- cookies/go.sum | 4 ++-- encodings/cbor/go.mod | 2 +- encodings/cbor/go.sum | 4 ++-- encodings/text/go.mod | 2 +- encodings/text/go.sum | 4 ++-- error/go.mod | 2 +- error/go.sum | 4 ++-- files/go.mod | 2 +- files/go.sum | 4 ++-- httpstatus/go.mod | 2 +- httpstatus/go.sum | 4 ++-- interceptors/go.mod | 2 +- interceptors/go.sum | 4 ++-- multipart/go.mod | 2 +- multipart/go.sum | 4 ++-- retry/go.mod | 2 +- retry/go.sum | 4 ++-- security/hierarchy/go.mod | 2 +- security/hierarchy/go.sum | 4 ++-- security/multiauth/go.mod | 2 +- security/multiauth/go.sum | 4 ++-- sse/go.mod | 2 +- sse/go.sum | 4 ++-- streaming/go.mod | 2 +- streaming/go.sum | 4 ++-- tracing/go.mod | 2 +- tracing/go.sum | 4 ++-- tus/go.mod | 2 +- tus/go.sum | 4 ++-- upload_download/go.mod | 2 +- upload_download/go.sum | 4 ++-- 38 files changed, 57 insertions(+), 57 deletions(-) diff --git a/basic/go.mod b/basic/go.mod index 5d237901c..188b39048 100644 --- a/basic/go.mod +++ b/basic/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( goa.design/clue v1.2.6 - goa.design/goa/v3 v3.30.1-0.20260825005549-6e7f0cbd9e6c + goa.design/goa/v3 v3.30.1-0.20260825014826-1b7182f77f9a google.golang.org/grpc v1.83.1 google.golang.org/protobuf v1.36.12 ) diff --git a/basic/go.sum b/basic/go.sum index e7892faae..bb11007fa 100644 --- a/basic/go.sum +++ b/basic/go.sum @@ -55,8 +55,8 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/clue v1.2.6 h1:ensyUkwlvEbNy8FuTGMldKuvaNouh8YoDY9QaE+EtYg= goa.design/clue v1.2.6/go.mod h1:Y4RS5o2k6MZiGk2PT3XbKyntjR2xkr8dYOKQ591dIDM= -goa.design/goa/v3 v3.30.1-0.20260825005549-6e7f0cbd9e6c h1:Vx1gpjJwT+dh+JYA2L7zHH9r1Y5nT/9KYQ4YnSA6l7Q= -goa.design/goa/v3 v3.30.1-0.20260825005549-6e7f0cbd9e6c/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260825014826-1b7182f77f9a h1:Liew9qCrjbMl9a+5WTXlLPYKaXcBRiXVSYRWAGlJvhc= +goa.design/goa/v3 v3.30.1-0.20260825014826-1b7182f77f9a/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/cellar/go.mod b/cellar/go.mod index 96765c97c..7e2a8d362 100644 --- a/cellar/go.mod +++ b/cellar/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( github.com/boltdb/bolt v1.3.1 - goa.design/goa/v3 v3.30.1-0.20260825005549-6e7f0cbd9e6c + goa.design/goa/v3 v3.30.1-0.20260825014826-1b7182f77f9a google.golang.org/grpc v1.83.1 google.golang.org/protobuf v1.36.12 ) diff --git a/cellar/go.sum b/cellar/go.sum index 5aa61c6e0..777216802 100644 --- a/cellar/go.sum +++ b/cellar/go.sum @@ -51,8 +51,8 @@ go.opentelemetry.io/otel/trace v1.44.0 h1:jxF5CsGYCe74MCRx2X4g7WsY/VBKRqqpNvXlX/ go.opentelemetry.io/otel/trace v1.44.0/go.mod h1:oLl1jrMQAVo6v3GAggN+1VH9VIz9iUSvW53sW1Q8PIE= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260825005549-6e7f0cbd9e6c h1:Vx1gpjJwT+dh+JYA2L7zHH9r1Y5nT/9KYQ4YnSA6l7Q= -goa.design/goa/v3 v3.30.1-0.20260825005549-6e7f0cbd9e6c/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260825014826-1b7182f77f9a h1:Liew9qCrjbMl9a+5WTXlLPYKaXcBRiXVSYRWAGlJvhc= +goa.design/goa/v3 v3.30.1-0.20260825014826-1b7182f77f9a/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/concerts/go.mod b/concerts/go.mod index d5c659738..88b39d6db 100644 --- a/concerts/go.mod +++ b/concerts/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( github.com/google/uuid v1.6.0 - goa.design/goa/v3 v3.30.1-0.20260825005549-6e7f0cbd9e6c + goa.design/goa/v3 v3.30.1-0.20260825014826-1b7182f77f9a ) require ( diff --git a/concerts/go.sum b/concerts/go.sum index 96f08a63d..0f7e4e3ab 100644 --- a/concerts/go.sum +++ b/concerts/go.sum @@ -31,8 +31,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260825005549-6e7f0cbd9e6c h1:Vx1gpjJwT+dh+JYA2L7zHH9r1Y5nT/9KYQ4YnSA6l7Q= -goa.design/goa/v3 v3.30.1-0.20260825005549-6e7f0cbd9e6c/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260825014826-1b7182f77f9a h1:Liew9qCrjbMl9a+5WTXlLPYKaXcBRiXVSYRWAGlJvhc= +goa.design/goa/v3 v3.30.1-0.20260825014826-1b7182f77f9a/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= diff --git a/cookies/go.mod b/cookies/go.mod index c13602d96..6e3796586 100644 --- a/cookies/go.mod +++ b/cookies/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( github.com/rs/xid v1.6.0 - goa.design/goa/v3 v3.30.1-0.20260825005549-6e7f0cbd9e6c + goa.design/goa/v3 v3.30.1-0.20260825014826-1b7182f77f9a ) require ( diff --git a/cookies/go.sum b/cookies/go.sum index 4ef0c3df5..b9cd03343 100644 --- a/cookies/go.sum +++ b/cookies/go.sum @@ -33,8 +33,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260825005549-6e7f0cbd9e6c h1:Vx1gpjJwT+dh+JYA2L7zHH9r1Y5nT/9KYQ4YnSA6l7Q= -goa.design/goa/v3 v3.30.1-0.20260825005549-6e7f0cbd9e6c/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260825014826-1b7182f77f9a h1:Liew9qCrjbMl9a+5WTXlLPYKaXcBRiXVSYRWAGlJvhc= +goa.design/goa/v3 v3.30.1-0.20260825014826-1b7182f77f9a/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= diff --git a/encodings/cbor/go.mod b/encodings/cbor/go.mod index 6b73208d1..784ebd44d 100644 --- a/encodings/cbor/go.mod +++ b/encodings/cbor/go.mod @@ -5,7 +5,7 @@ go 1.26.0 require ( github.com/fxamacker/cbor/v2 v2.9.2 goa.design/clue v1.2.6 - goa.design/goa/v3 v3.30.1-0.20260825005549-6e7f0cbd9e6c + goa.design/goa/v3 v3.30.1-0.20260825014826-1b7182f77f9a ) require ( diff --git a/encodings/cbor/go.sum b/encodings/cbor/go.sum index e33d02396..03e29050f 100644 --- a/encodings/cbor/go.sum +++ b/encodings/cbor/go.sum @@ -59,8 +59,8 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/clue v1.2.6 h1:ensyUkwlvEbNy8FuTGMldKuvaNouh8YoDY9QaE+EtYg= goa.design/clue v1.2.6/go.mod h1:Y4RS5o2k6MZiGk2PT3XbKyntjR2xkr8dYOKQ591dIDM= -goa.design/goa/v3 v3.30.1-0.20260825005549-6e7f0cbd9e6c h1:Vx1gpjJwT+dh+JYA2L7zHH9r1Y5nT/9KYQ4YnSA6l7Q= -goa.design/goa/v3 v3.30.1-0.20260825005549-6e7f0cbd9e6c/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260825014826-1b7182f77f9a h1:Liew9qCrjbMl9a+5WTXlLPYKaXcBRiXVSYRWAGlJvhc= +goa.design/goa/v3 v3.30.1-0.20260825014826-1b7182f77f9a/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/encodings/text/go.mod b/encodings/text/go.mod index ef143501e..8c5040d14 100644 --- a/encodings/text/go.mod +++ b/encodings/text/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( goa.design/clue v1.2.6 - goa.design/goa/v3 v3.30.1-0.20260825005549-6e7f0cbd9e6c + goa.design/goa/v3 v3.30.1-0.20260825014826-1b7182f77f9a ) require ( diff --git a/encodings/text/go.sum b/encodings/text/go.sum index e7892faae..bb11007fa 100644 --- a/encodings/text/go.sum +++ b/encodings/text/go.sum @@ -55,8 +55,8 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/clue v1.2.6 h1:ensyUkwlvEbNy8FuTGMldKuvaNouh8YoDY9QaE+EtYg= goa.design/clue v1.2.6/go.mod h1:Y4RS5o2k6MZiGk2PT3XbKyntjR2xkr8dYOKQ591dIDM= -goa.design/goa/v3 v3.30.1-0.20260825005549-6e7f0cbd9e6c h1:Vx1gpjJwT+dh+JYA2L7zHH9r1Y5nT/9KYQ4YnSA6l7Q= -goa.design/goa/v3 v3.30.1-0.20260825005549-6e7f0cbd9e6c/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260825014826-1b7182f77f9a h1:Liew9qCrjbMl9a+5WTXlLPYKaXcBRiXVSYRWAGlJvhc= +goa.design/goa/v3 v3.30.1-0.20260825014826-1b7182f77f9a/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/error/go.mod b/error/go.mod index 0f5a185d2..2ef8802a3 100644 --- a/error/go.mod +++ b/error/go.mod @@ -3,7 +3,7 @@ module goa.design/examples/error go 1.26.0 require ( - goa.design/goa/v3 v3.30.1-0.20260825005549-6e7f0cbd9e6c + goa.design/goa/v3 v3.30.1-0.20260825014826-1b7182f77f9a google.golang.org/genproto v0.0.0-20260810153831-ec0a7760b754 google.golang.org/grpc v1.83.1 google.golang.org/protobuf v1.36.12 diff --git a/error/go.sum b/error/go.sum index d7bcf0983..1fcc32fef 100644 --- a/error/go.sum +++ b/error/go.sum @@ -49,8 +49,8 @@ go.opentelemetry.io/otel/trace v1.44.0 h1:jxF5CsGYCe74MCRx2X4g7WsY/VBKRqqpNvXlX/ go.opentelemetry.io/otel/trace v1.44.0/go.mod h1:oLl1jrMQAVo6v3GAggN+1VH9VIz9iUSvW53sW1Q8PIE= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260825005549-6e7f0cbd9e6c h1:Vx1gpjJwT+dh+JYA2L7zHH9r1Y5nT/9KYQ4YnSA6l7Q= -goa.design/goa/v3 v3.30.1-0.20260825005549-6e7f0cbd9e6c/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260825014826-1b7182f77f9a h1:Liew9qCrjbMl9a+5WTXlLPYKaXcBRiXVSYRWAGlJvhc= +goa.design/goa/v3 v3.30.1-0.20260825014826-1b7182f77f9a/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/files/go.mod b/files/go.mod index fe0cc1eef..a656f78ac 100644 --- a/files/go.mod +++ b/files/go.mod @@ -2,7 +2,7 @@ module goa.design/examples/files go 1.26.0 -require goa.design/goa/v3 v3.30.1-0.20260825005549-6e7f0cbd9e6c +require goa.design/goa/v3 v3.30.1-0.20260825014826-1b7182f77f9a require ( github.com/dimfeld/httppath v0.0.0-20170720192232-ee938bf73598 // indirect diff --git a/files/go.sum b/files/go.sum index 96f08a63d..0f7e4e3ab 100644 --- a/files/go.sum +++ b/files/go.sum @@ -31,8 +31,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260825005549-6e7f0cbd9e6c h1:Vx1gpjJwT+dh+JYA2L7zHH9r1Y5nT/9KYQ4YnSA6l7Q= -goa.design/goa/v3 v3.30.1-0.20260825005549-6e7f0cbd9e6c/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260825014826-1b7182f77f9a h1:Liew9qCrjbMl9a+5WTXlLPYKaXcBRiXVSYRWAGlJvhc= +goa.design/goa/v3 v3.30.1-0.20260825014826-1b7182f77f9a/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= diff --git a/httpstatus/go.mod b/httpstatus/go.mod index b8c5f1b3d..db329f828 100644 --- a/httpstatus/go.mod +++ b/httpstatus/go.mod @@ -2,7 +2,7 @@ module goa.design/examples/httpstatus go 1.26.0 -require goa.design/goa/v3 v3.30.1-0.20260825005549-6e7f0cbd9e6c +require goa.design/goa/v3 v3.30.1-0.20260825014826-1b7182f77f9a require ( github.com/dimfeld/httppath v0.0.0-20170720192232-ee938bf73598 // indirect diff --git a/httpstatus/go.sum b/httpstatus/go.sum index 96f08a63d..0f7e4e3ab 100644 --- a/httpstatus/go.sum +++ b/httpstatus/go.sum @@ -31,8 +31,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260825005549-6e7f0cbd9e6c h1:Vx1gpjJwT+dh+JYA2L7zHH9r1Y5nT/9KYQ4YnSA6l7Q= -goa.design/goa/v3 v3.30.1-0.20260825005549-6e7f0cbd9e6c/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260825014826-1b7182f77f9a h1:Liew9qCrjbMl9a+5WTXlLPYKaXcBRiXVSYRWAGlJvhc= +goa.design/goa/v3 v3.30.1-0.20260825014826-1b7182f77f9a/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= diff --git a/interceptors/go.mod b/interceptors/go.mod index 3cd21f8e7..218e96e80 100644 --- a/interceptors/go.mod +++ b/interceptors/go.mod @@ -6,7 +6,7 @@ require ( github.com/google/uuid v1.6.0 github.com/gorilla/websocket v1.5.3 goa.design/clue v1.2.6 - goa.design/goa/v3 v3.30.1-0.20260825005549-6e7f0cbd9e6c + goa.design/goa/v3 v3.30.1-0.20260825014826-1b7182f77f9a google.golang.org/grpc v1.83.1 google.golang.org/protobuf v1.36.12 ) diff --git a/interceptors/go.sum b/interceptors/go.sum index e7892faae..bb11007fa 100644 --- a/interceptors/go.sum +++ b/interceptors/go.sum @@ -55,8 +55,8 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/clue v1.2.6 h1:ensyUkwlvEbNy8FuTGMldKuvaNouh8YoDY9QaE+EtYg= goa.design/clue v1.2.6/go.mod h1:Y4RS5o2k6MZiGk2PT3XbKyntjR2xkr8dYOKQ591dIDM= -goa.design/goa/v3 v3.30.1-0.20260825005549-6e7f0cbd9e6c h1:Vx1gpjJwT+dh+JYA2L7zHH9r1Y5nT/9KYQ4YnSA6l7Q= -goa.design/goa/v3 v3.30.1-0.20260825005549-6e7f0cbd9e6c/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260825014826-1b7182f77f9a h1:Liew9qCrjbMl9a+5WTXlLPYKaXcBRiXVSYRWAGlJvhc= +goa.design/goa/v3 v3.30.1-0.20260825014826-1b7182f77f9a/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/multipart/go.mod b/multipart/go.mod index 37297ad73..06f1ef515 100644 --- a/multipart/go.mod +++ b/multipart/go.mod @@ -2,7 +2,7 @@ module goa.design/examples/multipart go 1.26.0 -require goa.design/goa/v3 v3.30.1-0.20260825005549-6e7f0cbd9e6c +require goa.design/goa/v3 v3.30.1-0.20260825014826-1b7182f77f9a require ( github.com/dimfeld/httppath v0.0.0-20170720192232-ee938bf73598 // indirect diff --git a/multipart/go.sum b/multipart/go.sum index 96f08a63d..0f7e4e3ab 100644 --- a/multipart/go.sum +++ b/multipart/go.sum @@ -31,8 +31,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260825005549-6e7f0cbd9e6c h1:Vx1gpjJwT+dh+JYA2L7zHH9r1Y5nT/9KYQ4YnSA6l7Q= -goa.design/goa/v3 v3.30.1-0.20260825005549-6e7f0cbd9e6c/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260825014826-1b7182f77f9a h1:Liew9qCrjbMl9a+5WTXlLPYKaXcBRiXVSYRWAGlJvhc= +goa.design/goa/v3 v3.30.1-0.20260825014826-1b7182f77f9a/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= diff --git a/retry/go.mod b/retry/go.mod index 2974ef1a7..b78cf92cf 100644 --- a/retry/go.mod +++ b/retry/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( goa.design/clue v1.2.6 - goa.design/goa/v3 v3.30.1-0.20260825005549-6e7f0cbd9e6c + goa.design/goa/v3 v3.30.1-0.20260825014826-1b7182f77f9a google.golang.org/grpc v1.83.1 google.golang.org/protobuf v1.36.12 ) diff --git a/retry/go.sum b/retry/go.sum index 3779af7e7..8bc8ecdda 100644 --- a/retry/go.sum +++ b/retry/go.sum @@ -52,8 +52,8 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/clue v1.2.6 h1:ensyUkwlvEbNy8FuTGMldKuvaNouh8YoDY9QaE+EtYg= goa.design/clue v1.2.6/go.mod h1:Y4RS5o2k6MZiGk2PT3XbKyntjR2xkr8dYOKQ591dIDM= -goa.design/goa/v3 v3.30.1-0.20260825005549-6e7f0cbd9e6c h1:Vx1gpjJwT+dh+JYA2L7zHH9r1Y5nT/9KYQ4YnSA6l7Q= -goa.design/goa/v3 v3.30.1-0.20260825005549-6e7f0cbd9e6c/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260825014826-1b7182f77f9a h1:Liew9qCrjbMl9a+5WTXlLPYKaXcBRiXVSYRWAGlJvhc= +goa.design/goa/v3 v3.30.1-0.20260825014826-1b7182f77f9a/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/security/hierarchy/go.mod b/security/hierarchy/go.mod index 54b2430a2..10821c063 100644 --- a/security/hierarchy/go.mod +++ b/security/hierarchy/go.mod @@ -2,7 +2,7 @@ module goa.design/examples/security/hierarchy go 1.26.0 -require goa.design/goa/v3 v3.30.1-0.20260825005549-6e7f0cbd9e6c +require goa.design/goa/v3 v3.30.1-0.20260825014826-1b7182f77f9a require ( github.com/dimfeld/httppath v0.0.0-20170720192232-ee938bf73598 // indirect diff --git a/security/hierarchy/go.sum b/security/hierarchy/go.sum index 96f08a63d..0f7e4e3ab 100644 --- a/security/hierarchy/go.sum +++ b/security/hierarchy/go.sum @@ -31,8 +31,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260825005549-6e7f0cbd9e6c h1:Vx1gpjJwT+dh+JYA2L7zHH9r1Y5nT/9KYQ4YnSA6l7Q= -goa.design/goa/v3 v3.30.1-0.20260825005549-6e7f0cbd9e6c/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260825014826-1b7182f77f9a h1:Liew9qCrjbMl9a+5WTXlLPYKaXcBRiXVSYRWAGlJvhc= +goa.design/goa/v3 v3.30.1-0.20260825014826-1b7182f77f9a/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= diff --git a/security/multiauth/go.mod b/security/multiauth/go.mod index 6dca4f54b..6b63638a2 100644 --- a/security/multiauth/go.mod +++ b/security/multiauth/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( github.com/golang-jwt/jwt/v4 v4.5.2 - goa.design/goa/v3 v3.30.1-0.20260825005549-6e7f0cbd9e6c + goa.design/goa/v3 v3.30.1-0.20260825014826-1b7182f77f9a google.golang.org/grpc v1.83.1 google.golang.org/protobuf v1.36.12 ) diff --git a/security/multiauth/go.sum b/security/multiauth/go.sum index df644752b..ff036136e 100644 --- a/security/multiauth/go.sum +++ b/security/multiauth/go.sum @@ -51,8 +51,8 @@ go.opentelemetry.io/otel/trace v1.44.0 h1:jxF5CsGYCe74MCRx2X4g7WsY/VBKRqqpNvXlX/ go.opentelemetry.io/otel/trace v1.44.0/go.mod h1:oLl1jrMQAVo6v3GAggN+1VH9VIz9iUSvW53sW1Q8PIE= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260825005549-6e7f0cbd9e6c h1:Vx1gpjJwT+dh+JYA2L7zHH9r1Y5nT/9KYQ4YnSA6l7Q= -goa.design/goa/v3 v3.30.1-0.20260825005549-6e7f0cbd9e6c/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260825014826-1b7182f77f9a h1:Liew9qCrjbMl9a+5WTXlLPYKaXcBRiXVSYRWAGlJvhc= +goa.design/goa/v3 v3.30.1-0.20260825014826-1b7182f77f9a/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/sse/go.mod b/sse/go.mod index d089e49b4..80e2bda55 100644 --- a/sse/go.mod +++ b/sse/go.mod @@ -5,7 +5,7 @@ go 1.26.0 require ( github.com/shirou/gopsutil/v3 v3.24.5 goa.design/clue v1.2.6 - goa.design/goa/v3 v3.30.1-0.20260825005549-6e7f0cbd9e6c + goa.design/goa/v3 v3.30.1-0.20260825014826-1b7182f77f9a ) require ( diff --git a/sse/go.sum b/sse/go.sum index fe85d66cf..4d072788e 100644 --- a/sse/go.sum +++ b/sse/go.sum @@ -74,8 +74,8 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/clue v1.2.6 h1:ensyUkwlvEbNy8FuTGMldKuvaNouh8YoDY9QaE+EtYg= goa.design/clue v1.2.6/go.mod h1:Y4RS5o2k6MZiGk2PT3XbKyntjR2xkr8dYOKQ591dIDM= -goa.design/goa/v3 v3.30.1-0.20260825005549-6e7f0cbd9e6c h1:Vx1gpjJwT+dh+JYA2L7zHH9r1Y5nT/9KYQ4YnSA6l7Q= -goa.design/goa/v3 v3.30.1-0.20260825005549-6e7f0cbd9e6c/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260825014826-1b7182f77f9a h1:Liew9qCrjbMl9a+5WTXlLPYKaXcBRiXVSYRWAGlJvhc= +goa.design/goa/v3 v3.30.1-0.20260825014826-1b7182f77f9a/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/streaming/go.mod b/streaming/go.mod index 2b1cee9e5..8c182b854 100644 --- a/streaming/go.mod +++ b/streaming/go.mod @@ -5,7 +5,7 @@ go 1.26.0 require ( github.com/golang-jwt/jwt/v4 v4.5.2 github.com/gorilla/websocket v1.5.3 - goa.design/goa/v3 v3.30.1-0.20260825005549-6e7f0cbd9e6c + goa.design/goa/v3 v3.30.1-0.20260825014826-1b7182f77f9a google.golang.org/grpc v1.83.1 google.golang.org/protobuf v1.36.12 ) diff --git a/streaming/go.sum b/streaming/go.sum index df644752b..ff036136e 100644 --- a/streaming/go.sum +++ b/streaming/go.sum @@ -51,8 +51,8 @@ go.opentelemetry.io/otel/trace v1.44.0 h1:jxF5CsGYCe74MCRx2X4g7WsY/VBKRqqpNvXlX/ go.opentelemetry.io/otel/trace v1.44.0/go.mod h1:oLl1jrMQAVo6v3GAggN+1VH9VIz9iUSvW53sW1Q8PIE= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260825005549-6e7f0cbd9e6c h1:Vx1gpjJwT+dh+JYA2L7zHH9r1Y5nT/9KYQ4YnSA6l7Q= -goa.design/goa/v3 v3.30.1-0.20260825005549-6e7f0cbd9e6c/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260825014826-1b7182f77f9a h1:Liew9qCrjbMl9a+5WTXlLPYKaXcBRiXVSYRWAGlJvhc= +goa.design/goa/v3 v3.30.1-0.20260825014826-1b7182f77f9a/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/tracing/go.mod b/tracing/go.mod index 6830312c9..a85c90116 100644 --- a/tracing/go.mod +++ b/tracing/go.mod @@ -5,7 +5,7 @@ go 1.26.0 require ( github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 goa.design/examples/basic v0.0.0-20260810182504-f834f43955c5 - goa.design/goa/v3 v3.30.1-0.20260825005549-6e7f0cbd9e6c + goa.design/goa/v3 v3.30.1-0.20260825014826-1b7182f77f9a google.golang.org/grpc v1.83.1 ) diff --git a/tracing/go.sum b/tracing/go.sum index 07ec0e6cb..e0a0c08c1 100644 --- a/tracing/go.sum +++ b/tracing/go.sum @@ -81,8 +81,8 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/examples/basic v0.0.0-20260810182504-f834f43955c5 h1:SRSrUaLTTdA4bUXb8+zA5MDhMEx8YaP+Knd+pddBcrg= goa.design/examples/basic v0.0.0-20260810182504-f834f43955c5/go.mod h1:XRziIzNcLb9fk7ZrfiHx5FIeAj+orJ4fkzLG0nXpiAo= -goa.design/goa/v3 v3.30.1-0.20260825005549-6e7f0cbd9e6c h1:Vx1gpjJwT+dh+JYA2L7zHH9r1Y5nT/9KYQ4YnSA6l7Q= -goa.design/goa/v3 v3.30.1-0.20260825005549-6e7f0cbd9e6c/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260825014826-1b7182f77f9a h1:Liew9qCrjbMl9a+5WTXlLPYKaXcBRiXVSYRWAGlJvhc= +goa.design/goa/v3 v3.30.1-0.20260825014826-1b7182f77f9a/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= diff --git a/tus/go.mod b/tus/go.mod index 2039c5006..b47360ac3 100644 --- a/tus/go.mod +++ b/tus/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( github.com/rs/xid v1.6.0 - goa.design/goa/v3 v3.30.1-0.20260825005549-6e7f0cbd9e6c + goa.design/goa/v3 v3.30.1-0.20260825014826-1b7182f77f9a ) require ( diff --git a/tus/go.sum b/tus/go.sum index 4ef0c3df5..b9cd03343 100644 --- a/tus/go.sum +++ b/tus/go.sum @@ -33,8 +33,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260825005549-6e7f0cbd9e6c h1:Vx1gpjJwT+dh+JYA2L7zHH9r1Y5nT/9KYQ4YnSA6l7Q= -goa.design/goa/v3 v3.30.1-0.20260825005549-6e7f0cbd9e6c/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260825014826-1b7182f77f9a h1:Liew9qCrjbMl9a+5WTXlLPYKaXcBRiXVSYRWAGlJvhc= +goa.design/goa/v3 v3.30.1-0.20260825014826-1b7182f77f9a/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= diff --git a/upload_download/go.mod b/upload_download/go.mod index 4534da22d..0dba4f012 100644 --- a/upload_download/go.mod +++ b/upload_download/go.mod @@ -2,7 +2,7 @@ module goa.design/examples/upload_download go 1.26.0 -require goa.design/goa/v3 v3.30.1-0.20260825005549-6e7f0cbd9e6c +require goa.design/goa/v3 v3.30.1-0.20260825014826-1b7182f77f9a require ( github.com/dimfeld/httppath v0.0.0-20170720192232-ee938bf73598 // indirect diff --git a/upload_download/go.sum b/upload_download/go.sum index 96f08a63d..0f7e4e3ab 100644 --- a/upload_download/go.sum +++ b/upload_download/go.sum @@ -31,8 +31,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260825005549-6e7f0cbd9e6c h1:Vx1gpjJwT+dh+JYA2L7zHH9r1Y5nT/9KYQ4YnSA6l7Q= -goa.design/goa/v3 v3.30.1-0.20260825005549-6e7f0cbd9e6c/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260825014826-1b7182f77f9a h1:Liew9qCrjbMl9a+5WTXlLPYKaXcBRiXVSYRWAGlJvhc= +goa.design/goa/v3 v3.30.1-0.20260825014826-1b7182f77f9a/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= From 084ef6243e2f969be79ed8718d951146b0b9e6af Mon Sep 17 00:00:00 2001 From: "Raphael (manual office deploy after cloud-state fix)" Date: Mon, 24 Aug 2026 21:06:53 -0700 Subject: [PATCH 07/28] chore: verify examples with corrected Goa --- basic/go.mod | 2 +- basic/go.sum | 4 ++-- cellar/go.mod | 2 +- cellar/go.sum | 4 ++-- concerts/go.mod | 2 +- concerts/go.sum | 4 ++-- cookies/go.mod | 2 +- cookies/go.sum | 4 ++-- encodings/cbor/go.mod | 2 +- encodings/cbor/go.sum | 4 ++-- encodings/text/go.mod | 2 +- encodings/text/go.sum | 4 ++-- error/go.mod | 2 +- error/go.sum | 4 ++-- files/go.mod | 2 +- files/go.sum | 4 ++-- httpstatus/go.mod | 2 +- httpstatus/go.sum | 4 ++-- interceptors/go.mod | 2 +- interceptors/go.sum | 4 ++-- multipart/go.mod | 2 +- multipart/go.sum | 4 ++-- retry/go.mod | 2 +- retry/go.sum | 4 ++-- security/hierarchy/go.mod | 2 +- security/hierarchy/go.sum | 4 ++-- security/multiauth/go.mod | 2 +- security/multiauth/go.sum | 4 ++-- sse/go.mod | 2 +- sse/go.sum | 4 ++-- streaming/go.mod | 2 +- streaming/go.sum | 4 ++-- tracing/go.mod | 2 +- tracing/go.sum | 4 ++-- tus/go.mod | 2 +- tus/go.sum | 4 ++-- upload_download/go.mod | 2 +- upload_download/go.sum | 4 ++-- 38 files changed, 57 insertions(+), 57 deletions(-) diff --git a/basic/go.mod b/basic/go.mod index 188b39048..ad8900e3a 100644 --- a/basic/go.mod +++ b/basic/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( goa.design/clue v1.2.6 - goa.design/goa/v3 v3.30.1-0.20260825014826-1b7182f77f9a + goa.design/goa/v3 v3.30.1-0.20260825034953-833f95e1fdc8 google.golang.org/grpc v1.83.1 google.golang.org/protobuf v1.36.12 ) diff --git a/basic/go.sum b/basic/go.sum index bb11007fa..9782e926c 100644 --- a/basic/go.sum +++ b/basic/go.sum @@ -55,8 +55,8 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/clue v1.2.6 h1:ensyUkwlvEbNy8FuTGMldKuvaNouh8YoDY9QaE+EtYg= goa.design/clue v1.2.6/go.mod h1:Y4RS5o2k6MZiGk2PT3XbKyntjR2xkr8dYOKQ591dIDM= -goa.design/goa/v3 v3.30.1-0.20260825014826-1b7182f77f9a h1:Liew9qCrjbMl9a+5WTXlLPYKaXcBRiXVSYRWAGlJvhc= -goa.design/goa/v3 v3.30.1-0.20260825014826-1b7182f77f9a/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260825034953-833f95e1fdc8 h1:CjoyylexZ1s2rePbKaePU2Q+VwWwYjvhXXwovd6x4Hc= +goa.design/goa/v3 v3.30.1-0.20260825034953-833f95e1fdc8/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/cellar/go.mod b/cellar/go.mod index 7e2a8d362..ac0f6eaf6 100644 --- a/cellar/go.mod +++ b/cellar/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( github.com/boltdb/bolt v1.3.1 - goa.design/goa/v3 v3.30.1-0.20260825014826-1b7182f77f9a + goa.design/goa/v3 v3.30.1-0.20260825034953-833f95e1fdc8 google.golang.org/grpc v1.83.1 google.golang.org/protobuf v1.36.12 ) diff --git a/cellar/go.sum b/cellar/go.sum index 777216802..51c3cad4a 100644 --- a/cellar/go.sum +++ b/cellar/go.sum @@ -51,8 +51,8 @@ go.opentelemetry.io/otel/trace v1.44.0 h1:jxF5CsGYCe74MCRx2X4g7WsY/VBKRqqpNvXlX/ go.opentelemetry.io/otel/trace v1.44.0/go.mod h1:oLl1jrMQAVo6v3GAggN+1VH9VIz9iUSvW53sW1Q8PIE= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260825014826-1b7182f77f9a h1:Liew9qCrjbMl9a+5WTXlLPYKaXcBRiXVSYRWAGlJvhc= -goa.design/goa/v3 v3.30.1-0.20260825014826-1b7182f77f9a/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260825034953-833f95e1fdc8 h1:CjoyylexZ1s2rePbKaePU2Q+VwWwYjvhXXwovd6x4Hc= +goa.design/goa/v3 v3.30.1-0.20260825034953-833f95e1fdc8/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/concerts/go.mod b/concerts/go.mod index 88b39d6db..32eef1ccc 100644 --- a/concerts/go.mod +++ b/concerts/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( github.com/google/uuid v1.6.0 - goa.design/goa/v3 v3.30.1-0.20260825014826-1b7182f77f9a + goa.design/goa/v3 v3.30.1-0.20260825034953-833f95e1fdc8 ) require ( diff --git a/concerts/go.sum b/concerts/go.sum index 0f7e4e3ab..b0fedd60d 100644 --- a/concerts/go.sum +++ b/concerts/go.sum @@ -31,8 +31,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260825014826-1b7182f77f9a h1:Liew9qCrjbMl9a+5WTXlLPYKaXcBRiXVSYRWAGlJvhc= -goa.design/goa/v3 v3.30.1-0.20260825014826-1b7182f77f9a/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260825034953-833f95e1fdc8 h1:CjoyylexZ1s2rePbKaePU2Q+VwWwYjvhXXwovd6x4Hc= +goa.design/goa/v3 v3.30.1-0.20260825034953-833f95e1fdc8/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= diff --git a/cookies/go.mod b/cookies/go.mod index 6e3796586..6d3f742dd 100644 --- a/cookies/go.mod +++ b/cookies/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( github.com/rs/xid v1.6.0 - goa.design/goa/v3 v3.30.1-0.20260825014826-1b7182f77f9a + goa.design/goa/v3 v3.30.1-0.20260825034953-833f95e1fdc8 ) require ( diff --git a/cookies/go.sum b/cookies/go.sum index b9cd03343..488ca01d5 100644 --- a/cookies/go.sum +++ b/cookies/go.sum @@ -33,8 +33,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260825014826-1b7182f77f9a h1:Liew9qCrjbMl9a+5WTXlLPYKaXcBRiXVSYRWAGlJvhc= -goa.design/goa/v3 v3.30.1-0.20260825014826-1b7182f77f9a/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260825034953-833f95e1fdc8 h1:CjoyylexZ1s2rePbKaePU2Q+VwWwYjvhXXwovd6x4Hc= +goa.design/goa/v3 v3.30.1-0.20260825034953-833f95e1fdc8/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= diff --git a/encodings/cbor/go.mod b/encodings/cbor/go.mod index 784ebd44d..6ae68f584 100644 --- a/encodings/cbor/go.mod +++ b/encodings/cbor/go.mod @@ -5,7 +5,7 @@ go 1.26.0 require ( github.com/fxamacker/cbor/v2 v2.9.2 goa.design/clue v1.2.6 - goa.design/goa/v3 v3.30.1-0.20260825014826-1b7182f77f9a + goa.design/goa/v3 v3.30.1-0.20260825034953-833f95e1fdc8 ) require ( diff --git a/encodings/cbor/go.sum b/encodings/cbor/go.sum index 03e29050f..aade422d6 100644 --- a/encodings/cbor/go.sum +++ b/encodings/cbor/go.sum @@ -59,8 +59,8 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/clue v1.2.6 h1:ensyUkwlvEbNy8FuTGMldKuvaNouh8YoDY9QaE+EtYg= goa.design/clue v1.2.6/go.mod h1:Y4RS5o2k6MZiGk2PT3XbKyntjR2xkr8dYOKQ591dIDM= -goa.design/goa/v3 v3.30.1-0.20260825014826-1b7182f77f9a h1:Liew9qCrjbMl9a+5WTXlLPYKaXcBRiXVSYRWAGlJvhc= -goa.design/goa/v3 v3.30.1-0.20260825014826-1b7182f77f9a/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260825034953-833f95e1fdc8 h1:CjoyylexZ1s2rePbKaePU2Q+VwWwYjvhXXwovd6x4Hc= +goa.design/goa/v3 v3.30.1-0.20260825034953-833f95e1fdc8/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/encodings/text/go.mod b/encodings/text/go.mod index 8c5040d14..ebd36e8b4 100644 --- a/encodings/text/go.mod +++ b/encodings/text/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( goa.design/clue v1.2.6 - goa.design/goa/v3 v3.30.1-0.20260825014826-1b7182f77f9a + goa.design/goa/v3 v3.30.1-0.20260825034953-833f95e1fdc8 ) require ( diff --git a/encodings/text/go.sum b/encodings/text/go.sum index bb11007fa..9782e926c 100644 --- a/encodings/text/go.sum +++ b/encodings/text/go.sum @@ -55,8 +55,8 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/clue v1.2.6 h1:ensyUkwlvEbNy8FuTGMldKuvaNouh8YoDY9QaE+EtYg= goa.design/clue v1.2.6/go.mod h1:Y4RS5o2k6MZiGk2PT3XbKyntjR2xkr8dYOKQ591dIDM= -goa.design/goa/v3 v3.30.1-0.20260825014826-1b7182f77f9a h1:Liew9qCrjbMl9a+5WTXlLPYKaXcBRiXVSYRWAGlJvhc= -goa.design/goa/v3 v3.30.1-0.20260825014826-1b7182f77f9a/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260825034953-833f95e1fdc8 h1:CjoyylexZ1s2rePbKaePU2Q+VwWwYjvhXXwovd6x4Hc= +goa.design/goa/v3 v3.30.1-0.20260825034953-833f95e1fdc8/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/error/go.mod b/error/go.mod index 2ef8802a3..91777aa79 100644 --- a/error/go.mod +++ b/error/go.mod @@ -3,7 +3,7 @@ module goa.design/examples/error go 1.26.0 require ( - goa.design/goa/v3 v3.30.1-0.20260825014826-1b7182f77f9a + goa.design/goa/v3 v3.30.1-0.20260825034953-833f95e1fdc8 google.golang.org/genproto v0.0.0-20260810153831-ec0a7760b754 google.golang.org/grpc v1.83.1 google.golang.org/protobuf v1.36.12 diff --git a/error/go.sum b/error/go.sum index 1fcc32fef..740068c37 100644 --- a/error/go.sum +++ b/error/go.sum @@ -49,8 +49,8 @@ go.opentelemetry.io/otel/trace v1.44.0 h1:jxF5CsGYCe74MCRx2X4g7WsY/VBKRqqpNvXlX/ go.opentelemetry.io/otel/trace v1.44.0/go.mod h1:oLl1jrMQAVo6v3GAggN+1VH9VIz9iUSvW53sW1Q8PIE= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260825014826-1b7182f77f9a h1:Liew9qCrjbMl9a+5WTXlLPYKaXcBRiXVSYRWAGlJvhc= -goa.design/goa/v3 v3.30.1-0.20260825014826-1b7182f77f9a/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260825034953-833f95e1fdc8 h1:CjoyylexZ1s2rePbKaePU2Q+VwWwYjvhXXwovd6x4Hc= +goa.design/goa/v3 v3.30.1-0.20260825034953-833f95e1fdc8/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/files/go.mod b/files/go.mod index a656f78ac..87976d763 100644 --- a/files/go.mod +++ b/files/go.mod @@ -2,7 +2,7 @@ module goa.design/examples/files go 1.26.0 -require goa.design/goa/v3 v3.30.1-0.20260825014826-1b7182f77f9a +require goa.design/goa/v3 v3.30.1-0.20260825034953-833f95e1fdc8 require ( github.com/dimfeld/httppath v0.0.0-20170720192232-ee938bf73598 // indirect diff --git a/files/go.sum b/files/go.sum index 0f7e4e3ab..b0fedd60d 100644 --- a/files/go.sum +++ b/files/go.sum @@ -31,8 +31,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260825014826-1b7182f77f9a h1:Liew9qCrjbMl9a+5WTXlLPYKaXcBRiXVSYRWAGlJvhc= -goa.design/goa/v3 v3.30.1-0.20260825014826-1b7182f77f9a/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260825034953-833f95e1fdc8 h1:CjoyylexZ1s2rePbKaePU2Q+VwWwYjvhXXwovd6x4Hc= +goa.design/goa/v3 v3.30.1-0.20260825034953-833f95e1fdc8/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= diff --git a/httpstatus/go.mod b/httpstatus/go.mod index db329f828..f1b829ae6 100644 --- a/httpstatus/go.mod +++ b/httpstatus/go.mod @@ -2,7 +2,7 @@ module goa.design/examples/httpstatus go 1.26.0 -require goa.design/goa/v3 v3.30.1-0.20260825014826-1b7182f77f9a +require goa.design/goa/v3 v3.30.1-0.20260825034953-833f95e1fdc8 require ( github.com/dimfeld/httppath v0.0.0-20170720192232-ee938bf73598 // indirect diff --git a/httpstatus/go.sum b/httpstatus/go.sum index 0f7e4e3ab..b0fedd60d 100644 --- a/httpstatus/go.sum +++ b/httpstatus/go.sum @@ -31,8 +31,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260825014826-1b7182f77f9a h1:Liew9qCrjbMl9a+5WTXlLPYKaXcBRiXVSYRWAGlJvhc= -goa.design/goa/v3 v3.30.1-0.20260825014826-1b7182f77f9a/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260825034953-833f95e1fdc8 h1:CjoyylexZ1s2rePbKaePU2Q+VwWwYjvhXXwovd6x4Hc= +goa.design/goa/v3 v3.30.1-0.20260825034953-833f95e1fdc8/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= diff --git a/interceptors/go.mod b/interceptors/go.mod index 218e96e80..5e9a12e00 100644 --- a/interceptors/go.mod +++ b/interceptors/go.mod @@ -6,7 +6,7 @@ require ( github.com/google/uuid v1.6.0 github.com/gorilla/websocket v1.5.3 goa.design/clue v1.2.6 - goa.design/goa/v3 v3.30.1-0.20260825014826-1b7182f77f9a + goa.design/goa/v3 v3.30.1-0.20260825034953-833f95e1fdc8 google.golang.org/grpc v1.83.1 google.golang.org/protobuf v1.36.12 ) diff --git a/interceptors/go.sum b/interceptors/go.sum index bb11007fa..9782e926c 100644 --- a/interceptors/go.sum +++ b/interceptors/go.sum @@ -55,8 +55,8 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/clue v1.2.6 h1:ensyUkwlvEbNy8FuTGMldKuvaNouh8YoDY9QaE+EtYg= goa.design/clue v1.2.6/go.mod h1:Y4RS5o2k6MZiGk2PT3XbKyntjR2xkr8dYOKQ591dIDM= -goa.design/goa/v3 v3.30.1-0.20260825014826-1b7182f77f9a h1:Liew9qCrjbMl9a+5WTXlLPYKaXcBRiXVSYRWAGlJvhc= -goa.design/goa/v3 v3.30.1-0.20260825014826-1b7182f77f9a/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260825034953-833f95e1fdc8 h1:CjoyylexZ1s2rePbKaePU2Q+VwWwYjvhXXwovd6x4Hc= +goa.design/goa/v3 v3.30.1-0.20260825034953-833f95e1fdc8/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/multipart/go.mod b/multipart/go.mod index 06f1ef515..2a0859089 100644 --- a/multipart/go.mod +++ b/multipart/go.mod @@ -2,7 +2,7 @@ module goa.design/examples/multipart go 1.26.0 -require goa.design/goa/v3 v3.30.1-0.20260825014826-1b7182f77f9a +require goa.design/goa/v3 v3.30.1-0.20260825034953-833f95e1fdc8 require ( github.com/dimfeld/httppath v0.0.0-20170720192232-ee938bf73598 // indirect diff --git a/multipart/go.sum b/multipart/go.sum index 0f7e4e3ab..b0fedd60d 100644 --- a/multipart/go.sum +++ b/multipart/go.sum @@ -31,8 +31,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260825014826-1b7182f77f9a h1:Liew9qCrjbMl9a+5WTXlLPYKaXcBRiXVSYRWAGlJvhc= -goa.design/goa/v3 v3.30.1-0.20260825014826-1b7182f77f9a/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260825034953-833f95e1fdc8 h1:CjoyylexZ1s2rePbKaePU2Q+VwWwYjvhXXwovd6x4Hc= +goa.design/goa/v3 v3.30.1-0.20260825034953-833f95e1fdc8/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= diff --git a/retry/go.mod b/retry/go.mod index b78cf92cf..f0a5023d8 100644 --- a/retry/go.mod +++ b/retry/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( goa.design/clue v1.2.6 - goa.design/goa/v3 v3.30.1-0.20260825014826-1b7182f77f9a + goa.design/goa/v3 v3.30.1-0.20260825034953-833f95e1fdc8 google.golang.org/grpc v1.83.1 google.golang.org/protobuf v1.36.12 ) diff --git a/retry/go.sum b/retry/go.sum index 8bc8ecdda..7b4db8f62 100644 --- a/retry/go.sum +++ b/retry/go.sum @@ -52,8 +52,8 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/clue v1.2.6 h1:ensyUkwlvEbNy8FuTGMldKuvaNouh8YoDY9QaE+EtYg= goa.design/clue v1.2.6/go.mod h1:Y4RS5o2k6MZiGk2PT3XbKyntjR2xkr8dYOKQ591dIDM= -goa.design/goa/v3 v3.30.1-0.20260825014826-1b7182f77f9a h1:Liew9qCrjbMl9a+5WTXlLPYKaXcBRiXVSYRWAGlJvhc= -goa.design/goa/v3 v3.30.1-0.20260825014826-1b7182f77f9a/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260825034953-833f95e1fdc8 h1:CjoyylexZ1s2rePbKaePU2Q+VwWwYjvhXXwovd6x4Hc= +goa.design/goa/v3 v3.30.1-0.20260825034953-833f95e1fdc8/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/security/hierarchy/go.mod b/security/hierarchy/go.mod index 10821c063..5c5f82373 100644 --- a/security/hierarchy/go.mod +++ b/security/hierarchy/go.mod @@ -2,7 +2,7 @@ module goa.design/examples/security/hierarchy go 1.26.0 -require goa.design/goa/v3 v3.30.1-0.20260825014826-1b7182f77f9a +require goa.design/goa/v3 v3.30.1-0.20260825034953-833f95e1fdc8 require ( github.com/dimfeld/httppath v0.0.0-20170720192232-ee938bf73598 // indirect diff --git a/security/hierarchy/go.sum b/security/hierarchy/go.sum index 0f7e4e3ab..b0fedd60d 100644 --- a/security/hierarchy/go.sum +++ b/security/hierarchy/go.sum @@ -31,8 +31,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260825014826-1b7182f77f9a h1:Liew9qCrjbMl9a+5WTXlLPYKaXcBRiXVSYRWAGlJvhc= -goa.design/goa/v3 v3.30.1-0.20260825014826-1b7182f77f9a/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260825034953-833f95e1fdc8 h1:CjoyylexZ1s2rePbKaePU2Q+VwWwYjvhXXwovd6x4Hc= +goa.design/goa/v3 v3.30.1-0.20260825034953-833f95e1fdc8/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= diff --git a/security/multiauth/go.mod b/security/multiauth/go.mod index 6b63638a2..b8b122b7f 100644 --- a/security/multiauth/go.mod +++ b/security/multiauth/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( github.com/golang-jwt/jwt/v4 v4.5.2 - goa.design/goa/v3 v3.30.1-0.20260825014826-1b7182f77f9a + goa.design/goa/v3 v3.30.1-0.20260825034953-833f95e1fdc8 google.golang.org/grpc v1.83.1 google.golang.org/protobuf v1.36.12 ) diff --git a/security/multiauth/go.sum b/security/multiauth/go.sum index ff036136e..f857c1e1a 100644 --- a/security/multiauth/go.sum +++ b/security/multiauth/go.sum @@ -51,8 +51,8 @@ go.opentelemetry.io/otel/trace v1.44.0 h1:jxF5CsGYCe74MCRx2X4g7WsY/VBKRqqpNvXlX/ go.opentelemetry.io/otel/trace v1.44.0/go.mod h1:oLl1jrMQAVo6v3GAggN+1VH9VIz9iUSvW53sW1Q8PIE= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260825014826-1b7182f77f9a h1:Liew9qCrjbMl9a+5WTXlLPYKaXcBRiXVSYRWAGlJvhc= -goa.design/goa/v3 v3.30.1-0.20260825014826-1b7182f77f9a/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260825034953-833f95e1fdc8 h1:CjoyylexZ1s2rePbKaePU2Q+VwWwYjvhXXwovd6x4Hc= +goa.design/goa/v3 v3.30.1-0.20260825034953-833f95e1fdc8/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/sse/go.mod b/sse/go.mod index 80e2bda55..f07427af1 100644 --- a/sse/go.mod +++ b/sse/go.mod @@ -5,7 +5,7 @@ go 1.26.0 require ( github.com/shirou/gopsutil/v3 v3.24.5 goa.design/clue v1.2.6 - goa.design/goa/v3 v3.30.1-0.20260825014826-1b7182f77f9a + goa.design/goa/v3 v3.30.1-0.20260825034953-833f95e1fdc8 ) require ( diff --git a/sse/go.sum b/sse/go.sum index 4d072788e..59b3e4067 100644 --- a/sse/go.sum +++ b/sse/go.sum @@ -74,8 +74,8 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/clue v1.2.6 h1:ensyUkwlvEbNy8FuTGMldKuvaNouh8YoDY9QaE+EtYg= goa.design/clue v1.2.6/go.mod h1:Y4RS5o2k6MZiGk2PT3XbKyntjR2xkr8dYOKQ591dIDM= -goa.design/goa/v3 v3.30.1-0.20260825014826-1b7182f77f9a h1:Liew9qCrjbMl9a+5WTXlLPYKaXcBRiXVSYRWAGlJvhc= -goa.design/goa/v3 v3.30.1-0.20260825014826-1b7182f77f9a/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260825034953-833f95e1fdc8 h1:CjoyylexZ1s2rePbKaePU2Q+VwWwYjvhXXwovd6x4Hc= +goa.design/goa/v3 v3.30.1-0.20260825034953-833f95e1fdc8/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/streaming/go.mod b/streaming/go.mod index 8c182b854..577f9d15a 100644 --- a/streaming/go.mod +++ b/streaming/go.mod @@ -5,7 +5,7 @@ go 1.26.0 require ( github.com/golang-jwt/jwt/v4 v4.5.2 github.com/gorilla/websocket v1.5.3 - goa.design/goa/v3 v3.30.1-0.20260825014826-1b7182f77f9a + goa.design/goa/v3 v3.30.1-0.20260825034953-833f95e1fdc8 google.golang.org/grpc v1.83.1 google.golang.org/protobuf v1.36.12 ) diff --git a/streaming/go.sum b/streaming/go.sum index ff036136e..f857c1e1a 100644 --- a/streaming/go.sum +++ b/streaming/go.sum @@ -51,8 +51,8 @@ go.opentelemetry.io/otel/trace v1.44.0 h1:jxF5CsGYCe74MCRx2X4g7WsY/VBKRqqpNvXlX/ go.opentelemetry.io/otel/trace v1.44.0/go.mod h1:oLl1jrMQAVo6v3GAggN+1VH9VIz9iUSvW53sW1Q8PIE= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260825014826-1b7182f77f9a h1:Liew9qCrjbMl9a+5WTXlLPYKaXcBRiXVSYRWAGlJvhc= -goa.design/goa/v3 v3.30.1-0.20260825014826-1b7182f77f9a/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260825034953-833f95e1fdc8 h1:CjoyylexZ1s2rePbKaePU2Q+VwWwYjvhXXwovd6x4Hc= +goa.design/goa/v3 v3.30.1-0.20260825034953-833f95e1fdc8/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/tracing/go.mod b/tracing/go.mod index a85c90116..14e1840e7 100644 --- a/tracing/go.mod +++ b/tracing/go.mod @@ -5,7 +5,7 @@ go 1.26.0 require ( github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 goa.design/examples/basic v0.0.0-20260810182504-f834f43955c5 - goa.design/goa/v3 v3.30.1-0.20260825014826-1b7182f77f9a + goa.design/goa/v3 v3.30.1-0.20260825034953-833f95e1fdc8 google.golang.org/grpc v1.83.1 ) diff --git a/tracing/go.sum b/tracing/go.sum index e0a0c08c1..065079242 100644 --- a/tracing/go.sum +++ b/tracing/go.sum @@ -81,8 +81,8 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/examples/basic v0.0.0-20260810182504-f834f43955c5 h1:SRSrUaLTTdA4bUXb8+zA5MDhMEx8YaP+Knd+pddBcrg= goa.design/examples/basic v0.0.0-20260810182504-f834f43955c5/go.mod h1:XRziIzNcLb9fk7ZrfiHx5FIeAj+orJ4fkzLG0nXpiAo= -goa.design/goa/v3 v3.30.1-0.20260825014826-1b7182f77f9a h1:Liew9qCrjbMl9a+5WTXlLPYKaXcBRiXVSYRWAGlJvhc= -goa.design/goa/v3 v3.30.1-0.20260825014826-1b7182f77f9a/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260825034953-833f95e1fdc8 h1:CjoyylexZ1s2rePbKaePU2Q+VwWwYjvhXXwovd6x4Hc= +goa.design/goa/v3 v3.30.1-0.20260825034953-833f95e1fdc8/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= diff --git a/tus/go.mod b/tus/go.mod index b47360ac3..17392dc33 100644 --- a/tus/go.mod +++ b/tus/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( github.com/rs/xid v1.6.0 - goa.design/goa/v3 v3.30.1-0.20260825014826-1b7182f77f9a + goa.design/goa/v3 v3.30.1-0.20260825034953-833f95e1fdc8 ) require ( diff --git a/tus/go.sum b/tus/go.sum index b9cd03343..488ca01d5 100644 --- a/tus/go.sum +++ b/tus/go.sum @@ -33,8 +33,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260825014826-1b7182f77f9a h1:Liew9qCrjbMl9a+5WTXlLPYKaXcBRiXVSYRWAGlJvhc= -goa.design/goa/v3 v3.30.1-0.20260825014826-1b7182f77f9a/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260825034953-833f95e1fdc8 h1:CjoyylexZ1s2rePbKaePU2Q+VwWwYjvhXXwovd6x4Hc= +goa.design/goa/v3 v3.30.1-0.20260825034953-833f95e1fdc8/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= diff --git a/upload_download/go.mod b/upload_download/go.mod index 0dba4f012..d8e460414 100644 --- a/upload_download/go.mod +++ b/upload_download/go.mod @@ -2,7 +2,7 @@ module goa.design/examples/upload_download go 1.26.0 -require goa.design/goa/v3 v3.30.1-0.20260825014826-1b7182f77f9a +require goa.design/goa/v3 v3.30.1-0.20260825034953-833f95e1fdc8 require ( github.com/dimfeld/httppath v0.0.0-20170720192232-ee938bf73598 // indirect diff --git a/upload_download/go.sum b/upload_download/go.sum index 0f7e4e3ab..b0fedd60d 100644 --- a/upload_download/go.sum +++ b/upload_download/go.sum @@ -31,8 +31,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260825014826-1b7182f77f9a h1:Liew9qCrjbMl9a+5WTXlLPYKaXcBRiXVSYRWAGlJvhc= -goa.design/goa/v3 v3.30.1-0.20260825014826-1b7182f77f9a/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260825034953-833f95e1fdc8 h1:CjoyylexZ1s2rePbKaePU2Q+VwWwYjvhXXwovd6x4Hc= +goa.design/goa/v3 v3.30.1-0.20260825034953-833f95e1fdc8/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= From b4fa823d3f8341e98c1d4dbf19ec625bf973f2ca Mon Sep 17 00:00:00 2001 From: Raphael Date: Tue, 25 Aug 2026 05:19:33 -0700 Subject: [PATCH 08/28] chore: verify examples with finalized Goa generator --- basic/gen/grpc/calc/client/cli.go | 6 +- basic/gen/grpc/cli/calc/cli.go | 25 ++- basic/gen/http/calc/client/cli.go | 12 +- basic/gen/http/cli/calc/cli.go | 28 ++- basic/go.mod | 2 +- basic/go.sum | 4 +- cellar/gen/grpc/cli/cellar/cli.go | 58 ++++-- cellar/gen/grpc/sommelier/client/cli.go | 6 +- cellar/gen/grpc/storage/client/cli.go | 44 ++-- cellar/gen/http/cli/cellar/cli.go | 64 ++++-- cellar/gen/http/sommelier/client/cli.go | 7 +- .../http/sommelier/client/encode_decode.go | 4 + cellar/gen/http/sommelier/client/types.go | 69 ++++++ cellar/gen/http/storage/client/cli.go | 48 +++-- .../gen/http/storage/client/encode_decode.go | 8 + cellar/gen/http/storage/client/types.go | 140 +++++++++++++ cellar/go.mod | 2 +- cellar/go.sum | 4 +- concerts/gen/http/cli/concerts/cli.go | 43 +++- concerts/gen/http/concerts/client/cli.go | 87 ++++---- concerts/go.mod | 2 +- concerts/go.sum | 4 +- cookies/gen/http/cli/session/cli.go | 30 ++- cookies/gen/http/session/client/cli.go | 14 +- cookies/go.mod | 2 +- cookies/go.sum | 4 +- encodings/cbor/gen/http/cli/concat/cli.go | 28 ++- encodings/cbor/gen/http/concat/client/cli.go | 14 +- encodings/cbor/go.mod | 2 +- encodings/cbor/go.sum | 4 +- encodings/text/gen/http/cli/text/cli.go | 52 +++-- encodings/text/gen/http/text/client/cli.go | 50 +++-- encodings/text/go.mod | 2 +- encodings/text/go.sum | 4 +- error/gen/grpc/calc/client/cli.go | 6 +- error/gen/grpc/cli/calc/cli.go | 25 ++- error/gen/http/calc/client/cli.go | 7 +- error/gen/http/cli/calc/cli.go | 25 ++- error/go.mod | 2 +- error/go.sum | 4 +- files/go.mod | 2 +- files/go.sum | 4 +- httpstatus/design/design.go | 1 - httpstatus/gen/hello/service.go | 2 +- httpstatus/gen/hello/views/view.go | 2 +- httpstatus/gen/http/cli/hello/cli.go | 25 ++- httpstatus/gen/http/hello/client/cli.go | 9 +- .../gen/http/hello/client/encode_decode.go | 12 ++ httpstatus/gen/http/hello/client/types.go | 37 +++- httpstatus/gen/http/hello/server/types.go | 6 +- httpstatus/go.mod | 2 +- httpstatus/go.sum | 4 +- interceptors/gen/grpc/cli/interceptors/cli.go | 25 ++- .../gen/grpc/interceptors/client/cli.go | 6 +- interceptors/gen/http/cli/interceptors/cli.go | 53 +++-- .../gen/http/interceptors/client/cli.go | 51 +++-- interceptors/go.mod | 2 +- interceptors/go.sum | 4 +- multipart/gen/http/cli/resume/cli.go | 25 ++- multipart/gen/http/resume/client/cli.go | 7 +- .../gen/http/resume/client/encode_decode.go | 4 + multipart/gen/http/resume/client/types.go | 48 +++++ multipart/go.mod | 2 +- multipart/go.sum | 4 +- retry/gen/grpc/cli/retry/cli.go | 25 ++- retry/gen/grpc/retry/client/cli.go | 6 +- retry/gen/http/cli/retry/cli.go | 25 ++- retry/gen/http/retry/client/cli.go | 9 +- retry/go.mod | 2 +- retry/go.sum | 4 +- .../gen/http/api_key_service/client/cli.go | 16 +- .../hierarchy/gen/http/cli/hierarchy/cli.go | 38 +++- .../gen/http/default_service/client/cli.go | 14 +- security/hierarchy/go.mod | 2 +- security/hierarchy/go.sum | 4 +- .../multiauth/gen/grpc/cli/multi_auth/cli.go | 55 +++-- .../gen/grpc/secured_service/client/cli.go | 48 +++-- .../multiauth/gen/http/cli/multi_auth/cli.go | 61 ++++-- .../gen/http/secured_service/client/cli.go | 57 +++-- security/multiauth/go.mod | 2 +- security/multiauth/go.sum | 4 +- sse/gen/http/monitor/client/client.go | 5 +- sse/gen/http/monitor/client/sse.go | 197 ++++++++++-------- sse/gen/http/monitor/server/server.go | 4 + sse/gen/http/monitor/server/sse.go | 59 ++++-- sse/go.mod | 2 +- sse/go.sum | 4 +- streaming/gen/grpc/chatter/client/cli.go | 57 +++-- streaming/gen/grpc/cli/chatter/cli.go | 56 +++-- streaming/gen/http/chatter/client/cli.go | 57 +++-- .../gen/http/chatter/client/encode_decode.go | 8 + streaming/gen/http/chatter/client/types.go | 43 ++++ streaming/gen/http/cli/chatter/cli.go | 56 +++-- streaming/go.mod | 2 +- streaming/go.sum | 4 +- tracing/go.mod | 2 +- tracing/go.sum | 4 +- tus/gen/http/cli/upload/cli.go | 91 ++++++-- tus/gen/http/tus/client/cli.go | 77 ++++--- tus/go.mod | 2 +- tus/go.sum | 4 +- .../gen/http/cli/upload_download/cli.go | 42 +++- upload_download/gen/http/updown/client/cli.go | 19 +- upload_download/go.mod | 2 +- upload_download/go.sum | 4 +- 105 files changed, 1854 insertions(+), 598 deletions(-) diff --git a/basic/gen/grpc/calc/client/cli.go b/basic/gen/grpc/calc/client/cli.go index 151544097..02869c80f 100644 --- a/basic/gen/grpc/calc/client/cli.go +++ b/basic/gen/grpc/calc/client/cli.go @@ -17,12 +17,12 @@ import ( // BuildMultiplyPayload builds the payload for the calc multiply endpoint from // CLI flags. -func BuildMultiplyPayload(calcMultiplyMessage string) (*calc.MultiplyPayload, error) { +func BuildMultiplyPayload(calcMultiplyMessage *string) (*calc.MultiplyPayload, error) { var err error var message calcpb.MultiplyRequest { - if calcMultiplyMessage != "" { - err = protojson.Unmarshal([]byte(calcMultiplyMessage), &message) + if calcMultiplyMessage != nil { + err = protojson.Unmarshal([]byte(*calcMultiplyMessage), &message) if err != nil { return nil, fmt.Errorf("invalid JSON for message, \nerror: %s, \nexample of valid JSON:\n%s", err, "'{\n \"a\": 7630570414871587529,\n \"b\": 2968728213815611862\n }'") } diff --git a/basic/gen/grpc/cli/calc/cli.go b/basic/gen/grpc/cli/calc/cli.go index 2e2378b9e..bc6f012f4 100644 --- a/basic/gen/grpc/cli/calc/cli.go +++ b/basic/gen/grpc/cli/calc/cli.go @@ -32,6 +32,25 @@ func UsageExamples() string { "" } +// cliStringFlag keeps an omitted command-line flag distinct from an explicitly empty flag. +type cliStringFlag struct { + value *string +} + +// String returns the flag text shown by the standard flag package. +func (f *cliStringFlag) String() string { + if f.value == nil { + return "" + } + return *f.value +} + +// Set records that the user supplied the flag, even when value is empty. +func (f *cliStringFlag) Set(value string) error { + f.value = &value + return nil +} + // ParseEndpoint returns the endpoint and payload as specified on the command // line. func ParseEndpoint( @@ -42,8 +61,10 @@ func ParseEndpoint( calcFlags = flag.NewFlagSet("calc", flag.ContinueOnError) calcMultiplyFlags = flag.NewFlagSet("multiply", flag.ExitOnError) - calcMultiplyMessageFlag = calcMultiplyFlags.String("message", "", "") + calcMultiplyMessageFlag = new(cliStringFlag) ) + calcMultiplyFlags.Var(calcMultiplyMessageFlag, "message", "") + calcFlags.Usage = calcUsage calcMultiplyFlags.Usage = calcMultiplyUsage @@ -111,7 +132,7 @@ func ParseEndpoint( switch epn { case "multiply": endpoint = c.Multiply() - data, err = calcc.BuildMultiplyPayload(*calcMultiplyMessageFlag) + data, err = calcc.BuildMultiplyPayload(calcMultiplyMessageFlag.value) } } } diff --git a/basic/gen/http/calc/client/cli.go b/basic/gen/http/calc/client/cli.go index e3acf7d73..ff43fcb23 100644 --- a/basic/gen/http/calc/client/cli.go +++ b/basic/gen/http/calc/client/cli.go @@ -16,12 +16,15 @@ import ( // BuildMultiplyPayload builds the payload for the calc multiply endpoint from // CLI flags. -func BuildMultiplyPayload(calcMultiplyA string, calcMultiplyB string) (*calc.MultiplyPayload, error) { +func BuildMultiplyPayload(calcMultiplyA *string, calcMultiplyB *string) (*calc.MultiplyPayload, error) { var err error var a int { + if calcMultiplyA == nil { + return nil, fmt.Errorf("missing required flag --a") + } var v int64 - v, err = strconv.ParseInt(calcMultiplyA, 10, strconv.IntSize) + v, err = strconv.ParseInt(*calcMultiplyA, 10, strconv.IntSize) a = int(v) if err != nil { return nil, fmt.Errorf("invalid value for a, must be INT") @@ -29,8 +32,11 @@ func BuildMultiplyPayload(calcMultiplyA string, calcMultiplyB string) (*calc.Mul } var b int { + if calcMultiplyB == nil { + return nil, fmt.Errorf("missing required flag --b") + } var v int64 - v, err = strconv.ParseInt(calcMultiplyB, 10, strconv.IntSize) + v, err = strconv.ParseInt(*calcMultiplyB, 10, strconv.IntSize) b = int(v) if err != nil { return nil, fmt.Errorf("invalid value for b, must be INT") diff --git a/basic/gen/http/cli/calc/cli.go b/basic/gen/http/cli/calc/cli.go index 330293e74..711bbbdeb 100644 --- a/basic/gen/http/cli/calc/cli.go +++ b/basic/gen/http/cli/calc/cli.go @@ -33,6 +33,25 @@ func UsageExamples() string { "" } +// cliStringFlag keeps an omitted command-line flag distinct from an explicitly empty flag. +type cliStringFlag struct { + value *string +} + +// String returns the flag text shown by the standard flag package. +func (f *cliStringFlag) String() string { + if f.value == nil { + return "" + } + return *f.value +} + +// Set records that the user supplied the flag, even when value is empty. +func (f *cliStringFlag) Set(value string) error { + f.value = &value + return nil +} + // ParseEndpoint returns the endpoint and payload as specified on the command // line. func ParseEndpoint( @@ -46,9 +65,12 @@ func ParseEndpoint( calcFlags = flag.NewFlagSet("calc", flag.ContinueOnError) calcMultiplyFlags = flag.NewFlagSet("multiply", flag.ExitOnError) - calcMultiplyAFlag = calcMultiplyFlags.String("a", "REQUIRED", "Left operand") - calcMultiplyBFlag = calcMultiplyFlags.String("b", "REQUIRED", "Right operand") + calcMultiplyAFlag = new(cliStringFlag) + calcMultiplyBFlag = new(cliStringFlag) ) + calcMultiplyFlags.Var(calcMultiplyAFlag, "a", "Left operand") + calcMultiplyFlags.Var(calcMultiplyBFlag, "b", "Right operand") + calcFlags.Usage = calcUsage calcMultiplyFlags.Usage = calcMultiplyUsage @@ -116,7 +138,7 @@ func ParseEndpoint( switch epn { case "multiply": endpoint = c.Multiply() - data, err = calcc.BuildMultiplyPayload(*calcMultiplyAFlag, *calcMultiplyBFlag) + data, err = calcc.BuildMultiplyPayload(calcMultiplyAFlag.value, calcMultiplyBFlag.value) } } } diff --git a/basic/go.mod b/basic/go.mod index ad8900e3a..cfaa476bd 100644 --- a/basic/go.mod +++ b/basic/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( goa.design/clue v1.2.6 - goa.design/goa/v3 v3.30.1-0.20260825034953-833f95e1fdc8 + goa.design/goa/v3 v3.30.1-0.20260825121239-93fbcbe975c8 google.golang.org/grpc v1.83.1 google.golang.org/protobuf v1.36.12 ) diff --git a/basic/go.sum b/basic/go.sum index 9782e926c..5cb877461 100644 --- a/basic/go.sum +++ b/basic/go.sum @@ -55,8 +55,8 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/clue v1.2.6 h1:ensyUkwlvEbNy8FuTGMldKuvaNouh8YoDY9QaE+EtYg= goa.design/clue v1.2.6/go.mod h1:Y4RS5o2k6MZiGk2PT3XbKyntjR2xkr8dYOKQ591dIDM= -goa.design/goa/v3 v3.30.1-0.20260825034953-833f95e1fdc8 h1:CjoyylexZ1s2rePbKaePU2Q+VwWwYjvhXXwovd6x4Hc= -goa.design/goa/v3 v3.30.1-0.20260825034953-833f95e1fdc8/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260825121239-93fbcbe975c8 h1:MwRPnes61LS7Sa+TLAK/7zCCMZ3gmlcusA06NkuF+F0= +goa.design/goa/v3 v3.30.1-0.20260825121239-93fbcbe975c8/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/cellar/gen/grpc/cli/cellar/cli.go b/cellar/gen/grpc/cli/cellar/cli.go index 5b13274e9..6efc623f3 100644 --- a/cellar/gen/grpc/cli/cellar/cli.go +++ b/cellar/gen/grpc/cli/cellar/cli.go @@ -35,6 +35,25 @@ func UsageExamples() string { "" } +// cliStringFlag keeps an omitted command-line flag distinct from an explicitly empty flag. +type cliStringFlag struct { + value *string +} + +// String returns the flag text shown by the standard flag package. +func (f *cliStringFlag) String() string { + if f.value == nil { + return "" + } + return *f.value +} + +// Set records that the user supplied the flag, even when value is empty. +func (f *cliStringFlag) Set(value string) error { + f.value = &value + return nil +} + // ParseEndpoint returns the endpoint and payload as specified on the command // line. func ParseEndpoint( @@ -45,31 +64,40 @@ func ParseEndpoint( sommelierFlags = flag.NewFlagSet("sommelier", flag.ContinueOnError) sommelierPickFlags = flag.NewFlagSet("pick", flag.ExitOnError) - sommelierPickMessageFlag = sommelierPickFlags.String("message", "", "") + sommelierPickMessageFlag = new(cliStringFlag) storageFlags = flag.NewFlagSet("storage", flag.ContinueOnError) storageListFlags = flag.NewFlagSet("list", flag.ExitOnError) storageShowFlags = flag.NewFlagSet("show", flag.ExitOnError) - storageShowMessageFlag = storageShowFlags.String("message", "", "") - storageShowViewFlag = storageShowFlags.String("view", "", "") + storageShowMessageFlag = new(cliStringFlag) + storageShowViewFlag = new(cliStringFlag) storageAddFlags = flag.NewFlagSet("add", flag.ExitOnError) - storageAddMessageFlag = storageAddFlags.String("message", "", "") + storageAddMessageFlag = new(cliStringFlag) storageRemoveFlags = flag.NewFlagSet("remove", flag.ExitOnError) - storageRemoveMessageFlag = storageRemoveFlags.String("message", "", "") + storageRemoveMessageFlag = new(cliStringFlag) storageRateFlags = flag.NewFlagSet("rate", flag.ExitOnError) - storageRateMessageFlag = storageRateFlags.String("message", "", "") + storageRateMessageFlag = new(cliStringFlag) storageMultiAddFlags = flag.NewFlagSet("multi-add", flag.ExitOnError) - storageMultiAddMessageFlag = storageMultiAddFlags.String("message", "", "") + storageMultiAddMessageFlag = new(cliStringFlag) storageMultiUpdateFlags = flag.NewFlagSet("multi-update", flag.ExitOnError) - storageMultiUpdateMessageFlag = storageMultiUpdateFlags.String("message", "", "") + storageMultiUpdateMessageFlag = new(cliStringFlag) ) + sommelierPickFlags.Var(sommelierPickMessageFlag, "message", "") + storageShowFlags.Var(storageShowMessageFlag, "message", "") + storageShowFlags.Var(storageShowViewFlag, "view", "") + storageAddFlags.Var(storageAddMessageFlag, "message", "") + storageRemoveFlags.Var(storageRemoveMessageFlag, "message", "") + storageRateFlags.Var(storageRateMessageFlag, "message", "") + storageMultiAddFlags.Var(storageMultiAddMessageFlag, "message", "") + storageMultiUpdateFlags.Var(storageMultiUpdateMessageFlag, "message", "") + sommelierFlags.Usage = sommelierUsage sommelierPickFlags.Usage = sommelierPickUsage @@ -173,7 +201,7 @@ func ParseEndpoint( switch epn { case "pick": endpoint = c.Pick() - data, err = sommelierc.BuildPickPayload(*sommelierPickMessageFlag) + data, err = sommelierc.BuildPickPayload(sommelierPickMessageFlag.value) } case "storage": c := storagec.NewClient(cc, opts...) @@ -182,22 +210,22 @@ func ParseEndpoint( endpoint = c.List() case "show": endpoint = c.Show() - data, err = storagec.BuildShowPayload(*storageShowMessageFlag, *storageShowViewFlag) + data, err = storagec.BuildShowPayload(storageShowMessageFlag.value, storageShowViewFlag.value) case "add": endpoint = c.Add() - data, err = storagec.BuildAddPayload(*storageAddMessageFlag) + data, err = storagec.BuildAddPayload(storageAddMessageFlag.value) case "remove": endpoint = c.Remove() - data, err = storagec.BuildRemovePayload(*storageRemoveMessageFlag) + data, err = storagec.BuildRemovePayload(storageRemoveMessageFlag.value) case "rate": endpoint = c.Rate() - data, err = storagec.BuildRatePayload(*storageRateMessageFlag) + data, err = storagec.BuildRatePayload(storageRateMessageFlag.value) case "multi-add": endpoint = c.MultiAdd() - data, err = storagec.BuildMultiAddPayload(*storageMultiAddMessageFlag) + data, err = storagec.BuildMultiAddPayload(storageMultiAddMessageFlag.value) case "multi-update": endpoint = c.MultiUpdate() - data, err = storagec.BuildMultiUpdatePayload(*storageMultiUpdateMessageFlag) + data, err = storagec.BuildMultiUpdatePayload(storageMultiUpdateMessageFlag.value) } } } diff --git a/cellar/gen/grpc/sommelier/client/cli.go b/cellar/gen/grpc/sommelier/client/cli.go index dddc96809..413fb24d7 100644 --- a/cellar/gen/grpc/sommelier/client/cli.go +++ b/cellar/gen/grpc/sommelier/client/cli.go @@ -17,12 +17,12 @@ import ( // BuildPickPayload builds the payload for the sommelier pick endpoint from CLI // flags. -func BuildPickPayload(sommelierPickMessage string) (*sommelier.Criteria, error) { +func BuildPickPayload(sommelierPickMessage *string) (*sommelier.Criteria, error) { var err error var message sommelierpb.PickRequest { - if sommelierPickMessage != "" { - err = protojson.Unmarshal([]byte(sommelierPickMessage), &message) + if sommelierPickMessage != nil { + err = protojson.Unmarshal([]byte(*sommelierPickMessage), &message) if err != nil { return nil, fmt.Errorf("invalid JSON for message, \nerror: %s, \nexample of valid JSON:\n%s", err, "'{\n \"name\": \"Blue\\'s Cuvee\",\n \"varietal\": [\n \"pinot noir\",\n \"merlot\",\n \"cabernet franc\"\n ],\n \"winery\": \"longoria\"\n }'") } diff --git a/cellar/gen/grpc/storage/client/cli.go b/cellar/gen/grpc/storage/client/cli.go index 2eb8462ab..132ca0eb5 100644 --- a/cellar/gen/grpc/storage/client/cli.go +++ b/cellar/gen/grpc/storage/client/cli.go @@ -18,12 +18,12 @@ import ( // BuildShowPayload builds the payload for the storage show endpoint from CLI // flags. -func BuildShowPayload(storageShowMessage string, storageShowView string) (*storage.ShowPayload, error) { +func BuildShowPayload(storageShowMessage *string, storageShowView *string) (*storage.ShowPayload, error) { var err error var message storagepb.ShowRequest { - if storageShowMessage != "" { - err = protojson.Unmarshal([]byte(storageShowMessage), &message) + if storageShowMessage != nil { + err = protojson.Unmarshal([]byte(*storageShowMessage), &message) if err != nil { return nil, fmt.Errorf("invalid JSON for message, \nerror: %s, \nexample of valid JSON:\n%s", err, "'{\n \"id\": \"Neque voluptas molestias.\"\n }'") } @@ -31,10 +31,10 @@ func BuildShowPayload(storageShowMessage string, storageShowView string) (*stora } var view *string { - if storageShowView != "" { - view = &storageShowView - if !(storageShowView == "default" || storageShowView == "tiny") { - err = goa.MergeErrors(err, goa.InvalidEnumValueError("view", storageShowView, []any{"default", "tiny"})) + if storageShowView != nil { + view = storageShowView + if !(*storageShowView == "default" || *storageShowView == "tiny") { + err = goa.MergeErrors(err, goa.InvalidEnumValueError("view", *storageShowView, []any{"default", "tiny"})) } if err != nil { return nil, err @@ -55,12 +55,12 @@ func BuildShowPayload(storageShowMessage string, storageShowView string) (*stora // BuildAddPayload builds the payload for the storage add endpoint from CLI // flags. -func BuildAddPayload(storageAddMessage string) (*storage.Bottle, error) { +func BuildAddPayload(storageAddMessage *string) (*storage.Bottle, error) { var err error var message storagepb.AddRequest { - if storageAddMessage != "" { - err = protojson.Unmarshal([]byte(storageAddMessage), &message) + if storageAddMessage != nil { + err = protojson.Unmarshal([]byte(*storageAddMessage), &message) if err != nil { return nil, fmt.Errorf("invalid JSON for message, \nerror: %s, \nexample of valid JSON:\n%s", err, "'{\n \"composition\": [\n {\n \"percentage\": 8,\n \"varietal\": \"Syrah\"\n },\n {\n \"percentage\": 8,\n \"varietal\": \"Syrah\"\n }\n ],\n \"description\": \"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah\",\n \"name\": \"Blue\\'s Cuvee\",\n \"rating\": 2,\n \"vintage\": 1918,\n \"winery\": {\n \"country\": \"USA\",\n \"name\": \"Longoria\",\n \"region\": \"Central Coast, California\",\n \"url\": \"http://www.longoriawine.com/\"\n }\n }'") } @@ -94,12 +94,12 @@ func BuildAddPayload(storageAddMessage string) (*storage.Bottle, error) { // BuildRemovePayload builds the payload for the storage remove endpoint from // CLI flags. -func BuildRemovePayload(storageRemoveMessage string) (*storage.RemovePayload, error) { +func BuildRemovePayload(storageRemoveMessage *string) (*storage.RemovePayload, error) { var err error var message storagepb.RemoveRequest { - if storageRemoveMessage != "" { - err = protojson.Unmarshal([]byte(storageRemoveMessage), &message) + if storageRemoveMessage != nil { + err = protojson.Unmarshal([]byte(*storageRemoveMessage), &message) if err != nil { return nil, fmt.Errorf("invalid JSON for message, \nerror: %s, \nexample of valid JSON:\n%s", err, "'{\n \"id\": \"Consectetur quaerat neque sed.\"\n }'") } @@ -118,12 +118,12 @@ func BuildRemovePayload(storageRemoveMessage string) (*storage.RemovePayload, er // BuildRatePayload builds the payload for the storage rate endpoint from CLI // flags. -func BuildRatePayload(storageRateMessage string) (map[uint32][]string, error) { +func BuildRatePayload(storageRateMessage *string) (map[uint32][]string, error) { var err error var message storagepb.RateRequest { - if storageRateMessage != "" { - err = protojson.Unmarshal([]byte(storageRateMessage), &message) + if storageRateMessage != nil { + err = protojson.Unmarshal([]byte(*storageRateMessage), &message) if err != nil { return nil, fmt.Errorf("invalid JSON for message, \nerror: %s, \nexample of valid JSON:\n%s", err, "'{\n \"field\": {\n \"3188487350\": {\n \"field\": [\n \"Sed quibusdam quidem.\",\n \"Dolore ratione libero.\"\n ]\n },\n \"507886676\": {\n \"field\": [\n \"Sed quibusdam quidem.\",\n \"Dolore ratione libero.\"\n ]\n },\n \"890945719\": {\n \"field\": [\n \"Sed quibusdam quidem.\",\n \"Dolore ratione libero.\"\n ]\n }\n }\n }'") } @@ -146,12 +146,12 @@ func BuildRatePayload(storageRateMessage string) (map[uint32][]string, error) { // BuildMultiAddPayload builds the payload for the storage multi_add endpoint // from CLI flags. -func BuildMultiAddPayload(storageMultiAddMessage string) ([]*storage.Bottle, error) { +func BuildMultiAddPayload(storageMultiAddMessage *string) ([]*storage.Bottle, error) { var err error var message storagepb.MultiAddRequest { - if storageMultiAddMessage != "" { - err = protojson.Unmarshal([]byte(storageMultiAddMessage), &message) + if storageMultiAddMessage != nil { + err = protojson.Unmarshal([]byte(*storageMultiAddMessage), &message) if err != nil { return nil, fmt.Errorf("invalid JSON for message, \nerror: %s, \nexample of valid JSON:\n%s", err, "'{\n \"field\": [\n {\n \"composition\": [\n {\n \"percentage\": 8,\n \"varietal\": \"Syrah\"\n },\n {\n \"percentage\": 8,\n \"varietal\": \"Syrah\"\n },\n {\n \"percentage\": 8,\n \"varietal\": \"Syrah\"\n }\n ],\n \"description\": \"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah\",\n \"name\": \"Blue\\'s Cuvee\",\n \"rating\": 3,\n \"vintage\": 2003,\n \"winery\": {\n \"country\": \"USA\",\n \"name\": \"Longoria\",\n \"region\": \"Central Coast, California\",\n \"url\": \"http://www.longoriawine.com/\"\n }\n },\n {\n \"composition\": [\n {\n \"percentage\": 8,\n \"varietal\": \"Syrah\"\n },\n {\n \"percentage\": 8,\n \"varietal\": \"Syrah\"\n },\n {\n \"percentage\": 8,\n \"varietal\": \"Syrah\"\n }\n ],\n \"description\": \"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah\",\n \"name\": \"Blue\\'s Cuvee\",\n \"rating\": 3,\n \"vintage\": 2003,\n \"winery\": {\n \"country\": \"USA\",\n \"name\": \"Longoria\",\n \"region\": \"Central Coast, California\",\n \"url\": \"http://www.longoriawine.com/\"\n }\n }\n ]\n }'") } @@ -187,12 +187,12 @@ func BuildMultiAddPayload(storageMultiAddMessage string) ([]*storage.Bottle, err // BuildMultiUpdatePayload builds the payload for the storage multi_update // endpoint from CLI flags. -func BuildMultiUpdatePayload(storageMultiUpdateMessage string) (*storage.MultiUpdatePayload, error) { +func BuildMultiUpdatePayload(storageMultiUpdateMessage *string) (*storage.MultiUpdatePayload, error) { var err error var message storagepb.MultiUpdateRequest { - if storageMultiUpdateMessage != "" { - err = protojson.Unmarshal([]byte(storageMultiUpdateMessage), &message) + if storageMultiUpdateMessage != nil { + err = protojson.Unmarshal([]byte(*storageMultiUpdateMessage), &message) if err != nil { return nil, fmt.Errorf("invalid JSON for message, \nerror: %s, \nexample of valid JSON:\n%s", err, "'{\n \"bottles\": [\n {\n \"composition\": [\n {\n \"percentage\": 8,\n \"varietal\": \"Syrah\"\n },\n {\n \"percentage\": 8,\n \"varietal\": \"Syrah\"\n },\n {\n \"percentage\": 8,\n \"varietal\": \"Syrah\"\n }\n ],\n \"description\": \"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah\",\n \"name\": \"Blue\\'s Cuvee\",\n \"rating\": 3,\n \"vintage\": 2003,\n \"winery\": {\n \"country\": \"USA\",\n \"name\": \"Longoria\",\n \"region\": \"Central Coast, California\",\n \"url\": \"http://www.longoriawine.com/\"\n }\n },\n {\n \"composition\": [\n {\n \"percentage\": 8,\n \"varietal\": \"Syrah\"\n },\n {\n \"percentage\": 8,\n \"varietal\": \"Syrah\"\n },\n {\n \"percentage\": 8,\n \"varietal\": \"Syrah\"\n }\n ],\n \"description\": \"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah\",\n \"name\": \"Blue\\'s Cuvee\",\n \"rating\": 3,\n \"vintage\": 2003,\n \"winery\": {\n \"country\": \"USA\",\n \"name\": \"Longoria\",\n \"region\": \"Central Coast, California\",\n \"url\": \"http://www.longoriawine.com/\"\n }\n }\n ],\n \"ids\": [\n \"Nihil voluptatibus aut mollitia ipsam.\",\n \"Qui optio non voluptate rem adipisci soluta.\",\n \"Omnis corporis quod veritatis temporibus dolores.\",\n \"Dolores voluptatem sunt architecto consequatur non.\"\n ]\n }'") } diff --git a/cellar/gen/http/cli/cellar/cli.go b/cellar/gen/http/cli/cellar/cli.go index ea4fb4c6f..650e82400 100644 --- a/cellar/gen/http/cli/cellar/cli.go +++ b/cellar/gen/http/cli/cellar/cli.go @@ -37,6 +37,25 @@ func UsageExamples() string { "" } +// cliStringFlag keeps an omitted command-line flag distinct from an explicitly empty flag. +type cliStringFlag struct { + value *string +} + +// String returns the flag text shown by the standard flag package. +func (f *cliStringFlag) String() string { + if f.value == nil { + return "" + } + return *f.value +} + +// Set records that the user supplied the flag, even when value is empty. +func (f *cliStringFlag) Set(value string) error { + f.value = &value + return nil +} + // ParseEndpoint returns the endpoint and payload as specified on the command // line. func ParseEndpoint( @@ -52,32 +71,42 @@ func ParseEndpoint( sommelierFlags = flag.NewFlagSet("sommelier", flag.ContinueOnError) sommelierPickFlags = flag.NewFlagSet("pick", flag.ExitOnError) - sommelierPickBodyFlag = sommelierPickFlags.String("body", "REQUIRED", "") + sommelierPickBodyFlag = new(cliStringFlag) storageFlags = flag.NewFlagSet("storage", flag.ContinueOnError) storageListFlags = flag.NewFlagSet("list", flag.ExitOnError) storageShowFlags = flag.NewFlagSet("show", flag.ExitOnError) - storageShowIDFlag = storageShowFlags.String("id", "REQUIRED", "ID of bottle to show") - storageShowViewFlag = storageShowFlags.String("view", "", "") + storageShowIDFlag = new(cliStringFlag) + storageShowViewFlag = new(cliStringFlag) storageAddFlags = flag.NewFlagSet("add", flag.ExitOnError) - storageAddBodyFlag = storageAddFlags.String("body", "REQUIRED", "") + storageAddBodyFlag = new(cliStringFlag) storageRemoveFlags = flag.NewFlagSet("remove", flag.ExitOnError) - storageRemoveIDFlag = storageRemoveFlags.String("id", "REQUIRED", "ID of bottle to remove") + storageRemoveIDFlag = new(cliStringFlag) storageRateFlags = flag.NewFlagSet("rate", flag.ExitOnError) - storageRatePFlag = storageRateFlags.String("p", "REQUIRED", "map[uint32][]string is the payload type of the storage service rate method.") + storageRatePFlag = new(cliStringFlag) storageMultiAddFlags = flag.NewFlagSet("multi-add", flag.ExitOnError) - storageMultiAddBodyFlag = storageMultiAddFlags.String("body", "REQUIRED", "") + storageMultiAddBodyFlag = new(cliStringFlag) storageMultiUpdateFlags = flag.NewFlagSet("multi-update", flag.ExitOnError) - storageMultiUpdateBodyFlag = storageMultiUpdateFlags.String("body", "REQUIRED", "") - storageMultiUpdateIdsFlag = storageMultiUpdateFlags.String("ids", "REQUIRED", "") + storageMultiUpdateBodyFlag = new(cliStringFlag) + storageMultiUpdateIdsFlag = new(cliStringFlag) ) + sommelierPickFlags.Var(sommelierPickBodyFlag, "body", "") + storageShowFlags.Var(storageShowIDFlag, "id", "ID of bottle to show") + storageShowFlags.Var(storageShowViewFlag, "view", "") + storageAddFlags.Var(storageAddBodyFlag, "body", "") + storageRemoveFlags.Var(storageRemoveIDFlag, "id", "ID of bottle to remove") + storageRateFlags.Var(storageRatePFlag, "p", "map[uint32][]string is the payload type of the storage service rate method.") + storageMultiAddFlags.Var(storageMultiAddBodyFlag, "body", "") + storageMultiUpdateFlags.Var(storageMultiUpdateBodyFlag, "body", "") + storageMultiUpdateFlags.Var(storageMultiUpdateIdsFlag, "ids", "") + sommelierFlags.Usage = sommelierUsage sommelierPickFlags.Usage = sommelierPickUsage @@ -181,7 +210,7 @@ func ParseEndpoint( switch epn { case "pick": endpoint = c.Pick() - data, err = sommelierc.BuildPickPayload(*sommelierPickBodyFlag) + data, err = sommelierc.BuildPickPayload(sommelierPickBodyFlag.value) } case "storage": c := storagec.NewClient(scheme, host, doer, enc, dec, restore) @@ -190,28 +219,31 @@ func ParseEndpoint( endpoint = c.List() case "show": endpoint = c.Show() - data, err = storagec.BuildShowPayload(*storageShowIDFlag, *storageShowViewFlag) + data, err = storagec.BuildShowPayload(storageShowIDFlag.value, storageShowViewFlag.value) case "add": endpoint = c.Add() - data, err = storagec.BuildAddPayload(*storageAddBodyFlag) + data, err = storagec.BuildAddPayload(storageAddBodyFlag.value) case "remove": endpoint = c.Remove() - data, err = storagec.BuildRemovePayload(*storageRemoveIDFlag) + data, err = storagec.BuildRemovePayload(storageRemoveIDFlag.value) case "rate": endpoint = c.Rate() var err error + if storageRatePFlag.value == nil { + return nil, nil, fmt.Errorf("missing required flag --p") + } var val map[uint32][]string - err = json.Unmarshal([]byte(*storageRatePFlag), &val) + err = json.Unmarshal([]byte(*storageRatePFlag.value), &val) data = val if err != nil { return nil, nil, fmt.Errorf("invalid JSON for storageRatePFlag, \nerror: %s, \nexample of valid JSON:\n%s", err, "'{\n \"2205736647\": [\n \"Aliquam occaecati voluptas neque vel.\",\n \"Omnis ducimus ut voluptatum expedita aut id.\",\n \"Nostrum magnam fugiat maiores.\"\n ],\n \"2592953118\": [\n \"Similique officia.\",\n \"Reprehenderit ut similique iste velit.\",\n \"Expedita quia.\"\n ],\n \"95281316\": [\n \"Velit et ab occaecati dolorum.\",\n \"Optio molestiae vel dolores.\"\n ]\n }'") } case "multi-add": endpoint = c.MultiAdd(storageMultiAddEncoderFn) - data, err = storagec.BuildMultiAddPayload(*storageMultiAddBodyFlag) + data, err = storagec.BuildMultiAddPayload(storageMultiAddBodyFlag.value) case "multi-update": endpoint = c.MultiUpdate(storageMultiUpdateEncoderFn) - data, err = storagec.BuildMultiUpdatePayload(*storageMultiUpdateBodyFlag, *storageMultiUpdateIdsFlag) + data, err = storagec.BuildMultiUpdatePayload(storageMultiUpdateBodyFlag.value, storageMultiUpdateIdsFlag.value) } } } diff --git a/cellar/gen/http/sommelier/client/cli.go b/cellar/gen/http/sommelier/client/cli.go index 5eafb76ee..d0b4d8c27 100644 --- a/cellar/gen/http/sommelier/client/cli.go +++ b/cellar/gen/http/sommelier/client/cli.go @@ -16,11 +16,14 @@ import ( // BuildPickPayload builds the payload for the sommelier pick endpoint from CLI // flags. -func BuildPickPayload(sommelierPickBody string) (*sommelier.Criteria, error) { +func BuildPickPayload(sommelierPickBody *string) (*sommelier.Criteria, error) { var err error var body PickRequestBody { - err = json.Unmarshal([]byte(sommelierPickBody), &body) + if sommelierPickBody == nil { + return nil, fmt.Errorf("missing required flag --body") + } + err = json.Unmarshal([]byte(*sommelierPickBody), &body) if err != nil { return nil, fmt.Errorf("invalid JSON for body, \nerror: %s, \nexample of valid JSON:\n%s", err, "'{\n \"name\": \"Blue\\'s Cuvee\",\n \"varietal\": [\n \"pinot noir\",\n \"merlot\",\n \"cabernet franc\"\n ],\n \"winery\": \"longoria\"\n }'") } diff --git a/cellar/gen/http/sommelier/client/encode_decode.go b/cellar/gen/http/sommelier/client/encode_decode.go index d4900d19e..4543da097 100644 --- a/cellar/gen/http/sommelier/client/encode_decode.go +++ b/cellar/gen/http/sommelier/client/encode_decode.go @@ -88,6 +88,10 @@ func DecodePickResponse(decoder func(*http.Response) goahttp.Decoder, restoreBod if err != nil { return nil, goahttp.ErrDecodingError("sommelier", "pick", err) } + err = ValidateStoredBottleResponseCollection(body) + if err != nil { + return nil, goahttp.ErrValidationError("sommelier", "pick", err) + } p := NewPickStoredBottleCollectionOK(body) view := "default" vres := sommelierviews.StoredBottleCollection{Projected: p, View: view} diff --git a/cellar/gen/http/sommelier/client/types.go b/cellar/gen/http/sommelier/client/types.go index 415400dc6..aed0ba9c1 100644 --- a/cellar/gen/http/sommelier/client/types.go +++ b/cellar/gen/http/sommelier/client/types.go @@ -107,6 +107,19 @@ func NewPickNoMatch(body string) sommelier.NoMatch { return v } +// ValidateStoredBottleResponseCollection runs the validations defined on +// StoredBottleResponseCollection +func ValidateStoredBottleResponseCollection(body StoredBottleResponseCollection) (err error) { + for _, e := range body { + if e != nil { + if err2 := validateStoredBottleResponse(e, "body[*]"); err2 != nil { + err = goa.MergeErrors(err, err2) + } + } + } + return +} + // ValidateStoredBottleResponse runs the validations defined on StoredBottle func ValidateStoredBottleResponse(body *StoredBottleResponse) (err error) { if body.ID == nil { @@ -162,6 +175,62 @@ func ValidateStoredBottleResponse(body *StoredBottleResponse) (err error) { return } +// validateStoredBottleResponse checks StoredBottle and reports errors using +// the path supplied by its caller +func validateStoredBottleResponse(body *StoredBottleResponse, path string) (err error) { + if body.ID == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("id", path)) + } + if body.Name == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("name", path)) + } + if body.Winery == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("winery", path)) + } + if body.Vintage == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("vintage", path)) + } + if body.Name != nil { + if utf8.RuneCountInString(*body.Name) > 100 { + err = goa.MergeErrors(err, goa.InvalidLengthError(path+".name", *body.Name, utf8.RuneCountInString(*body.Name), 100, false)) + } + } + if body.Winery != nil { + if err2 := validateWineryResponseTiny(body.Winery, path+".winery"); err2 != nil { + err = goa.MergeErrors(err, err2) + } + } + if body.Vintage != nil { + if *body.Vintage < 1900 { + err = goa.MergeErrors(err, goa.InvalidRangeError(path+".vintage", *body.Vintage, 1900, true)) + } + if *body.Vintage > 2020 { + err = goa.MergeErrors(err, goa.InvalidRangeError(path+".vintage", *body.Vintage, 2020, false)) + } + } + for _, e := range body.Composition { + if e != nil { + if err2 := validateComponentResponse(e, path+".composition[*]"); err2 != nil { + err = goa.MergeErrors(err, err2) + } + } + } + if body.Description != nil { + if utf8.RuneCountInString(*body.Description) > 2000 { + err = goa.MergeErrors(err, goa.InvalidLengthError(path+".description", *body.Description, utf8.RuneCountInString(*body.Description), 2000, false)) + } + } + if body.Rating != nil { + if *body.Rating < 1 { + err = goa.MergeErrors(err, goa.InvalidRangeError(path+".rating", *body.Rating, 1, true)) + } + if *body.Rating > 5 { + err = goa.MergeErrors(err, goa.InvalidRangeError(path+".rating", *body.Rating, 5, false)) + } + } + return +} + // ValidateWineryResponseTiny runs the validations defined on WineryTiny func ValidateWineryResponseTiny(body *WineryResponseTiny) (err error) { if body.Name == nil { diff --git a/cellar/gen/http/storage/client/cli.go b/cellar/gen/http/storage/client/cli.go index 1d4fc7ce2..94aa949be 100644 --- a/cellar/gen/http/storage/client/cli.go +++ b/cellar/gen/http/storage/client/cli.go @@ -18,18 +18,21 @@ import ( // BuildShowPayload builds the payload for the storage show endpoint from CLI // flags. -func BuildShowPayload(storageShowID string, storageShowView string) (*storage.ShowPayload, error) { +func BuildShowPayload(storageShowID *string, storageShowView *string) (*storage.ShowPayload, error) { var err error var id string { - id = storageShowID + if storageShowID == nil { + return nil, fmt.Errorf("missing required flag --id") + } + id = *storageShowID } var view *string { - if storageShowView != "" { - view = &storageShowView - if !(storageShowView == "default" || storageShowView == "tiny") { - err = goa.MergeErrors(err, goa.InvalidEnumValueError("view", storageShowView, []any{"default", "tiny"})) + if storageShowView != nil { + view = storageShowView + if !(*storageShowView == "default" || *storageShowView == "tiny") { + err = goa.MergeErrors(err, goa.InvalidEnumValueError("view", *storageShowView, []any{"default", "tiny"})) } if err != nil { return nil, err @@ -45,11 +48,14 @@ func BuildShowPayload(storageShowID string, storageShowView string) (*storage.Sh // BuildAddPayload builds the payload for the storage add endpoint from CLI // flags. -func BuildAddPayload(storageAddBody string) (*storage.Bottle, error) { +func BuildAddPayload(storageAddBody *string) (*storage.Bottle, error) { var err error var body AddRequestBody { - err = json.Unmarshal([]byte(storageAddBody), &body) + if storageAddBody == nil { + return nil, fmt.Errorf("missing required flag --body") + } + err = json.Unmarshal([]byte(*storageAddBody), &body) if err != nil { return nil, fmt.Errorf("invalid JSON for body, \nerror: %s, \nexample of valid JSON:\n%s", err, "'{\n \"composition\": [\n {\n \"percentage\": 8,\n \"varietal\": \"Syrah\"\n },\n {\n \"percentage\": 8,\n \"varietal\": \"Syrah\"\n }\n ],\n \"description\": \"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah\",\n \"name\": \"Blue\\'s Cuvee\",\n \"rating\": 3,\n \"vintage\": 2005,\n \"winery\": {\n \"country\": \"USA\",\n \"name\": \"Longoria\",\n \"region\": \"Central Coast, California\",\n \"url\": \"http://www.longoriawine.com/\"\n }\n }'") } @@ -119,10 +125,13 @@ func BuildAddPayload(storageAddBody string) (*storage.Bottle, error) { // BuildRemovePayload builds the payload for the storage remove endpoint from // CLI flags. -func BuildRemovePayload(storageRemoveID string) (*storage.RemovePayload, error) { +func BuildRemovePayload(storageRemoveID *string) (*storage.RemovePayload, error) { var id string { - id = storageRemoveID + if storageRemoveID == nil { + return nil, fmt.Errorf("missing required flag --id") + } + id = *storageRemoveID } v := &storage.RemovePayload{} v.ID = id @@ -132,11 +141,14 @@ func BuildRemovePayload(storageRemoveID string) (*storage.RemovePayload, error) // BuildMultiAddPayload builds the payload for the storage multi_add endpoint // from CLI flags. -func BuildMultiAddPayload(storageMultiAddBody string) ([]*storage.Bottle, error) { +func BuildMultiAddPayload(storageMultiAddBody *string) ([]*storage.Bottle, error) { var err error var body []*BottleRequestBody { - err = json.Unmarshal([]byte(storageMultiAddBody), &body) + if storageMultiAddBody == nil { + return nil, fmt.Errorf("missing required flag --body") + } + err = json.Unmarshal([]byte(*storageMultiAddBody), &body) if err != nil { return nil, fmt.Errorf("invalid JSON for body, \nerror: %s, \nexample of valid JSON:\n%s", err, "'[\n {\n \"composition\": [\n {\n \"percentage\": 8,\n \"varietal\": \"Syrah\"\n },\n {\n \"percentage\": 8,\n \"varietal\": \"Syrah\"\n },\n {\n \"percentage\": 8,\n \"varietal\": \"Syrah\"\n }\n ],\n \"description\": \"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah\",\n \"name\": \"Blue\\'s Cuvee\",\n \"rating\": 3,\n \"vintage\": 2003,\n \"winery\": {\n \"country\": \"USA\",\n \"name\": \"Longoria\",\n \"region\": \"Central Coast, California\",\n \"url\": \"http://www.longoriawine.com/\"\n }\n },\n {\n \"composition\": [\n {\n \"percentage\": 8,\n \"varietal\": \"Syrah\"\n },\n {\n \"percentage\": 8,\n \"varietal\": \"Syrah\"\n },\n {\n \"percentage\": 8,\n \"varietal\": \"Syrah\"\n }\n ],\n \"description\": \"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah\",\n \"name\": \"Blue\\'s Cuvee\",\n \"rating\": 3,\n \"vintage\": 2003,\n \"winery\": {\n \"country\": \"USA\",\n \"name\": \"Longoria\",\n \"region\": \"Central Coast, California\",\n \"url\": \"http://www.longoriawine.com/\"\n }\n }\n ]'") } @@ -154,11 +166,14 @@ func BuildMultiAddPayload(storageMultiAddBody string) ([]*storage.Bottle, error) // BuildMultiUpdatePayload builds the payload for the storage multi_update // endpoint from CLI flags. -func BuildMultiUpdatePayload(storageMultiUpdateBody string, storageMultiUpdateIds string) (*storage.MultiUpdatePayload, error) { +func BuildMultiUpdatePayload(storageMultiUpdateBody *string, storageMultiUpdateIds *string) (*storage.MultiUpdatePayload, error) { var err error var body MultiUpdateRequestBody { - err = json.Unmarshal([]byte(storageMultiUpdateBody), &body) + if storageMultiUpdateBody == nil { + return nil, fmt.Errorf("missing required flag --body") + } + err = json.Unmarshal([]byte(*storageMultiUpdateBody), &body) if err != nil { return nil, fmt.Errorf("invalid JSON for body, \nerror: %s, \nexample of valid JSON:\n%s", err, "'{\n \"bottles\": [\n {\n \"composition\": [\n {\n \"percentage\": 8,\n \"varietal\": \"Syrah\"\n },\n {\n \"percentage\": 8,\n \"varietal\": \"Syrah\"\n },\n {\n \"percentage\": 8,\n \"varietal\": \"Syrah\"\n }\n ],\n \"description\": \"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah\",\n \"name\": \"Blue\\'s Cuvee\",\n \"rating\": 3,\n \"vintage\": 2003,\n \"winery\": {\n \"country\": \"USA\",\n \"name\": \"Longoria\",\n \"region\": \"Central Coast, California\",\n \"url\": \"http://www.longoriawine.com/\"\n }\n },\n {\n \"composition\": [\n {\n \"percentage\": 8,\n \"varietal\": \"Syrah\"\n },\n {\n \"percentage\": 8,\n \"varietal\": \"Syrah\"\n },\n {\n \"percentage\": 8,\n \"varietal\": \"Syrah\"\n }\n ],\n \"description\": \"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah\",\n \"name\": \"Blue\\'s Cuvee\",\n \"rating\": 3,\n \"vintage\": 2003,\n \"winery\": {\n \"country\": \"USA\",\n \"name\": \"Longoria\",\n \"region\": \"Central Coast, California\",\n \"url\": \"http://www.longoriawine.com/\"\n }\n },\n {\n \"composition\": [\n {\n \"percentage\": 8,\n \"varietal\": \"Syrah\"\n },\n {\n \"percentage\": 8,\n \"varietal\": \"Syrah\"\n },\n {\n \"percentage\": 8,\n \"varietal\": \"Syrah\"\n }\n ],\n \"description\": \"Red wine blend with an emphasis on the Cabernet Franc grape and including other Bordeaux grape varietals and some Syrah\",\n \"name\": \"Blue\\'s Cuvee\",\n \"rating\": 3,\n \"vintage\": 2003,\n \"winery\": {\n \"country\": \"USA\",\n \"name\": \"Longoria\",\n \"region\": \"Central Coast, California\",\n \"url\": \"http://www.longoriawine.com/\"\n }\n }\n ]\n }'") } @@ -178,7 +193,10 @@ func BuildMultiUpdatePayload(storageMultiUpdateBody string, storageMultiUpdateId } var ids []string { - err = json.Unmarshal([]byte(storageMultiUpdateIds), &ids) + if storageMultiUpdateIds == nil { + return nil, fmt.Errorf("missing required flag --ids") + } + err = json.Unmarshal([]byte(*storageMultiUpdateIds), &ids) if err != nil { return nil, fmt.Errorf("invalid JSON for ids, \nerror: %s, \nexample of valid JSON:\n%s", err, "'[\n \"Deserunt itaque omnis necessitatibus enim aspernatur.\",\n \"Tempore in voluptate asperiores.\",\n \"Incidunt quia ut eius quibusdam rerum.\",\n \"Consequatur architecto ratione.\"\n ]'") } diff --git a/cellar/gen/http/storage/client/encode_decode.go b/cellar/gen/http/storage/client/encode_decode.go index 2bff2e8a6..9b408206f 100644 --- a/cellar/gen/http/storage/client/encode_decode.go +++ b/cellar/gen/http/storage/client/encode_decode.go @@ -70,6 +70,10 @@ func DecodeListResponse(decoder func(*http.Response) goahttp.Decoder, restoreBod if err != nil { return nil, goahttp.ErrDecodingError("storage", "list", err) } + err = ValidateStoredBottleResponseTinyCollection(body) + if err != nil { + return nil, goahttp.ErrValidationError("storage", "list", err) + } p := NewListStoredBottleCollectionOK(body) view := "tiny" vres := storageviews.StoredBottleCollection{Projected: p, View: view} @@ -166,6 +170,10 @@ func DecodeShowResponse(decoder func(*http.Response) goahttp.Decoder, restoreBod if err != nil { return nil, goahttp.ErrDecodingError("storage", "show", err) } + err = ValidateShowResponseBody(&body) + if err != nil { + return nil, goahttp.ErrValidationError("storage", "show", err) + } p := NewShowStoredBottleOK(&body) view := resp.Header.Get("goa-view") vres := &storageviews.StoredBottle{Projected: p, View: view} diff --git a/cellar/gen/http/storage/client/types.go b/cellar/gen/http/storage/client/types.go index 608f61ed8..50992cf8f 100644 --- a/cellar/gen/http/storage/client/types.go +++ b/cellar/gen/http/storage/client/types.go @@ -251,6 +251,74 @@ func NewShowNotFound(body *ShowNotFoundResponseBody) *storage.NotFound { return v } +// ValidateStoredBottleResponseTinyCollection runs the validations defined on +// StoredBottleResponseTinyCollection +func ValidateStoredBottleResponseTinyCollection(body StoredBottleResponseTinyCollection) (err error) { + for _, e := range body { + if e != nil { + if err2 := validateStoredBottleResponseTiny(e, "body[*]"); err2 != nil { + err = goa.MergeErrors(err, err2) + } + } + } + return +} + +// ValidateShowResponseBody runs the validations defined on ShowResponseBody +func ValidateShowResponseBody(body *ShowResponseBody) (err error) { + if body.ID == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("id", "body")) + } + if body.Name == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("name", "body")) + } + if body.Winery == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("winery", "body")) + } + if body.Vintage == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("vintage", "body")) + } + if body.Name != nil { + if utf8.RuneCountInString(*body.Name) > 100 { + err = goa.MergeErrors(err, goa.InvalidLengthError("body.name", *body.Name, utf8.RuneCountInString(*body.Name), 100, false)) + } + } + if body.Winery != nil { + if err2 := validateWineryResponseBody(body.Winery, "body.winery"); err2 != nil { + err = goa.MergeErrors(err, err2) + } + } + if body.Vintage != nil { + if *body.Vintage < 1900 { + err = goa.MergeErrors(err, goa.InvalidRangeError("body.vintage", *body.Vintage, 1900, true)) + } + if *body.Vintage > 2020 { + err = goa.MergeErrors(err, goa.InvalidRangeError("body.vintage", *body.Vintage, 2020, false)) + } + } + for _, e := range body.Composition { + if e != nil { + if err2 := validateComponentResponseBody(e, "body.composition[*]"); err2 != nil { + err = goa.MergeErrors(err, err2) + } + } + } + if body.Description != nil { + if utf8.RuneCountInString(*body.Description) > 2000 { + err = goa.MergeErrors(err, goa.InvalidLengthError("body.description", *body.Description, utf8.RuneCountInString(*body.Description), 2000, false)) + } + } + if body.Rating != nil { + if *body.Rating < 1 { + err = goa.MergeErrors(err, goa.InvalidRangeError("body.rating", *body.Rating, 1, true)) + } + if *body.Rating > 5 { + err = goa.MergeErrors(err, goa.InvalidRangeError("body.rating", *body.Rating, 5, false)) + } + } + return +} + // ValidateShowNotFoundResponseBody runs the validations defined on // ShowNotFoundResponseBody func ValidateShowNotFoundResponseBody(body *ShowNotFoundResponseBody) (err error) { @@ -288,6 +356,31 @@ func ValidateStoredBottleResponseTiny(body *StoredBottleResponseTiny) (err error return } +// validateStoredBottleResponseTiny checks StoredBottleTiny and reports errors +// using the path supplied by its caller +func validateStoredBottleResponseTiny(body *StoredBottleResponseTiny, path string) (err error) { + if body.ID == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("id", path)) + } + if body.Name == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("name", path)) + } + if body.Winery == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("winery", path)) + } + if body.Name != nil { + if utf8.RuneCountInString(*body.Name) > 100 { + err = goa.MergeErrors(err, goa.InvalidLengthError(path+".name", *body.Name, utf8.RuneCountInString(*body.Name), 100, false)) + } + } + if body.Winery != nil { + if err2 := validateWineryResponseTiny(body.Winery, path+".winery"); err2 != nil { + err = goa.MergeErrors(err, err2) + } + } + return +} + // ValidateWineryResponseTiny runs the validations defined on WineryTiny func ValidateWineryResponseTiny(body *WineryResponseTiny) (err error) { if body.Name == nil { @@ -328,6 +421,30 @@ func ValidateWineryResponseBody(body *WineryResponseBody) (err error) { return } +// validateWineryResponseBody checks Winery and reports errors using the path +// supplied by its caller +func validateWineryResponseBody(body *WineryResponseBody, path string) (err error) { + if body.Name == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("name", path)) + } + if body.Region == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("region", path)) + } + if body.Country == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("country", path)) + } + if body.Region != nil { + err = goa.MergeErrors(err, goa.ValidatePattern(path+".region", *body.Region, "[a-zA-Z '\\.]+")) + } + if body.Country != nil { + err = goa.MergeErrors(err, goa.ValidatePattern(path+".country", *body.Country, "[a-zA-Z '\\.]+")) + } + if body.URL != nil { + err = goa.MergeErrors(err, goa.ValidatePattern(path+".url", *body.URL, "^(https?|ftp)://[^\\s/$.?#].[^\\s]*$")) + } + return +} + // ValidateComponentResponseBody runs the validations defined on Component func ValidateComponentResponseBody(body *ComponentResponseBody) (err error) { if body.Varietal == nil { @@ -350,6 +467,29 @@ func ValidateComponentResponseBody(body *ComponentResponseBody) (err error) { return } +// validateComponentResponseBody checks Component and reports errors using the +// path supplied by its caller +func validateComponentResponseBody(body *ComponentResponseBody, path string) (err error) { + if body.Varietal == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("varietal", path)) + } + if body.Varietal != nil { + err = goa.MergeErrors(err, goa.ValidatePattern(path+".varietal", *body.Varietal, "[A-Za-z' ]+")) + if utf8.RuneCountInString(*body.Varietal) > 100 { + err = goa.MergeErrors(err, goa.InvalidLengthError(path+".varietal", *body.Varietal, utf8.RuneCountInString(*body.Varietal), 100, false)) + } + } + if body.Percentage != nil { + if *body.Percentage < 1 { + err = goa.MergeErrors(err, goa.InvalidRangeError(path+".percentage", *body.Percentage, 1, true)) + } + if *body.Percentage > 100 { + err = goa.MergeErrors(err, goa.InvalidRangeError(path+".percentage", *body.Percentage, 100, false)) + } + } + return +} + // ValidateWineryRequestBody runs the validations defined on Winery func ValidateWineryRequestBody(body *WineryRequestBody) (err error) { err = goa.MergeErrors(err, goa.ValidatePattern("body.region", body.Region, "[a-zA-Z '\\.]+")) diff --git a/cellar/go.mod b/cellar/go.mod index ac0f6eaf6..c51a23a6f 100644 --- a/cellar/go.mod +++ b/cellar/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( github.com/boltdb/bolt v1.3.1 - goa.design/goa/v3 v3.30.1-0.20260825034953-833f95e1fdc8 + goa.design/goa/v3 v3.30.1-0.20260825121239-93fbcbe975c8 google.golang.org/grpc v1.83.1 google.golang.org/protobuf v1.36.12 ) diff --git a/cellar/go.sum b/cellar/go.sum index 51c3cad4a..95649226c 100644 --- a/cellar/go.sum +++ b/cellar/go.sum @@ -51,8 +51,8 @@ go.opentelemetry.io/otel/trace v1.44.0 h1:jxF5CsGYCe74MCRx2X4g7WsY/VBKRqqpNvXlX/ go.opentelemetry.io/otel/trace v1.44.0/go.mod h1:oLl1jrMQAVo6v3GAggN+1VH9VIz9iUSvW53sW1Q8PIE= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260825034953-833f95e1fdc8 h1:CjoyylexZ1s2rePbKaePU2Q+VwWwYjvhXXwovd6x4Hc= -goa.design/goa/v3 v3.30.1-0.20260825034953-833f95e1fdc8/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260825121239-93fbcbe975c8 h1:MwRPnes61LS7Sa+TLAK/7zCCMZ3gmlcusA06NkuF+F0= +goa.design/goa/v3 v3.30.1-0.20260825121239-93fbcbe975c8/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/concerts/gen/http/cli/concerts/cli.go b/concerts/gen/http/cli/concerts/cli.go index 9c1975cf1..5dfe793a7 100644 --- a/concerts/gen/http/cli/concerts/cli.go +++ b/concerts/gen/http/cli/concerts/cli.go @@ -33,6 +33,25 @@ func UsageExamples() string { "" } +// cliStringFlag keeps an omitted command-line flag distinct from an explicitly empty flag. +type cliStringFlag struct { + value *string +} + +// String returns the flag text shown by the standard flag package. +func (f *cliStringFlag) String() string { + if f.value == nil { + return "" + } + return *f.value +} + +// Set records that the user supplied the flag, even when value is empty. +func (f *cliStringFlag) Set(value string) error { + f.value = &value + return nil +} + // ParseEndpoint returns the endpoint and payload as specified on the command // line. func ParseEndpoint( @@ -50,18 +69,24 @@ func ParseEndpoint( concertsListLimitFlag = concertsListFlags.String("limit", "10", "") concertsCreateFlags = flag.NewFlagSet("create", flag.ExitOnError) - concertsCreateBodyFlag = concertsCreateFlags.String("body", "REQUIRED", "") + concertsCreateBodyFlag = new(cliStringFlag) concertsShowFlags = flag.NewFlagSet("show", flag.ExitOnError) - concertsShowConcertIDFlag = concertsShowFlags.String("concert-id", "REQUIRED", "Unique concert identifier") + concertsShowConcertIDFlag = new(cliStringFlag) concertsUpdateFlags = flag.NewFlagSet("update", flag.ExitOnError) - concertsUpdateBodyFlag = concertsUpdateFlags.String("body", "REQUIRED", "") - concertsUpdateConcertIDFlag = concertsUpdateFlags.String("concert-id", "REQUIRED", "ID of the concert to update") + concertsUpdateBodyFlag = new(cliStringFlag) + concertsUpdateConcertIDFlag = new(cliStringFlag) concertsDeleteFlags = flag.NewFlagSet("delete", flag.ExitOnError) - concertsDeleteConcertIDFlag = concertsDeleteFlags.String("concert-id", "REQUIRED", "ID of the concert to remove") + concertsDeleteConcertIDFlag = new(cliStringFlag) ) + concertsCreateFlags.Var(concertsCreateBodyFlag, "body", "") + concertsShowFlags.Var(concertsShowConcertIDFlag, "concert-id", "Unique concert identifier") + concertsUpdateFlags.Var(concertsUpdateBodyFlag, "body", "") + concertsUpdateFlags.Var(concertsUpdateConcertIDFlag, "concert-id", "ID of the concert to update") + concertsDeleteFlags.Var(concertsDeleteConcertIDFlag, "concert-id", "ID of the concert to remove") + concertsFlags.Usage = concertsUsage concertsListFlags.Usage = concertsListUsage concertsCreateFlags.Usage = concertsCreateUsage @@ -148,16 +173,16 @@ func ParseEndpoint( data, err = concertsc.BuildListPayload(*concertsListPageFlag, *concertsListLimitFlag) case "create": endpoint = c.Create() - data, err = concertsc.BuildCreatePayload(*concertsCreateBodyFlag) + data, err = concertsc.BuildCreatePayload(concertsCreateBodyFlag.value) case "show": endpoint = c.Show() - data, err = concertsc.BuildShowPayload(*concertsShowConcertIDFlag) + data, err = concertsc.BuildShowPayload(concertsShowConcertIDFlag.value) case "update": endpoint = c.Update() - data, err = concertsc.BuildUpdatePayload(*concertsUpdateBodyFlag, *concertsUpdateConcertIDFlag) + data, err = concertsc.BuildUpdatePayload(concertsUpdateBodyFlag.value, concertsUpdateConcertIDFlag.value) case "delete": endpoint = c.Delete() - data, err = concertsc.BuildDeletePayload(*concertsDeleteConcertIDFlag) + data, err = concertsc.BuildDeletePayload(concertsDeleteConcertIDFlag.value) } } } diff --git a/concerts/gen/http/concerts/client/cli.go b/concerts/gen/http/concerts/client/cli.go index a62e182d7..861603394 100644 --- a/concerts/gen/http/concerts/client/cli.go +++ b/concerts/gen/http/concerts/client/cli.go @@ -23,39 +23,35 @@ func BuildListPayload(concertsListPage string, concertsListLimit string) (*conce var err error var page int { - if concertsListPage != "" { - var v int64 - v, err = strconv.ParseInt(concertsListPage, 10, strconv.IntSize) - page = int(v) - if err != nil { - return nil, fmt.Errorf("invalid value for page, must be INT") - } - if page < 1 { - err = goa.MergeErrors(err, goa.InvalidRangeError("page", page, 1, true)) - } - if err != nil { - return nil, err - } + var v int64 + v, err = strconv.ParseInt(concertsListPage, 10, strconv.IntSize) + page = int(v) + if err != nil { + return nil, fmt.Errorf("invalid value for page, must be INT") + } + if page < 1 { + err = goa.MergeErrors(err, goa.InvalidRangeError("page", page, 1, true)) + } + if err != nil { + return nil, err } } var limit int { - if concertsListLimit != "" { - var v int64 - v, err = strconv.ParseInt(concertsListLimit, 10, strconv.IntSize) - limit = int(v) - if err != nil { - return nil, fmt.Errorf("invalid value for limit, must be INT") - } - if limit < 1 { - err = goa.MergeErrors(err, goa.InvalidRangeError("limit", limit, 1, true)) - } - if limit > 100 { - err = goa.MergeErrors(err, goa.InvalidRangeError("limit", limit, 100, false)) - } - if err != nil { - return nil, err - } + var v int64 + v, err = strconv.ParseInt(concertsListLimit, 10, strconv.IntSize) + limit = int(v) + if err != nil { + return nil, fmt.Errorf("invalid value for limit, must be INT") + } + if limit < 1 { + err = goa.MergeErrors(err, goa.InvalidRangeError("limit", limit, 1, true)) + } + if limit > 100 { + err = goa.MergeErrors(err, goa.InvalidRangeError("limit", limit, 100, false)) + } + if err != nil { + return nil, err } } v := &concerts.ListPayload{} @@ -67,11 +63,14 @@ func BuildListPayload(concertsListPage string, concertsListLimit string) (*conce // BuildCreatePayload builds the payload for the concerts create endpoint from // CLI flags. -func BuildCreatePayload(concertsCreateBody string) (*concerts.ConcertPayload, error) { +func BuildCreatePayload(concertsCreateBody *string) (*concerts.ConcertPayload, error) { var err error var body CreateRequestBody { - err = json.Unmarshal([]byte(concertsCreateBody), &body) + if concertsCreateBody == nil { + return nil, fmt.Errorf("missing required flag --body") + } + err = json.Unmarshal([]byte(*concertsCreateBody), &body) if err != nil { return nil, fmt.Errorf("invalid JSON for body, \nerror: %s, \nexample of valid JSON:\n%s", err, "'{\n \"artist\": \"The White Stripes\",\n \"date\": \"2024-12-25\",\n \"price\": 7500,\n \"venue\": \"Madison Square Garden, New York, NY\"\n }'") } @@ -110,11 +109,14 @@ func BuildCreatePayload(concertsCreateBody string) (*concerts.ConcertPayload, er // BuildShowPayload builds the payload for the concerts show endpoint from CLI // flags. -func BuildShowPayload(concertsShowConcertID string) (*concerts.ShowPayload, error) { +func BuildShowPayload(concertsShowConcertID *string) (*concerts.ShowPayload, error) { var err error var concertID string { - concertID = concertsShowConcertID + if concertsShowConcertID == nil { + return nil, fmt.Errorf("missing required flag --concert-id") + } + concertID = *concertsShowConcertID err = goa.MergeErrors(err, goa.ValidateFormat("concertID", concertID, goa.FormatUUID)) if err != nil { return nil, err @@ -128,11 +130,14 @@ func BuildShowPayload(concertsShowConcertID string) (*concerts.ShowPayload, erro // BuildUpdatePayload builds the payload for the concerts update endpoint from // CLI flags. -func BuildUpdatePayload(concertsUpdateBody string, concertsUpdateConcertID string) (*concerts.UpdatePayload, error) { +func BuildUpdatePayload(concertsUpdateBody *string, concertsUpdateConcertID *string) (*concerts.UpdatePayload, error) { var err error var body UpdateRequestBody { - err = json.Unmarshal([]byte(concertsUpdateBody), &body) + if concertsUpdateBody == nil { + return nil, fmt.Errorf("missing required flag --body") + } + err = json.Unmarshal([]byte(*concertsUpdateBody), &body) if err != nil { return nil, fmt.Errorf("invalid JSON for body, \nerror: %s, \nexample of valid JSON:\n%s", err, "'{\n \"artist\": \"The White Stripes\",\n \"date\": \"2024-12-25\",\n \"price\": 7500,\n \"venue\": \"Madison Square Garden, New York, NY\"\n }'") } @@ -169,7 +174,10 @@ func BuildUpdatePayload(concertsUpdateBody string, concertsUpdateConcertID strin } var concertID string { - concertID = concertsUpdateConcertID + if concertsUpdateConcertID == nil { + return nil, fmt.Errorf("missing required flag --concert-id") + } + concertID = *concertsUpdateConcertID err = goa.MergeErrors(err, goa.ValidateFormat("concertID", concertID, goa.FormatUUID)) if err != nil { return nil, err @@ -188,11 +196,14 @@ func BuildUpdatePayload(concertsUpdateBody string, concertsUpdateConcertID strin // BuildDeletePayload builds the payload for the concerts delete endpoint from // CLI flags. -func BuildDeletePayload(concertsDeleteConcertID string) (*concerts.DeletePayload, error) { +func BuildDeletePayload(concertsDeleteConcertID *string) (*concerts.DeletePayload, error) { var err error var concertID string { - concertID = concertsDeleteConcertID + if concertsDeleteConcertID == nil { + return nil, fmt.Errorf("missing required flag --concert-id") + } + concertID = *concertsDeleteConcertID err = goa.MergeErrors(err, goa.ValidateFormat("concertID", concertID, goa.FormatUUID)) if err != nil { return nil, err diff --git a/concerts/go.mod b/concerts/go.mod index 32eef1ccc..4b38c191e 100644 --- a/concerts/go.mod +++ b/concerts/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( github.com/google/uuid v1.6.0 - goa.design/goa/v3 v3.30.1-0.20260825034953-833f95e1fdc8 + goa.design/goa/v3 v3.30.1-0.20260825121239-93fbcbe975c8 ) require ( diff --git a/concerts/go.sum b/concerts/go.sum index b0fedd60d..43f0e60f5 100644 --- a/concerts/go.sum +++ b/concerts/go.sum @@ -31,8 +31,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260825034953-833f95e1fdc8 h1:CjoyylexZ1s2rePbKaePU2Q+VwWwYjvhXXwovd6x4Hc= -goa.design/goa/v3 v3.30.1-0.20260825034953-833f95e1fdc8/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260825121239-93fbcbe975c8 h1:MwRPnes61LS7Sa+TLAK/7zCCMZ3gmlcusA06NkuF+F0= +goa.design/goa/v3 v3.30.1-0.20260825121239-93fbcbe975c8/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= diff --git a/cookies/gen/http/cli/session/cli.go b/cookies/gen/http/cli/session/cli.go index 0a68e9084..095afe989 100644 --- a/cookies/gen/http/cli/session/cli.go +++ b/cookies/gen/http/cli/session/cli.go @@ -33,6 +33,25 @@ func UsageExamples() string { "" } +// cliStringFlag keeps an omitted command-line flag distinct from an explicitly empty flag. +type cliStringFlag struct { + value *string +} + +// String returns the flag text shown by the standard flag package. +func (f *cliStringFlag) String() string { + if f.value == nil { + return "" + } + return *f.value +} + +// Set records that the user supplied the flag, even when value is empty. +func (f *cliStringFlag) Set(value string) error { + f.value = &value + return nil +} + // ParseEndpoint returns the endpoint and payload as specified on the command // line. func ParseEndpoint( @@ -46,11 +65,14 @@ func ParseEndpoint( sessionFlags = flag.NewFlagSet("session", flag.ContinueOnError) sessionCreateSessionFlags = flag.NewFlagSet("create-session", flag.ExitOnError) - sessionCreateSessionBodyFlag = sessionCreateSessionFlags.String("body", "REQUIRED", "") + sessionCreateSessionBodyFlag = new(cliStringFlag) sessionUseSessionFlags = flag.NewFlagSet("use-session", flag.ExitOnError) - sessionUseSessionSessionIDFlag = sessionUseSessionFlags.String("session-id", "REQUIRED", "") + sessionUseSessionSessionIDFlag = new(cliStringFlag) ) + sessionCreateSessionFlags.Var(sessionCreateSessionBodyFlag, "body", "") + sessionUseSessionFlags.Var(sessionUseSessionSessionIDFlag, "session-id", "") + sessionFlags.Usage = sessionUsage sessionCreateSessionFlags.Usage = sessionCreateSessionUsage sessionUseSessionFlags.Usage = sessionUseSessionUsage @@ -122,10 +144,10 @@ func ParseEndpoint( switch epn { case "create-session": endpoint = c.CreateSession() - data, err = sessionc.BuildCreateSessionPayload(*sessionCreateSessionBodyFlag) + data, err = sessionc.BuildCreateSessionPayload(sessionCreateSessionBodyFlag.value) case "use-session": endpoint = c.UseSession() - data, err = sessionc.BuildUseSessionPayload(*sessionUseSessionSessionIDFlag) + data, err = sessionc.BuildUseSessionPayload(sessionUseSessionSessionIDFlag.value) } } } diff --git a/cookies/gen/http/session/client/cli.go b/cookies/gen/http/session/client/cli.go index f2aab262c..26a6537bc 100644 --- a/cookies/gen/http/session/client/cli.go +++ b/cookies/gen/http/session/client/cli.go @@ -16,11 +16,14 @@ import ( // BuildCreateSessionPayload builds the payload for the session create_session // endpoint from CLI flags. -func BuildCreateSessionPayload(sessionCreateSessionBody string) (*session.CreateSessionPayload, error) { +func BuildCreateSessionPayload(sessionCreateSessionBody *string) (*session.CreateSessionPayload, error) { var err error var body CreateSessionRequestBody { - err = json.Unmarshal([]byte(sessionCreateSessionBody), &body) + if sessionCreateSessionBody == nil { + return nil, fmt.Errorf("missing required flag --body") + } + err = json.Unmarshal([]byte(*sessionCreateSessionBody), &body) if err != nil { return nil, fmt.Errorf("invalid JSON for body, \nerror: %s, \nexample of valid JSON:\n%s", err, "'{\n \"name\": \"Ea sit quis similique.\"\n }'") } @@ -34,10 +37,13 @@ func BuildCreateSessionPayload(sessionCreateSessionBody string) (*session.Create // BuildUseSessionPayload builds the payload for the session use_session // endpoint from CLI flags. -func BuildUseSessionPayload(sessionUseSessionSessionID string) (*session.UseSessionPayload, error) { +func BuildUseSessionPayload(sessionUseSessionSessionID *string) (*session.UseSessionPayload, error) { var sessionID string { - sessionID = sessionUseSessionSessionID + if sessionUseSessionSessionID == nil { + return nil, fmt.Errorf("missing required flag --session-id") + } + sessionID = *sessionUseSessionSessionID } v := &session.UseSessionPayload{} v.SessionID = sessionID diff --git a/cookies/go.mod b/cookies/go.mod index 6d3f742dd..efb2c88bb 100644 --- a/cookies/go.mod +++ b/cookies/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( github.com/rs/xid v1.6.0 - goa.design/goa/v3 v3.30.1-0.20260825034953-833f95e1fdc8 + goa.design/goa/v3 v3.30.1-0.20260825121239-93fbcbe975c8 ) require ( diff --git a/cookies/go.sum b/cookies/go.sum index 488ca01d5..b38592b3a 100644 --- a/cookies/go.sum +++ b/cookies/go.sum @@ -33,8 +33,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260825034953-833f95e1fdc8 h1:CjoyylexZ1s2rePbKaePU2Q+VwWwYjvhXXwovd6x4Hc= -goa.design/goa/v3 v3.30.1-0.20260825034953-833f95e1fdc8/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260825121239-93fbcbe975c8 h1:MwRPnes61LS7Sa+TLAK/7zCCMZ3gmlcusA06NkuF+F0= +goa.design/goa/v3 v3.30.1-0.20260825121239-93fbcbe975c8/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= diff --git a/encodings/cbor/gen/http/cli/concat/cli.go b/encodings/cbor/gen/http/cli/concat/cli.go index 1e1d3a261..cd56a9ebb 100644 --- a/encodings/cbor/gen/http/cli/concat/cli.go +++ b/encodings/cbor/gen/http/cli/concat/cli.go @@ -33,6 +33,25 @@ func UsageExamples() string { "" } +// cliStringFlag keeps an omitted command-line flag distinct from an explicitly empty flag. +type cliStringFlag struct { + value *string +} + +// String returns the flag text shown by the standard flag package. +func (f *cliStringFlag) String() string { + if f.value == nil { + return "" + } + return *f.value +} + +// Set records that the user supplied the flag, even when value is empty. +func (f *cliStringFlag) Set(value string) error { + f.value = &value + return nil +} + // ParseEndpoint returns the endpoint and payload as specified on the command // line. func ParseEndpoint( @@ -46,9 +65,12 @@ func ParseEndpoint( concatFlags = flag.NewFlagSet("concat", flag.ContinueOnError) concatConcatFlags = flag.NewFlagSet("concat", flag.ExitOnError) - concatConcatAFlag = concatConcatFlags.String("a", "REQUIRED", "Left operand") - concatConcatBFlag = concatConcatFlags.String("b", "REQUIRED", "Right operand") + concatConcatAFlag = new(cliStringFlag) + concatConcatBFlag = new(cliStringFlag) ) + concatConcatFlags.Var(concatConcatAFlag, "a", "Left operand") + concatConcatFlags.Var(concatConcatBFlag, "b", "Right operand") + concatFlags.Usage = concatUsage concatConcatFlags.Usage = concatConcatUsage @@ -116,7 +138,7 @@ func ParseEndpoint( switch epn { case "concat": endpoint = c.Concat() - data, err = concatc.BuildConcatPayload(*concatConcatAFlag, *concatConcatBFlag) + data, err = concatc.BuildConcatPayload(concatConcatAFlag.value, concatConcatBFlag.value) } } } diff --git a/encodings/cbor/gen/http/concat/client/cli.go b/encodings/cbor/gen/http/concat/client/cli.go index cc972017e..0e2d8923a 100644 --- a/encodings/cbor/gen/http/concat/client/cli.go +++ b/encodings/cbor/gen/http/concat/client/cli.go @@ -8,19 +8,27 @@ package client import ( + "fmt" + concat "goa.design/examples/encodings/cbor/gen/concat" ) // BuildConcatPayload builds the payload for the concat concat endpoint from // CLI flags. -func BuildConcatPayload(concatConcatA string, concatConcatB string) (*concat.ConcatPayload, error) { +func BuildConcatPayload(concatConcatA *string, concatConcatB *string) (*concat.ConcatPayload, error) { var a string { - a = concatConcatA + if concatConcatA == nil { + return nil, fmt.Errorf("missing required flag --a") + } + a = *concatConcatA } var b string { - b = concatConcatB + if concatConcatB == nil { + return nil, fmt.Errorf("missing required flag --b") + } + b = *concatConcatB } v := &concat.ConcatPayload{} v.A = a diff --git a/encodings/cbor/go.mod b/encodings/cbor/go.mod index 6ae68f584..782fcea6f 100644 --- a/encodings/cbor/go.mod +++ b/encodings/cbor/go.mod @@ -5,7 +5,7 @@ go 1.26.0 require ( github.com/fxamacker/cbor/v2 v2.9.2 goa.design/clue v1.2.6 - goa.design/goa/v3 v3.30.1-0.20260825034953-833f95e1fdc8 + goa.design/goa/v3 v3.30.1-0.20260825121239-93fbcbe975c8 ) require ( diff --git a/encodings/cbor/go.sum b/encodings/cbor/go.sum index aade422d6..f1d6fa259 100644 --- a/encodings/cbor/go.sum +++ b/encodings/cbor/go.sum @@ -59,8 +59,8 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/clue v1.2.6 h1:ensyUkwlvEbNy8FuTGMldKuvaNouh8YoDY9QaE+EtYg= goa.design/clue v1.2.6/go.mod h1:Y4RS5o2k6MZiGk2PT3XbKyntjR2xkr8dYOKQ591dIDM= -goa.design/goa/v3 v3.30.1-0.20260825034953-833f95e1fdc8 h1:CjoyylexZ1s2rePbKaePU2Q+VwWwYjvhXXwovd6x4Hc= -goa.design/goa/v3 v3.30.1-0.20260825034953-833f95e1fdc8/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260825121239-93fbcbe975c8 h1:MwRPnes61LS7Sa+TLAK/7zCCMZ3gmlcusA06NkuF+F0= +goa.design/goa/v3 v3.30.1-0.20260825121239-93fbcbe975c8/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/encodings/text/gen/http/cli/text/cli.go b/encodings/text/gen/http/cli/text/cli.go index f85ddf5ca..945e5561c 100644 --- a/encodings/text/gen/http/cli/text/cli.go +++ b/encodings/text/gen/http/cli/text/cli.go @@ -33,6 +33,25 @@ func UsageExamples() string { "" } +// cliStringFlag keeps an omitted command-line flag distinct from an explicitly empty flag. +type cliStringFlag struct { + value *string +} + +// String returns the flag text shown by the standard flag package. +func (f *cliStringFlag) String() string { + if f.value == nil { + return "" + } + return *f.value +} + +// Set records that the user supplied the flag, even when value is empty. +func (f *cliStringFlag) Set(value string) error { + f.value = &value + return nil +} + // ParseEndpoint returns the endpoint and payload as specified on the command // line. func ParseEndpoint( @@ -46,21 +65,30 @@ func ParseEndpoint( textFlags = flag.NewFlagSet("text", flag.ContinueOnError) textConcatstringsFlags = flag.NewFlagSet("concatstrings", flag.ExitOnError) - textConcatstringsAFlag = textConcatstringsFlags.String("a", "REQUIRED", "Left operand") - textConcatstringsBFlag = textConcatstringsFlags.String("b", "REQUIRED", "Right operand") + textConcatstringsAFlag = new(cliStringFlag) + textConcatstringsBFlag = new(cliStringFlag) textConcatbytesFlags = flag.NewFlagSet("concatbytes", flag.ExitOnError) - textConcatbytesAFlag = textConcatbytesFlags.String("a", "REQUIRED", "Left operand") - textConcatbytesBFlag = textConcatbytesFlags.String("b", "REQUIRED", "Right operand") + textConcatbytesAFlag = new(cliStringFlag) + textConcatbytesBFlag = new(cliStringFlag) textConcatstringfieldFlags = flag.NewFlagSet("concatstringfield", flag.ExitOnError) - textConcatstringfieldAFlag = textConcatstringfieldFlags.String("a", "REQUIRED", "Left operand") - textConcatstringfieldBFlag = textConcatstringfieldFlags.String("b", "REQUIRED", "Right operand") + textConcatstringfieldAFlag = new(cliStringFlag) + textConcatstringfieldBFlag = new(cliStringFlag) textConcatbytesfieldFlags = flag.NewFlagSet("concatbytesfield", flag.ExitOnError) - textConcatbytesfieldAFlag = textConcatbytesfieldFlags.String("a", "REQUIRED", "Left operand") - textConcatbytesfieldBFlag = textConcatbytesfieldFlags.String("b", "REQUIRED", "Right operand") + textConcatbytesfieldAFlag = new(cliStringFlag) + textConcatbytesfieldBFlag = new(cliStringFlag) ) + textConcatstringsFlags.Var(textConcatstringsAFlag, "a", "Left operand") + textConcatstringsFlags.Var(textConcatstringsBFlag, "b", "Right operand") + textConcatbytesFlags.Var(textConcatbytesAFlag, "a", "Left operand") + textConcatbytesFlags.Var(textConcatbytesBFlag, "b", "Right operand") + textConcatstringfieldFlags.Var(textConcatstringfieldAFlag, "a", "Left operand") + textConcatstringfieldFlags.Var(textConcatstringfieldBFlag, "b", "Right operand") + textConcatbytesfieldFlags.Var(textConcatbytesfieldAFlag, "a", "Left operand") + textConcatbytesfieldFlags.Var(textConcatbytesfieldBFlag, "b", "Right operand") + textFlags.Usage = textUsage textConcatstringsFlags.Usage = textConcatstringsUsage textConcatbytesFlags.Usage = textConcatbytesUsage @@ -140,16 +168,16 @@ func ParseEndpoint( switch epn { case "concatstrings": endpoint = c.Concatstrings() - data, err = textc.BuildConcatstringsPayload(*textConcatstringsAFlag, *textConcatstringsBFlag) + data, err = textc.BuildConcatstringsPayload(textConcatstringsAFlag.value, textConcatstringsBFlag.value) case "concatbytes": endpoint = c.Concatbytes() - data, err = textc.BuildConcatbytesPayload(*textConcatbytesAFlag, *textConcatbytesBFlag) + data, err = textc.BuildConcatbytesPayload(textConcatbytesAFlag.value, textConcatbytesBFlag.value) case "concatstringfield": endpoint = c.Concatstringfield() - data, err = textc.BuildConcatstringfieldPayload(*textConcatstringfieldAFlag, *textConcatstringfieldBFlag) + data, err = textc.BuildConcatstringfieldPayload(textConcatstringfieldAFlag.value, textConcatstringfieldBFlag.value) case "concatbytesfield": endpoint = c.Concatbytesfield() - data, err = textc.BuildConcatbytesfieldPayload(*textConcatbytesfieldAFlag, *textConcatbytesfieldBFlag) + data, err = textc.BuildConcatbytesfieldPayload(textConcatbytesfieldAFlag.value, textConcatbytesfieldBFlag.value) } } } diff --git a/encodings/text/gen/http/text/client/cli.go b/encodings/text/gen/http/text/client/cli.go index 4a6a50787..a9f346aec 100644 --- a/encodings/text/gen/http/text/client/cli.go +++ b/encodings/text/gen/http/text/client/cli.go @@ -8,19 +8,27 @@ package client import ( + "fmt" + text "goa.design/examples/encodings/text/gen/text" ) // BuildConcatstringsPayload builds the payload for the text concatstrings // endpoint from CLI flags. -func BuildConcatstringsPayload(textConcatstringsA string, textConcatstringsB string) (*text.ConcatstringsPayload, error) { +func BuildConcatstringsPayload(textConcatstringsA *string, textConcatstringsB *string) (*text.ConcatstringsPayload, error) { var a string { - a = textConcatstringsA + if textConcatstringsA == nil { + return nil, fmt.Errorf("missing required flag --a") + } + a = *textConcatstringsA } var b string { - b = textConcatstringsB + if textConcatstringsB == nil { + return nil, fmt.Errorf("missing required flag --b") + } + b = *textConcatstringsB } v := &text.ConcatstringsPayload{} v.A = a @@ -31,14 +39,20 @@ func BuildConcatstringsPayload(textConcatstringsA string, textConcatstringsB str // BuildConcatbytesPayload builds the payload for the text concatbytes endpoint // from CLI flags. -func BuildConcatbytesPayload(textConcatbytesA string, textConcatbytesB string) (*text.ConcatbytesPayload, error) { +func BuildConcatbytesPayload(textConcatbytesA *string, textConcatbytesB *string) (*text.ConcatbytesPayload, error) { var a string { - a = textConcatbytesA + if textConcatbytesA == nil { + return nil, fmt.Errorf("missing required flag --a") + } + a = *textConcatbytesA } var b string { - b = textConcatbytesB + if textConcatbytesB == nil { + return nil, fmt.Errorf("missing required flag --b") + } + b = *textConcatbytesB } v := &text.ConcatbytesPayload{} v.A = a @@ -49,14 +63,20 @@ func BuildConcatbytesPayload(textConcatbytesA string, textConcatbytesB string) ( // BuildConcatstringfieldPayload builds the payload for the text // concatstringfield endpoint from CLI flags. -func BuildConcatstringfieldPayload(textConcatstringfieldA string, textConcatstringfieldB string) (*text.ConcatstringfieldPayload, error) { +func BuildConcatstringfieldPayload(textConcatstringfieldA *string, textConcatstringfieldB *string) (*text.ConcatstringfieldPayload, error) { var a string { - a = textConcatstringfieldA + if textConcatstringfieldA == nil { + return nil, fmt.Errorf("missing required flag --a") + } + a = *textConcatstringfieldA } var b string { - b = textConcatstringfieldB + if textConcatstringfieldB == nil { + return nil, fmt.Errorf("missing required flag --b") + } + b = *textConcatstringfieldB } v := &text.ConcatstringfieldPayload{} v.A = a @@ -67,14 +87,20 @@ func BuildConcatstringfieldPayload(textConcatstringfieldA string, textConcatstri // BuildConcatbytesfieldPayload builds the payload for the text // concatbytesfield endpoint from CLI flags. -func BuildConcatbytesfieldPayload(textConcatbytesfieldA string, textConcatbytesfieldB string) (*text.ConcatbytesfieldPayload, error) { +func BuildConcatbytesfieldPayload(textConcatbytesfieldA *string, textConcatbytesfieldB *string) (*text.ConcatbytesfieldPayload, error) { var a string { - a = textConcatbytesfieldA + if textConcatbytesfieldA == nil { + return nil, fmt.Errorf("missing required flag --a") + } + a = *textConcatbytesfieldA } var b string { - b = textConcatbytesfieldB + if textConcatbytesfieldB == nil { + return nil, fmt.Errorf("missing required flag --b") + } + b = *textConcatbytesfieldB } v := &text.ConcatbytesfieldPayload{} v.A = a diff --git a/encodings/text/go.mod b/encodings/text/go.mod index ebd36e8b4..ee9f0a4ed 100644 --- a/encodings/text/go.mod +++ b/encodings/text/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( goa.design/clue v1.2.6 - goa.design/goa/v3 v3.30.1-0.20260825034953-833f95e1fdc8 + goa.design/goa/v3 v3.30.1-0.20260825121239-93fbcbe975c8 ) require ( diff --git a/encodings/text/go.sum b/encodings/text/go.sum index 9782e926c..5cb877461 100644 --- a/encodings/text/go.sum +++ b/encodings/text/go.sum @@ -55,8 +55,8 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/clue v1.2.6 h1:ensyUkwlvEbNy8FuTGMldKuvaNouh8YoDY9QaE+EtYg= goa.design/clue v1.2.6/go.mod h1:Y4RS5o2k6MZiGk2PT3XbKyntjR2xkr8dYOKQ591dIDM= -goa.design/goa/v3 v3.30.1-0.20260825034953-833f95e1fdc8 h1:CjoyylexZ1s2rePbKaePU2Q+VwWwYjvhXXwovd6x4Hc= -goa.design/goa/v3 v3.30.1-0.20260825034953-833f95e1fdc8/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260825121239-93fbcbe975c8 h1:MwRPnes61LS7Sa+TLAK/7zCCMZ3gmlcusA06NkuF+F0= +goa.design/goa/v3 v3.30.1-0.20260825121239-93fbcbe975c8/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/error/gen/grpc/calc/client/cli.go b/error/gen/grpc/calc/client/cli.go index 1999434ee..2a5239283 100644 --- a/error/gen/grpc/calc/client/cli.go +++ b/error/gen/grpc/calc/client/cli.go @@ -17,12 +17,12 @@ import ( // BuildDividePayload builds the payload for the calc divide endpoint from CLI // flags. -func BuildDividePayload(calcDivideMessage string) (*calc.DividePayload, error) { +func BuildDividePayload(calcDivideMessage *string) (*calc.DividePayload, error) { var err error var message calcpb.DivideRequest { - if calcDivideMessage != "" { - err = protojson.Unmarshal([]byte(calcDivideMessage), &message) + if calcDivideMessage != nil { + err = protojson.Unmarshal([]byte(*calcDivideMessage), &message) if err != nil { return nil, fmt.Errorf("invalid JSON for message, \nerror: %s, \nexample of valid JSON:\n%s", err, "'{\n \"dividend\": 2120767999786333776,\n \"divisor\": 6535528958544806582\n }'") } diff --git a/error/gen/grpc/cli/calc/cli.go b/error/gen/grpc/cli/calc/cli.go index 5e73a7932..c7050cce6 100644 --- a/error/gen/grpc/cli/calc/cli.go +++ b/error/gen/grpc/cli/calc/cli.go @@ -32,6 +32,25 @@ func UsageExamples() string { "" } +// cliStringFlag keeps an omitted command-line flag distinct from an explicitly empty flag. +type cliStringFlag struct { + value *string +} + +// String returns the flag text shown by the standard flag package. +func (f *cliStringFlag) String() string { + if f.value == nil { + return "" + } + return *f.value +} + +// Set records that the user supplied the flag, even when value is empty. +func (f *cliStringFlag) Set(value string) error { + f.value = &value + return nil +} + // ParseEndpoint returns the endpoint and payload as specified on the command // line. func ParseEndpoint( @@ -42,8 +61,10 @@ func ParseEndpoint( calcFlags = flag.NewFlagSet("calc", flag.ContinueOnError) calcDivideFlags = flag.NewFlagSet("divide", flag.ExitOnError) - calcDivideMessageFlag = calcDivideFlags.String("message", "", "") + calcDivideMessageFlag = new(cliStringFlag) ) + calcDivideFlags.Var(calcDivideMessageFlag, "message", "") + calcFlags.Usage = calcUsage calcDivideFlags.Usage = calcDivideUsage @@ -111,7 +132,7 @@ func ParseEndpoint( switch epn { case "divide": endpoint = c.Divide() - data, err = calcc.BuildDividePayload(*calcDivideMessageFlag) + data, err = calcc.BuildDividePayload(calcDivideMessageFlag.value) } } } diff --git a/error/gen/http/calc/client/cli.go b/error/gen/http/calc/client/cli.go index 09aff3abf..dde5e3f7d 100644 --- a/error/gen/http/calc/client/cli.go +++ b/error/gen/http/calc/client/cli.go @@ -16,11 +16,14 @@ import ( // BuildDividePayload builds the payload for the calc divide endpoint from CLI // flags. -func BuildDividePayload(calcDivideBody string) (*calc.DividePayload, error) { +func BuildDividePayload(calcDivideBody *string) (*calc.DividePayload, error) { var err error var body DivideRequestBody { - err = json.Unmarshal([]byte(calcDivideBody), &body) + if calcDivideBody == nil { + return nil, fmt.Errorf("missing required flag --body") + } + err = json.Unmarshal([]byte(*calcDivideBody), &body) if err != nil { return nil, fmt.Errorf("invalid JSON for body, \nerror: %s, \nexample of valid JSON:\n%s", err, "'{\n \"dividend\": 6599615662108896380,\n \"divisor\": 6289780582187170160\n }'") } diff --git a/error/gen/http/cli/calc/cli.go b/error/gen/http/cli/calc/cli.go index f565ff64c..b5e88c923 100644 --- a/error/gen/http/cli/calc/cli.go +++ b/error/gen/http/cli/calc/cli.go @@ -33,6 +33,25 @@ func UsageExamples() string { "" } +// cliStringFlag keeps an omitted command-line flag distinct from an explicitly empty flag. +type cliStringFlag struct { + value *string +} + +// String returns the flag text shown by the standard flag package. +func (f *cliStringFlag) String() string { + if f.value == nil { + return "" + } + return *f.value +} + +// Set records that the user supplied the flag, even when value is empty. +func (f *cliStringFlag) Set(value string) error { + f.value = &value + return nil +} + // ParseEndpoint returns the endpoint and payload as specified on the command // line. func ParseEndpoint( @@ -46,8 +65,10 @@ func ParseEndpoint( calcFlags = flag.NewFlagSet("calc", flag.ContinueOnError) calcDivideFlags = flag.NewFlagSet("divide", flag.ExitOnError) - calcDivideBodyFlag = calcDivideFlags.String("body", "REQUIRED", "") + calcDivideBodyFlag = new(cliStringFlag) ) + calcDivideFlags.Var(calcDivideBodyFlag, "body", "") + calcFlags.Usage = calcUsage calcDivideFlags.Usage = calcDivideUsage @@ -115,7 +136,7 @@ func ParseEndpoint( switch epn { case "divide": endpoint = c.Divide() - data, err = calcc.BuildDividePayload(*calcDivideBodyFlag) + data, err = calcc.BuildDividePayload(calcDivideBodyFlag.value) } } } diff --git a/error/go.mod b/error/go.mod index 91777aa79..fb0b7b98d 100644 --- a/error/go.mod +++ b/error/go.mod @@ -3,7 +3,7 @@ module goa.design/examples/error go 1.26.0 require ( - goa.design/goa/v3 v3.30.1-0.20260825034953-833f95e1fdc8 + goa.design/goa/v3 v3.30.1-0.20260825121239-93fbcbe975c8 google.golang.org/genproto v0.0.0-20260810153831-ec0a7760b754 google.golang.org/grpc v1.83.1 google.golang.org/protobuf v1.36.12 diff --git a/error/go.sum b/error/go.sum index 740068c37..9df4b41a0 100644 --- a/error/go.sum +++ b/error/go.sum @@ -49,8 +49,8 @@ go.opentelemetry.io/otel/trace v1.44.0 h1:jxF5CsGYCe74MCRx2X4g7WsY/VBKRqqpNvXlX/ go.opentelemetry.io/otel/trace v1.44.0/go.mod h1:oLl1jrMQAVo6v3GAggN+1VH9VIz9iUSvW53sW1Q8PIE= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260825034953-833f95e1fdc8 h1:CjoyylexZ1s2rePbKaePU2Q+VwWwYjvhXXwovd6x4Hc= -goa.design/goa/v3 v3.30.1-0.20260825034953-833f95e1fdc8/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260825121239-93fbcbe975c8 h1:MwRPnes61LS7Sa+TLAK/7zCCMZ3gmlcusA06NkuF+F0= +goa.design/goa/v3 v3.30.1-0.20260825121239-93fbcbe975c8/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/files/go.mod b/files/go.mod index 87976d763..415c3a2be 100644 --- a/files/go.mod +++ b/files/go.mod @@ -2,7 +2,7 @@ module goa.design/examples/files go 1.26.0 -require goa.design/goa/v3 v3.30.1-0.20260825034953-833f95e1fdc8 +require goa.design/goa/v3 v3.30.1-0.20260825121239-93fbcbe975c8 require ( github.com/dimfeld/httppath v0.0.0-20170720192232-ee938bf73598 // indirect diff --git a/files/go.sum b/files/go.sum index b0fedd60d..43f0e60f5 100644 --- a/files/go.sum +++ b/files/go.sum @@ -31,8 +31,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260825034953-833f95e1fdc8 h1:CjoyylexZ1s2rePbKaePU2Q+VwWwYjvhXXwovd6x4Hc= -goa.design/goa/v3 v3.30.1-0.20260825034953-833f95e1fdc8/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260825121239-93fbcbe975c8 h1:MwRPnes61LS7Sa+TLAK/7zCCMZ3gmlcusA06NkuF+F0= +goa.design/goa/v3 v3.30.1-0.20260825121239-93fbcbe975c8/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= diff --git a/httpstatus/design/design.go b/httpstatus/design/design.go index 019b2d85a..42e403c14 100644 --- a/httpstatus/design/design.go +++ b/httpstatus/design/design.go @@ -7,7 +7,6 @@ import ( var GreetingResult = ResultType("application/vnd.hello", func() { Attribute("greeting", String, "The greeting message") Attribute("outcome", func() { - Meta("struct:tag:json", "-") // hide from response Meta("swagger:example", "false") // hide from swagger Meta("swagger:generate", "false") }) diff --git a/httpstatus/gen/hello/service.go b/httpstatus/gen/hello/service.go index 8825876f1..083324a3c 100644 --- a/httpstatus/gen/hello/service.go +++ b/httpstatus/gen/hello/service.go @@ -39,7 +39,7 @@ var MethodNames = [1]string{"hello"} type Hello struct { // The greeting message Greeting string - Outcome string `json:"-"` + Outcome string } // HelloPayload is the payload type of the hello service hello method. diff --git a/httpstatus/gen/hello/views/view.go b/httpstatus/gen/hello/views/view.go index 2f7fc4500..0b5210868 100644 --- a/httpstatus/gen/hello/views/view.go +++ b/httpstatus/gen/hello/views/view.go @@ -21,7 +21,7 @@ type Hello struct { type HelloView struct { // The greeting message Greeting *string - Outcome *string `json:"-"` + Outcome *string } var ( diff --git a/httpstatus/gen/http/cli/hello/cli.go b/httpstatus/gen/http/cli/hello/cli.go index dccfce824..dc8998c85 100644 --- a/httpstatus/gen/http/cli/hello/cli.go +++ b/httpstatus/gen/http/cli/hello/cli.go @@ -33,6 +33,25 @@ func UsageExamples() string { "" } +// cliStringFlag keeps an omitted command-line flag distinct from an explicitly empty flag. +type cliStringFlag struct { + value *string +} + +// String returns the flag text shown by the standard flag package. +func (f *cliStringFlag) String() string { + if f.value == nil { + return "" + } + return *f.value +} + +// Set records that the user supplied the flag, even when value is empty. +func (f *cliStringFlag) Set(value string) error { + f.value = &value + return nil +} + // ParseEndpoint returns the endpoint and payload as specified on the command // line. func ParseEndpoint( @@ -46,8 +65,10 @@ func ParseEndpoint( helloFlags = flag.NewFlagSet("hello", flag.ContinueOnError) helloHelloFlags = flag.NewFlagSet("hello", flag.ExitOnError) - helloHelloGreetingFlag = helloHelloFlags.String("greeting", "REQUIRED", "The greeting message") + helloHelloGreetingFlag = new(cliStringFlag) ) + helloHelloFlags.Var(helloHelloGreetingFlag, "greeting", "The greeting message") + helloFlags.Usage = helloUsage helloHelloFlags.Usage = helloHelloUsage @@ -115,7 +136,7 @@ func ParseEndpoint( switch epn { case "hello": endpoint = c.Hello() - data, err = helloc.BuildHelloPayload(*helloHelloGreetingFlag) + data, err = helloc.BuildHelloPayload(helloHelloGreetingFlag.value) } } } diff --git a/httpstatus/gen/http/hello/client/cli.go b/httpstatus/gen/http/hello/client/cli.go index 20dad9451..efc2185f5 100644 --- a/httpstatus/gen/http/hello/client/cli.go +++ b/httpstatus/gen/http/hello/client/cli.go @@ -8,15 +8,20 @@ package client import ( + "fmt" + hello "goa.design/examples/httpstatus/gen/hello" ) // BuildHelloPayload builds the payload for the hello hello endpoint from CLI // flags. -func BuildHelloPayload(helloHelloGreeting string) (*hello.HelloPayload, error) { +func BuildHelloPayload(helloHelloGreeting *string) (*hello.HelloPayload, error) { var greeting string { - greeting = helloHelloGreeting + if helloHelloGreeting == nil { + return nil, fmt.Errorf("missing required flag --greeting") + } + greeting = *helloHelloGreeting } v := &hello.HelloPayload{} v.Greeting = greeting diff --git a/httpstatus/gen/http/hello/client/encode_decode.go b/httpstatus/gen/http/hello/client/encode_decode.go index 32f70e869..968d11d6f 100644 --- a/httpstatus/gen/http/hello/client/encode_decode.go +++ b/httpstatus/gen/http/hello/client/encode_decode.go @@ -78,6 +78,10 @@ func DecodeHelloResponse(decoder func(*http.Response) goahttp.Decoder, restoreBo if err != nil { return nil, goahttp.ErrDecodingError("hello", "hello", err) } + err = ValidateHelloCreatedResponseBody(&body) + if err != nil { + return nil, goahttp.ErrValidationError("hello", "hello", err) + } p := NewHelloViewCreated(&body) tmp := "created" p.Outcome = &tmp @@ -97,6 +101,10 @@ func DecodeHelloResponse(decoder func(*http.Response) goahttp.Decoder, restoreBo if err != nil { return nil, goahttp.ErrDecodingError("hello", "hello", err) } + err = ValidateHelloAcceptedResponseBody(&body) + if err != nil { + return nil, goahttp.ErrValidationError("hello", "hello", err) + } p := NewHelloViewAccepted(&body) tmp := "accepted" p.Outcome = &tmp @@ -116,6 +124,10 @@ func DecodeHelloResponse(decoder func(*http.Response) goahttp.Decoder, restoreBo if err != nil { return nil, goahttp.ErrDecodingError("hello", "hello", err) } + err = ValidateHelloOKResponseBody(&body) + if err != nil { + return nil, goahttp.ErrValidationError("hello", "hello", err) + } p := NewHelloViewOK(&body) view := "default" vres := &helloviews.Hello{Projected: p, View: view} diff --git a/httpstatus/gen/http/hello/client/types.go b/httpstatus/gen/http/hello/client/types.go index 89fbee716..9cb23438d 100644 --- a/httpstatus/gen/http/hello/client/types.go +++ b/httpstatus/gen/http/hello/client/types.go @@ -9,6 +9,7 @@ package client import ( helloviews "goa.design/examples/httpstatus/gen/hello/views" + goa "goa.design/goa/v3/pkg" ) // HelloCreatedResponseBody is the type of the "hello" service "hello" endpoint @@ -16,7 +17,6 @@ import ( type HelloCreatedResponseBody struct { // The greeting message Greeting *string `form:"greeting,omitempty" json:"greeting,omitempty" xml:"greeting,omitempty"` - Outcome *string `json:"-"` } // HelloAcceptedResponseBody is the type of the "hello" service "hello" @@ -24,7 +24,6 @@ type HelloCreatedResponseBody struct { type HelloAcceptedResponseBody struct { // The greeting message Greeting *string `form:"greeting,omitempty" json:"greeting,omitempty" xml:"greeting,omitempty"` - Outcome *string `json:"-"` } // HelloOKResponseBody is the type of the "hello" service "hello" endpoint HTTP @@ -32,7 +31,7 @@ type HelloAcceptedResponseBody struct { type HelloOKResponseBody struct { // The greeting message Greeting *string `form:"greeting,omitempty" json:"greeting,omitempty" xml:"greeting,omitempty"` - Outcome *string `json:"-"` + Outcome *string `form:"outcome,omitempty" json:"outcome,omitempty" xml:"outcome,omitempty"` } // NewHelloViewCreated builds a "hello" service "hello" endpoint result from a @@ -40,7 +39,6 @@ type HelloOKResponseBody struct { func NewHelloViewCreated(body *HelloCreatedResponseBody) *helloviews.HelloView { v := &helloviews.HelloView{ Greeting: body.Greeting, - Outcome: body.Outcome, } return v @@ -51,7 +49,6 @@ func NewHelloViewCreated(body *HelloCreatedResponseBody) *helloviews.HelloView { func NewHelloViewAccepted(body *HelloAcceptedResponseBody) *helloviews.HelloView { v := &helloviews.HelloView{ Greeting: body.Greeting, - Outcome: body.Outcome, } return v @@ -67,3 +64,33 @@ func NewHelloViewOK(body *HelloOKResponseBody) *helloviews.HelloView { return v } + +// ValidateHelloCreatedResponseBody runs the validations defined on +// HelloCreatedResponseBody +func ValidateHelloCreatedResponseBody(body *HelloCreatedResponseBody) (err error) { + if body.Greeting == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("greeting", "body")) + } + return +} + +// ValidateHelloAcceptedResponseBody runs the validations defined on +// HelloAcceptedResponseBody +func ValidateHelloAcceptedResponseBody(body *HelloAcceptedResponseBody) (err error) { + if body.Greeting == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("greeting", "body")) + } + return +} + +// ValidateHelloOKResponseBody runs the validations defined on +// HelloOKResponseBody +func ValidateHelloOKResponseBody(body *HelloOKResponseBody) (err error) { + if body.Outcome == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("outcome", "body")) + } + if body.Greeting == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("greeting", "body")) + } + return +} diff --git a/httpstatus/gen/http/hello/server/types.go b/httpstatus/gen/http/hello/server/types.go index 0b4c5b619..40c17d70d 100644 --- a/httpstatus/gen/http/hello/server/types.go +++ b/httpstatus/gen/http/hello/server/types.go @@ -17,7 +17,6 @@ import ( type HelloCreatedResponseBody struct { // The greeting message Greeting string `form:"greeting" json:"greeting" xml:"greeting"` - Outcome string `json:"-"` } // HelloAcceptedResponseBody is the type of the "hello" service "hello" @@ -25,7 +24,6 @@ type HelloCreatedResponseBody struct { type HelloAcceptedResponseBody struct { // The greeting message Greeting string `form:"greeting" json:"greeting" xml:"greeting"` - Outcome string `json:"-"` } // HelloOKResponseBody is the type of the "hello" service "hello" endpoint HTTP @@ -33,7 +31,7 @@ type HelloAcceptedResponseBody struct { type HelloOKResponseBody struct { // The greeting message Greeting string `form:"greeting" json:"greeting" xml:"greeting"` - Outcome string `json:"-"` + Outcome string `form:"outcome" json:"outcome" xml:"outcome"` } // NewHelloCreatedResponseBody builds the HTTP response body from the result of @@ -41,7 +39,6 @@ type HelloOKResponseBody struct { func NewHelloCreatedResponseBody(res *helloviews.HelloView) *HelloCreatedResponseBody { body := &HelloCreatedResponseBody{ Greeting: *res.Greeting, - Outcome: *res.Outcome, } return body } @@ -51,7 +48,6 @@ func NewHelloCreatedResponseBody(res *helloviews.HelloView) *HelloCreatedRespons func NewHelloAcceptedResponseBody(res *helloviews.HelloView) *HelloAcceptedResponseBody { body := &HelloAcceptedResponseBody{ Greeting: *res.Greeting, - Outcome: *res.Outcome, } return body } diff --git a/httpstatus/go.mod b/httpstatus/go.mod index f1b829ae6..66b5f1104 100644 --- a/httpstatus/go.mod +++ b/httpstatus/go.mod @@ -2,7 +2,7 @@ module goa.design/examples/httpstatus go 1.26.0 -require goa.design/goa/v3 v3.30.1-0.20260825034953-833f95e1fdc8 +require goa.design/goa/v3 v3.30.1-0.20260825121239-93fbcbe975c8 require ( github.com/dimfeld/httppath v0.0.0-20170720192232-ee938bf73598 // indirect diff --git a/httpstatus/go.sum b/httpstatus/go.sum index b0fedd60d..43f0e60f5 100644 --- a/httpstatus/go.sum +++ b/httpstatus/go.sum @@ -31,8 +31,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260825034953-833f95e1fdc8 h1:CjoyylexZ1s2rePbKaePU2Q+VwWwYjvhXXwovd6x4Hc= -goa.design/goa/v3 v3.30.1-0.20260825034953-833f95e1fdc8/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260825121239-93fbcbe975c8 h1:MwRPnes61LS7Sa+TLAK/7zCCMZ3gmlcusA06NkuF+F0= +goa.design/goa/v3 v3.30.1-0.20260825121239-93fbcbe975c8/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= diff --git a/interceptors/gen/grpc/cli/interceptors/cli.go b/interceptors/gen/grpc/cli/interceptors/cli.go index b3c6a3201..026cd4208 100644 --- a/interceptors/gen/grpc/cli/interceptors/cli.go +++ b/interceptors/gen/grpc/cli/interceptors/cli.go @@ -33,6 +33,25 @@ func UsageExamples() string { "" } +// cliStringFlag keeps an omitted command-line flag distinct from an explicitly empty flag. +type cliStringFlag struct { + value *string +} + +// String returns the flag text shown by the standard flag package. +func (f *cliStringFlag) String() string { + if f.value == nil { + return "" + } + return *f.value +} + +// Set records that the user supplied the flag, even when value is empty. +func (f *cliStringFlag) Set(value string) error { + f.value = &value + return nil +} + // ParseEndpoint returns the endpoint and payload as specified on the command // line. func ParseEndpoint( @@ -44,8 +63,10 @@ func ParseEndpoint( interceptorsFlags = flag.NewFlagSet("interceptors", flag.ContinueOnError) interceptorsGetFlags = flag.NewFlagSet("get", flag.ExitOnError) - interceptorsGetMessageFlag = interceptorsGetFlags.String("message", "", "") + interceptorsGetMessageFlag = new(cliStringFlag) ) + interceptorsGetFlags.Var(interceptorsGetMessageFlag, "message", "") + interceptorsFlags.Usage = interceptorsUsage interceptorsGetFlags.Usage = interceptorsGetUsage @@ -114,7 +135,7 @@ func ParseEndpoint( case "get": endpoint = c.Get() endpoint = interceptors.WrapGetClientEndpoint(endpoint, interceptorsInter) - data, err = interceptorsc.BuildGetPayload(*interceptorsGetMessageFlag) + data, err = interceptorsc.BuildGetPayload(interceptorsGetMessageFlag.value) } } } diff --git a/interceptors/gen/grpc/interceptors/client/cli.go b/interceptors/gen/grpc/interceptors/client/cli.go index 057879d68..aeb2cc0b1 100644 --- a/interceptors/gen/grpc/interceptors/client/cli.go +++ b/interceptors/gen/grpc/interceptors/client/cli.go @@ -17,12 +17,12 @@ import ( // BuildGetPayload builds the payload for the interceptors get endpoint from // CLI flags. -func BuildGetPayload(interceptorsGetMessage string) (*interceptors.GetPayload, error) { +func BuildGetPayload(interceptorsGetMessage *string) (*interceptors.GetPayload, error) { var err error var message interceptorspb.GetRequest { - if interceptorsGetMessage != "" { - err = protojson.Unmarshal([]byte(interceptorsGetMessage), &message) + if interceptorsGetMessage != nil { + err = protojson.Unmarshal([]byte(*interceptorsGetMessage), &message) if err != nil { return nil, fmt.Errorf("invalid JSON for message, \nerror: %s, \nexample of valid JSON:\n%s", err, "'{\n \"auth\": \"Aut dolorem nisi qui accusantium.\",\n \"record_id\": \"dd11abcb-f3b1-412f-9ede-6f80730d5a28\",\n \"span_id\": \"dd11abcb-f3b1-412f-9ede-6f80730d5a28\",\n \"tenant_id\": \"dd11abcb-f3b1-412f-9ede-6f80730d5a28\",\n \"trace_id\": \"dd11abcb-f3b1-412f-9ede-6f80730d5a28\"\n }'") } diff --git a/interceptors/gen/http/cli/interceptors/cli.go b/interceptors/gen/http/cli/interceptors/cli.go index a45eda352..5381d0516 100644 --- a/interceptors/gen/http/cli/interceptors/cli.go +++ b/interceptors/gen/http/cli/interceptors/cli.go @@ -34,6 +34,25 @@ func UsageExamples() string { "" } +// cliStringFlag keeps an omitted command-line flag distinct from an explicitly empty flag. +type cliStringFlag struct { + value *string +} + +// String returns the flag text shown by the standard flag package. +func (f *cliStringFlag) String() string { + if f.value == nil { + return "" + } + return *f.value +} + +// Set records that the user supplied the flag, even when value is empty. +func (f *cliStringFlag) Set(value string) error { + f.value = &value + return nil +} + // ParseEndpoint returns the endpoint and payload as specified on the command // line. func ParseEndpoint( @@ -50,20 +69,30 @@ func ParseEndpoint( interceptorsFlags = flag.NewFlagSet("interceptors", flag.ContinueOnError) interceptorsGetFlags = flag.NewFlagSet("get", flag.ExitOnError) - interceptorsGetBodyFlag = interceptorsGetFlags.String("body", "REQUIRED", "") - interceptorsGetTenantIDFlag = interceptorsGetFlags.String("tenant-id", "REQUIRED", "Tenant ID for the request") - interceptorsGetRecordIDFlag = interceptorsGetFlags.String("record-id", "REQUIRED", "ID of the record to retrieve") - interceptorsGetAuthFlag = interceptorsGetFlags.String("auth", "REQUIRED", "") + interceptorsGetBodyFlag = new(cliStringFlag) + interceptorsGetTenantIDFlag = new(cliStringFlag) + interceptorsGetRecordIDFlag = new(cliStringFlag) + interceptorsGetAuthFlag = new(cliStringFlag) interceptorsCreateFlags = flag.NewFlagSet("create", flag.ExitOnError) - interceptorsCreateBodyFlag = interceptorsCreateFlags.String("body", "REQUIRED", "") - interceptorsCreateTenantIDFlag = interceptorsCreateFlags.String("tenant-id", "REQUIRED", "Tenant ID for the request") - interceptorsCreateAuthFlag = interceptorsCreateFlags.String("auth", "REQUIRED", "") + interceptorsCreateBodyFlag = new(cliStringFlag) + interceptorsCreateTenantIDFlag = new(cliStringFlag) + interceptorsCreateAuthFlag = new(cliStringFlag) interceptorsStreamFlags = flag.NewFlagSet("stream", flag.ExitOnError) - interceptorsStreamTenantIDFlag = interceptorsStreamFlags.String("tenant-id", "REQUIRED", "Tenant ID for the request") - interceptorsStreamAuthFlag = interceptorsStreamFlags.String("auth", "REQUIRED", "") + interceptorsStreamTenantIDFlag = new(cliStringFlag) + interceptorsStreamAuthFlag = new(cliStringFlag) ) + interceptorsGetFlags.Var(interceptorsGetBodyFlag, "body", "") + interceptorsGetFlags.Var(interceptorsGetTenantIDFlag, "tenant-id", "Tenant ID for the request") + interceptorsGetFlags.Var(interceptorsGetRecordIDFlag, "record-id", "ID of the record to retrieve") + interceptorsGetFlags.Var(interceptorsGetAuthFlag, "auth", "") + interceptorsCreateFlags.Var(interceptorsCreateBodyFlag, "body", "") + interceptorsCreateFlags.Var(interceptorsCreateTenantIDFlag, "tenant-id", "Tenant ID for the request") + interceptorsCreateFlags.Var(interceptorsCreateAuthFlag, "auth", "") + interceptorsStreamFlags.Var(interceptorsStreamTenantIDFlag, "tenant-id", "Tenant ID for the request") + interceptorsStreamFlags.Var(interceptorsStreamAuthFlag, "auth", "") + interceptorsFlags.Usage = interceptorsUsage interceptorsGetFlags.Usage = interceptorsGetUsage interceptorsCreateFlags.Usage = interceptorsCreateUsage @@ -140,15 +169,15 @@ func ParseEndpoint( case "get": endpoint = c.Get() endpoint = interceptors.WrapGetClientEndpoint(endpoint, interceptorsInter) - data, err = interceptorsc.BuildGetPayload(*interceptorsGetBodyFlag, *interceptorsGetTenantIDFlag, *interceptorsGetRecordIDFlag, *interceptorsGetAuthFlag) + data, err = interceptorsc.BuildGetPayload(interceptorsGetBodyFlag.value, interceptorsGetTenantIDFlag.value, interceptorsGetRecordIDFlag.value, interceptorsGetAuthFlag.value) case "create": endpoint = c.Create() endpoint = interceptors.WrapCreateClientEndpoint(endpoint, interceptorsInter) - data, err = interceptorsc.BuildCreatePayload(*interceptorsCreateBodyFlag, *interceptorsCreateTenantIDFlag, *interceptorsCreateAuthFlag) + data, err = interceptorsc.BuildCreatePayload(interceptorsCreateBodyFlag.value, interceptorsCreateTenantIDFlag.value, interceptorsCreateAuthFlag.value) case "stream": endpoint = c.Stream() endpoint = interceptors.WrapStreamClientEndpoint(endpoint, interceptorsInter) - data, err = interceptorsc.BuildStreamPayload(*interceptorsStreamTenantIDFlag, *interceptorsStreamAuthFlag) + data, err = interceptorsc.BuildStreamPayload(interceptorsStreamTenantIDFlag.value, interceptorsStreamAuthFlag.value) } } } diff --git a/interceptors/gen/http/interceptors/client/cli.go b/interceptors/gen/http/interceptors/client/cli.go index eb11dce4b..3b6479f95 100644 --- a/interceptors/gen/http/interceptors/client/cli.go +++ b/interceptors/gen/http/interceptors/client/cli.go @@ -17,11 +17,14 @@ import ( // BuildGetPayload builds the payload for the interceptors get endpoint from // CLI flags. -func BuildGetPayload(interceptorsGetBody string, interceptorsGetTenantID string, interceptorsGetRecordID string, interceptorsGetAuth string) (*interceptors.GetPayload, error) { +func BuildGetPayload(interceptorsGetBody *string, interceptorsGetTenantID *string, interceptorsGetRecordID *string, interceptorsGetAuth *string) (*interceptors.GetPayload, error) { var err error var body GetRequestBody { - err = json.Unmarshal([]byte(interceptorsGetBody), &body) + if interceptorsGetBody == nil { + return nil, fmt.Errorf("missing required flag --body") + } + err = json.Unmarshal([]byte(*interceptorsGetBody), &body) if err != nil { return nil, fmt.Errorf("invalid JSON for body, \nerror: %s, \nexample of valid JSON:\n%s", err, "'{\n \"spanID\": \"dd11abcb-f3b1-412f-9ede-6f80730d5a28\",\n \"traceID\": \"dd11abcb-f3b1-412f-9ede-6f80730d5a28\"\n }'") } @@ -37,7 +40,10 @@ func BuildGetPayload(interceptorsGetBody string, interceptorsGetTenantID string, } var tenantID string { - tenantID = interceptorsGetTenantID + if interceptorsGetTenantID == nil { + return nil, fmt.Errorf("missing required flag --tenant-id") + } + tenantID = *interceptorsGetTenantID err = goa.MergeErrors(err, goa.ValidateFormat("tenantID", tenantID, goa.FormatUUID)) if err != nil { return nil, err @@ -45,7 +51,10 @@ func BuildGetPayload(interceptorsGetBody string, interceptorsGetTenantID string, } var recordID string { - recordID = interceptorsGetRecordID + if interceptorsGetRecordID == nil { + return nil, fmt.Errorf("missing required flag --record-id") + } + recordID = *interceptorsGetRecordID err = goa.MergeErrors(err, goa.ValidateFormat("recordID", recordID, goa.FormatUUID)) if err != nil { return nil, err @@ -53,7 +62,10 @@ func BuildGetPayload(interceptorsGetBody string, interceptorsGetTenantID string, } var auth string { - auth = interceptorsGetAuth + if interceptorsGetAuth == nil { + return nil, fmt.Errorf("missing required flag --auth") + } + auth = *interceptorsGetAuth } v := &interceptors.GetPayload{} if body.TraceID != nil { @@ -73,11 +85,14 @@ func BuildGetPayload(interceptorsGetBody string, interceptorsGetTenantID string, // BuildCreatePayload builds the payload for the interceptors create endpoint // from CLI flags. -func BuildCreatePayload(interceptorsCreateBody string, interceptorsCreateTenantID string, interceptorsCreateAuth string) (*interceptors.CreatePayload, error) { +func BuildCreatePayload(interceptorsCreateBody *string, interceptorsCreateTenantID *string, interceptorsCreateAuth *string) (*interceptors.CreatePayload, error) { var err error var body CreateRequestBody { - err = json.Unmarshal([]byte(interceptorsCreateBody), &body) + if interceptorsCreateBody == nil { + return nil, fmt.Errorf("missing required flag --body") + } + err = json.Unmarshal([]byte(*interceptorsCreateBody), &body) if err != nil { return nil, fmt.Errorf("invalid JSON for body, \nerror: %s, \nexample of valid JSON:\n%s", err, "'{\n \"spanID\": \"dd11abcb-f3b1-412f-9ede-6f80730d5a28\",\n \"traceID\": \"dd11abcb-f3b1-412f-9ede-6f80730d5a28\",\n \"value\": \"Vel dolores.\"\n }'") } @@ -93,7 +108,10 @@ func BuildCreatePayload(interceptorsCreateBody string, interceptorsCreateTenantI } var tenantID string { - tenantID = interceptorsCreateTenantID + if interceptorsCreateTenantID == nil { + return nil, fmt.Errorf("missing required flag --tenant-id") + } + tenantID = *interceptorsCreateTenantID err = goa.MergeErrors(err, goa.ValidateFormat("tenantID", tenantID, goa.FormatUUID)) if err != nil { return nil, err @@ -101,7 +119,10 @@ func BuildCreatePayload(interceptorsCreateBody string, interceptorsCreateTenantI } var auth string { - auth = interceptorsCreateAuth + if interceptorsCreateAuth == nil { + return nil, fmt.Errorf("missing required flag --auth") + } + auth = *interceptorsCreateAuth } v := &interceptors.CreatePayload{ Value: body.Value, @@ -122,11 +143,14 @@ func BuildCreatePayload(interceptorsCreateBody string, interceptorsCreateTenantI // BuildStreamPayload builds the payload for the interceptors stream endpoint // from CLI flags. -func BuildStreamPayload(interceptorsStreamTenantID string, interceptorsStreamAuth string) (*interceptors.StreamPayload, error) { +func BuildStreamPayload(interceptorsStreamTenantID *string, interceptorsStreamAuth *string) (*interceptors.StreamPayload, error) { var err error var tenantID string { - tenantID = interceptorsStreamTenantID + if interceptorsStreamTenantID == nil { + return nil, fmt.Errorf("missing required flag --tenant-id") + } + tenantID = *interceptorsStreamTenantID err = goa.MergeErrors(err, goa.ValidateFormat("tenantID", tenantID, goa.FormatUUID)) if err != nil { return nil, err @@ -134,7 +158,10 @@ func BuildStreamPayload(interceptorsStreamTenantID string, interceptorsStreamAut } var auth string { - auth = interceptorsStreamAuth + if interceptorsStreamAuth == nil { + return nil, fmt.Errorf("missing required flag --auth") + } + auth = *interceptorsStreamAuth } v := &interceptors.StreamPayload{} v.TenantID = interceptors.UUID(tenantID) diff --git a/interceptors/go.mod b/interceptors/go.mod index 5e9a12e00..6dec4d8f2 100644 --- a/interceptors/go.mod +++ b/interceptors/go.mod @@ -6,7 +6,7 @@ require ( github.com/google/uuid v1.6.0 github.com/gorilla/websocket v1.5.3 goa.design/clue v1.2.6 - goa.design/goa/v3 v3.30.1-0.20260825034953-833f95e1fdc8 + goa.design/goa/v3 v3.30.1-0.20260825121239-93fbcbe975c8 google.golang.org/grpc v1.83.1 google.golang.org/protobuf v1.36.12 ) diff --git a/interceptors/go.sum b/interceptors/go.sum index 9782e926c..5cb877461 100644 --- a/interceptors/go.sum +++ b/interceptors/go.sum @@ -55,8 +55,8 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/clue v1.2.6 h1:ensyUkwlvEbNy8FuTGMldKuvaNouh8YoDY9QaE+EtYg= goa.design/clue v1.2.6/go.mod h1:Y4RS5o2k6MZiGk2PT3XbKyntjR2xkr8dYOKQ591dIDM= -goa.design/goa/v3 v3.30.1-0.20260825034953-833f95e1fdc8 h1:CjoyylexZ1s2rePbKaePU2Q+VwWwYjvhXXwovd6x4Hc= -goa.design/goa/v3 v3.30.1-0.20260825034953-833f95e1fdc8/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260825121239-93fbcbe975c8 h1:MwRPnes61LS7Sa+TLAK/7zCCMZ3gmlcusA06NkuF+F0= +goa.design/goa/v3 v3.30.1-0.20260825121239-93fbcbe975c8/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/multipart/gen/http/cli/resume/cli.go b/multipart/gen/http/cli/resume/cli.go index 503510768..4da321a7d 100644 --- a/multipart/gen/http/cli/resume/cli.go +++ b/multipart/gen/http/cli/resume/cli.go @@ -33,6 +33,25 @@ func UsageExamples() string { "" } +// cliStringFlag keeps an omitted command-line flag distinct from an explicitly empty flag. +type cliStringFlag struct { + value *string +} + +// String returns the flag text shown by the standard flag package. +func (f *cliStringFlag) String() string { + if f.value == nil { + return "" + } + return *f.value +} + +// Set records that the user supplied the flag, even when value is empty. +func (f *cliStringFlag) Set(value string) error { + f.value = &value + return nil +} + // ParseEndpoint returns the endpoint and payload as specified on the command // line. func ParseEndpoint( @@ -49,8 +68,10 @@ func ParseEndpoint( resumeListFlags = flag.NewFlagSet("list", flag.ExitOnError) resumeAddFlags = flag.NewFlagSet("add", flag.ExitOnError) - resumeAddBodyFlag = resumeAddFlags.String("body", "REQUIRED", "") + resumeAddBodyFlag = new(cliStringFlag) ) + resumeAddFlags.Var(resumeAddBodyFlag, "body", "") + resumeFlags.Usage = resumeUsage resumeListFlags.Usage = resumeListUsage resumeAddFlags.Usage = resumeAddUsage @@ -124,7 +145,7 @@ func ParseEndpoint( endpoint = c.List() case "add": endpoint = c.Add(resumeAddEncoderFn) - data, err = resumec.BuildAddPayload(*resumeAddBodyFlag) + data, err = resumec.BuildAddPayload(resumeAddBodyFlag.value) } } } diff --git a/multipart/gen/http/resume/client/cli.go b/multipart/gen/http/resume/client/cli.go index 8a84838dd..5a454c268 100644 --- a/multipart/gen/http/resume/client/cli.go +++ b/multipart/gen/http/resume/client/cli.go @@ -16,11 +16,14 @@ import ( // BuildAddPayload builds the payload for the resume add endpoint from CLI // flags. -func BuildAddPayload(resumeAddBody string) ([]*resume.Resume, error) { +func BuildAddPayload(resumeAddBody *string) ([]*resume.Resume, error) { var err error var body []*ResumeRequestBody { - err = json.Unmarshal([]byte(resumeAddBody), &body) + if resumeAddBody == nil { + return nil, fmt.Errorf("missing required flag --body") + } + err = json.Unmarshal([]byte(*resumeAddBody), &body) if err != nil { return nil, fmt.Errorf("invalid JSON for body, \nerror: %s, \nexample of valid JSON:\n%s", err, "'[\n {\n \"education\": [\n {\n \"institution\": \"Vitae eaque autem in.\",\n \"major\": \"Qui nostrum quas velit nihil.\"\n },\n {\n \"institution\": \"Vitae eaque autem in.\",\n \"major\": \"Qui nostrum quas velit nihil.\"\n }\n ],\n \"experience\": [\n {\n \"company\": \"Dolor dicta dignissimos eius facere enim quae.\",\n \"duration\": 6839028381351029038,\n \"role\": \"Enim quia recusandae nostrum animi nam.\"\n },\n {\n \"company\": \"Dolor dicta dignissimos eius facere enim quae.\",\n \"duration\": 6839028381351029038,\n \"role\": \"Enim quia recusandae nostrum animi nam.\"\n }\n ],\n \"name\": \"Voluptas et.\"\n },\n {\n \"education\": [\n {\n \"institution\": \"Vitae eaque autem in.\",\n \"major\": \"Qui nostrum quas velit nihil.\"\n },\n {\n \"institution\": \"Vitae eaque autem in.\",\n \"major\": \"Qui nostrum quas velit nihil.\"\n }\n ],\n \"experience\": [\n {\n \"company\": \"Dolor dicta dignissimos eius facere enim quae.\",\n \"duration\": 6839028381351029038,\n \"role\": \"Enim quia recusandae nostrum animi nam.\"\n },\n {\n \"company\": \"Dolor dicta dignissimos eius facere enim quae.\",\n \"duration\": 6839028381351029038,\n \"role\": \"Enim quia recusandae nostrum animi nam.\"\n }\n ],\n \"name\": \"Voluptas et.\"\n },\n {\n \"education\": [\n {\n \"institution\": \"Vitae eaque autem in.\",\n \"major\": \"Qui nostrum quas velit nihil.\"\n },\n {\n \"institution\": \"Vitae eaque autem in.\",\n \"major\": \"Qui nostrum quas velit nihil.\"\n }\n ],\n \"experience\": [\n {\n \"company\": \"Dolor dicta dignissimos eius facere enim quae.\",\n \"duration\": 6839028381351029038,\n \"role\": \"Enim quia recusandae nostrum animi nam.\"\n },\n {\n \"company\": \"Dolor dicta dignissimos eius facere enim quae.\",\n \"duration\": 6839028381351029038,\n \"role\": \"Enim quia recusandae nostrum animi nam.\"\n }\n ],\n \"name\": \"Voluptas et.\"\n },\n {\n \"education\": [\n {\n \"institution\": \"Vitae eaque autem in.\",\n \"major\": \"Qui nostrum quas velit nihil.\"\n },\n {\n \"institution\": \"Vitae eaque autem in.\",\n \"major\": \"Qui nostrum quas velit nihil.\"\n }\n ],\n \"experience\": [\n {\n \"company\": \"Dolor dicta dignissimos eius facere enim quae.\",\n \"duration\": 6839028381351029038,\n \"role\": \"Enim quia recusandae nostrum animi nam.\"\n },\n {\n \"company\": \"Dolor dicta dignissimos eius facere enim quae.\",\n \"duration\": 6839028381351029038,\n \"role\": \"Enim quia recusandae nostrum animi nam.\"\n }\n ],\n \"name\": \"Voluptas et.\"\n }\n ]'") } diff --git a/multipart/gen/http/resume/client/encode_decode.go b/multipart/gen/http/resume/client/encode_decode.go index a4ecd1696..b91968b04 100644 --- a/multipart/gen/http/resume/client/encode_decode.go +++ b/multipart/gen/http/resume/client/encode_decode.go @@ -69,6 +69,10 @@ func DecodeListResponse(decoder func(*http.Response) goahttp.Decoder, restoreBod if err != nil { return nil, goahttp.ErrDecodingError("resume", "list", err) } + err = ValidateStoredResumeResponseCollection(body) + if err != nil { + return nil, goahttp.ErrValidationError("resume", "list", err) + } p := NewListStoredResumeCollectionOK(body) view := "default" vres := resumeviews.StoredResumeCollection{Projected: p, View: view} diff --git a/multipart/gen/http/resume/client/types.go b/multipart/gen/http/resume/client/types.go index 49a953a68..72f294f8d 100644 --- a/multipart/gen/http/resume/client/types.go +++ b/multipart/gen/http/resume/client/types.go @@ -106,6 +106,19 @@ func NewListStoredResumeCollectionOK(body StoredResumeResponseCollection) resume return v } +// ValidateStoredResumeResponseCollection runs the validations defined on +// StoredResumeResponseCollection +func ValidateStoredResumeResponseCollection(body StoredResumeResponseCollection) (err error) { + for _, e := range body { + if e != nil { + if err2 := validateStoredResumeResponse(e, "body[*]"); err2 != nil { + err = goa.MergeErrors(err, err2) + } + } + } + return +} + // ValidateStoredResumeResponse runs the validations defined on StoredResume func ValidateStoredResumeResponse(body *StoredResumeResponse) (err error) { if body.ID == nil { @@ -140,6 +153,41 @@ func ValidateStoredResumeResponse(body *StoredResumeResponse) (err error) { return } +// validateStoredResumeResponse checks StoredResume and reports errors using +// the path supplied by its caller +func validateStoredResumeResponse(body *StoredResumeResponse, path string) (err error) { + if body.ID == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("id", path)) + } + if body.Name == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("name", path)) + } + if body.Experience == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("experience", path)) + } + if body.Education == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("education", path)) + } + if body.CreatedAt == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("created_at", path)) + } + for _, e := range body.Experience { + if e != nil { + if err2 := validateExperienceResponse(e, path+".experience[*]"); err2 != nil { + err = goa.MergeErrors(err, err2) + } + } + } + for _, e := range body.Education { + if e != nil { + if err2 := validateEducationResponse(e, path+".education[*]"); err2 != nil { + err = goa.MergeErrors(err, err2) + } + } + } + return +} + // ValidateExperienceResponse runs the validations defined on Experience func ValidateExperienceResponse(body *ExperienceResponse) (err error) { if body.Company == nil { diff --git a/multipart/go.mod b/multipart/go.mod index 2a0859089..2684d4c56 100644 --- a/multipart/go.mod +++ b/multipart/go.mod @@ -2,7 +2,7 @@ module goa.design/examples/multipart go 1.26.0 -require goa.design/goa/v3 v3.30.1-0.20260825034953-833f95e1fdc8 +require goa.design/goa/v3 v3.30.1-0.20260825121239-93fbcbe975c8 require ( github.com/dimfeld/httppath v0.0.0-20170720192232-ee938bf73598 // indirect diff --git a/multipart/go.sum b/multipart/go.sum index b0fedd60d..43f0e60f5 100644 --- a/multipart/go.sum +++ b/multipart/go.sum @@ -31,8 +31,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260825034953-833f95e1fdc8 h1:CjoyylexZ1s2rePbKaePU2Q+VwWwYjvhXXwovd6x4Hc= -goa.design/goa/v3 v3.30.1-0.20260825034953-833f95e1fdc8/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260825121239-93fbcbe975c8 h1:MwRPnes61LS7Sa+TLAK/7zCCMZ3gmlcusA06NkuF+F0= +goa.design/goa/v3 v3.30.1-0.20260825121239-93fbcbe975c8/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= diff --git a/retry/gen/grpc/cli/retry/cli.go b/retry/gen/grpc/cli/retry/cli.go index e39d6e404..918b9613e 100644 --- a/retry/gen/grpc/cli/retry/cli.go +++ b/retry/gen/grpc/cli/retry/cli.go @@ -32,6 +32,25 @@ func UsageExamples() string { "" } +// cliStringFlag keeps an omitted command-line flag distinct from an explicitly empty flag. +type cliStringFlag struct { + value *string +} + +// String returns the flag text shown by the standard flag package. +func (f *cliStringFlag) String() string { + if f.value == nil { + return "" + } + return *f.value +} + +// Set records that the user supplied the flag, even when value is empty. +func (f *cliStringFlag) Set(value string) error { + f.value = &value + return nil +} + // ParseEndpoint returns the endpoint and payload as specified on the command // line. func ParseEndpoint( @@ -42,8 +61,10 @@ func ParseEndpoint( retryFlags = flag.NewFlagSet("retry", flag.ContinueOnError) retryGetMessageFlags = flag.NewFlagSet("get-message", flag.ExitOnError) - retryGetMessageMessageFlag = retryGetMessageFlags.String("message", "", "") + retryGetMessageMessageFlag = new(cliStringFlag) ) + retryGetMessageFlags.Var(retryGetMessageMessageFlag, "message", "") + retryFlags.Usage = retryUsage retryGetMessageFlags.Usage = retryGetMessageUsage @@ -111,7 +132,7 @@ func ParseEndpoint( switch epn { case "get-message": endpoint = c.GetMessage() - data, err = retryc.BuildGetMessagePayload(*retryGetMessageMessageFlag) + data, err = retryc.BuildGetMessagePayload(retryGetMessageMessageFlag.value) } } } diff --git a/retry/gen/grpc/retry/client/cli.go b/retry/gen/grpc/retry/client/cli.go index 7248e7d4a..fe3d5d55a 100644 --- a/retry/gen/grpc/retry/client/cli.go +++ b/retry/gen/grpc/retry/client/cli.go @@ -17,12 +17,12 @@ import ( // BuildGetMessagePayload builds the payload for the retry get_message endpoint // from CLI flags. -func BuildGetMessagePayload(retryGetMessageMessage string) (*retry.GetMessagePayload, error) { +func BuildGetMessagePayload(retryGetMessageMessage *string) (*retry.GetMessagePayload, error) { var err error var message retrypb.GetMessageRequest { - if retryGetMessageMessage != "" { - err = protojson.Unmarshal([]byte(retryGetMessageMessage), &message) + if retryGetMessageMessage != nil { + err = protojson.Unmarshal([]byte(*retryGetMessageMessage), &message) if err != nil { return nil, fmt.Errorf("invalid JSON for message, \nerror: %s, \nexample of valid JSON:\n%s", err, "'{\n \"id\": \"Dolores asperiores ipsam.\"\n }'") } diff --git a/retry/gen/http/cli/retry/cli.go b/retry/gen/http/cli/retry/cli.go index ea8374395..364618de6 100644 --- a/retry/gen/http/cli/retry/cli.go +++ b/retry/gen/http/cli/retry/cli.go @@ -33,6 +33,25 @@ func UsageExamples() string { "" } +// cliStringFlag keeps an omitted command-line flag distinct from an explicitly empty flag. +type cliStringFlag struct { + value *string +} + +// String returns the flag text shown by the standard flag package. +func (f *cliStringFlag) String() string { + if f.value == nil { + return "" + } + return *f.value +} + +// Set records that the user supplied the flag, even when value is empty. +func (f *cliStringFlag) Set(value string) error { + f.value = &value + return nil +} + // ParseEndpoint returns the endpoint and payload as specified on the command // line. func ParseEndpoint( @@ -46,8 +65,10 @@ func ParseEndpoint( retryFlags = flag.NewFlagSet("retry", flag.ContinueOnError) retryGetMessageFlags = flag.NewFlagSet("get-message", flag.ExitOnError) - retryGetMessageIDFlag = retryGetMessageFlags.String("id", "REQUIRED", "Identifies one demonstration request.") + retryGetMessageIDFlag = new(cliStringFlag) ) + retryGetMessageFlags.Var(retryGetMessageIDFlag, "id", "Identifies one demonstration request.") + retryFlags.Usage = retryUsage retryGetMessageFlags.Usage = retryGetMessageUsage @@ -115,7 +136,7 @@ func ParseEndpoint( switch epn { case "get-message": endpoint = c.GetMessage() - data, err = retryc.BuildGetMessagePayload(*retryGetMessageIDFlag) + data, err = retryc.BuildGetMessagePayload(retryGetMessageIDFlag.value) } } } diff --git a/retry/gen/http/retry/client/cli.go b/retry/gen/http/retry/client/cli.go index ec2d2a703..e5dbb0c0e 100644 --- a/retry/gen/http/retry/client/cli.go +++ b/retry/gen/http/retry/client/cli.go @@ -8,15 +8,20 @@ package client import ( + "fmt" + retry "goa.design/examples/retry/gen/retry" ) // BuildGetMessagePayload builds the payload for the retry get_message endpoint // from CLI flags. -func BuildGetMessagePayload(retryGetMessageID string) (*retry.GetMessagePayload, error) { +func BuildGetMessagePayload(retryGetMessageID *string) (*retry.GetMessagePayload, error) { var id string { - id = retryGetMessageID + if retryGetMessageID == nil { + return nil, fmt.Errorf("missing required flag --id") + } + id = *retryGetMessageID } v := &retry.GetMessagePayload{} v.ID = id diff --git a/retry/go.mod b/retry/go.mod index f0a5023d8..ebaefa3ab 100644 --- a/retry/go.mod +++ b/retry/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( goa.design/clue v1.2.6 - goa.design/goa/v3 v3.30.1-0.20260825034953-833f95e1fdc8 + goa.design/goa/v3 v3.30.1-0.20260825121239-93fbcbe975c8 google.golang.org/grpc v1.83.1 google.golang.org/protobuf v1.36.12 ) diff --git a/retry/go.sum b/retry/go.sum index 7b4db8f62..f056a9064 100644 --- a/retry/go.sum +++ b/retry/go.sum @@ -52,8 +52,8 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/clue v1.2.6 h1:ensyUkwlvEbNy8FuTGMldKuvaNouh8YoDY9QaE+EtYg= goa.design/clue v1.2.6/go.mod h1:Y4RS5o2k6MZiGk2PT3XbKyntjR2xkr8dYOKQ591dIDM= -goa.design/goa/v3 v3.30.1-0.20260825034953-833f95e1fdc8 h1:CjoyylexZ1s2rePbKaePU2Q+VwWwYjvhXXwovd6x4Hc= -goa.design/goa/v3 v3.30.1-0.20260825034953-833f95e1fdc8/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260825121239-93fbcbe975c8 h1:MwRPnes61LS7Sa+TLAK/7zCCMZ3gmlcusA06NkuF+F0= +goa.design/goa/v3 v3.30.1-0.20260825121239-93fbcbe975c8/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/security/hierarchy/gen/http/api_key_service/client/cli.go b/security/hierarchy/gen/http/api_key_service/client/cli.go index d4c57fc8f..0e183506d 100644 --- a/security/hierarchy/gen/http/api_key_service/client/cli.go +++ b/security/hierarchy/gen/http/api_key_service/client/cli.go @@ -8,15 +8,20 @@ package client import ( + "fmt" + apikeyservice "goa.design/examples/security/hierarchy/gen/api_key_service" ) // BuildDefaultPayload builds the payload for the api_key_service default // endpoint from CLI flags. -func BuildDefaultPayload(apiKeyServiceDefaultKey string) (*apikeyservice.DefaultPayload, error) { +func BuildDefaultPayload(apiKeyServiceDefaultKey *string) (*apikeyservice.DefaultPayload, error) { var key string { - key = apiKeyServiceDefaultKey + if apiKeyServiceDefaultKey == nil { + return nil, fmt.Errorf("missing required flag --key") + } + key = *apiKeyServiceDefaultKey } v := &apikeyservice.DefaultPayload{} v.Key = key @@ -26,10 +31,13 @@ func BuildDefaultPayload(apiKeyServiceDefaultKey string) (*apikeyservice.Default // BuildSecurePayload builds the payload for the api_key_service secure // endpoint from CLI flags. -func BuildSecurePayload(apiKeyServiceSecureToken string) (*apikeyservice.SecurePayload, error) { +func BuildSecurePayload(apiKeyServiceSecureToken *string) (*apikeyservice.SecurePayload, error) { var token string { - token = apiKeyServiceSecureToken + if apiKeyServiceSecureToken == nil { + return nil, fmt.Errorf("missing required flag --token") + } + token = *apiKeyServiceSecureToken } v := &apikeyservice.SecurePayload{} v.Token = token diff --git a/security/hierarchy/gen/http/cli/hierarchy/cli.go b/security/hierarchy/gen/http/cli/hierarchy/cli.go index 661ce7df8..3a6821313 100644 --- a/security/hierarchy/gen/http/cli/hierarchy/cli.go +++ b/security/hierarchy/gen/http/cli/hierarchy/cli.go @@ -36,6 +36,25 @@ func UsageExamples() string { "" } +// cliStringFlag keeps an omitted command-line flag distinct from an explicitly empty flag. +type cliStringFlag struct { + value *string +} + +// String returns the flag text shown by the standard flag package. +func (f *cliStringFlag) String() string { + if f.value == nil { + return "" + } + return *f.value +} + +// Set records that the user supplied the flag, even when value is empty. +func (f *cliStringFlag) Set(value string) error { + f.value = &value + return nil +} + // ParseEndpoint returns the endpoint and payload as specified on the command // line. func ParseEndpoint( @@ -49,17 +68,22 @@ func ParseEndpoint( defaultServiceFlags = flag.NewFlagSet("default-service", flag.ContinueOnError) defaultServiceDefaultFlags = flag.NewFlagSet("default", flag.ExitOnError) - defaultServiceDefaultUsernameFlag = defaultServiceDefaultFlags.String("username", "REQUIRED", "") - defaultServiceDefaultPasswordFlag = defaultServiceDefaultFlags.String("password", "REQUIRED", "") + defaultServiceDefaultUsernameFlag = new(cliStringFlag) + defaultServiceDefaultPasswordFlag = new(cliStringFlag) apiKeyServiceFlags = flag.NewFlagSet("api-key-service", flag.ContinueOnError) apiKeyServiceDefaultFlags = flag.NewFlagSet("default", flag.ExitOnError) - apiKeyServiceDefaultKeyFlag = apiKeyServiceDefaultFlags.String("key", "REQUIRED", "") + apiKeyServiceDefaultKeyFlag = new(cliStringFlag) apiKeyServiceSecureFlags = flag.NewFlagSet("secure", flag.ExitOnError) - apiKeyServiceSecureTokenFlag = apiKeyServiceSecureFlags.String("token", "REQUIRED", "") + apiKeyServiceSecureTokenFlag = new(cliStringFlag) ) + defaultServiceDefaultFlags.Var(defaultServiceDefaultUsernameFlag, "username", "") + defaultServiceDefaultFlags.Var(defaultServiceDefaultPasswordFlag, "password", "") + apiKeyServiceDefaultFlags.Var(apiKeyServiceDefaultKeyFlag, "key", "") + apiKeyServiceSecureFlags.Var(apiKeyServiceSecureTokenFlag, "token", "") + defaultServiceFlags.Usage = defaultServiceUsage defaultServiceDefaultFlags.Usage = defaultServiceDefaultUsage @@ -143,17 +167,17 @@ func ParseEndpoint( switch epn { case "default": endpoint = c.Default() - data, err = defaultservicec.BuildDefaultPayload(*defaultServiceDefaultUsernameFlag, *defaultServiceDefaultPasswordFlag) + data, err = defaultservicec.BuildDefaultPayload(defaultServiceDefaultUsernameFlag.value, defaultServiceDefaultPasswordFlag.value) } case "api-key-service": c := apikeyservicec.NewClient(scheme, host, doer, enc, dec, restore) switch epn { case "default": endpoint = c.Default() - data, err = apikeyservicec.BuildDefaultPayload(*apiKeyServiceDefaultKeyFlag) + data, err = apikeyservicec.BuildDefaultPayload(apiKeyServiceDefaultKeyFlag.value) case "secure": endpoint = c.Secure() - data, err = apikeyservicec.BuildSecurePayload(*apiKeyServiceSecureTokenFlag) + data, err = apikeyservicec.BuildSecurePayload(apiKeyServiceSecureTokenFlag.value) } } } diff --git a/security/hierarchy/gen/http/default_service/client/cli.go b/security/hierarchy/gen/http/default_service/client/cli.go index a32e8148b..e19e108ca 100644 --- a/security/hierarchy/gen/http/default_service/client/cli.go +++ b/security/hierarchy/gen/http/default_service/client/cli.go @@ -8,19 +8,27 @@ package client import ( + "fmt" + defaultservice "goa.design/examples/security/hierarchy/gen/default_service" ) // BuildDefaultPayload builds the payload for the default_service default // endpoint from CLI flags. -func BuildDefaultPayload(defaultServiceDefaultUsername string, defaultServiceDefaultPassword string) (*defaultservice.DefaultPayload, error) { +func BuildDefaultPayload(defaultServiceDefaultUsername *string, defaultServiceDefaultPassword *string) (*defaultservice.DefaultPayload, error) { var username string { - username = defaultServiceDefaultUsername + if defaultServiceDefaultUsername == nil { + return nil, fmt.Errorf("missing required flag --username") + } + username = *defaultServiceDefaultUsername } var password string { - password = defaultServiceDefaultPassword + if defaultServiceDefaultPassword == nil { + return nil, fmt.Errorf("missing required flag --password") + } + password = *defaultServiceDefaultPassword } v := &defaultservice.DefaultPayload{} v.Username = username diff --git a/security/hierarchy/go.mod b/security/hierarchy/go.mod index 5c5f82373..4cf5a71df 100644 --- a/security/hierarchy/go.mod +++ b/security/hierarchy/go.mod @@ -2,7 +2,7 @@ module goa.design/examples/security/hierarchy go 1.26.0 -require goa.design/goa/v3 v3.30.1-0.20260825034953-833f95e1fdc8 +require goa.design/goa/v3 v3.30.1-0.20260825121239-93fbcbe975c8 require ( github.com/dimfeld/httppath v0.0.0-20170720192232-ee938bf73598 // indirect diff --git a/security/hierarchy/go.sum b/security/hierarchy/go.sum index b0fedd60d..43f0e60f5 100644 --- a/security/hierarchy/go.sum +++ b/security/hierarchy/go.sum @@ -31,8 +31,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260825034953-833f95e1fdc8 h1:CjoyylexZ1s2rePbKaePU2Q+VwWwYjvhXXwovd6x4Hc= -goa.design/goa/v3 v3.30.1-0.20260825034953-833f95e1fdc8/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260825121239-93fbcbe975c8 h1:MwRPnes61LS7Sa+TLAK/7zCCMZ3gmlcusA06NkuF+F0= +goa.design/goa/v3 v3.30.1-0.20260825121239-93fbcbe975c8/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= diff --git a/security/multiauth/gen/grpc/cli/multi_auth/cli.go b/security/multiauth/gen/grpc/cli/multi_auth/cli.go index 416e5f254..ef804240c 100644 --- a/security/multiauth/gen/grpc/cli/multi_auth/cli.go +++ b/security/multiauth/gen/grpc/cli/multi_auth/cli.go @@ -32,6 +32,25 @@ func UsageExamples() string { "" } +// cliStringFlag keeps an omitted command-line flag distinct from an explicitly empty flag. +type cliStringFlag struct { + value *string +} + +// String returns the flag text shown by the standard flag package. +func (f *cliStringFlag) String() string { + if f.value == nil { + return "" + } + return *f.value +} + +// Set records that the user supplied the flag, even when value is empty. +func (f *cliStringFlag) Set(value string) error { + f.value = &value + return nil +} + // ParseEndpoint returns the endpoint and payload as specified on the command // line. func ParseEndpoint( @@ -42,22 +61,32 @@ func ParseEndpoint( securedServiceFlags = flag.NewFlagSet("secured-service", flag.ContinueOnError) securedServiceSigninFlags = flag.NewFlagSet("signin", flag.ExitOnError) - securedServiceSigninUsernameFlag = securedServiceSigninFlags.String("username", "REQUIRED", "") - securedServiceSigninPasswordFlag = securedServiceSigninFlags.String("password", "REQUIRED", "") + securedServiceSigninUsernameFlag = new(cliStringFlag) + securedServiceSigninPasswordFlag = new(cliStringFlag) securedServiceSecureFlags = flag.NewFlagSet("secure", flag.ExitOnError) - securedServiceSecureMessageFlag = securedServiceSecureFlags.String("message", "", "") - securedServiceSecureTokenFlag = securedServiceSecureFlags.String("token", "REQUIRED", "") + securedServiceSecureMessageFlag = new(cliStringFlag) + securedServiceSecureTokenFlag = new(cliStringFlag) securedServiceDoublySecureFlags = flag.NewFlagSet("doubly-secure", flag.ExitOnError) - securedServiceDoublySecureMessageFlag = securedServiceDoublySecureFlags.String("message", "", "") - securedServiceDoublySecureTokenFlag = securedServiceDoublySecureFlags.String("token", "REQUIRED", "") + securedServiceDoublySecureMessageFlag = new(cliStringFlag) + securedServiceDoublySecureTokenFlag = new(cliStringFlag) securedServiceAlsoDoublySecureFlags = flag.NewFlagSet("also-doubly-secure", flag.ExitOnError) - securedServiceAlsoDoublySecureMessageFlag = securedServiceAlsoDoublySecureFlags.String("message", "", "") - securedServiceAlsoDoublySecureOauthTokenFlag = securedServiceAlsoDoublySecureFlags.String("oauth-token", "", "") - securedServiceAlsoDoublySecureTokenFlag = securedServiceAlsoDoublySecureFlags.String("token", "", "") + securedServiceAlsoDoublySecureMessageFlag = new(cliStringFlag) + securedServiceAlsoDoublySecureOauthTokenFlag = new(cliStringFlag) + securedServiceAlsoDoublySecureTokenFlag = new(cliStringFlag) ) + securedServiceSigninFlags.Var(securedServiceSigninUsernameFlag, "username", "") + securedServiceSigninFlags.Var(securedServiceSigninPasswordFlag, "password", "") + securedServiceSecureFlags.Var(securedServiceSecureMessageFlag, "message", "") + securedServiceSecureFlags.Var(securedServiceSecureTokenFlag, "token", "") + securedServiceDoublySecureFlags.Var(securedServiceDoublySecureMessageFlag, "message", "") + securedServiceDoublySecureFlags.Var(securedServiceDoublySecureTokenFlag, "token", "") + securedServiceAlsoDoublySecureFlags.Var(securedServiceAlsoDoublySecureMessageFlag, "message", "") + securedServiceAlsoDoublySecureFlags.Var(securedServiceAlsoDoublySecureOauthTokenFlag, "oauth-token", "") + securedServiceAlsoDoublySecureFlags.Var(securedServiceAlsoDoublySecureTokenFlag, "token", "") + securedServiceFlags.Usage = securedServiceUsage securedServiceSigninFlags.Usage = securedServiceSigninUsage securedServiceSecureFlags.Usage = securedServiceSecureUsage @@ -137,16 +166,16 @@ func ParseEndpoint( switch epn { case "signin": endpoint = c.Signin() - data, err = securedservicec.BuildSigninPayload(*securedServiceSigninUsernameFlag, *securedServiceSigninPasswordFlag) + data, err = securedservicec.BuildSigninPayload(securedServiceSigninUsernameFlag.value, securedServiceSigninPasswordFlag.value) case "secure": endpoint = c.Secure() - data, err = securedservicec.BuildSecurePayload(*securedServiceSecureMessageFlag, *securedServiceSecureTokenFlag) + data, err = securedservicec.BuildSecurePayload(securedServiceSecureMessageFlag.value, securedServiceSecureTokenFlag.value) case "doubly-secure": endpoint = c.DoublySecure() - data, err = securedservicec.BuildDoublySecurePayload(*securedServiceDoublySecureMessageFlag, *securedServiceDoublySecureTokenFlag) + data, err = securedservicec.BuildDoublySecurePayload(securedServiceDoublySecureMessageFlag.value, securedServiceDoublySecureTokenFlag.value) case "also-doubly-secure": endpoint = c.AlsoDoublySecure() - data, err = securedservicec.BuildAlsoDoublySecurePayload(*securedServiceAlsoDoublySecureMessageFlag, *securedServiceAlsoDoublySecureOauthTokenFlag, *securedServiceAlsoDoublySecureTokenFlag) + data, err = securedservicec.BuildAlsoDoublySecurePayload(securedServiceAlsoDoublySecureMessageFlag.value, securedServiceAlsoDoublySecureOauthTokenFlag.value, securedServiceAlsoDoublySecureTokenFlag.value) } } } diff --git a/security/multiauth/gen/grpc/secured_service/client/cli.go b/security/multiauth/gen/grpc/secured_service/client/cli.go index 1a85bf63e..dd3f9831c 100644 --- a/security/multiauth/gen/grpc/secured_service/client/cli.go +++ b/security/multiauth/gen/grpc/secured_service/client/cli.go @@ -17,14 +17,20 @@ import ( // BuildSigninPayload builds the payload for the secured_service signin // endpoint from CLI flags. -func BuildSigninPayload(securedServiceSigninUsername string, securedServiceSigninPassword string) (*securedservice.SigninPayload, error) { +func BuildSigninPayload(securedServiceSigninUsername *string, securedServiceSigninPassword *string) (*securedservice.SigninPayload, error) { var username string { - username = securedServiceSigninUsername + if securedServiceSigninUsername == nil { + return nil, fmt.Errorf("missing required flag --username") + } + username = *securedServiceSigninUsername } var password string { - password = securedServiceSigninPassword + if securedServiceSigninPassword == nil { + return nil, fmt.Errorf("missing required flag --password") + } + password = *securedServiceSigninPassword } v := &securedservice.SigninPayload{} v.Username = username @@ -35,12 +41,12 @@ func BuildSigninPayload(securedServiceSigninUsername string, securedServiceSigni // BuildSecurePayload builds the payload for the secured_service secure // endpoint from CLI flags. -func BuildSecurePayload(securedServiceSecureMessage string, securedServiceSecureToken string) (*securedservice.SecurePayload, error) { +func BuildSecurePayload(securedServiceSecureMessage *string, securedServiceSecureToken *string) (*securedservice.SecurePayload, error) { var err error var message secured_servicepb.SecureRequest { - if securedServiceSecureMessage != "" { - err = protojson.Unmarshal([]byte(securedServiceSecureMessage), &message) + if securedServiceSecureMessage != nil { + err = protojson.Unmarshal([]byte(*securedServiceSecureMessage), &message) if err != nil { return nil, fmt.Errorf("invalid JSON for message, \nerror: %s, \nexample of valid JSON:\n%s", err, "'{\n \"fail\": false\n }'") } @@ -48,7 +54,10 @@ func BuildSecurePayload(securedServiceSecureMessage string, securedServiceSecure } var token string { - token = securedServiceSecureToken + if securedServiceSecureToken == nil { + return nil, fmt.Errorf("missing required flag --token") + } + token = *securedServiceSecureToken } v := &securedservice.SecurePayload{ Fail: message.Fail, @@ -60,12 +69,12 @@ func BuildSecurePayload(securedServiceSecureMessage string, securedServiceSecure // BuildDoublySecurePayload builds the payload for the secured_service // doubly_secure endpoint from CLI flags. -func BuildDoublySecurePayload(securedServiceDoublySecureMessage string, securedServiceDoublySecureToken string) (*securedservice.DoublySecurePayload, error) { +func BuildDoublySecurePayload(securedServiceDoublySecureMessage *string, securedServiceDoublySecureToken *string) (*securedservice.DoublySecurePayload, error) { var err error var message secured_servicepb.DoublySecureRequest { - if securedServiceDoublySecureMessage != "" { - err = protojson.Unmarshal([]byte(securedServiceDoublySecureMessage), &message) + if securedServiceDoublySecureMessage != nil { + err = protojson.Unmarshal([]byte(*securedServiceDoublySecureMessage), &message) if err != nil { return nil, fmt.Errorf("invalid JSON for message, \nerror: %s, \nexample of valid JSON:\n%s", err, "'{\n \"key\": \"abcdef12345\"\n }'") } @@ -73,7 +82,10 @@ func BuildDoublySecurePayload(securedServiceDoublySecureMessage string, securedS } var token string { - token = securedServiceDoublySecureToken + if securedServiceDoublySecureToken == nil { + return nil, fmt.Errorf("missing required flag --token") + } + token = *securedServiceDoublySecureToken } if err := ValidateDoublySecureRequest(&message); err != nil { var zero *securedservice.DoublySecurePayload @@ -89,12 +101,12 @@ func BuildDoublySecurePayload(securedServiceDoublySecureMessage string, securedS // BuildAlsoDoublySecurePayload builds the payload for the secured_service // also_doubly_secure endpoint from CLI flags. -func BuildAlsoDoublySecurePayload(securedServiceAlsoDoublySecureMessage string, securedServiceAlsoDoublySecureOauthToken string, securedServiceAlsoDoublySecureToken string) (*securedservice.AlsoDoublySecurePayload, error) { +func BuildAlsoDoublySecurePayload(securedServiceAlsoDoublySecureMessage *string, securedServiceAlsoDoublySecureOauthToken *string, securedServiceAlsoDoublySecureToken *string) (*securedservice.AlsoDoublySecurePayload, error) { var err error var message secured_servicepb.AlsoDoublySecureRequest { - if securedServiceAlsoDoublySecureMessage != "" { - err = protojson.Unmarshal([]byte(securedServiceAlsoDoublySecureMessage), &message) + if securedServiceAlsoDoublySecureMessage != nil { + err = protojson.Unmarshal([]byte(*securedServiceAlsoDoublySecureMessage), &message) if err != nil { return nil, fmt.Errorf("invalid JSON for message, \nerror: %s, \nexample of valid JSON:\n%s", err, "'{\n \"key\": \"abcdef12345\",\n \"password\": \"password\",\n \"username\": \"user\"\n }'") } @@ -102,14 +114,14 @@ func BuildAlsoDoublySecurePayload(securedServiceAlsoDoublySecureMessage string, } var oauthToken *string { - if securedServiceAlsoDoublySecureOauthToken != "" { - oauthToken = &securedServiceAlsoDoublySecureOauthToken + if securedServiceAlsoDoublySecureOauthToken != nil { + oauthToken = securedServiceAlsoDoublySecureOauthToken } } var token *string { - if securedServiceAlsoDoublySecureToken != "" { - token = &securedServiceAlsoDoublySecureToken + if securedServiceAlsoDoublySecureToken != nil { + token = securedServiceAlsoDoublySecureToken } } v := &securedservice.AlsoDoublySecurePayload{ diff --git a/security/multiauth/gen/http/cli/multi_auth/cli.go b/security/multiauth/gen/http/cli/multi_auth/cli.go index 1af4cfbb8..aec001360 100644 --- a/security/multiauth/gen/http/cli/multi_auth/cli.go +++ b/security/multiauth/gen/http/cli/multi_auth/cli.go @@ -33,6 +33,25 @@ func UsageExamples() string { "" } +// cliStringFlag keeps an omitted command-line flag distinct from an explicitly empty flag. +type cliStringFlag struct { + value *string +} + +// String returns the flag text shown by the standard flag package. +func (f *cliStringFlag) String() string { + if f.value == nil { + return "" + } + return *f.value +} + +// Set records that the user supplied the flag, even when value is empty. +func (f *cliStringFlag) Set(value string) error { + f.value = &value + return nil +} + // ParseEndpoint returns the endpoint and payload as specified on the command // line. func ParseEndpoint( @@ -46,24 +65,36 @@ func ParseEndpoint( securedServiceFlags = flag.NewFlagSet("secured-service", flag.ContinueOnError) securedServiceSigninFlags = flag.NewFlagSet("signin", flag.ExitOnError) - securedServiceSigninUsernameFlag = securedServiceSigninFlags.String("username", "REQUIRED", "Username used to perform signin") - securedServiceSigninPasswordFlag = securedServiceSigninFlags.String("password", "REQUIRED", "Password used to perform signin") + securedServiceSigninUsernameFlag = new(cliStringFlag) + securedServiceSigninPasswordFlag = new(cliStringFlag) securedServiceSecureFlags = flag.NewFlagSet("secure", flag.ExitOnError) - securedServiceSecureFailFlag = securedServiceSecureFlags.String("fail", "", "") - securedServiceSecureTokenFlag = securedServiceSecureFlags.String("token", "REQUIRED", "") + securedServiceSecureFailFlag = new(cliStringFlag) + securedServiceSecureTokenFlag = new(cliStringFlag) securedServiceDoublySecureFlags = flag.NewFlagSet("doubly-secure", flag.ExitOnError) - securedServiceDoublySecureKeyFlag = securedServiceDoublySecureFlags.String("key", "REQUIRED", "") - securedServiceDoublySecureTokenFlag = securedServiceDoublySecureFlags.String("token", "REQUIRED", "") + securedServiceDoublySecureKeyFlag = new(cliStringFlag) + securedServiceDoublySecureTokenFlag = new(cliStringFlag) securedServiceAlsoDoublySecureFlags = flag.NewFlagSet("also-doubly-secure", flag.ExitOnError) - securedServiceAlsoDoublySecureKeyFlag = securedServiceAlsoDoublySecureFlags.String("key", "", "") - securedServiceAlsoDoublySecureOauthTokenFlag = securedServiceAlsoDoublySecureFlags.String("oauth-token", "", "") - securedServiceAlsoDoublySecureTokenFlag = securedServiceAlsoDoublySecureFlags.String("token", "", "") - securedServiceAlsoDoublySecureUsernameFlag = securedServiceAlsoDoublySecureFlags.String("username", "", "Username used to perform signin") - securedServiceAlsoDoublySecurePasswordFlag = securedServiceAlsoDoublySecureFlags.String("password", "", "Password used to perform signin") + securedServiceAlsoDoublySecureKeyFlag = new(cliStringFlag) + securedServiceAlsoDoublySecureOauthTokenFlag = new(cliStringFlag) + securedServiceAlsoDoublySecureTokenFlag = new(cliStringFlag) + securedServiceAlsoDoublySecureUsernameFlag = new(cliStringFlag) + securedServiceAlsoDoublySecurePasswordFlag = new(cliStringFlag) ) + securedServiceSigninFlags.Var(securedServiceSigninUsernameFlag, "username", "Username used to perform signin") + securedServiceSigninFlags.Var(securedServiceSigninPasswordFlag, "password", "Password used to perform signin") + securedServiceSecureFlags.Var(securedServiceSecureFailFlag, "fail", "") + securedServiceSecureFlags.Var(securedServiceSecureTokenFlag, "token", "") + securedServiceDoublySecureFlags.Var(securedServiceDoublySecureKeyFlag, "key", "") + securedServiceDoublySecureFlags.Var(securedServiceDoublySecureTokenFlag, "token", "") + securedServiceAlsoDoublySecureFlags.Var(securedServiceAlsoDoublySecureKeyFlag, "key", "") + securedServiceAlsoDoublySecureFlags.Var(securedServiceAlsoDoublySecureOauthTokenFlag, "oauth-token", "") + securedServiceAlsoDoublySecureFlags.Var(securedServiceAlsoDoublySecureTokenFlag, "token", "") + securedServiceAlsoDoublySecureFlags.Var(securedServiceAlsoDoublySecureUsernameFlag, "username", "Username used to perform signin") + securedServiceAlsoDoublySecureFlags.Var(securedServiceAlsoDoublySecurePasswordFlag, "password", "Password used to perform signin") + securedServiceFlags.Usage = securedServiceUsage securedServiceSigninFlags.Usage = securedServiceSigninUsage securedServiceSecureFlags.Usage = securedServiceSecureUsage @@ -143,16 +174,16 @@ func ParseEndpoint( switch epn { case "signin": endpoint = c.Signin() - data, err = securedservicec.BuildSigninPayload(*securedServiceSigninUsernameFlag, *securedServiceSigninPasswordFlag) + data, err = securedservicec.BuildSigninPayload(securedServiceSigninUsernameFlag.value, securedServiceSigninPasswordFlag.value) case "secure": endpoint = c.Secure() - data, err = securedservicec.BuildSecurePayload(*securedServiceSecureFailFlag, *securedServiceSecureTokenFlag) + data, err = securedservicec.BuildSecurePayload(securedServiceSecureFailFlag.value, securedServiceSecureTokenFlag.value) case "doubly-secure": endpoint = c.DoublySecure() - data, err = securedservicec.BuildDoublySecurePayload(*securedServiceDoublySecureKeyFlag, *securedServiceDoublySecureTokenFlag) + data, err = securedservicec.BuildDoublySecurePayload(securedServiceDoublySecureKeyFlag.value, securedServiceDoublySecureTokenFlag.value) case "also-doubly-secure": endpoint = c.AlsoDoublySecure() - data, err = securedservicec.BuildAlsoDoublySecurePayload(*securedServiceAlsoDoublySecureKeyFlag, *securedServiceAlsoDoublySecureOauthTokenFlag, *securedServiceAlsoDoublySecureTokenFlag, *securedServiceAlsoDoublySecureUsernameFlag, *securedServiceAlsoDoublySecurePasswordFlag) + data, err = securedservicec.BuildAlsoDoublySecurePayload(securedServiceAlsoDoublySecureKeyFlag.value, securedServiceAlsoDoublySecureOauthTokenFlag.value, securedServiceAlsoDoublySecureTokenFlag.value, securedServiceAlsoDoublySecureUsernameFlag.value, securedServiceAlsoDoublySecurePasswordFlag.value) } } } diff --git a/security/multiauth/gen/http/secured_service/client/cli.go b/security/multiauth/gen/http/secured_service/client/cli.go index e37fb1bfb..4c61fcea1 100644 --- a/security/multiauth/gen/http/secured_service/client/cli.go +++ b/security/multiauth/gen/http/secured_service/client/cli.go @@ -16,14 +16,20 @@ import ( // BuildSigninPayload builds the payload for the secured_service signin // endpoint from CLI flags. -func BuildSigninPayload(securedServiceSigninUsername string, securedServiceSigninPassword string) (*securedservice.SigninPayload, error) { +func BuildSigninPayload(securedServiceSigninUsername *string, securedServiceSigninPassword *string) (*securedservice.SigninPayload, error) { var username string { - username = securedServiceSigninUsername + if securedServiceSigninUsername == nil { + return nil, fmt.Errorf("missing required flag --username") + } + username = *securedServiceSigninUsername } var password string { - password = securedServiceSigninPassword + if securedServiceSigninPassword == nil { + return nil, fmt.Errorf("missing required flag --password") + } + password = *securedServiceSigninPassword } v := &securedservice.SigninPayload{} v.Username = username @@ -34,13 +40,13 @@ func BuildSigninPayload(securedServiceSigninUsername string, securedServiceSigni // BuildSecurePayload builds the payload for the secured_service secure // endpoint from CLI flags. -func BuildSecurePayload(securedServiceSecureFail string, securedServiceSecureToken string) (*securedservice.SecurePayload, error) { +func BuildSecurePayload(securedServiceSecureFail *string, securedServiceSecureToken *string) (*securedservice.SecurePayload, error) { var err error var fail *bool { - if securedServiceSecureFail != "" { + if securedServiceSecureFail != nil { var val bool - val, err = strconv.ParseBool(securedServiceSecureFail) + val, err = strconv.ParseBool(*securedServiceSecureFail) fail = &val if err != nil { return nil, fmt.Errorf("invalid value for fail, must be BOOL") @@ -49,7 +55,10 @@ func BuildSecurePayload(securedServiceSecureFail string, securedServiceSecureTok } var token string { - token = securedServiceSecureToken + if securedServiceSecureToken == nil { + return nil, fmt.Errorf("missing required flag --token") + } + token = *securedServiceSecureToken } v := &securedservice.SecurePayload{} v.Fail = fail @@ -60,14 +69,20 @@ func BuildSecurePayload(securedServiceSecureFail string, securedServiceSecureTok // BuildDoublySecurePayload builds the payload for the secured_service // doubly_secure endpoint from CLI flags. -func BuildDoublySecurePayload(securedServiceDoublySecureKey string, securedServiceDoublySecureToken string) (*securedservice.DoublySecurePayload, error) { +func BuildDoublySecurePayload(securedServiceDoublySecureKey *string, securedServiceDoublySecureToken *string) (*securedservice.DoublySecurePayload, error) { var key string { - key = securedServiceDoublySecureKey + if securedServiceDoublySecureKey == nil { + return nil, fmt.Errorf("missing required flag --key") + } + key = *securedServiceDoublySecureKey } var token string { - token = securedServiceDoublySecureToken + if securedServiceDoublySecureToken == nil { + return nil, fmt.Errorf("missing required flag --token") + } + token = *securedServiceDoublySecureToken } v := &securedservice.DoublySecurePayload{} v.Key = key @@ -78,35 +93,35 @@ func BuildDoublySecurePayload(securedServiceDoublySecureKey string, securedServi // BuildAlsoDoublySecurePayload builds the payload for the secured_service // also_doubly_secure endpoint from CLI flags. -func BuildAlsoDoublySecurePayload(securedServiceAlsoDoublySecureKey string, securedServiceAlsoDoublySecureOauthToken string, securedServiceAlsoDoublySecureToken string, securedServiceAlsoDoublySecureUsername string, securedServiceAlsoDoublySecurePassword string) (*securedservice.AlsoDoublySecurePayload, error) { +func BuildAlsoDoublySecurePayload(securedServiceAlsoDoublySecureKey *string, securedServiceAlsoDoublySecureOauthToken *string, securedServiceAlsoDoublySecureToken *string, securedServiceAlsoDoublySecureUsername *string, securedServiceAlsoDoublySecurePassword *string) (*securedservice.AlsoDoublySecurePayload, error) { var key *string { - if securedServiceAlsoDoublySecureKey != "" { - key = &securedServiceAlsoDoublySecureKey + if securedServiceAlsoDoublySecureKey != nil { + key = securedServiceAlsoDoublySecureKey } } var oauthToken *string { - if securedServiceAlsoDoublySecureOauthToken != "" { - oauthToken = &securedServiceAlsoDoublySecureOauthToken + if securedServiceAlsoDoublySecureOauthToken != nil { + oauthToken = securedServiceAlsoDoublySecureOauthToken } } var token *string { - if securedServiceAlsoDoublySecureToken != "" { - token = &securedServiceAlsoDoublySecureToken + if securedServiceAlsoDoublySecureToken != nil { + token = securedServiceAlsoDoublySecureToken } } var username *string { - if securedServiceAlsoDoublySecureUsername != "" { - username = &securedServiceAlsoDoublySecureUsername + if securedServiceAlsoDoublySecureUsername != nil { + username = securedServiceAlsoDoublySecureUsername } } var password *string { - if securedServiceAlsoDoublySecurePassword != "" { - password = &securedServiceAlsoDoublySecurePassword + if securedServiceAlsoDoublySecurePassword != nil { + password = securedServiceAlsoDoublySecurePassword } } v := &securedservice.AlsoDoublySecurePayload{} diff --git a/security/multiauth/go.mod b/security/multiauth/go.mod index b8b122b7f..ccc1587e8 100644 --- a/security/multiauth/go.mod +++ b/security/multiauth/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( github.com/golang-jwt/jwt/v4 v4.5.2 - goa.design/goa/v3 v3.30.1-0.20260825034953-833f95e1fdc8 + goa.design/goa/v3 v3.30.1-0.20260825121239-93fbcbe975c8 google.golang.org/grpc v1.83.1 google.golang.org/protobuf v1.36.12 ) diff --git a/security/multiauth/go.sum b/security/multiauth/go.sum index f857c1e1a..0effc6191 100644 --- a/security/multiauth/go.sum +++ b/security/multiauth/go.sum @@ -51,8 +51,8 @@ go.opentelemetry.io/otel/trace v1.44.0 h1:jxF5CsGYCe74MCRx2X4g7WsY/VBKRqqpNvXlX/ go.opentelemetry.io/otel/trace v1.44.0/go.mod h1:oLl1jrMQAVo6v3GAggN+1VH9VIz9iUSvW53sW1Q8PIE= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260825034953-833f95e1fdc8 h1:CjoyylexZ1s2rePbKaePU2Q+VwWwYjvhXXwovd6x4Hc= -goa.design/goa/v3 v3.30.1-0.20260825034953-833f95e1fdc8/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260825121239-93fbcbe975c8 h1:MwRPnes61LS7Sa+TLAK/7zCCMZ3gmlcusA06NkuF+F0= +goa.design/goa/v3 v3.30.1-0.20260825121239-93fbcbe975c8/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/sse/gen/http/monitor/client/client.go b/sse/gen/http/monitor/client/client.go index 865ef379c..962b2c05a 100644 --- a/sse/gen/http/monitor/client/client.go +++ b/sse/gen/http/monitor/client/client.go @@ -11,8 +11,8 @@ import ( "context" "errors" "fmt" + "mime" "net/http" - "strings" goahttp "goa.design/goa/v3/http" goa "goa.design/goa/v3/pkg" @@ -76,7 +76,8 @@ func (c *Client) Monitor() goa.Endpoint { } contentType := resp.Header.Get("Content-Type") - if contentType != "" && !strings.HasPrefix(contentType, "text/event-stream") { + mediaType, _, mediaTypeErr := mime.ParseMediaType(contentType) + if mediaTypeErr != nil || mediaType != "text/event-stream" { contentTypeErr := fmt.Errorf("unexpected content type: %s (expected text/event-stream)", contentType) if err := resp.Body.Close(); err != nil { return nil, errors.Join(contentTypeErr, goahttp.ErrDecodingError("monitor", "monitor", err)) diff --git a/sse/gen/http/monitor/client/sse.go b/sse/gen/http/monitor/client/sse.go index 6f9a48e6c..6a25a8e6a 100644 --- a/sse/gen/http/monitor/client/sse.go +++ b/sse/gen/http/monitor/client/sse.go @@ -36,6 +36,8 @@ type ( resp *http.Response decoder func(*http.Response) goahttp.Decoder buffer []byte // Buffer for unprocessed data + // started records whether the first stream line was read. + started bool lock sync.Mutex closed bool } @@ -64,25 +66,28 @@ func (s *MonitorStreamImpl) Recv() (*monitor.Usage, error) { // RecvWithContext reads and returns the next event from the SSE stream, respecting context cancellation. func (s *MonitorStreamImpl) RecvWithContext(ctx context.Context) (event *monitor.Usage, err error) { - var byts []byte - byts, err = s.readEvent(ctx) - if err != nil { - if errors.Is(err, io.EOF) || errors.Is(err, context.Canceled) || errors.Is(err, context.DeadlineExceeded) { - // Clean up on EOF or context cancellation. io.EOF - // propagates to the caller to signal end of stream. - s.Close() + for { + var byts []byte + byts, err = s.readEvent(ctx) + if err != nil { + if errors.Is(err, io.EOF) || errors.Is(err, context.Canceled) || errors.Is(err, context.DeadlineExceeded) { + // Clean up on EOF or context cancellation. io.EOF + // propagates to the caller to signal end of stream. + s.Close() + } + return + } + var hasData bool + event, hasData, err = s.processEvent(byts) + if err != nil || hasData { + return } - return } - return s.processEvent(byts) } // readEvent reads a single SSE event from the stream, respecting context -// cancellation. It first checks the internal buffer for a complete event -// (delimited by double newlines). If no complete event is found, it reads from -// the HTTP response body until it either finds an event boundary, reaches EOF, -// or encounters an error. Any data after the event boundary is saved in the -// buffer for the next call. +// cancellation. It accepts CR, LF, and CRLF line endings. A blank line ends an +// event; bytes after that line remain buffered for the next call. func (s *MonitorStreamImpl) readEvent(ctx context.Context) ([]byte, error) { const bufSize = 4096 // 4KB buffer size @@ -92,9 +97,7 @@ func (s *MonitorStreamImpl) readEvent(ctx context.Context) ([]byte, error) { return event, nil } - // Initialize with any data from buffer eventData := event - wasNewline := len(eventData) > 0 && eventData[len(eventData)-1] == '\n' buf := make([]byte, bufSize) // Read data in chunks until we find an event or hit EOF. A stream that @@ -125,27 +128,14 @@ func (s *MonitorStreamImpl) readEvent(ctx context.Context) ([]byte, error) { return nil, err } - // Process data if we got any if n > 0 { - // Look for event boundary in this chunk - for i := 0; i < n; i++ { - b := buf[i] - eventData = append(eventData, b) - - // Check for double newlines (event boundary) - if b == '\n' && wasNewline { - // Save any remaining data for next read - if i+1 < n { - s.lock.Lock() - s.buffer = append(s.buffer[:0], buf[i+1:n]...) - s.lock.Unlock() - } - return eventData, nil - } - - // Update newline tracking - wasNewline = (b == '\n') - } + eventData = append(eventData, buf[:n]...) + } + if end := s.eventEnd(eventData, errors.Is(err, io.EOF)); end >= 0 { + s.lock.Lock() + s.buffer = append(s.buffer[:0], eventData[end:]...) + s.lock.Unlock() + return eventData[:end], nil } // Discard any partial frame at EOF: an event that ends before its @@ -156,11 +146,8 @@ func (s *MonitorStreamImpl) readEvent(ctx context.Context) ([]byte, error) { } } -// checkBuffer examines the internal buffer for a complete SSE event (delimited -// by double newlines). It returns two values: the event data (or all buffer -// contents if no complete event is found), and a boolean indicating whether a -// complete event was found. If a complete event is found, any remaining data -// after the event is kept in the buffer for the next call. +// checkBuffer returns the first complete event already read from the response. +// When no blank line is present, it returns a copy that readEvent can extend. func (s *MonitorStreamImpl) checkBuffer() ([]byte, bool) { s.lock.Lock() defer s.lock.Unlock() @@ -170,25 +157,11 @@ func (s *MonitorStreamImpl) checkBuffer() ([]byte, bool) { return nil, false } - // Look for double newline in buffer - for i := 0; i < len(s.buffer)-1; i++ { - if s.buffer[i] == '\n' && s.buffer[i+1] == '\n' { - // Found complete event. Copy it out: compacting the buffer - // below would otherwise overwrite the returned bytes, since - // both slices share the same backing array. - eventEnd := i + 2 // Include both newlines - eventData := make([]byte, eventEnd) - copy(eventData, s.buffer[:eventEnd]) - - // Save remaining data for next time - if eventEnd < len(s.buffer) { - s.buffer = append(s.buffer[:0], s.buffer[eventEnd:]...) - } else { - s.buffer = s.buffer[:0] - } - - return eventData, true - } + if end := s.eventEnd(s.buffer, false); end >= 0 { + eventData := make([]byte, end) + copy(eventData, s.buffer[:end]) + s.buffer = append(s.buffer[:0], s.buffer[end:]...) + return eventData, true } // No complete event found, return a copy of the buffer contents: the @@ -200,6 +173,54 @@ func (s *MonitorStreamImpl) checkBuffer() ([]byte, bool) { return eventData, false } +// eventEnd returns the byte after the blank line that ends the first event. +// A CR at the end waits for the next byte unless the response has ended. +func (s *MonitorStreamImpl) eventEnd(data []byte, atEOF bool) int { + lineStart := 0 + for i := 0; i < len(data); { + if data[i] != '\r' && data[i] != '\n' { + i++ + continue + } + lineEnd := i + 1 + if data[i] == '\r' { + if lineEnd == len(data) && !atEOF { + return -1 + } + if lineEnd < len(data) && data[lineEnd] == '\n' { + lineEnd++ + } + } + if i == lineStart { + return lineEnd + } + lineStart = lineEnd + i = lineEnd + } + return -1 +} + +// eventLines splits one complete event using every line ending allowed by SSE. +func (s *MonitorStreamImpl) eventLines(data []byte) [][]byte { + var lines [][]byte + for len(data) > 0 { + lineEnd := 0 + for lineEnd < len(data) && data[lineEnd] != '\r' && data[lineEnd] != '\n' { + lineEnd++ + } + lines = append(lines, data[:lineEnd]) + if lineEnd == len(data) { + break + } + next := lineEnd + 1 + if data[lineEnd] == '\r' && next < len(data) && data[next] == '\n' { + next++ + } + data = data[next:] + } + return lines +} + // Close closes the SSE stream and releases any associated resources. func (s *MonitorStreamImpl) Close() error { s.lock.Lock() @@ -212,37 +233,45 @@ func (s *MonitorStreamImpl) Close() error { } // processEvent processes a raw SSE event into the expected type -func (s *MonitorStreamImpl) processEvent(eventData []byte) (event *monitor.Usage, err error) { - event = new(monitor.Usage) +func (s *MonitorStreamImpl) processEvent(eventData []byte) (event *monitor.Usage, hasData bool, err error) { + var body MonitorResponseBody var dataLines []string - for _, line := range bytes.Split(eventData, []byte("\n")) { + for _, line := range s.eventLines(eventData) { + if !s.started { + line = bytes.TrimPrefix(line, []byte{0xef, 0xbb, 0xbf}) + s.started = true + } if len(line) == 0 { continue } - if bytes.HasPrefix(line, []byte("data:")) { - dataLines = append(dataLines, s.trimHeader(line[len("data:"):])) + field, value, _ := bytes.Cut(line, []byte(":")) + if len(value) > 0 && value[0] == ' ' { + value = value[1:] + } + if bytes.Equal(field, []byte("data")) { + dataLines = append(dataLines, string(value)) continue } } - if len(dataLines) > 0 { - dataContent := strings.Join(dataLines, "\n") - // Decode the event data into the result value returned by Recv. - respBody := &http.Response{ - StatusCode: http.StatusOK, - Body: io.NopCloser(bytes.NewReader([]byte(dataContent))), - } - err = s.decoder(respBody).Decode(event) - if err != nil { - return - } + if len(dataLines) == 0 { + return event, false, nil } - return -} - -// trimHeader removes the optional space after an SSE field name. -func (s *MonitorStreamImpl) trimHeader(data []byte) string { - if len(data) > 0 && data[0] == ' ' { - data = data[1:] + dataContent := strings.Join(dataLines, "\n") + // Decode the event data into the HTTP response type so required + // primitive fields retain their presence for validation. + respBody := &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader([]byte(dataContent))), + } + err = s.decoder(respBody).Decode(&body) + if err != nil { + return } - return string(data) + err = ValidateMonitorResponseBody(&body) + if err != nil { + return event, false, goahttp.ErrValidationError("monitor", "monitor", err) + } + event = NewMonitorUsageOK(&body) + hasData = true + return } diff --git a/sse/gen/http/monitor/server/server.go b/sse/gen/http/monitor/server/server.go index 3a5074899..8c4abd85d 100644 --- a/sse/gen/http/monitor/server/server.go +++ b/sse/gen/http/monitor/server/server.go @@ -123,6 +123,10 @@ func NewMonitorHandler( }, } _, err = endpoint(ctx, v) + if err == nil { + stream := v.Stream.(*MonitorServerStream) + err = stream.finish() + } if err != nil { stream := v.Stream.(*MonitorServerStream) if stream.attempted { diff --git a/sse/gen/http/monitor/server/sse.go b/sse/gen/http/monitor/server/sse.go index 091753dc6..730387f3e 100644 --- a/sse/gen/http/monitor/server/sse.go +++ b/sse/gen/http/monitor/server/sse.go @@ -30,6 +30,34 @@ type MonitorServerStream struct { attempted bool } +// start writes the headers that identify a successful SSE response. +func (s *MonitorServerStream) start() { + s.once.Do(func() { + header := s.w.Header() + if header.Get("Content-Type") == "" { + header.Set("Content-Type", "text/event-stream") + } + if header.Get("Cache-Control") == "" { + header.Set("Cache-Control", "no-cache") + } + if header.Get("Connection") == "" { + header.Set("Connection", "keep-alive") + } + s.w.WriteHeader(http.StatusOK) + s.attempted = true + }) +} + +// finish writes an empty successful SSE response when the service sent no +// events. +func (s *MonitorServerStream) finish() error { + if s.attempted { + return nil + } + s.start() + return nil +} + // Send Send streams instances of "monitor.Usage" to the "monitor" endpoint SSE // connection. func (s *MonitorServerStream) Send(v *monitor.Usage) error { @@ -49,22 +77,27 @@ func (s *MonitorServerStream) SendWithContext(ctx context.Context, v *monitor.Us return err } data = string(byts) - s.once.Do(func() { - header := s.w.Header() - if header.Get("Content-Type") == "" { - header.Set("Content-Type", "text/event-stream") + s.start() + + remaining := data + for { + lineEnd := 0 + for lineEnd < len(remaining) && remaining[lineEnd] != '\r' && remaining[lineEnd] != '\n' { + lineEnd++ } - if header.Get("Cache-Control") == "" { - header.Set("Cache-Control", "no-cache") + if _, err := fmt.Fprintf(s.w, "data: %s\n", remaining[:lineEnd]); err != nil { + return err } - if header.Get("Connection") == "" { - header.Set("Connection", "keep-alive") + if lineEnd == len(remaining) { + break } - s.w.WriteHeader(http.StatusOK) - s.attempted = true - }) - - if _, err := fmt.Fprintf(s.w, "data: %s\n\n", data); err != nil { + next := lineEnd + 1 + if remaining[lineEnd] == '\r' && next < len(remaining) && remaining[next] == '\n' { + next++ + } + remaining = remaining[next:] + } + if _, err := fmt.Fprintln(s.w); err != nil { return err } diff --git a/sse/go.mod b/sse/go.mod index f07427af1..6ce14b436 100644 --- a/sse/go.mod +++ b/sse/go.mod @@ -5,7 +5,7 @@ go 1.26.0 require ( github.com/shirou/gopsutil/v3 v3.24.5 goa.design/clue v1.2.6 - goa.design/goa/v3 v3.30.1-0.20260825034953-833f95e1fdc8 + goa.design/goa/v3 v3.30.1-0.20260825121239-93fbcbe975c8 ) require ( diff --git a/sse/go.sum b/sse/go.sum index 59b3e4067..fe3539e99 100644 --- a/sse/go.sum +++ b/sse/go.sum @@ -74,8 +74,8 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/clue v1.2.6 h1:ensyUkwlvEbNy8FuTGMldKuvaNouh8YoDY9QaE+EtYg= goa.design/clue v1.2.6/go.mod h1:Y4RS5o2k6MZiGk2PT3XbKyntjR2xkr8dYOKQ591dIDM= -goa.design/goa/v3 v3.30.1-0.20260825034953-833f95e1fdc8 h1:CjoyylexZ1s2rePbKaePU2Q+VwWwYjvhXXwovd6x4Hc= -goa.design/goa/v3 v3.30.1-0.20260825034953-833f95e1fdc8/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260825121239-93fbcbe975c8 h1:MwRPnes61LS7Sa+TLAK/7zCCMZ3gmlcusA06NkuF+F0= +goa.design/goa/v3 v3.30.1-0.20260825121239-93fbcbe975c8/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/streaming/gen/grpc/chatter/client/cli.go b/streaming/gen/grpc/chatter/client/cli.go index 21a7276da..af9027b14 100644 --- a/streaming/gen/grpc/chatter/client/cli.go +++ b/streaming/gen/grpc/chatter/client/cli.go @@ -8,20 +8,28 @@ package client import ( + "fmt" + chatter "goa.design/examples/streaming/gen/chatter" goa "goa.design/goa/v3/pkg" ) // BuildLoginPayload builds the payload for the chatter login endpoint from CLI // flags. -func BuildLoginPayload(chatterLoginUser string, chatterLoginPassword string) (*chatter.LoginPayload, error) { +func BuildLoginPayload(chatterLoginUser *string, chatterLoginPassword *string) (*chatter.LoginPayload, error) { var user string { - user = chatterLoginUser + if chatterLoginUser == nil { + return nil, fmt.Errorf("missing required flag --user") + } + user = *chatterLoginUser } var password string { - password = chatterLoginPassword + if chatterLoginPassword == nil { + return nil, fmt.Errorf("missing required flag --password") + } + password = *chatterLoginPassword } v := &chatter.LoginPayload{} v.User = user @@ -32,10 +40,13 @@ func BuildLoginPayload(chatterLoginUser string, chatterLoginPassword string) (*c // BuildEchoerPayload builds the payload for the chatter echoer endpoint from // CLI flags. -func BuildEchoerPayload(chatterEchoerToken string) (*chatter.EchoerPayload, error) { +func BuildEchoerPayload(chatterEchoerToken *string) (*chatter.EchoerPayload, error) { var token string { - token = chatterEchoerToken + if chatterEchoerToken == nil { + return nil, fmt.Errorf("missing required flag --token") + } + token = *chatterEchoerToken } v := &chatter.EchoerPayload{} v.Token = token @@ -45,10 +56,13 @@ func BuildEchoerPayload(chatterEchoerToken string) (*chatter.EchoerPayload, erro // BuildListenerPayload builds the payload for the chatter listener endpoint // from CLI flags. -func BuildListenerPayload(chatterListenerToken string) (*chatter.ListenerPayload, error) { +func BuildListenerPayload(chatterListenerToken *string) (*chatter.ListenerPayload, error) { var token string { - token = chatterListenerToken + if chatterListenerToken == nil { + return nil, fmt.Errorf("missing required flag --token") + } + token = *chatterListenerToken } v := &chatter.ListenerPayload{} v.Token = token @@ -58,10 +72,13 @@ func BuildListenerPayload(chatterListenerToken string) (*chatter.ListenerPayload // BuildSummaryPayload builds the payload for the chatter summary endpoint from // CLI flags. -func BuildSummaryPayload(chatterSummaryToken string) (*chatter.SummaryPayload, error) { +func BuildSummaryPayload(chatterSummaryToken *string) (*chatter.SummaryPayload, error) { var token string { - token = chatterSummaryToken + if chatterSummaryToken == nil { + return nil, fmt.Errorf("missing required flag --token") + } + token = *chatterSummaryToken } v := &chatter.SummaryPayload{} v.Token = token @@ -71,10 +88,13 @@ func BuildSummaryPayload(chatterSummaryToken string) (*chatter.SummaryPayload, e // BuildSubscribePayload builds the payload for the chatter subscribe endpoint // from CLI flags. -func BuildSubscribePayload(chatterSubscribeToken string) (*chatter.SubscribePayload, error) { +func BuildSubscribePayload(chatterSubscribeToken *string) (*chatter.SubscribePayload, error) { var token string { - token = chatterSubscribeToken + if chatterSubscribeToken == nil { + return nil, fmt.Errorf("missing required flag --token") + } + token = *chatterSubscribeToken } v := &chatter.SubscribePayload{} v.Token = token @@ -84,14 +104,14 @@ func BuildSubscribePayload(chatterSubscribeToken string) (*chatter.SubscribePayl // BuildHistoryPayload builds the payload for the chatter history endpoint from // CLI flags. -func BuildHistoryPayload(chatterHistoryView string, chatterHistoryToken string) (*chatter.HistoryPayload, error) { +func BuildHistoryPayload(chatterHistoryView *string, chatterHistoryToken *string) (*chatter.HistoryPayload, error) { var err error var view *string { - if chatterHistoryView != "" { - view = &chatterHistoryView - if !(chatterHistoryView == "tiny" || chatterHistoryView == "default") { - err = goa.MergeErrors(err, goa.InvalidEnumValueError("view", chatterHistoryView, []any{"tiny", "default"})) + if chatterHistoryView != nil { + view = chatterHistoryView + if !(*chatterHistoryView == "tiny" || *chatterHistoryView == "default") { + err = goa.MergeErrors(err, goa.InvalidEnumValueError("view", *chatterHistoryView, []any{"tiny", "default"})) } if err != nil { return nil, err @@ -100,7 +120,10 @@ func BuildHistoryPayload(chatterHistoryView string, chatterHistoryToken string) } var token string { - token = chatterHistoryToken + if chatterHistoryToken == nil { + return nil, fmt.Errorf("missing required flag --token") + } + token = *chatterHistoryToken } v := &chatter.HistoryPayload{} v.View = view diff --git a/streaming/gen/grpc/cli/chatter/cli.go b/streaming/gen/grpc/cli/chatter/cli.go index 29c13c835..19b93b5af 100644 --- a/streaming/gen/grpc/cli/chatter/cli.go +++ b/streaming/gen/grpc/cli/chatter/cli.go @@ -32,6 +32,25 @@ func UsageExamples() string { "" } +// cliStringFlag keeps an omitted command-line flag distinct from an explicitly empty flag. +type cliStringFlag struct { + value *string +} + +// String returns the flag text shown by the standard flag package. +func (f *cliStringFlag) String() string { + if f.value == nil { + return "" + } + return *f.value +} + +// Set records that the user supplied the flag, even when value is empty. +func (f *cliStringFlag) Set(value string) error { + f.value = &value + return nil +} + // ParseEndpoint returns the endpoint and payload as specified on the command // line. func ParseEndpoint( @@ -42,25 +61,34 @@ func ParseEndpoint( chatterFlags = flag.NewFlagSet("chatter", flag.ContinueOnError) chatterLoginFlags = flag.NewFlagSet("login", flag.ExitOnError) - chatterLoginUserFlag = chatterLoginFlags.String("user", "REQUIRED", "") - chatterLoginPasswordFlag = chatterLoginFlags.String("password", "REQUIRED", "") + chatterLoginUserFlag = new(cliStringFlag) + chatterLoginPasswordFlag = new(cliStringFlag) chatterEchoerFlags = flag.NewFlagSet("echoer", flag.ExitOnError) - chatterEchoerTokenFlag = chatterEchoerFlags.String("token", "REQUIRED", "") + chatterEchoerTokenFlag = new(cliStringFlag) chatterListenerFlags = flag.NewFlagSet("listener", flag.ExitOnError) - chatterListenerTokenFlag = chatterListenerFlags.String("token", "REQUIRED", "") + chatterListenerTokenFlag = new(cliStringFlag) chatterSummaryFlags = flag.NewFlagSet("summary", flag.ExitOnError) - chatterSummaryTokenFlag = chatterSummaryFlags.String("token", "REQUIRED", "") + chatterSummaryTokenFlag = new(cliStringFlag) chatterSubscribeFlags = flag.NewFlagSet("subscribe", flag.ExitOnError) - chatterSubscribeTokenFlag = chatterSubscribeFlags.String("token", "REQUIRED", "") + chatterSubscribeTokenFlag = new(cliStringFlag) chatterHistoryFlags = flag.NewFlagSet("history", flag.ExitOnError) - chatterHistoryViewFlag = chatterHistoryFlags.String("view", "", "") - chatterHistoryTokenFlag = chatterHistoryFlags.String("token", "REQUIRED", "") + chatterHistoryViewFlag = new(cliStringFlag) + chatterHistoryTokenFlag = new(cliStringFlag) ) + chatterLoginFlags.Var(chatterLoginUserFlag, "user", "") + chatterLoginFlags.Var(chatterLoginPasswordFlag, "password", "") + chatterEchoerFlags.Var(chatterEchoerTokenFlag, "token", "") + chatterListenerFlags.Var(chatterListenerTokenFlag, "token", "") + chatterSummaryFlags.Var(chatterSummaryTokenFlag, "token", "") + chatterSubscribeFlags.Var(chatterSubscribeTokenFlag, "token", "") + chatterHistoryFlags.Var(chatterHistoryViewFlag, "view", "") + chatterHistoryFlags.Var(chatterHistoryTokenFlag, "token", "") + chatterFlags.Usage = chatterUsage chatterLoginFlags.Usage = chatterLoginUsage chatterEchoerFlags.Usage = chatterEchoerUsage @@ -148,22 +176,22 @@ func ParseEndpoint( switch epn { case "login": endpoint = c.Login() - data, err = chatterc.BuildLoginPayload(*chatterLoginUserFlag, *chatterLoginPasswordFlag) + data, err = chatterc.BuildLoginPayload(chatterLoginUserFlag.value, chatterLoginPasswordFlag.value) case "echoer": endpoint = c.Echoer() - data, err = chatterc.BuildEchoerPayload(*chatterEchoerTokenFlag) + data, err = chatterc.BuildEchoerPayload(chatterEchoerTokenFlag.value) case "listener": endpoint = c.Listener() - data, err = chatterc.BuildListenerPayload(*chatterListenerTokenFlag) + data, err = chatterc.BuildListenerPayload(chatterListenerTokenFlag.value) case "summary": endpoint = c.Summary() - data, err = chatterc.BuildSummaryPayload(*chatterSummaryTokenFlag) + data, err = chatterc.BuildSummaryPayload(chatterSummaryTokenFlag.value) case "subscribe": endpoint = c.Subscribe() - data, err = chatterc.BuildSubscribePayload(*chatterSubscribeTokenFlag) + data, err = chatterc.BuildSubscribePayload(chatterSubscribeTokenFlag.value) case "history": endpoint = c.History() - data, err = chatterc.BuildHistoryPayload(*chatterHistoryViewFlag, *chatterHistoryTokenFlag) + data, err = chatterc.BuildHistoryPayload(chatterHistoryViewFlag.value, chatterHistoryTokenFlag.value) } } } diff --git a/streaming/gen/http/chatter/client/cli.go b/streaming/gen/http/chatter/client/cli.go index ef0b4c68d..228fdb1ed 100644 --- a/streaming/gen/http/chatter/client/cli.go +++ b/streaming/gen/http/chatter/client/cli.go @@ -8,20 +8,28 @@ package client import ( + "fmt" + chatter "goa.design/examples/streaming/gen/chatter" goa "goa.design/goa/v3/pkg" ) // BuildLoginPayload builds the payload for the chatter login endpoint from CLI // flags. -func BuildLoginPayload(chatterLoginUser string, chatterLoginPassword string) (*chatter.LoginPayload, error) { +func BuildLoginPayload(chatterLoginUser *string, chatterLoginPassword *string) (*chatter.LoginPayload, error) { var user string { - user = chatterLoginUser + if chatterLoginUser == nil { + return nil, fmt.Errorf("missing required flag --user") + } + user = *chatterLoginUser } var password string { - password = chatterLoginPassword + if chatterLoginPassword == nil { + return nil, fmt.Errorf("missing required flag --password") + } + password = *chatterLoginPassword } v := &chatter.LoginPayload{} v.User = user @@ -32,10 +40,13 @@ func BuildLoginPayload(chatterLoginUser string, chatterLoginPassword string) (*c // BuildEchoerPayload builds the payload for the chatter echoer endpoint from // CLI flags. -func BuildEchoerPayload(chatterEchoerToken string) (*chatter.EchoerPayload, error) { +func BuildEchoerPayload(chatterEchoerToken *string) (*chatter.EchoerPayload, error) { var token string { - token = chatterEchoerToken + if chatterEchoerToken == nil { + return nil, fmt.Errorf("missing required flag --token") + } + token = *chatterEchoerToken } v := &chatter.EchoerPayload{} v.Token = token @@ -45,10 +56,13 @@ func BuildEchoerPayload(chatterEchoerToken string) (*chatter.EchoerPayload, erro // BuildListenerPayload builds the payload for the chatter listener endpoint // from CLI flags. -func BuildListenerPayload(chatterListenerToken string) (*chatter.ListenerPayload, error) { +func BuildListenerPayload(chatterListenerToken *string) (*chatter.ListenerPayload, error) { var token string { - token = chatterListenerToken + if chatterListenerToken == nil { + return nil, fmt.Errorf("missing required flag --token") + } + token = *chatterListenerToken } v := &chatter.ListenerPayload{} v.Token = token @@ -58,10 +72,13 @@ func BuildListenerPayload(chatterListenerToken string) (*chatter.ListenerPayload // BuildSummaryPayload builds the payload for the chatter summary endpoint from // CLI flags. -func BuildSummaryPayload(chatterSummaryToken string) (*chatter.SummaryPayload, error) { +func BuildSummaryPayload(chatterSummaryToken *string) (*chatter.SummaryPayload, error) { var token string { - token = chatterSummaryToken + if chatterSummaryToken == nil { + return nil, fmt.Errorf("missing required flag --token") + } + token = *chatterSummaryToken } v := &chatter.SummaryPayload{} v.Token = token @@ -71,10 +88,13 @@ func BuildSummaryPayload(chatterSummaryToken string) (*chatter.SummaryPayload, e // BuildSubscribePayload builds the payload for the chatter subscribe endpoint // from CLI flags. -func BuildSubscribePayload(chatterSubscribeToken string) (*chatter.SubscribePayload, error) { +func BuildSubscribePayload(chatterSubscribeToken *string) (*chatter.SubscribePayload, error) { var token string { - token = chatterSubscribeToken + if chatterSubscribeToken == nil { + return nil, fmt.Errorf("missing required flag --token") + } + token = *chatterSubscribeToken } v := &chatter.SubscribePayload{} v.Token = token @@ -84,14 +104,14 @@ func BuildSubscribePayload(chatterSubscribeToken string) (*chatter.SubscribePayl // BuildHistoryPayload builds the payload for the chatter history endpoint from // CLI flags. -func BuildHistoryPayload(chatterHistoryView string, chatterHistoryToken string) (*chatter.HistoryPayload, error) { +func BuildHistoryPayload(chatterHistoryView *string, chatterHistoryToken *string) (*chatter.HistoryPayload, error) { var err error var view *string { - if chatterHistoryView != "" { - view = &chatterHistoryView - if !(chatterHistoryView == "tiny" || chatterHistoryView == "default") { - err = goa.MergeErrors(err, goa.InvalidEnumValueError("view", chatterHistoryView, []any{"tiny", "default"})) + if chatterHistoryView != nil { + view = chatterHistoryView + if !(*chatterHistoryView == "tiny" || *chatterHistoryView == "default") { + err = goa.MergeErrors(err, goa.InvalidEnumValueError("view", *chatterHistoryView, []any{"tiny", "default"})) } if err != nil { return nil, err @@ -100,7 +120,10 @@ func BuildHistoryPayload(chatterHistoryView string, chatterHistoryToken string) } var token string { - token = chatterHistoryToken + if chatterHistoryToken == nil { + return nil, fmt.Errorf("missing required flag --token") + } + token = *chatterHistoryToken } v := &chatter.HistoryPayload{} v.View = view diff --git a/streaming/gen/http/chatter/client/encode_decode.go b/streaming/gen/http/chatter/client/encode_decode.go index 0d15526a5..0891c01e7 100644 --- a/streaming/gen/http/chatter/client/encode_decode.go +++ b/streaming/gen/http/chatter/client/encode_decode.go @@ -397,6 +397,10 @@ func DecodeSummaryResponse(decoder func(*http.Response) goahttp.Decoder, restore if err != nil { return nil, goahttp.ErrDecodingError("chatter", "summary", err) } + err = ValidateChatSummaryResponseCollection(body) + if err != nil { + return nil, goahttp.ErrValidationError("chatter", "summary", err) + } p := NewSummaryChatSummaryCollectionOK(body) view := "default" vres := chatterviews.ChatSummaryCollection{Projected: p, View: view} @@ -634,6 +638,10 @@ func DecodeHistoryResponse(decoder func(*http.Response) goahttp.Decoder, restore if err != nil { return nil, goahttp.ErrDecodingError("chatter", "history", err) } + err = ValidateHistoryResponseBody(&body) + if err != nil { + return nil, goahttp.ErrValidationError("chatter", "history", err) + } p := NewHistoryChatSummaryOK(&body) view := resp.Header.Get("goa-view") vres := &chatterviews.ChatSummary{Projected: p, View: view} diff --git a/streaming/gen/http/chatter/client/types.go b/streaming/gen/http/chatter/client/types.go index 4f9b8c1c2..91f002faa 100644 --- a/streaming/gen/http/chatter/client/types.go +++ b/streaming/gen/http/chatter/client/types.go @@ -175,6 +175,19 @@ func NewHistoryUnauthorized(body string) chatter.Unauthorized { return v } +// ValidateChatSummaryResponseCollection runs the validations defined on +// ChatSummaryResponseCollection +func ValidateChatSummaryResponseCollection(body ChatSummaryResponseCollection) (err error) { + for _, e := range body { + if e != nil { + if err2 := validateChatSummaryResponse(e, "body[*]"); err2 != nil { + err = goa.MergeErrors(err, err2) + } + } + } + return +} + // ValidateSubscribeResponseBody runs the validations defined on // SubscribeResponseBody func ValidateSubscribeResponseBody(body *SubscribeResponseBody) (err error) { @@ -198,6 +211,21 @@ func ValidateSubscribeResponseBody(body *SubscribeResponseBody) (err error) { return } +// ValidateHistoryResponseBody runs the validations defined on +// HistoryResponseBody +func ValidateHistoryResponseBody(body *HistoryResponseBody) (err error) { + if body.Message == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("message", "body")) + } + if body.SentAt == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("sent_at", "body")) + } + if body.SentAt != nil { + err = goa.MergeErrors(err, goa.ValidateFormat("body.sent_at", *body.SentAt, goa.FormatDateTime)) + } + return +} + // ValidateChatSummaryResponse runs the validations defined on ChatSummary func ValidateChatSummaryResponse(body *ChatSummaryResponse) (err error) { if body.Message == nil { @@ -211,3 +239,18 @@ func ValidateChatSummaryResponse(body *ChatSummaryResponse) (err error) { } return } + +// validateChatSummaryResponse checks ChatSummary and reports errors using the +// path supplied by its caller +func validateChatSummaryResponse(body *ChatSummaryResponse, path string) (err error) { + if body.Message == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("message", path)) + } + if body.SentAt == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("sent_at", path)) + } + if body.SentAt != nil { + err = goa.MergeErrors(err, goa.ValidateFormat(path+".sent_at", *body.SentAt, goa.FormatDateTime)) + } + return +} diff --git a/streaming/gen/http/cli/chatter/cli.go b/streaming/gen/http/cli/chatter/cli.go index 58e14ce0f..bd0693da0 100644 --- a/streaming/gen/http/cli/chatter/cli.go +++ b/streaming/gen/http/cli/chatter/cli.go @@ -33,6 +33,25 @@ func UsageExamples() string { "" } +// cliStringFlag keeps an omitted command-line flag distinct from an explicitly empty flag. +type cliStringFlag struct { + value *string +} + +// String returns the flag text shown by the standard flag package. +func (f *cliStringFlag) String() string { + if f.value == nil { + return "" + } + return *f.value +} + +// Set records that the user supplied the flag, even when value is empty. +func (f *cliStringFlag) Set(value string) error { + f.value = &value + return nil +} + // ParseEndpoint returns the endpoint and payload as specified on the command // line. func ParseEndpoint( @@ -48,25 +67,34 @@ func ParseEndpoint( chatterFlags = flag.NewFlagSet("chatter", flag.ContinueOnError) chatterLoginFlags = flag.NewFlagSet("login", flag.ExitOnError) - chatterLoginUserFlag = chatterLoginFlags.String("user", "REQUIRED", "") - chatterLoginPasswordFlag = chatterLoginFlags.String("password", "REQUIRED", "") + chatterLoginUserFlag = new(cliStringFlag) + chatterLoginPasswordFlag = new(cliStringFlag) chatterEchoerFlags = flag.NewFlagSet("echoer", flag.ExitOnError) - chatterEchoerTokenFlag = chatterEchoerFlags.String("token", "REQUIRED", "") + chatterEchoerTokenFlag = new(cliStringFlag) chatterListenerFlags = flag.NewFlagSet("listener", flag.ExitOnError) - chatterListenerTokenFlag = chatterListenerFlags.String("token", "REQUIRED", "") + chatterListenerTokenFlag = new(cliStringFlag) chatterSummaryFlags = flag.NewFlagSet("summary", flag.ExitOnError) - chatterSummaryTokenFlag = chatterSummaryFlags.String("token", "REQUIRED", "") + chatterSummaryTokenFlag = new(cliStringFlag) chatterSubscribeFlags = flag.NewFlagSet("subscribe", flag.ExitOnError) - chatterSubscribeTokenFlag = chatterSubscribeFlags.String("token", "REQUIRED", "") + chatterSubscribeTokenFlag = new(cliStringFlag) chatterHistoryFlags = flag.NewFlagSet("history", flag.ExitOnError) - chatterHistoryViewFlag = chatterHistoryFlags.String("view", "", "") - chatterHistoryTokenFlag = chatterHistoryFlags.String("token", "REQUIRED", "") + chatterHistoryViewFlag = new(cliStringFlag) + chatterHistoryTokenFlag = new(cliStringFlag) ) + chatterLoginFlags.Var(chatterLoginUserFlag, "user", "") + chatterLoginFlags.Var(chatterLoginPasswordFlag, "password", "") + chatterEchoerFlags.Var(chatterEchoerTokenFlag, "token", "") + chatterListenerFlags.Var(chatterListenerTokenFlag, "token", "") + chatterSummaryFlags.Var(chatterSummaryTokenFlag, "token", "") + chatterSubscribeFlags.Var(chatterSubscribeTokenFlag, "token", "") + chatterHistoryFlags.Var(chatterHistoryViewFlag, "view", "") + chatterHistoryFlags.Var(chatterHistoryTokenFlag, "token", "") + chatterFlags.Usage = chatterUsage chatterLoginFlags.Usage = chatterLoginUsage chatterEchoerFlags.Usage = chatterEchoerUsage @@ -154,22 +182,22 @@ func ParseEndpoint( switch epn { case "login": endpoint = c.Login() - data, err = chatterc.BuildLoginPayload(*chatterLoginUserFlag, *chatterLoginPasswordFlag) + data, err = chatterc.BuildLoginPayload(chatterLoginUserFlag.value, chatterLoginPasswordFlag.value) case "echoer": endpoint = c.Echoer() - data, err = chatterc.BuildEchoerPayload(*chatterEchoerTokenFlag) + data, err = chatterc.BuildEchoerPayload(chatterEchoerTokenFlag.value) case "listener": endpoint = c.Listener() - data, err = chatterc.BuildListenerPayload(*chatterListenerTokenFlag) + data, err = chatterc.BuildListenerPayload(chatterListenerTokenFlag.value) case "summary": endpoint = c.Summary() - data, err = chatterc.BuildSummaryPayload(*chatterSummaryTokenFlag) + data, err = chatterc.BuildSummaryPayload(chatterSummaryTokenFlag.value) case "subscribe": endpoint = c.Subscribe() - data, err = chatterc.BuildSubscribePayload(*chatterSubscribeTokenFlag) + data, err = chatterc.BuildSubscribePayload(chatterSubscribeTokenFlag.value) case "history": endpoint = c.History() - data, err = chatterc.BuildHistoryPayload(*chatterHistoryViewFlag, *chatterHistoryTokenFlag) + data, err = chatterc.BuildHistoryPayload(chatterHistoryViewFlag.value, chatterHistoryTokenFlag.value) } } } diff --git a/streaming/go.mod b/streaming/go.mod index 577f9d15a..9e0d71a7a 100644 --- a/streaming/go.mod +++ b/streaming/go.mod @@ -5,7 +5,7 @@ go 1.26.0 require ( github.com/golang-jwt/jwt/v4 v4.5.2 github.com/gorilla/websocket v1.5.3 - goa.design/goa/v3 v3.30.1-0.20260825034953-833f95e1fdc8 + goa.design/goa/v3 v3.30.1-0.20260825121239-93fbcbe975c8 google.golang.org/grpc v1.83.1 google.golang.org/protobuf v1.36.12 ) diff --git a/streaming/go.sum b/streaming/go.sum index f857c1e1a..0effc6191 100644 --- a/streaming/go.sum +++ b/streaming/go.sum @@ -51,8 +51,8 @@ go.opentelemetry.io/otel/trace v1.44.0 h1:jxF5CsGYCe74MCRx2X4g7WsY/VBKRqqpNvXlX/ go.opentelemetry.io/otel/trace v1.44.0/go.mod h1:oLl1jrMQAVo6v3GAggN+1VH9VIz9iUSvW53sW1Q8PIE= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260825034953-833f95e1fdc8 h1:CjoyylexZ1s2rePbKaePU2Q+VwWwYjvhXXwovd6x4Hc= -goa.design/goa/v3 v3.30.1-0.20260825034953-833f95e1fdc8/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260825121239-93fbcbe975c8 h1:MwRPnes61LS7Sa+TLAK/7zCCMZ3gmlcusA06NkuF+F0= +goa.design/goa/v3 v3.30.1-0.20260825121239-93fbcbe975c8/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/tracing/go.mod b/tracing/go.mod index 14e1840e7..189db3080 100644 --- a/tracing/go.mod +++ b/tracing/go.mod @@ -5,7 +5,7 @@ go 1.26.0 require ( github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 goa.design/examples/basic v0.0.0-20260810182504-f834f43955c5 - goa.design/goa/v3 v3.30.1-0.20260825034953-833f95e1fdc8 + goa.design/goa/v3 v3.30.1-0.20260825121239-93fbcbe975c8 google.golang.org/grpc v1.83.1 ) diff --git a/tracing/go.sum b/tracing/go.sum index 065079242..f9ff4f98a 100644 --- a/tracing/go.sum +++ b/tracing/go.sum @@ -81,8 +81,8 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/examples/basic v0.0.0-20260810182504-f834f43955c5 h1:SRSrUaLTTdA4bUXb8+zA5MDhMEx8YaP+Knd+pddBcrg= goa.design/examples/basic v0.0.0-20260810182504-f834f43955c5/go.mod h1:XRziIzNcLb9fk7ZrfiHx5FIeAj+orJ4fkzLG0nXpiAo= -goa.design/goa/v3 v3.30.1-0.20260825034953-833f95e1fdc8 h1:CjoyylexZ1s2rePbKaePU2Q+VwWwYjvhXXwovd6x4Hc= -goa.design/goa/v3 v3.30.1-0.20260825034953-833f95e1fdc8/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260825121239-93fbcbe975c8 h1:MwRPnes61LS7Sa+TLAK/7zCCMZ3gmlcusA06NkuF+F0= +goa.design/goa/v3 v3.30.1-0.20260825121239-93fbcbe975c8/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= diff --git a/tus/gen/http/cli/upload/cli.go b/tus/gen/http/cli/upload/cli.go index f59c6c805..adf4b4cc2 100644 --- a/tus/gen/http/cli/upload/cli.go +++ b/tus/gen/http/cli/upload/cli.go @@ -33,6 +33,25 @@ func UsageExamples() string { "" } +// cliStringFlag keeps an omitted command-line flag distinct from an explicitly empty flag. +type cliStringFlag struct { + value *string +} + +// String returns the flag text shown by the standard flag package. +func (f *cliStringFlag) String() string { + if f.value == nil { + return "" + } + return *f.value +} + +// Set records that the user supplied the flag, even when value is empty. +func (f *cliStringFlag) Set(value string) error { + f.value = &value + return nil +} + // ParseEndpoint returns the endpoint and payload as specified on the command // line. func ParseEndpoint( @@ -46,32 +65,50 @@ func ParseEndpoint( tusFlags = flag.NewFlagSet("tus", flag.ContinueOnError) tusHeadFlags = flag.NewFlagSet("head", flag.ExitOnError) - tusHeadIDFlag = tusHeadFlags.String("id", "REQUIRED", "IDs are generated using Xid: https://github.com/rs/xid") - tusHeadTusResumableFlag = tusHeadFlags.String("tus-resumable", "REQUIRED", "") + tusHeadIDFlag = new(cliStringFlag) + tusHeadTusResumableFlag = new(cliStringFlag) tusPatchFlags = flag.NewFlagSet("patch", flag.ExitOnError) - tusPatchIDFlag = tusPatchFlags.String("id", "REQUIRED", "IDs are generated using Xid: https://github.com/rs/xid") - tusPatchContentTypeFlag = tusPatchFlags.String("content-type", "REQUIRED", "") - tusPatchTusResumableFlag = tusPatchFlags.String("tus-resumable", "REQUIRED", "") - tusPatchUploadOffsetFlag = tusPatchFlags.String("upload-offset", "REQUIRED", "") - tusPatchUploadChecksumFlag = tusPatchFlags.String("upload-checksum", "", "") - tusPatchStreamFlag = tusPatchFlags.String("stream", "REQUIRED", "path to file containing the streamed request body") + tusPatchIDFlag = new(cliStringFlag) + tusPatchContentTypeFlag = new(cliStringFlag) + tusPatchTusResumableFlag = new(cliStringFlag) + tusPatchUploadOffsetFlag = new(cliStringFlag) + tusPatchUploadChecksumFlag = new(cliStringFlag) + tusPatchStreamFlag = new(cliStringFlag) tusOptionsFlags = flag.NewFlagSet("options", flag.ExitOnError) tusPostFlags = flag.NewFlagSet("post", flag.ExitOnError) - tusPostTusResumableFlag = tusPostFlags.String("tus-resumable", "REQUIRED", "") - tusPostUploadLengthFlag = tusPostFlags.String("upload-length", "", "") - tusPostUploadDeferLengthFlag = tusPostFlags.String("upload-defer-length", "", "") - tusPostUploadChecksumFlag = tusPostFlags.String("upload-checksum", "", "") - tusPostUploadMetadataFlag = tusPostFlags.String("upload-metadata", "", "") - tusPostTusMaxSizeFlag = tusPostFlags.String("tus-max-size", "", "") - tusPostStreamFlag = tusPostFlags.String("stream", "REQUIRED", "path to file containing the streamed request body") + tusPostTusResumableFlag = new(cliStringFlag) + tusPostUploadLengthFlag = new(cliStringFlag) + tusPostUploadDeferLengthFlag = new(cliStringFlag) + tusPostUploadChecksumFlag = new(cliStringFlag) + tusPostUploadMetadataFlag = new(cliStringFlag) + tusPostTusMaxSizeFlag = new(cliStringFlag) + tusPostStreamFlag = new(cliStringFlag) tusDeleteFlags = flag.NewFlagSet("delete", flag.ExitOnError) - tusDeleteIDFlag = tusDeleteFlags.String("id", "REQUIRED", "IDs are generated using Xid: https://github.com/rs/xid") - tusDeleteTusResumableFlag = tusDeleteFlags.String("tus-resumable", "REQUIRED", "") + tusDeleteIDFlag = new(cliStringFlag) + tusDeleteTusResumableFlag = new(cliStringFlag) ) + tusHeadFlags.Var(tusHeadIDFlag, "id", "IDs are generated using Xid: https://github.com/rs/xid") + tusHeadFlags.Var(tusHeadTusResumableFlag, "tus-resumable", "") + tusPatchFlags.Var(tusPatchIDFlag, "id", "IDs are generated using Xid: https://github.com/rs/xid") + tusPatchFlags.Var(tusPatchContentTypeFlag, "content-type", "") + tusPatchFlags.Var(tusPatchTusResumableFlag, "tus-resumable", "") + tusPatchFlags.Var(tusPatchUploadOffsetFlag, "upload-offset", "") + tusPatchFlags.Var(tusPatchUploadChecksumFlag, "upload-checksum", "") + tusPatchFlags.Var(tusPatchStreamFlag, "stream", "path to file containing the streamed request body") + tusPostFlags.Var(tusPostTusResumableFlag, "tus-resumable", "") + tusPostFlags.Var(tusPostUploadLengthFlag, "upload-length", "") + tusPostFlags.Var(tusPostUploadDeferLengthFlag, "upload-defer-length", "") + tusPostFlags.Var(tusPostUploadChecksumFlag, "upload-checksum", "") + tusPostFlags.Var(tusPostUploadMetadataFlag, "upload-metadata", "") + tusPostFlags.Var(tusPostTusMaxSizeFlag, "tus-max-size", "") + tusPostFlags.Var(tusPostStreamFlag, "stream", "path to file containing the streamed request body") + tusDeleteFlags.Var(tusDeleteIDFlag, "id", "IDs are generated using Xid: https://github.com/rs/xid") + tusDeleteFlags.Var(tusDeleteTusResumableFlag, "tus-resumable", "") + tusFlags.Usage = tusUsage tusHeadFlags.Usage = tusHeadUsage tusPatchFlags.Usage = tusPatchUsage @@ -155,24 +192,32 @@ func ParseEndpoint( switch epn { case "head": endpoint = c.Head() - data, err = tusc.BuildHeadPayload(*tusHeadIDFlag, *tusHeadTusResumableFlag) + data, err = tusc.BuildHeadPayload(tusHeadIDFlag.value, tusHeadTusResumableFlag.value) case "patch": endpoint = c.Patch() - data, err = tusc.BuildPatchPayload(*tusPatchIDFlag, *tusPatchContentTypeFlag, *tusPatchTusResumableFlag, *tusPatchUploadOffsetFlag, *tusPatchUploadChecksumFlag) + data, err = tusc.BuildPatchPayload(tusPatchIDFlag.value, tusPatchContentTypeFlag.value, tusPatchTusResumableFlag.value, tusPatchUploadOffsetFlag.value, tusPatchUploadChecksumFlag.value) if err == nil { - data, err = tusc.BuildPatchStreamPayload(data, *tusPatchStreamFlag) + if tusPatchStreamFlag.value == nil { + err = fmt.Errorf("missing required flag --stream") + } else { + data, err = tusc.BuildPatchStreamPayload(data, *tusPatchStreamFlag.value) + } } case "options": endpoint = c.Options() case "post": endpoint = c.Post() - data, err = tusc.BuildPostPayload(*tusPostTusResumableFlag, *tusPostUploadLengthFlag, *tusPostUploadDeferLengthFlag, *tusPostUploadChecksumFlag, *tusPostUploadMetadataFlag, *tusPostTusMaxSizeFlag) + data, err = tusc.BuildPostPayload(tusPostTusResumableFlag.value, tusPostUploadLengthFlag.value, tusPostUploadDeferLengthFlag.value, tusPostUploadChecksumFlag.value, tusPostUploadMetadataFlag.value, tusPostTusMaxSizeFlag.value) if err == nil { - data, err = tusc.BuildPostStreamPayload(data, *tusPostStreamFlag) + if tusPostStreamFlag.value == nil { + err = fmt.Errorf("missing required flag --stream") + } else { + data, err = tusc.BuildPostStreamPayload(data, *tusPostStreamFlag.value) + } } case "delete": endpoint = c.Delete() - data, err = tusc.BuildDeletePayload(*tusDeleteIDFlag, *tusDeleteTusResumableFlag) + data, err = tusc.BuildDeletePayload(tusDeleteIDFlag.value, tusDeleteTusResumableFlag.value) } } } diff --git a/tus/gen/http/tus/client/cli.go b/tus/gen/http/tus/client/cli.go index ae28031ef..22392cb4f 100644 --- a/tus/gen/http/tus/client/cli.go +++ b/tus/gen/http/tus/client/cli.go @@ -16,11 +16,14 @@ import ( ) // BuildHeadPayload builds the payload for the tus head endpoint from CLI flags. -func BuildHeadPayload(tusHeadID string, tusHeadTusResumable string) (*tus.HeadPayload, error) { +func BuildHeadPayload(tusHeadID *string, tusHeadTusResumable *string) (*tus.HeadPayload, error) { var err error var id string { - id = tusHeadID + if tusHeadID == nil { + return nil, fmt.Errorf("missing required flag --id") + } + id = *tusHeadID err = goa.MergeErrors(err, goa.ValidatePattern("id", id, "[0-9a-v]{20}")) if err != nil { return nil, err @@ -28,7 +31,10 @@ func BuildHeadPayload(tusHeadID string, tusHeadTusResumable string) (*tus.HeadPa } var tusResumable string { - tusResumable = tusHeadTusResumable + if tusHeadTusResumable == nil { + return nil, fmt.Errorf("missing required flag --tus-resumable") + } + tusResumable = *tusHeadTusResumable err = goa.MergeErrors(err, goa.ValidatePattern("tusResumable", tusResumable, "^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(-(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(\\.(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\\+[0-9a-zA-Z-]+(\\.[0-9a-zA-Z-]+)*)?$")) if err != nil { return nil, err @@ -43,11 +49,14 @@ func BuildHeadPayload(tusHeadID string, tusHeadTusResumable string) (*tus.HeadPa // BuildPatchPayload builds the payload for the tus patch endpoint from CLI // flags. -func BuildPatchPayload(tusPatchID string, tusPatchContentType string, tusPatchTusResumable string, tusPatchUploadOffset string, tusPatchUploadChecksum string) (*tus.PatchPayload, error) { +func BuildPatchPayload(tusPatchID *string, tusPatchContentType *string, tusPatchTusResumable *string, tusPatchUploadOffset *string, tusPatchUploadChecksum *string) (*tus.PatchPayload, error) { var err error var id string { - id = tusPatchID + if tusPatchID == nil { + return nil, fmt.Errorf("missing required flag --id") + } + id = *tusPatchID err = goa.MergeErrors(err, goa.ValidatePattern("id", id, "[0-9a-v]{20}")) if err != nil { return nil, err @@ -55,11 +64,17 @@ func BuildPatchPayload(tusPatchID string, tusPatchContentType string, tusPatchTu } var contentType string { - contentType = tusPatchContentType + if tusPatchContentType == nil { + return nil, fmt.Errorf("missing required flag --content-type") + } + contentType = *tusPatchContentType } var tusResumable string { - tusResumable = tusPatchTusResumable + if tusPatchTusResumable == nil { + return nil, fmt.Errorf("missing required flag --tus-resumable") + } + tusResumable = *tusPatchTusResumable err = goa.MergeErrors(err, goa.ValidatePattern("tusResumable", tusResumable, "^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(-(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(\\.(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\\+[0-9a-zA-Z-]+(\\.[0-9a-zA-Z-]+)*)?$")) if err != nil { return nil, err @@ -67,15 +82,18 @@ func BuildPatchPayload(tusPatchID string, tusPatchContentType string, tusPatchTu } var uploadOffset int64 { - uploadOffset, err = strconv.ParseInt(tusPatchUploadOffset, 10, 64) + if tusPatchUploadOffset == nil { + return nil, fmt.Errorf("missing required flag --upload-offset") + } + uploadOffset, err = strconv.ParseInt(*tusPatchUploadOffset, 10, 64) if err != nil { return nil, fmt.Errorf("invalid value for uploadOffset, must be INT64") } } var uploadChecksum *string { - if tusPatchUploadChecksum != "" { - uploadChecksum = &tusPatchUploadChecksum + if tusPatchUploadChecksum != nil { + uploadChecksum = tusPatchUploadChecksum } } v := &tus.PatchPayload{} @@ -89,11 +107,14 @@ func BuildPatchPayload(tusPatchID string, tusPatchContentType string, tusPatchTu } // BuildPostPayload builds the payload for the tus post endpoint from CLI flags. -func BuildPostPayload(tusPostTusResumable string, tusPostUploadLength string, tusPostUploadDeferLength string, tusPostUploadChecksum string, tusPostUploadMetadata string, tusPostTusMaxSize string) (*tus.PostPayload, error) { +func BuildPostPayload(tusPostTusResumable *string, tusPostUploadLength *string, tusPostUploadDeferLength *string, tusPostUploadChecksum *string, tusPostUploadMetadata *string, tusPostTusMaxSize *string) (*tus.PostPayload, error) { var err error var tusResumable string { - tusResumable = tusPostTusResumable + if tusPostTusResumable == nil { + return nil, fmt.Errorf("missing required flag --tus-resumable") + } + tusResumable = *tusPostTusResumable err = goa.MergeErrors(err, goa.ValidatePattern("tusResumable", tusResumable, "^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(-(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(\\.(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\\+[0-9a-zA-Z-]+(\\.[0-9a-zA-Z-]+)*)?$")) if err != nil { return nil, err @@ -101,9 +122,9 @@ func BuildPostPayload(tusPostTusResumable string, tusPostUploadLength string, tu } var uploadLength *int64 { - if tusPostUploadLength != "" { + if tusPostUploadLength != nil { var val int64 - val, err = strconv.ParseInt(tusPostUploadLength, 10, 64) + val, err = strconv.ParseInt(*tusPostUploadLength, 10, 64) uploadLength = &val if err != nil { return nil, fmt.Errorf("invalid value for uploadLength, must be INT64") @@ -112,9 +133,9 @@ func BuildPostPayload(tusPostTusResumable string, tusPostUploadLength string, tu } var uploadDeferLength *int { - if tusPostUploadDeferLength != "" { + if tusPostUploadDeferLength != nil { var v int64 - v, err = strconv.ParseInt(tusPostUploadDeferLength, 10, strconv.IntSize) + v, err = strconv.ParseInt(*tusPostUploadDeferLength, 10, strconv.IntSize) val := int(v) uploadDeferLength = &val if err != nil { @@ -130,21 +151,21 @@ func BuildPostPayload(tusPostTusResumable string, tusPostUploadLength string, tu } var uploadChecksum *string { - if tusPostUploadChecksum != "" { - uploadChecksum = &tusPostUploadChecksum + if tusPostUploadChecksum != nil { + uploadChecksum = tusPostUploadChecksum } } var uploadMetadata *string { - if tusPostUploadMetadata != "" { - uploadMetadata = &tusPostUploadMetadata + if tusPostUploadMetadata != nil { + uploadMetadata = tusPostUploadMetadata } } var tusMaxSize *int64 { - if tusPostTusMaxSize != "" { + if tusPostTusMaxSize != nil { var val int64 - val, err = strconv.ParseInt(tusPostTusMaxSize, 10, 64) + val, err = strconv.ParseInt(*tusPostTusMaxSize, 10, 64) tusMaxSize = &val if err != nil { return nil, fmt.Errorf("invalid value for tusMaxSize, must be INT64") @@ -164,11 +185,14 @@ func BuildPostPayload(tusPostTusResumable string, tusPostUploadLength string, tu // BuildDeletePayload builds the payload for the tus delete endpoint from CLI // flags. -func BuildDeletePayload(tusDeleteID string, tusDeleteTusResumable string) (*tus.DeletePayload, error) { +func BuildDeletePayload(tusDeleteID *string, tusDeleteTusResumable *string) (*tus.DeletePayload, error) { var err error var id string { - id = tusDeleteID + if tusDeleteID == nil { + return nil, fmt.Errorf("missing required flag --id") + } + id = *tusDeleteID err = goa.MergeErrors(err, goa.ValidatePattern("id", id, "[0-9a-v]{20}")) if err != nil { return nil, err @@ -176,7 +200,10 @@ func BuildDeletePayload(tusDeleteID string, tusDeleteTusResumable string) (*tus. } var tusResumable string { - tusResumable = tusDeleteTusResumable + if tusDeleteTusResumable == nil { + return nil, fmt.Errorf("missing required flag --tus-resumable") + } + tusResumable = *tusDeleteTusResumable err = goa.MergeErrors(err, goa.ValidatePattern("tusResumable", tusResumable, "^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(-(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(\\.(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\\+[0-9a-zA-Z-]+(\\.[0-9a-zA-Z-]+)*)?$")) if err != nil { return nil, err diff --git a/tus/go.mod b/tus/go.mod index 17392dc33..e85b8f556 100644 --- a/tus/go.mod +++ b/tus/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( github.com/rs/xid v1.6.0 - goa.design/goa/v3 v3.30.1-0.20260825034953-833f95e1fdc8 + goa.design/goa/v3 v3.30.1-0.20260825121239-93fbcbe975c8 ) require ( diff --git a/tus/go.sum b/tus/go.sum index 488ca01d5..b38592b3a 100644 --- a/tus/go.sum +++ b/tus/go.sum @@ -33,8 +33,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260825034953-833f95e1fdc8 h1:CjoyylexZ1s2rePbKaePU2Q+VwWwYjvhXXwovd6x4Hc= -goa.design/goa/v3 v3.30.1-0.20260825034953-833f95e1fdc8/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260825121239-93fbcbe975c8 h1:MwRPnes61LS7Sa+TLAK/7zCCMZ3gmlcusA06NkuF+F0= +goa.design/goa/v3 v3.30.1-0.20260825121239-93fbcbe975c8/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= diff --git a/upload_download/gen/http/cli/upload_download/cli.go b/upload_download/gen/http/cli/upload_download/cli.go index 35f7c9f2f..ad8efebea 100644 --- a/upload_download/gen/http/cli/upload_download/cli.go +++ b/upload_download/gen/http/cli/upload_download/cli.go @@ -33,6 +33,25 @@ func UsageExamples() string { "" } +// cliStringFlag keeps an omitted command-line flag distinct from an explicitly empty flag. +type cliStringFlag struct { + value *string +} + +// String returns the flag text shown by the standard flag package. +func (f *cliStringFlag) String() string { + if f.value == nil { + return "" + } + return *f.value +} + +// Set records that the user supplied the flag, even when value is empty. +func (f *cliStringFlag) Set(value string) error { + f.value = &value + return nil +} + // ParseEndpoint returns the endpoint and payload as specified on the command // line. func ParseEndpoint( @@ -46,13 +65,17 @@ func ParseEndpoint( updownFlags = flag.NewFlagSet("updown", flag.ContinueOnError) updownUploadFlags = flag.NewFlagSet("upload", flag.ExitOnError) - updownUploadDirFlag = updownUploadFlags.String("dir", "REQUIRED", "Dir is the relative path to the file directory where the uploaded content is saved.") + updownUploadDirFlag = new(cliStringFlag) updownUploadContentTypeFlag = updownUploadFlags.String("content-type", "multipart/form-data; boundary=goa", "") - updownUploadStreamFlag = updownUploadFlags.String("stream", "REQUIRED", "path to file containing the streamed request body") + updownUploadStreamFlag = new(cliStringFlag) updownDownloadFlags = flag.NewFlagSet("download", flag.ExitOnError) - updownDownloadPFlag = updownDownloadFlags.String("p", "REQUIRED", "Path to downloaded file.") + updownDownloadPFlag = new(cliStringFlag) ) + updownUploadFlags.Var(updownUploadDirFlag, "dir", "Dir is the relative path to the file directory where the uploaded content is saved.") + updownUploadFlags.Var(updownUploadStreamFlag, "stream", "path to file containing the streamed request body") + updownDownloadFlags.Var(updownDownloadPFlag, "p", "Path to downloaded file.") + updownFlags.Usage = updownUsage updownUploadFlags.Usage = updownUploadUsage updownDownloadFlags.Usage = updownDownloadUsage @@ -124,13 +147,20 @@ func ParseEndpoint( switch epn { case "upload": endpoint = c.Upload() - data, err = updownc.BuildUploadPayload(*updownUploadDirFlag, *updownUploadContentTypeFlag) + data, err = updownc.BuildUploadPayload(updownUploadDirFlag.value, *updownUploadContentTypeFlag) if err == nil { - data, err = updownc.BuildUploadStreamPayload(data, *updownUploadStreamFlag) + if updownUploadStreamFlag.value == nil { + err = fmt.Errorf("missing required flag --stream") + } else { + data, err = updownc.BuildUploadStreamPayload(data, *updownUploadStreamFlag.value) + } } case "download": endpoint = c.Download() - data = *updownDownloadPFlag + if updownDownloadPFlag.value == nil { + return nil, nil, fmt.Errorf("missing required flag --p") + } + data = *updownDownloadPFlag.value } } } diff --git a/upload_download/gen/http/updown/client/cli.go b/upload_download/gen/http/updown/client/cli.go index 8f74912fe..7e311968a 100644 --- a/upload_download/gen/http/updown/client/cli.go +++ b/upload_download/gen/http/updown/client/cli.go @@ -8,26 +8,29 @@ package client import ( + "fmt" + updown "goa.design/examples/upload_download/gen/updown" goa "goa.design/goa/v3/pkg" ) // BuildUploadPayload builds the payload for the updown upload endpoint from // CLI flags. -func BuildUploadPayload(updownUploadDir string, updownUploadContentType string) (*updown.UploadPayload, error) { +func BuildUploadPayload(updownUploadDir *string, updownUploadContentType string) (*updown.UploadPayload, error) { var err error var dir string { - dir = updownUploadDir + if updownUploadDir == nil { + return nil, fmt.Errorf("missing required flag --dir") + } + dir = *updownUploadDir } var contentType string { - if updownUploadContentType != "" { - contentType = updownUploadContentType - err = goa.MergeErrors(err, goa.ValidatePattern("content_type", contentType, "multipart/[^;]+; boundary=.+")) - if err != nil { - return nil, err - } + contentType = updownUploadContentType + err = goa.MergeErrors(err, goa.ValidatePattern("content_type", contentType, "multipart/[^;]+; boundary=.+")) + if err != nil { + return nil, err } } v := &updown.UploadPayload{} diff --git a/upload_download/go.mod b/upload_download/go.mod index d8e460414..5a875daac 100644 --- a/upload_download/go.mod +++ b/upload_download/go.mod @@ -2,7 +2,7 @@ module goa.design/examples/upload_download go 1.26.0 -require goa.design/goa/v3 v3.30.1-0.20260825034953-833f95e1fdc8 +require goa.design/goa/v3 v3.30.1-0.20260825121239-93fbcbe975c8 require ( github.com/dimfeld/httppath v0.0.0-20170720192232-ee938bf73598 // indirect diff --git a/upload_download/go.sum b/upload_download/go.sum index b0fedd60d..43f0e60f5 100644 --- a/upload_download/go.sum +++ b/upload_download/go.sum @@ -31,8 +31,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260825034953-833f95e1fdc8 h1:CjoyylexZ1s2rePbKaePU2Q+VwWwYjvhXXwovd6x4Hc= -goa.design/goa/v3 v3.30.1-0.20260825034953-833f95e1fdc8/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260825121239-93fbcbe975c8 h1:MwRPnes61LS7Sa+TLAK/7zCCMZ3gmlcusA06NkuF+F0= +goa.design/goa/v3 v3.30.1-0.20260825121239-93fbcbe975c8/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= From 0c83750caca543cb92f503dfc87b20c9baca8749 Mon Sep 17 00:00:00 2001 From: "Raphael (manual office deploy after cloud-state fix)" Date: Tue, 25 Aug 2026 05:51:09 -0700 Subject: [PATCH 09/28] chore: pin examples to final Goa generator --- basic/go.mod | 2 +- basic/go.sum | 4 ++-- cellar/go.mod | 2 +- cellar/go.sum | 4 ++-- concerts/go.mod | 3 +-- concerts/go.sum | 6 ++---- cookies/go.mod | 3 +-- cookies/go.sum | 6 ++---- encodings/cbor/go.mod | 2 +- encodings/cbor/go.sum | 4 ++-- encodings/text/go.mod | 2 +- encodings/text/go.sum | 4 ++-- error/go.mod | 2 +- error/go.sum | 4 ++-- files/go.mod | 3 +-- files/go.sum | 6 ++---- httpstatus/go.mod | 3 +-- httpstatus/go.sum | 6 ++---- interceptors/go.mod | 2 +- interceptors/go.sum | 4 ++-- multipart/go.mod | 3 +-- multipart/go.sum | 6 ++---- retry/go.mod | 2 +- retry/go.sum | 4 ++-- security/hierarchy/go.mod | 3 +-- security/hierarchy/go.sum | 6 ++---- security/multiauth/go.mod | 2 +- security/multiauth/go.sum | 4 ++-- sse/go.mod | 2 +- sse/go.sum | 4 ++-- streaming/go.mod | 2 +- streaming/go.sum | 4 ++-- tracing/go.mod | 2 +- tracing/go.sum | 4 ++-- tus/go.mod | 3 +-- tus/go.sum | 6 ++---- upload_download/go.mod | 3 +-- upload_download/go.sum | 6 ++---- 38 files changed, 57 insertions(+), 81 deletions(-) diff --git a/basic/go.mod b/basic/go.mod index cfaa476bd..4d2050c5e 100644 --- a/basic/go.mod +++ b/basic/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( goa.design/clue v1.2.6 - goa.design/goa/v3 v3.30.1-0.20260825121239-93fbcbe975c8 + goa.design/goa/v3 v3.30.1-0.20260825122644-ed7b72688709 google.golang.org/grpc v1.83.1 google.golang.org/protobuf v1.36.12 ) diff --git a/basic/go.sum b/basic/go.sum index 5cb877461..d396fa70d 100644 --- a/basic/go.sum +++ b/basic/go.sum @@ -55,8 +55,8 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/clue v1.2.6 h1:ensyUkwlvEbNy8FuTGMldKuvaNouh8YoDY9QaE+EtYg= goa.design/clue v1.2.6/go.mod h1:Y4RS5o2k6MZiGk2PT3XbKyntjR2xkr8dYOKQ591dIDM= -goa.design/goa/v3 v3.30.1-0.20260825121239-93fbcbe975c8 h1:MwRPnes61LS7Sa+TLAK/7zCCMZ3gmlcusA06NkuF+F0= -goa.design/goa/v3 v3.30.1-0.20260825121239-93fbcbe975c8/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260825122644-ed7b72688709 h1:CUUmVjHssJLES+e+2BqBo29/usnQHEak2wtPcpJKqvs= +goa.design/goa/v3 v3.30.1-0.20260825122644-ed7b72688709/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/cellar/go.mod b/cellar/go.mod index c51a23a6f..8dceac828 100644 --- a/cellar/go.mod +++ b/cellar/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( github.com/boltdb/bolt v1.3.1 - goa.design/goa/v3 v3.30.1-0.20260825121239-93fbcbe975c8 + goa.design/goa/v3 v3.30.1-0.20260825122644-ed7b72688709 google.golang.org/grpc v1.83.1 google.golang.org/protobuf v1.36.12 ) diff --git a/cellar/go.sum b/cellar/go.sum index 95649226c..478babeed 100644 --- a/cellar/go.sum +++ b/cellar/go.sum @@ -51,8 +51,8 @@ go.opentelemetry.io/otel/trace v1.44.0 h1:jxF5CsGYCe74MCRx2X4g7WsY/VBKRqqpNvXlX/ go.opentelemetry.io/otel/trace v1.44.0/go.mod h1:oLl1jrMQAVo6v3GAggN+1VH9VIz9iUSvW53sW1Q8PIE= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260825121239-93fbcbe975c8 h1:MwRPnes61LS7Sa+TLAK/7zCCMZ3gmlcusA06NkuF+F0= -goa.design/goa/v3 v3.30.1-0.20260825121239-93fbcbe975c8/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260825122644-ed7b72688709 h1:CUUmVjHssJLES+e+2BqBo29/usnQHEak2wtPcpJKqvs= +goa.design/goa/v3 v3.30.1-0.20260825122644-ed7b72688709/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/concerts/go.mod b/concerts/go.mod index 4b38c191e..da6dfad4a 100644 --- a/concerts/go.mod +++ b/concerts/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( github.com/google/uuid v1.6.0 - goa.design/goa/v3 v3.30.1-0.20260825121239-93fbcbe975c8 + goa.design/goa/v3 v3.30.1-0.20260825122644-ed7b72688709 ) require ( @@ -21,7 +21,6 @@ require ( golang.org/x/sync v0.22.0 // indirect golang.org/x/text v0.41.0 // indirect golang.org/x/tools v0.49.0 // indirect - google.golang.org/protobuf v1.36.12 // indirect gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/concerts/go.sum b/concerts/go.sum index 43f0e60f5..38b30ded1 100644 --- a/concerts/go.sum +++ b/concerts/go.sum @@ -31,8 +31,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260825121239-93fbcbe975c8 h1:MwRPnes61LS7Sa+TLAK/7zCCMZ3gmlcusA06NkuF+F0= -goa.design/goa/v3 v3.30.1-0.20260825121239-93fbcbe975c8/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260825122644-ed7b72688709 h1:CUUmVjHssJLES+e+2BqBo29/usnQHEak2wtPcpJKqvs= +goa.design/goa/v3 v3.30.1-0.20260825122644-ed7b72688709/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= @@ -41,8 +41,6 @@ golang.org/x/text v0.41.0 h1:vz/seA0lnX87Othu2f/0L24RcgrXD9/YFTSuGjj3rH8= golang.org/x/text v0.41.0/go.mod h1:jvf1O8ajNzZqhSrQBPbutR/EB83Cc0CFrezNQIwbb5M= golang.org/x/tools v0.49.0 h1:3NI7VXzL9+1WZD52Dx2ttoPwD5DWrFGpl9mFZDlmisI= golang.org/x/tools v0.49.0/go.mod h1:SJNXV9DBKT0UbdttsQjbfJlAE/q+y36++zo3uL3N0Oo= -google.golang.org/protobuf v1.36.12 h1:pJOKDDOyeXErUroCihFAd5LQuwXBSpVnKGrj5o/fwxc= -google.golang.org/protobuf v1.36.12/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= diff --git a/cookies/go.mod b/cookies/go.mod index efb2c88bb..514b96cf8 100644 --- a/cookies/go.mod +++ b/cookies/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( github.com/rs/xid v1.6.0 - goa.design/goa/v3 v3.30.1-0.20260825121239-93fbcbe975c8 + goa.design/goa/v3 v3.30.1-0.20260825122644-ed7b72688709 ) require ( @@ -22,7 +22,6 @@ require ( golang.org/x/sync v0.22.0 // indirect golang.org/x/text v0.41.0 // indirect golang.org/x/tools v0.49.0 // indirect - google.golang.org/protobuf v1.36.12 // indirect gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/cookies/go.sum b/cookies/go.sum index b38592b3a..505df9b65 100644 --- a/cookies/go.sum +++ b/cookies/go.sum @@ -33,8 +33,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260825121239-93fbcbe975c8 h1:MwRPnes61LS7Sa+TLAK/7zCCMZ3gmlcusA06NkuF+F0= -goa.design/goa/v3 v3.30.1-0.20260825121239-93fbcbe975c8/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260825122644-ed7b72688709 h1:CUUmVjHssJLES+e+2BqBo29/usnQHEak2wtPcpJKqvs= +goa.design/goa/v3 v3.30.1-0.20260825122644-ed7b72688709/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= @@ -43,8 +43,6 @@ golang.org/x/text v0.41.0 h1:vz/seA0lnX87Othu2f/0L24RcgrXD9/YFTSuGjj3rH8= golang.org/x/text v0.41.0/go.mod h1:jvf1O8ajNzZqhSrQBPbutR/EB83Cc0CFrezNQIwbb5M= golang.org/x/tools v0.49.0 h1:3NI7VXzL9+1WZD52Dx2ttoPwD5DWrFGpl9mFZDlmisI= golang.org/x/tools v0.49.0/go.mod h1:SJNXV9DBKT0UbdttsQjbfJlAE/q+y36++zo3uL3N0Oo= -google.golang.org/protobuf v1.36.12 h1:pJOKDDOyeXErUroCihFAd5LQuwXBSpVnKGrj5o/fwxc= -google.golang.org/protobuf v1.36.12/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= diff --git a/encodings/cbor/go.mod b/encodings/cbor/go.mod index 782fcea6f..f7e7ffa1c 100644 --- a/encodings/cbor/go.mod +++ b/encodings/cbor/go.mod @@ -5,7 +5,7 @@ go 1.26.0 require ( github.com/fxamacker/cbor/v2 v2.9.2 goa.design/clue v1.2.6 - goa.design/goa/v3 v3.30.1-0.20260825121239-93fbcbe975c8 + goa.design/goa/v3 v3.30.1-0.20260825122644-ed7b72688709 ) require ( diff --git a/encodings/cbor/go.sum b/encodings/cbor/go.sum index f1d6fa259..79f39b9ce 100644 --- a/encodings/cbor/go.sum +++ b/encodings/cbor/go.sum @@ -59,8 +59,8 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/clue v1.2.6 h1:ensyUkwlvEbNy8FuTGMldKuvaNouh8YoDY9QaE+EtYg= goa.design/clue v1.2.6/go.mod h1:Y4RS5o2k6MZiGk2PT3XbKyntjR2xkr8dYOKQ591dIDM= -goa.design/goa/v3 v3.30.1-0.20260825121239-93fbcbe975c8 h1:MwRPnes61LS7Sa+TLAK/7zCCMZ3gmlcusA06NkuF+F0= -goa.design/goa/v3 v3.30.1-0.20260825121239-93fbcbe975c8/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260825122644-ed7b72688709 h1:CUUmVjHssJLES+e+2BqBo29/usnQHEak2wtPcpJKqvs= +goa.design/goa/v3 v3.30.1-0.20260825122644-ed7b72688709/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/encodings/text/go.mod b/encodings/text/go.mod index ee9f0a4ed..011ae637c 100644 --- a/encodings/text/go.mod +++ b/encodings/text/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( goa.design/clue v1.2.6 - goa.design/goa/v3 v3.30.1-0.20260825121239-93fbcbe975c8 + goa.design/goa/v3 v3.30.1-0.20260825122644-ed7b72688709 ) require ( diff --git a/encodings/text/go.sum b/encodings/text/go.sum index 5cb877461..d396fa70d 100644 --- a/encodings/text/go.sum +++ b/encodings/text/go.sum @@ -55,8 +55,8 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/clue v1.2.6 h1:ensyUkwlvEbNy8FuTGMldKuvaNouh8YoDY9QaE+EtYg= goa.design/clue v1.2.6/go.mod h1:Y4RS5o2k6MZiGk2PT3XbKyntjR2xkr8dYOKQ591dIDM= -goa.design/goa/v3 v3.30.1-0.20260825121239-93fbcbe975c8 h1:MwRPnes61LS7Sa+TLAK/7zCCMZ3gmlcusA06NkuF+F0= -goa.design/goa/v3 v3.30.1-0.20260825121239-93fbcbe975c8/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260825122644-ed7b72688709 h1:CUUmVjHssJLES+e+2BqBo29/usnQHEak2wtPcpJKqvs= +goa.design/goa/v3 v3.30.1-0.20260825122644-ed7b72688709/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/error/go.mod b/error/go.mod index fb0b7b98d..433378c92 100644 --- a/error/go.mod +++ b/error/go.mod @@ -3,7 +3,7 @@ module goa.design/examples/error go 1.26.0 require ( - goa.design/goa/v3 v3.30.1-0.20260825121239-93fbcbe975c8 + goa.design/goa/v3 v3.30.1-0.20260825122644-ed7b72688709 google.golang.org/genproto v0.0.0-20260810153831-ec0a7760b754 google.golang.org/grpc v1.83.1 google.golang.org/protobuf v1.36.12 diff --git a/error/go.sum b/error/go.sum index 9df4b41a0..9453a1b54 100644 --- a/error/go.sum +++ b/error/go.sum @@ -49,8 +49,8 @@ go.opentelemetry.io/otel/trace v1.44.0 h1:jxF5CsGYCe74MCRx2X4g7WsY/VBKRqqpNvXlX/ go.opentelemetry.io/otel/trace v1.44.0/go.mod h1:oLl1jrMQAVo6v3GAggN+1VH9VIz9iUSvW53sW1Q8PIE= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260825121239-93fbcbe975c8 h1:MwRPnes61LS7Sa+TLAK/7zCCMZ3gmlcusA06NkuF+F0= -goa.design/goa/v3 v3.30.1-0.20260825121239-93fbcbe975c8/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260825122644-ed7b72688709 h1:CUUmVjHssJLES+e+2BqBo29/usnQHEak2wtPcpJKqvs= +goa.design/goa/v3 v3.30.1-0.20260825122644-ed7b72688709/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/files/go.mod b/files/go.mod index 415c3a2be..b4bfac480 100644 --- a/files/go.mod +++ b/files/go.mod @@ -2,7 +2,7 @@ module goa.design/examples/files go 1.26.0 -require goa.design/goa/v3 v3.30.1-0.20260825121239-93fbcbe975c8 +require goa.design/goa/v3 v3.30.1-0.20260825122644-ed7b72688709 require ( github.com/dimfeld/httppath v0.0.0-20170720192232-ee938bf73598 // indirect @@ -19,7 +19,6 @@ require ( golang.org/x/sync v0.22.0 // indirect golang.org/x/text v0.41.0 // indirect golang.org/x/tools v0.49.0 // indirect - google.golang.org/protobuf v1.36.12 // indirect gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/files/go.sum b/files/go.sum index 43f0e60f5..38b30ded1 100644 --- a/files/go.sum +++ b/files/go.sum @@ -31,8 +31,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260825121239-93fbcbe975c8 h1:MwRPnes61LS7Sa+TLAK/7zCCMZ3gmlcusA06NkuF+F0= -goa.design/goa/v3 v3.30.1-0.20260825121239-93fbcbe975c8/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260825122644-ed7b72688709 h1:CUUmVjHssJLES+e+2BqBo29/usnQHEak2wtPcpJKqvs= +goa.design/goa/v3 v3.30.1-0.20260825122644-ed7b72688709/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= @@ -41,8 +41,6 @@ golang.org/x/text v0.41.0 h1:vz/seA0lnX87Othu2f/0L24RcgrXD9/YFTSuGjj3rH8= golang.org/x/text v0.41.0/go.mod h1:jvf1O8ajNzZqhSrQBPbutR/EB83Cc0CFrezNQIwbb5M= golang.org/x/tools v0.49.0 h1:3NI7VXzL9+1WZD52Dx2ttoPwD5DWrFGpl9mFZDlmisI= golang.org/x/tools v0.49.0/go.mod h1:SJNXV9DBKT0UbdttsQjbfJlAE/q+y36++zo3uL3N0Oo= -google.golang.org/protobuf v1.36.12 h1:pJOKDDOyeXErUroCihFAd5LQuwXBSpVnKGrj5o/fwxc= -google.golang.org/protobuf v1.36.12/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= diff --git a/httpstatus/go.mod b/httpstatus/go.mod index 66b5f1104..5d7e243d4 100644 --- a/httpstatus/go.mod +++ b/httpstatus/go.mod @@ -2,7 +2,7 @@ module goa.design/examples/httpstatus go 1.26.0 -require goa.design/goa/v3 v3.30.1-0.20260825121239-93fbcbe975c8 +require goa.design/goa/v3 v3.30.1-0.20260825122644-ed7b72688709 require ( github.com/dimfeld/httppath v0.0.0-20170720192232-ee938bf73598 // indirect @@ -19,7 +19,6 @@ require ( golang.org/x/sync v0.22.0 // indirect golang.org/x/text v0.41.0 // indirect golang.org/x/tools v0.49.0 // indirect - google.golang.org/protobuf v1.36.12 // indirect gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/httpstatus/go.sum b/httpstatus/go.sum index 43f0e60f5..38b30ded1 100644 --- a/httpstatus/go.sum +++ b/httpstatus/go.sum @@ -31,8 +31,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260825121239-93fbcbe975c8 h1:MwRPnes61LS7Sa+TLAK/7zCCMZ3gmlcusA06NkuF+F0= -goa.design/goa/v3 v3.30.1-0.20260825121239-93fbcbe975c8/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260825122644-ed7b72688709 h1:CUUmVjHssJLES+e+2BqBo29/usnQHEak2wtPcpJKqvs= +goa.design/goa/v3 v3.30.1-0.20260825122644-ed7b72688709/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= @@ -41,8 +41,6 @@ golang.org/x/text v0.41.0 h1:vz/seA0lnX87Othu2f/0L24RcgrXD9/YFTSuGjj3rH8= golang.org/x/text v0.41.0/go.mod h1:jvf1O8ajNzZqhSrQBPbutR/EB83Cc0CFrezNQIwbb5M= golang.org/x/tools v0.49.0 h1:3NI7VXzL9+1WZD52Dx2ttoPwD5DWrFGpl9mFZDlmisI= golang.org/x/tools v0.49.0/go.mod h1:SJNXV9DBKT0UbdttsQjbfJlAE/q+y36++zo3uL3N0Oo= -google.golang.org/protobuf v1.36.12 h1:pJOKDDOyeXErUroCihFAd5LQuwXBSpVnKGrj5o/fwxc= -google.golang.org/protobuf v1.36.12/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= diff --git a/interceptors/go.mod b/interceptors/go.mod index 6dec4d8f2..07a7f5048 100644 --- a/interceptors/go.mod +++ b/interceptors/go.mod @@ -6,7 +6,7 @@ require ( github.com/google/uuid v1.6.0 github.com/gorilla/websocket v1.5.3 goa.design/clue v1.2.6 - goa.design/goa/v3 v3.30.1-0.20260825121239-93fbcbe975c8 + goa.design/goa/v3 v3.30.1-0.20260825122644-ed7b72688709 google.golang.org/grpc v1.83.1 google.golang.org/protobuf v1.36.12 ) diff --git a/interceptors/go.sum b/interceptors/go.sum index 5cb877461..d396fa70d 100644 --- a/interceptors/go.sum +++ b/interceptors/go.sum @@ -55,8 +55,8 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/clue v1.2.6 h1:ensyUkwlvEbNy8FuTGMldKuvaNouh8YoDY9QaE+EtYg= goa.design/clue v1.2.6/go.mod h1:Y4RS5o2k6MZiGk2PT3XbKyntjR2xkr8dYOKQ591dIDM= -goa.design/goa/v3 v3.30.1-0.20260825121239-93fbcbe975c8 h1:MwRPnes61LS7Sa+TLAK/7zCCMZ3gmlcusA06NkuF+F0= -goa.design/goa/v3 v3.30.1-0.20260825121239-93fbcbe975c8/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260825122644-ed7b72688709 h1:CUUmVjHssJLES+e+2BqBo29/usnQHEak2wtPcpJKqvs= +goa.design/goa/v3 v3.30.1-0.20260825122644-ed7b72688709/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/multipart/go.mod b/multipart/go.mod index 2684d4c56..f2409043f 100644 --- a/multipart/go.mod +++ b/multipart/go.mod @@ -2,7 +2,7 @@ module goa.design/examples/multipart go 1.26.0 -require goa.design/goa/v3 v3.30.1-0.20260825121239-93fbcbe975c8 +require goa.design/goa/v3 v3.30.1-0.20260825122644-ed7b72688709 require ( github.com/dimfeld/httppath v0.0.0-20170720192232-ee938bf73598 // indirect @@ -19,7 +19,6 @@ require ( golang.org/x/sync v0.22.0 // indirect golang.org/x/text v0.41.0 // indirect golang.org/x/tools v0.49.0 // indirect - google.golang.org/protobuf v1.36.12 // indirect gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/multipart/go.sum b/multipart/go.sum index 43f0e60f5..38b30ded1 100644 --- a/multipart/go.sum +++ b/multipart/go.sum @@ -31,8 +31,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260825121239-93fbcbe975c8 h1:MwRPnes61LS7Sa+TLAK/7zCCMZ3gmlcusA06NkuF+F0= -goa.design/goa/v3 v3.30.1-0.20260825121239-93fbcbe975c8/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260825122644-ed7b72688709 h1:CUUmVjHssJLES+e+2BqBo29/usnQHEak2wtPcpJKqvs= +goa.design/goa/v3 v3.30.1-0.20260825122644-ed7b72688709/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= @@ -41,8 +41,6 @@ golang.org/x/text v0.41.0 h1:vz/seA0lnX87Othu2f/0L24RcgrXD9/YFTSuGjj3rH8= golang.org/x/text v0.41.0/go.mod h1:jvf1O8ajNzZqhSrQBPbutR/EB83Cc0CFrezNQIwbb5M= golang.org/x/tools v0.49.0 h1:3NI7VXzL9+1WZD52Dx2ttoPwD5DWrFGpl9mFZDlmisI= golang.org/x/tools v0.49.0/go.mod h1:SJNXV9DBKT0UbdttsQjbfJlAE/q+y36++zo3uL3N0Oo= -google.golang.org/protobuf v1.36.12 h1:pJOKDDOyeXErUroCihFAd5LQuwXBSpVnKGrj5o/fwxc= -google.golang.org/protobuf v1.36.12/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= diff --git a/retry/go.mod b/retry/go.mod index ebaefa3ab..bf0aed941 100644 --- a/retry/go.mod +++ b/retry/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( goa.design/clue v1.2.6 - goa.design/goa/v3 v3.30.1-0.20260825121239-93fbcbe975c8 + goa.design/goa/v3 v3.30.1-0.20260825122644-ed7b72688709 google.golang.org/grpc v1.83.1 google.golang.org/protobuf v1.36.12 ) diff --git a/retry/go.sum b/retry/go.sum index f056a9064..d3630ca53 100644 --- a/retry/go.sum +++ b/retry/go.sum @@ -52,8 +52,8 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/clue v1.2.6 h1:ensyUkwlvEbNy8FuTGMldKuvaNouh8YoDY9QaE+EtYg= goa.design/clue v1.2.6/go.mod h1:Y4RS5o2k6MZiGk2PT3XbKyntjR2xkr8dYOKQ591dIDM= -goa.design/goa/v3 v3.30.1-0.20260825121239-93fbcbe975c8 h1:MwRPnes61LS7Sa+TLAK/7zCCMZ3gmlcusA06NkuF+F0= -goa.design/goa/v3 v3.30.1-0.20260825121239-93fbcbe975c8/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260825122644-ed7b72688709 h1:CUUmVjHssJLES+e+2BqBo29/usnQHEak2wtPcpJKqvs= +goa.design/goa/v3 v3.30.1-0.20260825122644-ed7b72688709/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/security/hierarchy/go.mod b/security/hierarchy/go.mod index 4cf5a71df..e4fd62aa7 100644 --- a/security/hierarchy/go.mod +++ b/security/hierarchy/go.mod @@ -2,7 +2,7 @@ module goa.design/examples/security/hierarchy go 1.26.0 -require goa.design/goa/v3 v3.30.1-0.20260825121239-93fbcbe975c8 +require goa.design/goa/v3 v3.30.1-0.20260825122644-ed7b72688709 require ( github.com/dimfeld/httppath v0.0.0-20170720192232-ee938bf73598 // indirect @@ -19,7 +19,6 @@ require ( golang.org/x/sync v0.22.0 // indirect golang.org/x/text v0.41.0 // indirect golang.org/x/tools v0.49.0 // indirect - google.golang.org/protobuf v1.36.12 // indirect gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/security/hierarchy/go.sum b/security/hierarchy/go.sum index 43f0e60f5..38b30ded1 100644 --- a/security/hierarchy/go.sum +++ b/security/hierarchy/go.sum @@ -31,8 +31,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260825121239-93fbcbe975c8 h1:MwRPnes61LS7Sa+TLAK/7zCCMZ3gmlcusA06NkuF+F0= -goa.design/goa/v3 v3.30.1-0.20260825121239-93fbcbe975c8/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260825122644-ed7b72688709 h1:CUUmVjHssJLES+e+2BqBo29/usnQHEak2wtPcpJKqvs= +goa.design/goa/v3 v3.30.1-0.20260825122644-ed7b72688709/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= @@ -41,8 +41,6 @@ golang.org/x/text v0.41.0 h1:vz/seA0lnX87Othu2f/0L24RcgrXD9/YFTSuGjj3rH8= golang.org/x/text v0.41.0/go.mod h1:jvf1O8ajNzZqhSrQBPbutR/EB83Cc0CFrezNQIwbb5M= golang.org/x/tools v0.49.0 h1:3NI7VXzL9+1WZD52Dx2ttoPwD5DWrFGpl9mFZDlmisI= golang.org/x/tools v0.49.0/go.mod h1:SJNXV9DBKT0UbdttsQjbfJlAE/q+y36++zo3uL3N0Oo= -google.golang.org/protobuf v1.36.12 h1:pJOKDDOyeXErUroCihFAd5LQuwXBSpVnKGrj5o/fwxc= -google.golang.org/protobuf v1.36.12/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= diff --git a/security/multiauth/go.mod b/security/multiauth/go.mod index ccc1587e8..41e673381 100644 --- a/security/multiauth/go.mod +++ b/security/multiauth/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( github.com/golang-jwt/jwt/v4 v4.5.2 - goa.design/goa/v3 v3.30.1-0.20260825121239-93fbcbe975c8 + goa.design/goa/v3 v3.30.1-0.20260825122644-ed7b72688709 google.golang.org/grpc v1.83.1 google.golang.org/protobuf v1.36.12 ) diff --git a/security/multiauth/go.sum b/security/multiauth/go.sum index 0effc6191..2a3a6a2ba 100644 --- a/security/multiauth/go.sum +++ b/security/multiauth/go.sum @@ -51,8 +51,8 @@ go.opentelemetry.io/otel/trace v1.44.0 h1:jxF5CsGYCe74MCRx2X4g7WsY/VBKRqqpNvXlX/ go.opentelemetry.io/otel/trace v1.44.0/go.mod h1:oLl1jrMQAVo6v3GAggN+1VH9VIz9iUSvW53sW1Q8PIE= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260825121239-93fbcbe975c8 h1:MwRPnes61LS7Sa+TLAK/7zCCMZ3gmlcusA06NkuF+F0= -goa.design/goa/v3 v3.30.1-0.20260825121239-93fbcbe975c8/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260825122644-ed7b72688709 h1:CUUmVjHssJLES+e+2BqBo29/usnQHEak2wtPcpJKqvs= +goa.design/goa/v3 v3.30.1-0.20260825122644-ed7b72688709/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/sse/go.mod b/sse/go.mod index 6ce14b436..d7fa70496 100644 --- a/sse/go.mod +++ b/sse/go.mod @@ -5,7 +5,7 @@ go 1.26.0 require ( github.com/shirou/gopsutil/v3 v3.24.5 goa.design/clue v1.2.6 - goa.design/goa/v3 v3.30.1-0.20260825121239-93fbcbe975c8 + goa.design/goa/v3 v3.30.1-0.20260825122644-ed7b72688709 ) require ( diff --git a/sse/go.sum b/sse/go.sum index fe3539e99..8988ed907 100644 --- a/sse/go.sum +++ b/sse/go.sum @@ -74,8 +74,8 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/clue v1.2.6 h1:ensyUkwlvEbNy8FuTGMldKuvaNouh8YoDY9QaE+EtYg= goa.design/clue v1.2.6/go.mod h1:Y4RS5o2k6MZiGk2PT3XbKyntjR2xkr8dYOKQ591dIDM= -goa.design/goa/v3 v3.30.1-0.20260825121239-93fbcbe975c8 h1:MwRPnes61LS7Sa+TLAK/7zCCMZ3gmlcusA06NkuF+F0= -goa.design/goa/v3 v3.30.1-0.20260825121239-93fbcbe975c8/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260825122644-ed7b72688709 h1:CUUmVjHssJLES+e+2BqBo29/usnQHEak2wtPcpJKqvs= +goa.design/goa/v3 v3.30.1-0.20260825122644-ed7b72688709/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/streaming/go.mod b/streaming/go.mod index 9e0d71a7a..af8db4a42 100644 --- a/streaming/go.mod +++ b/streaming/go.mod @@ -5,7 +5,7 @@ go 1.26.0 require ( github.com/golang-jwt/jwt/v4 v4.5.2 github.com/gorilla/websocket v1.5.3 - goa.design/goa/v3 v3.30.1-0.20260825121239-93fbcbe975c8 + goa.design/goa/v3 v3.30.1-0.20260825122644-ed7b72688709 google.golang.org/grpc v1.83.1 google.golang.org/protobuf v1.36.12 ) diff --git a/streaming/go.sum b/streaming/go.sum index 0effc6191..2a3a6a2ba 100644 --- a/streaming/go.sum +++ b/streaming/go.sum @@ -51,8 +51,8 @@ go.opentelemetry.io/otel/trace v1.44.0 h1:jxF5CsGYCe74MCRx2X4g7WsY/VBKRqqpNvXlX/ go.opentelemetry.io/otel/trace v1.44.0/go.mod h1:oLl1jrMQAVo6v3GAggN+1VH9VIz9iUSvW53sW1Q8PIE= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260825121239-93fbcbe975c8 h1:MwRPnes61LS7Sa+TLAK/7zCCMZ3gmlcusA06NkuF+F0= -goa.design/goa/v3 v3.30.1-0.20260825121239-93fbcbe975c8/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260825122644-ed7b72688709 h1:CUUmVjHssJLES+e+2BqBo29/usnQHEak2wtPcpJKqvs= +goa.design/goa/v3 v3.30.1-0.20260825122644-ed7b72688709/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/tracing/go.mod b/tracing/go.mod index 189db3080..de71c37b4 100644 --- a/tracing/go.mod +++ b/tracing/go.mod @@ -5,7 +5,7 @@ go 1.26.0 require ( github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 goa.design/examples/basic v0.0.0-20260810182504-f834f43955c5 - goa.design/goa/v3 v3.30.1-0.20260825121239-93fbcbe975c8 + goa.design/goa/v3 v3.30.1-0.20260825122644-ed7b72688709 google.golang.org/grpc v1.83.1 ) diff --git a/tracing/go.sum b/tracing/go.sum index f9ff4f98a..52c991f65 100644 --- a/tracing/go.sum +++ b/tracing/go.sum @@ -81,8 +81,8 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/examples/basic v0.0.0-20260810182504-f834f43955c5 h1:SRSrUaLTTdA4bUXb8+zA5MDhMEx8YaP+Knd+pddBcrg= goa.design/examples/basic v0.0.0-20260810182504-f834f43955c5/go.mod h1:XRziIzNcLb9fk7ZrfiHx5FIeAj+orJ4fkzLG0nXpiAo= -goa.design/goa/v3 v3.30.1-0.20260825121239-93fbcbe975c8 h1:MwRPnes61LS7Sa+TLAK/7zCCMZ3gmlcusA06NkuF+F0= -goa.design/goa/v3 v3.30.1-0.20260825121239-93fbcbe975c8/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260825122644-ed7b72688709 h1:CUUmVjHssJLES+e+2BqBo29/usnQHEak2wtPcpJKqvs= +goa.design/goa/v3 v3.30.1-0.20260825122644-ed7b72688709/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= diff --git a/tus/go.mod b/tus/go.mod index e85b8f556..ab79c33d4 100644 --- a/tus/go.mod +++ b/tus/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( github.com/rs/xid v1.6.0 - goa.design/goa/v3 v3.30.1-0.20260825121239-93fbcbe975c8 + goa.design/goa/v3 v3.30.1-0.20260825122644-ed7b72688709 ) require ( @@ -22,7 +22,6 @@ require ( golang.org/x/sync v0.22.0 // indirect golang.org/x/text v0.41.0 // indirect golang.org/x/tools v0.49.0 // indirect - google.golang.org/protobuf v1.36.12 // indirect gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/tus/go.sum b/tus/go.sum index b38592b3a..505df9b65 100644 --- a/tus/go.sum +++ b/tus/go.sum @@ -33,8 +33,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260825121239-93fbcbe975c8 h1:MwRPnes61LS7Sa+TLAK/7zCCMZ3gmlcusA06NkuF+F0= -goa.design/goa/v3 v3.30.1-0.20260825121239-93fbcbe975c8/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260825122644-ed7b72688709 h1:CUUmVjHssJLES+e+2BqBo29/usnQHEak2wtPcpJKqvs= +goa.design/goa/v3 v3.30.1-0.20260825122644-ed7b72688709/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= @@ -43,8 +43,6 @@ golang.org/x/text v0.41.0 h1:vz/seA0lnX87Othu2f/0L24RcgrXD9/YFTSuGjj3rH8= golang.org/x/text v0.41.0/go.mod h1:jvf1O8ajNzZqhSrQBPbutR/EB83Cc0CFrezNQIwbb5M= golang.org/x/tools v0.49.0 h1:3NI7VXzL9+1WZD52Dx2ttoPwD5DWrFGpl9mFZDlmisI= golang.org/x/tools v0.49.0/go.mod h1:SJNXV9DBKT0UbdttsQjbfJlAE/q+y36++zo3uL3N0Oo= -google.golang.org/protobuf v1.36.12 h1:pJOKDDOyeXErUroCihFAd5LQuwXBSpVnKGrj5o/fwxc= -google.golang.org/protobuf v1.36.12/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= diff --git a/upload_download/go.mod b/upload_download/go.mod index 5a875daac..87f19df0b 100644 --- a/upload_download/go.mod +++ b/upload_download/go.mod @@ -2,7 +2,7 @@ module goa.design/examples/upload_download go 1.26.0 -require goa.design/goa/v3 v3.30.1-0.20260825121239-93fbcbe975c8 +require goa.design/goa/v3 v3.30.1-0.20260825122644-ed7b72688709 require ( github.com/dimfeld/httppath v0.0.0-20170720192232-ee938bf73598 // indirect @@ -19,7 +19,6 @@ require ( golang.org/x/sync v0.22.0 // indirect golang.org/x/text v0.41.0 // indirect golang.org/x/tools v0.49.0 // indirect - google.golang.org/protobuf v1.36.12 // indirect gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/upload_download/go.sum b/upload_download/go.sum index 43f0e60f5..38b30ded1 100644 --- a/upload_download/go.sum +++ b/upload_download/go.sum @@ -31,8 +31,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260825121239-93fbcbe975c8 h1:MwRPnes61LS7Sa+TLAK/7zCCMZ3gmlcusA06NkuF+F0= -goa.design/goa/v3 v3.30.1-0.20260825121239-93fbcbe975c8/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260825122644-ed7b72688709 h1:CUUmVjHssJLES+e+2BqBo29/usnQHEak2wtPcpJKqvs= +goa.design/goa/v3 v3.30.1-0.20260825122644-ed7b72688709/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= @@ -41,8 +41,6 @@ golang.org/x/text v0.41.0 h1:vz/seA0lnX87Othu2f/0L24RcgrXD9/YFTSuGjj3rH8= golang.org/x/text v0.41.0/go.mod h1:jvf1O8ajNzZqhSrQBPbutR/EB83Cc0CFrezNQIwbb5M= golang.org/x/tools v0.49.0 h1:3NI7VXzL9+1WZD52Dx2ttoPwD5DWrFGpl9mFZDlmisI= golang.org/x/tools v0.49.0/go.mod h1:SJNXV9DBKT0UbdttsQjbfJlAE/q+y36++zo3uL3N0Oo= -google.golang.org/protobuf v1.36.12 h1:pJOKDDOyeXErUroCihFAd5LQuwXBSpVnKGrj5o/fwxc= -google.golang.org/protobuf v1.36.12/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= From e760e1d6018b097b24a541440806500b0956920f Mon Sep 17 00:00:00 2001 From: "Raphael (manual office deploy after cloud-state fix)" Date: Tue, 25 Aug 2026 11:42:58 -0700 Subject: [PATCH 10/28] chore: regenerate examples with Goa generation fixes --- basic/go.mod | 2 +- basic/go.sum | 4 +- .../http/sommelier/client/encode_decode.go | 12 ++---- .../http/sommelier/server/encode_decode.go | 12 ++---- cellar/gen/http/storage/client/cli.go | 2 +- .../gen/http/storage/client/encode_decode.go | 28 +++++-------- cellar/gen/http/storage/client/types.go | 4 +- .../gen/http/storage/server/encode_decode.go | 21 ++++------ cellar/gen/http/storage/server/types.go | 4 +- cellar/gen/sommelier/service.go | 6 --- cellar/gen/storage/service.go | 6 --- cellar/go.mod | 2 +- cellar/go.sum | 4 +- concerts/go.mod | 3 +- concerts/go.sum | 6 ++- cookies/go.mod | 3 +- cookies/go.sum | 6 ++- encodings/cbor/go.mod | 2 +- encodings/cbor/go.sum | 4 +- encodings/text/go.mod | 2 +- encodings/text/go.sum | 4 +- error/go.mod | 2 +- error/go.sum | 4 +- files/go.mod | 3 +- files/go.sum | 6 ++- httpstatus/design/design.go | 14 ++++--- httpstatus/gen/hello/service.go | 6 ++- httpstatus/gen/hello/views/view.go | 11 +++-- httpstatus/gen/http/hello/client/types.go | 5 --- httpstatus/gen/http/hello/server/types.go | 2 - httpstatus/gen/http/openapi.json | 2 +- httpstatus/gen/http/openapi.yaml | 16 +++++++- httpstatus/gen/http/openapi3.2.json | 2 +- httpstatus/gen/http/openapi3.2.yaml | 13 +++++- httpstatus/gen/http/openapi3.json | 2 +- httpstatus/gen/http/openapi3.yaml | 13 +++++- httpstatus/go.mod | 3 +- httpstatus/go.sum | 6 ++- interceptors/go.mod | 2 +- interceptors/go.sum | 4 +- .../gen/http/resume/client/encode_decode.go | 40 +++++++------------ .../gen/http/resume/server/encode_decode.go | 22 ++++------ multipart/gen/resume/service.go | 6 --- multipart/go.mod | 3 +- multipart/go.sum | 6 ++- retry/go.mod | 2 +- retry/go.sum | 4 +- security/hierarchy/go.mod | 3 +- security/hierarchy/go.sum | 6 ++- security/multiauth/go.mod | 2 +- security/multiauth/go.sum | 4 +- sse/go.mod | 2 +- sse/go.sum | 4 +- streaming/go.mod | 2 +- streaming/go.sum | 4 +- tracing/go.mod | 2 +- tracing/go.sum | 4 +- tus/go.mod | 3 +- tus/go.sum | 6 ++- upload_download/go.mod | 3 +- upload_download/go.sum | 6 ++- 61 files changed, 195 insertions(+), 192 deletions(-) diff --git a/basic/go.mod b/basic/go.mod index 4d2050c5e..15e9398cd 100644 --- a/basic/go.mod +++ b/basic/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( goa.design/clue v1.2.6 - goa.design/goa/v3 v3.30.1-0.20260825122644-ed7b72688709 + goa.design/goa/v3 v3.30.1-0.20260825174000-15f11dc2fdee google.golang.org/grpc v1.83.1 google.golang.org/protobuf v1.36.12 ) diff --git a/basic/go.sum b/basic/go.sum index d396fa70d..b94db4453 100644 --- a/basic/go.sum +++ b/basic/go.sum @@ -55,8 +55,8 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/clue v1.2.6 h1:ensyUkwlvEbNy8FuTGMldKuvaNouh8YoDY9QaE+EtYg= goa.design/clue v1.2.6/go.mod h1:Y4RS5o2k6MZiGk2PT3XbKyntjR2xkr8dYOKQ591dIDM= -goa.design/goa/v3 v3.30.1-0.20260825122644-ed7b72688709 h1:CUUmVjHssJLES+e+2BqBo29/usnQHEak2wtPcpJKqvs= -goa.design/goa/v3 v3.30.1-0.20260825122644-ed7b72688709/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260825174000-15f11dc2fdee h1:kHhMouwWXQwdReV0dGkgsx7WX0tzka0xnKZWHznWixQ= +goa.design/goa/v3 v3.30.1-0.20260825174000-15f11dc2fdee/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/cellar/gen/http/sommelier/client/encode_decode.go b/cellar/gen/http/sommelier/client/encode_decode.go index 4543da097..7895361af 100644 --- a/cellar/gen/http/sommelier/client/encode_decode.go +++ b/cellar/gen/http/sommelier/client/encode_decode.go @@ -149,7 +149,7 @@ func unmarshalStoredBottleResponseToSommelierviewsStoredBottleView(v *StoredBott res.Composition[i] = nil continue } - res.Composition[i] = unmarshalComponentResponseToSommelierviewsComponentViewOptional(val) + res.Composition[i] = unmarshalComponentResponseToSommelierviewsComponentView(val) } } @@ -166,13 +166,9 @@ func unmarshalWineryResponseTinyToSommelierviewsWineryView(v *WineryResponseTiny return res } -// unmarshalComponentResponseToSommelierviewsComponentViewOptional builds a -// value of type *sommelierviews.ComponentView from a value of type -// *ComponentResponse. -func unmarshalComponentResponseToSommelierviewsComponentViewOptional(v *ComponentResponse) *sommelierviews.ComponentView { - if v == nil { - return nil - } +// unmarshalComponentResponseToSommelierviewsComponentView builds a value of +// type *sommelierviews.ComponentView from a value of type *ComponentResponse. +func unmarshalComponentResponseToSommelierviewsComponentView(v *ComponentResponse) *sommelierviews.ComponentView { res := &sommelierviews.ComponentView{ Varietal: v.Varietal, Percentage: v.Percentage, diff --git a/cellar/gen/http/sommelier/server/encode_decode.go b/cellar/gen/http/sommelier/server/encode_decode.go index b557c3463..fade6be80 100644 --- a/cellar/gen/http/sommelier/server/encode_decode.go +++ b/cellar/gen/http/sommelier/server/encode_decode.go @@ -110,7 +110,7 @@ func marshalSommelierviewsStoredBottleViewToStoredBottleResponse(v *sommeliervie res.Composition[i] = nil continue } - res.Composition[i] = marshalSommelierviewsComponentViewToComponentResponseOptional(val) + res.Composition[i] = marshalSommelierviewsComponentViewToComponentResponse(val) } } @@ -127,13 +127,9 @@ func marshalSommelierviewsWineryViewToWineryResponseTiny(v *sommelierviews.Winer return res } -// marshalSommelierviewsComponentViewToComponentResponseOptional builds a value -// of type *ComponentResponse from a value of type -// *sommelierviews.ComponentView. -func marshalSommelierviewsComponentViewToComponentResponseOptional(v *sommelierviews.ComponentView) *ComponentResponse { - if v == nil { - return nil - } +// marshalSommelierviewsComponentViewToComponentResponse builds a value of type +// *ComponentResponse from a value of type *sommelierviews.ComponentView. +func marshalSommelierviewsComponentViewToComponentResponse(v *sommelierviews.ComponentView) *ComponentResponse { res := &ComponentResponse{ Varietal: *v.Varietal, Percentage: v.Percentage, diff --git a/cellar/gen/http/storage/client/cli.go b/cellar/gen/http/storage/client/cli.go index 94aa949be..dcc3402b3 100644 --- a/cellar/gen/http/storage/client/cli.go +++ b/cellar/gen/http/storage/client/cli.go @@ -116,7 +116,7 @@ func BuildAddPayload(storageAddBody *string) (*storage.Bottle, error) { v.Composition[i] = nil continue } - v.Composition[i] = marshalComponentRequestBodyToStorageComponentOptional(val) + v.Composition[i] = marshalComponentRequestBodyToStorageComponent(val) } } diff --git a/cellar/gen/http/storage/client/encode_decode.go b/cellar/gen/http/storage/client/encode_decode.go index 9b408206f..1fd6c0adb 100644 --- a/cellar/gen/http/storage/client/encode_decode.go +++ b/cellar/gen/http/storage/client/encode_decode.go @@ -631,13 +631,9 @@ func unmarshalWineryResponseBodyToStorageviewsWineryView(v *WineryResponseBody) return res } -// unmarshalComponentResponseBodyToStorageviewsComponentViewOptional builds a -// value of type *storageviews.ComponentView from a value of type -// *ComponentResponseBody. -func unmarshalComponentResponseBodyToStorageviewsComponentViewOptional(v *ComponentResponseBody) *storageviews.ComponentView { - if v == nil { - return nil - } +// unmarshalComponentResponseBodyToStorageviewsComponentView builds a value of +// type *storageviews.ComponentView from a value of type *ComponentResponseBody. +func unmarshalComponentResponseBodyToStorageviewsComponentView(v *ComponentResponseBody) *storageviews.ComponentView { res := &storageviews.ComponentView{ Varietal: v.Varietal, Percentage: v.Percentage, @@ -659,12 +655,9 @@ func marshalStorageWineryToWineryRequestBody(v *storage.Winery) *WineryRequestBo return res } -// marshalStorageComponentToComponentRequestBodyOptional builds a value of type +// marshalStorageComponentToComponentRequestBody builds a value of type // *ComponentRequestBody from a value of type *storage.Component. -func marshalStorageComponentToComponentRequestBodyOptional(v *storage.Component) *ComponentRequestBody { - if v == nil { - return nil - } +func marshalStorageComponentToComponentRequestBody(v *storage.Component) *ComponentRequestBody { res := &ComponentRequestBody{ Varietal: v.Varietal, Percentage: v.Percentage, @@ -686,12 +679,9 @@ func marshalWineryRequestBodyToStorageWinery(v *WineryRequestBody) *storage.Wine return res } -// marshalComponentRequestBodyToStorageComponentOptional builds a value of type +// marshalComponentRequestBodyToStorageComponent builds a value of type // *storage.Component from a value of type *ComponentRequestBody. -func marshalComponentRequestBodyToStorageComponentOptional(v *ComponentRequestBody) *storage.Component { - if v == nil { - return nil - } +func marshalComponentRequestBodyToStorageComponent(v *ComponentRequestBody) *storage.Component { res := &storage.Component{ Varietal: v.Varietal, Percentage: v.Percentage, @@ -719,7 +709,7 @@ func marshalStorageBottleToBottleRequestBody(v *storage.Bottle) *BottleRequestBo res.Composition[i] = nil continue } - res.Composition[i] = marshalStorageComponentToComponentRequestBodyOptional(val) + res.Composition[i] = marshalStorageComponentToComponentRequestBody(val) } } @@ -745,7 +735,7 @@ func marshalBottleRequestBodyToStorageBottle(v *BottleRequestBody) *storage.Bott res.Composition[i] = nil continue } - res.Composition[i] = marshalComponentRequestBodyToStorageComponentOptional(val) + res.Composition[i] = marshalComponentRequestBodyToStorageComponent(val) } } diff --git a/cellar/gen/http/storage/client/types.go b/cellar/gen/http/storage/client/types.go index 50992cf8f..2cf75d826 100644 --- a/cellar/gen/http/storage/client/types.go +++ b/cellar/gen/http/storage/client/types.go @@ -162,7 +162,7 @@ func NewAddRequestBody(p *storage.Bottle) *AddRequestBody { body.Composition[i] = nil continue } - body.Composition[i] = marshalStorageComponentToComponentRequestBodyOptional(val) + body.Composition[i] = marshalStorageComponentToComponentRequestBody(val) } } return body @@ -234,7 +234,7 @@ func NewShowStoredBottleOK(body *ShowResponseBody) *storageviews.StoredBottleVie v.Composition[i] = nil continue } - v.Composition[i] = unmarshalComponentResponseBodyToStorageviewsComponentViewOptional(val) + v.Composition[i] = unmarshalComponentResponseBodyToStorageviewsComponentView(val) } } diff --git a/cellar/gen/http/storage/server/encode_decode.go b/cellar/gen/http/storage/server/encode_decode.go index 0490534a7..20ec9efcd 100644 --- a/cellar/gen/http/storage/server/encode_decode.go +++ b/cellar/gen/http/storage/server/encode_decode.go @@ -383,13 +383,9 @@ func marshalStorageviewsWineryViewToWineryTiny(v *storageviews.WineryView) *Wine return res } -// marshalStorageviewsComponentViewToComponentResponseBodyOptional builds a -// value of type *ComponentResponseBody from a value of type -// *storageviews.ComponentView. -func marshalStorageviewsComponentViewToComponentResponseBodyOptional(v *storageviews.ComponentView) *ComponentResponseBody { - if v == nil { - return nil - } +// marshalStorageviewsComponentViewToComponentResponseBody builds a value of +// type *ComponentResponseBody from a value of type *storageviews.ComponentView. +func marshalStorageviewsComponentViewToComponentResponseBody(v *storageviews.ComponentView) *ComponentResponseBody { res := &ComponentResponseBody{ Varietal: *v.Varietal, Percentage: v.Percentage, @@ -411,12 +407,9 @@ func unmarshalWineryRequestBodyToStorageWinery(v *WineryRequestBody) *storage.Wi return res } -// unmarshalComponentRequestBodyToStorageComponentOptional builds a value of -// type *storage.Component from a value of type *ComponentRequestBody. -func unmarshalComponentRequestBodyToStorageComponentOptional(v *ComponentRequestBody) *storage.Component { - if v == nil { - return nil - } +// unmarshalComponentRequestBodyToStorageComponent builds a value of type +// *storage.Component from a value of type *ComponentRequestBody. +func unmarshalComponentRequestBodyToStorageComponent(v *ComponentRequestBody) *storage.Component { res := &storage.Component{ Varietal: *v.Varietal, Percentage: v.Percentage, @@ -442,7 +435,7 @@ func unmarshalBottleRequestBodyToStorageBottle(v *BottleRequestBody) *storage.Bo res.Composition[i] = nil continue } - res.Composition[i] = unmarshalComponentRequestBodyToStorageComponentOptional(val) + res.Composition[i] = unmarshalComponentRequestBodyToStorageComponent(val) } } diff --git a/cellar/gen/http/storage/server/types.go b/cellar/gen/http/storage/server/types.go index e5d34ca42..911061750 100644 --- a/cellar/gen/http/storage/server/types.go +++ b/cellar/gen/http/storage/server/types.go @@ -176,7 +176,7 @@ func NewShowResponseBody(res *storageviews.StoredBottleView) *ShowResponseBody { body.Composition[i] = nil continue } - body.Composition[i] = marshalStorageviewsComponentViewToComponentResponseBodyOptional(val) + body.Composition[i] = marshalStorageviewsComponentViewToComponentResponseBody(val) } } return body @@ -230,7 +230,7 @@ func NewAddBottle(body *AddRequestBody) *storage.Bottle { v.Composition[i] = nil continue } - v.Composition[i] = unmarshalComponentRequestBodyToStorageComponentOptional(val) + v.Composition[i] = unmarshalComponentRequestBodyToStorageComponent(val) } } diff --git a/cellar/gen/sommelier/service.go b/cellar/gen/sommelier/service.go index ba903cc33..04657f7bc 100644 --- a/cellar/gen/sommelier/service.go +++ b/cellar/gen/sommelier/service.go @@ -332,9 +332,6 @@ func newWineryViewTiny(res *Winery) *sommelierviews.WineryView { // transformSommelierviewsComponentViewToComponent builds a value of type // *Component from a value of type *sommelierviews.ComponentView. func transformSommelierviewsComponentViewToComponent(v *sommelierviews.ComponentView) *Component { - if v == nil { - return nil - } res := &Component{ Varietal: *v.Varietal, Percentage: v.Percentage, @@ -346,9 +343,6 @@ func transformSommelierviewsComponentViewToComponent(v *sommelierviews.Component // transformComponentToSommelierviewsComponentView builds a value of type // *sommelierviews.ComponentView from a value of type *Component. func transformComponentToSommelierviewsComponentView(v *Component) *sommelierviews.ComponentView { - if v == nil { - return nil - } res := &sommelierviews.ComponentView{ Varietal: &v.Varietal, Percentage: v.Percentage, diff --git a/cellar/gen/storage/service.go b/cellar/gen/storage/service.go index 8eefbccba..ffdf44aa9 100644 --- a/cellar/gen/storage/service.go +++ b/cellar/gen/storage/service.go @@ -393,9 +393,6 @@ func newWineryViewTiny(res *Winery) *storageviews.WineryView { // transformStorageviewsComponentViewToComponent builds a value of type // *Component from a value of type *storageviews.ComponentView. func transformStorageviewsComponentViewToComponent(v *storageviews.ComponentView) *Component { - if v == nil { - return nil - } res := &Component{ Varietal: *v.Varietal, Percentage: v.Percentage, @@ -407,9 +404,6 @@ func transformStorageviewsComponentViewToComponent(v *storageviews.ComponentView // transformComponentToStorageviewsComponentView builds a value of type // *storageviews.ComponentView from a value of type *Component. func transformComponentToStorageviewsComponentView(v *Component) *storageviews.ComponentView { - if v == nil { - return nil - } res := &storageviews.ComponentView{ Varietal: &v.Varietal, Percentage: v.Percentage, diff --git a/cellar/go.mod b/cellar/go.mod index 8dceac828..21e3a228a 100644 --- a/cellar/go.mod +++ b/cellar/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( github.com/boltdb/bolt v1.3.1 - goa.design/goa/v3 v3.30.1-0.20260825122644-ed7b72688709 + goa.design/goa/v3 v3.30.1-0.20260825174000-15f11dc2fdee google.golang.org/grpc v1.83.1 google.golang.org/protobuf v1.36.12 ) diff --git a/cellar/go.sum b/cellar/go.sum index 478babeed..8e4c5f320 100644 --- a/cellar/go.sum +++ b/cellar/go.sum @@ -51,8 +51,8 @@ go.opentelemetry.io/otel/trace v1.44.0 h1:jxF5CsGYCe74MCRx2X4g7WsY/VBKRqqpNvXlX/ go.opentelemetry.io/otel/trace v1.44.0/go.mod h1:oLl1jrMQAVo6v3GAggN+1VH9VIz9iUSvW53sW1Q8PIE= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260825122644-ed7b72688709 h1:CUUmVjHssJLES+e+2BqBo29/usnQHEak2wtPcpJKqvs= -goa.design/goa/v3 v3.30.1-0.20260825122644-ed7b72688709/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260825174000-15f11dc2fdee h1:kHhMouwWXQwdReV0dGkgsx7WX0tzka0xnKZWHznWixQ= +goa.design/goa/v3 v3.30.1-0.20260825174000-15f11dc2fdee/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/concerts/go.mod b/concerts/go.mod index da6dfad4a..8be635f0f 100644 --- a/concerts/go.mod +++ b/concerts/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( github.com/google/uuid v1.6.0 - goa.design/goa/v3 v3.30.1-0.20260825122644-ed7b72688709 + goa.design/goa/v3 v3.30.1-0.20260825174000-15f11dc2fdee ) require ( @@ -21,6 +21,7 @@ require ( golang.org/x/sync v0.22.0 // indirect golang.org/x/text v0.41.0 // indirect golang.org/x/tools v0.49.0 // indirect + google.golang.org/protobuf v1.36.12 // indirect gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/concerts/go.sum b/concerts/go.sum index 38b30ded1..92dd77cb3 100644 --- a/concerts/go.sum +++ b/concerts/go.sum @@ -31,8 +31,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260825122644-ed7b72688709 h1:CUUmVjHssJLES+e+2BqBo29/usnQHEak2wtPcpJKqvs= -goa.design/goa/v3 v3.30.1-0.20260825122644-ed7b72688709/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260825174000-15f11dc2fdee h1:kHhMouwWXQwdReV0dGkgsx7WX0tzka0xnKZWHznWixQ= +goa.design/goa/v3 v3.30.1-0.20260825174000-15f11dc2fdee/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= @@ -41,6 +41,8 @@ golang.org/x/text v0.41.0 h1:vz/seA0lnX87Othu2f/0L24RcgrXD9/YFTSuGjj3rH8= golang.org/x/text v0.41.0/go.mod h1:jvf1O8ajNzZqhSrQBPbutR/EB83Cc0CFrezNQIwbb5M= golang.org/x/tools v0.49.0 h1:3NI7VXzL9+1WZD52Dx2ttoPwD5DWrFGpl9mFZDlmisI= golang.org/x/tools v0.49.0/go.mod h1:SJNXV9DBKT0UbdttsQjbfJlAE/q+y36++zo3uL3N0Oo= +google.golang.org/protobuf v1.36.12 h1:pJOKDDOyeXErUroCihFAd5LQuwXBSpVnKGrj5o/fwxc= +google.golang.org/protobuf v1.36.12/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= diff --git a/cookies/go.mod b/cookies/go.mod index 514b96cf8..1c396b673 100644 --- a/cookies/go.mod +++ b/cookies/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( github.com/rs/xid v1.6.0 - goa.design/goa/v3 v3.30.1-0.20260825122644-ed7b72688709 + goa.design/goa/v3 v3.30.1-0.20260825174000-15f11dc2fdee ) require ( @@ -22,6 +22,7 @@ require ( golang.org/x/sync v0.22.0 // indirect golang.org/x/text v0.41.0 // indirect golang.org/x/tools v0.49.0 // indirect + google.golang.org/protobuf v1.36.12 // indirect gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/cookies/go.sum b/cookies/go.sum index 505df9b65..176b7108f 100644 --- a/cookies/go.sum +++ b/cookies/go.sum @@ -33,8 +33,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260825122644-ed7b72688709 h1:CUUmVjHssJLES+e+2BqBo29/usnQHEak2wtPcpJKqvs= -goa.design/goa/v3 v3.30.1-0.20260825122644-ed7b72688709/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260825174000-15f11dc2fdee h1:kHhMouwWXQwdReV0dGkgsx7WX0tzka0xnKZWHznWixQ= +goa.design/goa/v3 v3.30.1-0.20260825174000-15f11dc2fdee/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= @@ -43,6 +43,8 @@ golang.org/x/text v0.41.0 h1:vz/seA0lnX87Othu2f/0L24RcgrXD9/YFTSuGjj3rH8= golang.org/x/text v0.41.0/go.mod h1:jvf1O8ajNzZqhSrQBPbutR/EB83Cc0CFrezNQIwbb5M= golang.org/x/tools v0.49.0 h1:3NI7VXzL9+1WZD52Dx2ttoPwD5DWrFGpl9mFZDlmisI= golang.org/x/tools v0.49.0/go.mod h1:SJNXV9DBKT0UbdttsQjbfJlAE/q+y36++zo3uL3N0Oo= +google.golang.org/protobuf v1.36.12 h1:pJOKDDOyeXErUroCihFAd5LQuwXBSpVnKGrj5o/fwxc= +google.golang.org/protobuf v1.36.12/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= diff --git a/encodings/cbor/go.mod b/encodings/cbor/go.mod index f7e7ffa1c..0568378c7 100644 --- a/encodings/cbor/go.mod +++ b/encodings/cbor/go.mod @@ -5,7 +5,7 @@ go 1.26.0 require ( github.com/fxamacker/cbor/v2 v2.9.2 goa.design/clue v1.2.6 - goa.design/goa/v3 v3.30.1-0.20260825122644-ed7b72688709 + goa.design/goa/v3 v3.30.1-0.20260825174000-15f11dc2fdee ) require ( diff --git a/encodings/cbor/go.sum b/encodings/cbor/go.sum index 79f39b9ce..5027bf913 100644 --- a/encodings/cbor/go.sum +++ b/encodings/cbor/go.sum @@ -59,8 +59,8 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/clue v1.2.6 h1:ensyUkwlvEbNy8FuTGMldKuvaNouh8YoDY9QaE+EtYg= goa.design/clue v1.2.6/go.mod h1:Y4RS5o2k6MZiGk2PT3XbKyntjR2xkr8dYOKQ591dIDM= -goa.design/goa/v3 v3.30.1-0.20260825122644-ed7b72688709 h1:CUUmVjHssJLES+e+2BqBo29/usnQHEak2wtPcpJKqvs= -goa.design/goa/v3 v3.30.1-0.20260825122644-ed7b72688709/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260825174000-15f11dc2fdee h1:kHhMouwWXQwdReV0dGkgsx7WX0tzka0xnKZWHznWixQ= +goa.design/goa/v3 v3.30.1-0.20260825174000-15f11dc2fdee/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/encodings/text/go.mod b/encodings/text/go.mod index 011ae637c..5639eec02 100644 --- a/encodings/text/go.mod +++ b/encodings/text/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( goa.design/clue v1.2.6 - goa.design/goa/v3 v3.30.1-0.20260825122644-ed7b72688709 + goa.design/goa/v3 v3.30.1-0.20260825174000-15f11dc2fdee ) require ( diff --git a/encodings/text/go.sum b/encodings/text/go.sum index d396fa70d..b94db4453 100644 --- a/encodings/text/go.sum +++ b/encodings/text/go.sum @@ -55,8 +55,8 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/clue v1.2.6 h1:ensyUkwlvEbNy8FuTGMldKuvaNouh8YoDY9QaE+EtYg= goa.design/clue v1.2.6/go.mod h1:Y4RS5o2k6MZiGk2PT3XbKyntjR2xkr8dYOKQ591dIDM= -goa.design/goa/v3 v3.30.1-0.20260825122644-ed7b72688709 h1:CUUmVjHssJLES+e+2BqBo29/usnQHEak2wtPcpJKqvs= -goa.design/goa/v3 v3.30.1-0.20260825122644-ed7b72688709/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260825174000-15f11dc2fdee h1:kHhMouwWXQwdReV0dGkgsx7WX0tzka0xnKZWHznWixQ= +goa.design/goa/v3 v3.30.1-0.20260825174000-15f11dc2fdee/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/error/go.mod b/error/go.mod index 433378c92..23552f7fa 100644 --- a/error/go.mod +++ b/error/go.mod @@ -3,7 +3,7 @@ module goa.design/examples/error go 1.26.0 require ( - goa.design/goa/v3 v3.30.1-0.20260825122644-ed7b72688709 + goa.design/goa/v3 v3.30.1-0.20260825174000-15f11dc2fdee google.golang.org/genproto v0.0.0-20260810153831-ec0a7760b754 google.golang.org/grpc v1.83.1 google.golang.org/protobuf v1.36.12 diff --git a/error/go.sum b/error/go.sum index 9453a1b54..b3b51efea 100644 --- a/error/go.sum +++ b/error/go.sum @@ -49,8 +49,8 @@ go.opentelemetry.io/otel/trace v1.44.0 h1:jxF5CsGYCe74MCRx2X4g7WsY/VBKRqqpNvXlX/ go.opentelemetry.io/otel/trace v1.44.0/go.mod h1:oLl1jrMQAVo6v3GAggN+1VH9VIz9iUSvW53sW1Q8PIE= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260825122644-ed7b72688709 h1:CUUmVjHssJLES+e+2BqBo29/usnQHEak2wtPcpJKqvs= -goa.design/goa/v3 v3.30.1-0.20260825122644-ed7b72688709/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260825174000-15f11dc2fdee h1:kHhMouwWXQwdReV0dGkgsx7WX0tzka0xnKZWHznWixQ= +goa.design/goa/v3 v3.30.1-0.20260825174000-15f11dc2fdee/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/files/go.mod b/files/go.mod index b4bfac480..4d084de59 100644 --- a/files/go.mod +++ b/files/go.mod @@ -2,7 +2,7 @@ module goa.design/examples/files go 1.26.0 -require goa.design/goa/v3 v3.30.1-0.20260825122644-ed7b72688709 +require goa.design/goa/v3 v3.30.1-0.20260825174000-15f11dc2fdee require ( github.com/dimfeld/httppath v0.0.0-20170720192232-ee938bf73598 // indirect @@ -19,6 +19,7 @@ require ( golang.org/x/sync v0.22.0 // indirect golang.org/x/text v0.41.0 // indirect golang.org/x/tools v0.49.0 // indirect + google.golang.org/protobuf v1.36.12 // indirect gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/files/go.sum b/files/go.sum index 38b30ded1..92dd77cb3 100644 --- a/files/go.sum +++ b/files/go.sum @@ -31,8 +31,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260825122644-ed7b72688709 h1:CUUmVjHssJLES+e+2BqBo29/usnQHEak2wtPcpJKqvs= -goa.design/goa/v3 v3.30.1-0.20260825122644-ed7b72688709/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260825174000-15f11dc2fdee h1:kHhMouwWXQwdReV0dGkgsx7WX0tzka0xnKZWHznWixQ= +goa.design/goa/v3 v3.30.1-0.20260825174000-15f11dc2fdee/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= @@ -41,6 +41,8 @@ golang.org/x/text v0.41.0 h1:vz/seA0lnX87Othu2f/0L24RcgrXD9/YFTSuGjj3rH8= golang.org/x/text v0.41.0/go.mod h1:jvf1O8ajNzZqhSrQBPbutR/EB83Cc0CFrezNQIwbb5M= golang.org/x/tools v0.49.0 h1:3NI7VXzL9+1WZD52Dx2ttoPwD5DWrFGpl9mFZDlmisI= golang.org/x/tools v0.49.0/go.mod h1:SJNXV9DBKT0UbdttsQjbfJlAE/q+y36++zo3uL3N0Oo= +google.golang.org/protobuf v1.36.12 h1:pJOKDDOyeXErUroCihFAd5LQuwXBSpVnKGrj5o/fwxc= +google.golang.org/protobuf v1.36.12/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= diff --git a/httpstatus/design/design.go b/httpstatus/design/design.go index 42e403c14..cd5ce3530 100644 --- a/httpstatus/design/design.go +++ b/httpstatus/design/design.go @@ -6,11 +6,11 @@ import ( var GreetingResult = ResultType("application/vnd.hello", func() { Attribute("greeting", String, "The greeting message") - Attribute("outcome", func() { - Meta("swagger:example", "false") // hide from swagger - Meta("swagger:generate", "false") + Attribute("outcome", String, "The HTTP response selected for the greeting", func() { + Default("defaultStatus") + Enum("created", "accepted", "defaultStatus") }) - Required("outcome", "greeting") + Required("greeting") }) var _ = Service("hello", func() { @@ -33,7 +33,11 @@ var _ = Service("hello", func() { Response(StatusAccepted, func() { Tag("outcome", "accepted") }) - Response(StatusOK) // default response status + Response(StatusOK, func() { + Body(func() { + Attribute("greeting") + }) + }) }) }) }) diff --git a/httpstatus/gen/hello/service.go b/httpstatus/gen/hello/service.go index 083324a3c..10b036905 100644 --- a/httpstatus/gen/hello/service.go +++ b/httpstatus/gen/hello/service.go @@ -39,7 +39,8 @@ var MethodNames = [1]string{"hello"} type Hello struct { // The greeting message Greeting string - Outcome string + // The HTTP response selected for the greeting + Outcome string } // HelloPayload is the payload type of the hello service hello method. @@ -69,6 +70,9 @@ func newHello(vres *helloviews.HelloView) *Hello { if vres.Outcome != nil { res.Outcome = *vres.Outcome } + if vres.Outcome == nil { + res.Outcome = "defaultStatus" + } return res } diff --git a/httpstatus/gen/hello/views/view.go b/httpstatus/gen/hello/views/view.go index 0b5210868..3bcda49c6 100644 --- a/httpstatus/gen/hello/views/view.go +++ b/httpstatus/gen/hello/views/view.go @@ -21,7 +21,8 @@ type Hello struct { type HelloView struct { // The greeting message Greeting *string - Outcome *string + // The HTTP response selected for the greeting + Outcome *string } var ( @@ -48,11 +49,13 @@ func ValidateHello(result *Hello) (err error) { // ValidateHelloView runs the validations defined on HelloView using the // "default" view. func ValidateHelloView(result *HelloView) (err error) { - if result.Outcome == nil { - err = goa.MergeErrors(err, goa.MissingFieldError("outcome", "result")) - } if result.Greeting == nil { err = goa.MergeErrors(err, goa.MissingFieldError("greeting", "result")) } + if result.Outcome != nil { + if !(*result.Outcome == "created" || *result.Outcome == "accepted" || *result.Outcome == "defaultStatus") { + err = goa.MergeErrors(err, goa.InvalidEnumValueError("result.outcome", *result.Outcome, []any{"created", "accepted", "defaultStatus"})) + } + } return } diff --git a/httpstatus/gen/http/hello/client/types.go b/httpstatus/gen/http/hello/client/types.go index 9cb23438d..5cbf8924c 100644 --- a/httpstatus/gen/http/hello/client/types.go +++ b/httpstatus/gen/http/hello/client/types.go @@ -31,7 +31,6 @@ type HelloAcceptedResponseBody struct { type HelloOKResponseBody struct { // The greeting message Greeting *string `form:"greeting,omitempty" json:"greeting,omitempty" xml:"greeting,omitempty"` - Outcome *string `form:"outcome,omitempty" json:"outcome,omitempty" xml:"outcome,omitempty"` } // NewHelloViewCreated builds a "hello" service "hello" endpoint result from a @@ -59,7 +58,6 @@ func NewHelloViewAccepted(body *HelloAcceptedResponseBody) *helloviews.HelloView func NewHelloViewOK(body *HelloOKResponseBody) *helloviews.HelloView { v := &helloviews.HelloView{ Greeting: body.Greeting, - Outcome: body.Outcome, } return v @@ -86,9 +84,6 @@ func ValidateHelloAcceptedResponseBody(body *HelloAcceptedResponseBody) (err err // ValidateHelloOKResponseBody runs the validations defined on // HelloOKResponseBody func ValidateHelloOKResponseBody(body *HelloOKResponseBody) (err error) { - if body.Outcome == nil { - err = goa.MergeErrors(err, goa.MissingFieldError("outcome", "body")) - } if body.Greeting == nil { err = goa.MergeErrors(err, goa.MissingFieldError("greeting", "body")) } diff --git a/httpstatus/gen/http/hello/server/types.go b/httpstatus/gen/http/hello/server/types.go index 40c17d70d..0b3976c19 100644 --- a/httpstatus/gen/http/hello/server/types.go +++ b/httpstatus/gen/http/hello/server/types.go @@ -31,7 +31,6 @@ type HelloAcceptedResponseBody struct { type HelloOKResponseBody struct { // The greeting message Greeting string `form:"greeting" json:"greeting" xml:"greeting"` - Outcome string `form:"outcome" json:"outcome" xml:"outcome"` } // NewHelloCreatedResponseBody builds the HTTP response body from the result of @@ -57,7 +56,6 @@ func NewHelloAcceptedResponseBody(res *helloviews.HelloView) *HelloAcceptedRespo func NewHelloOKResponseBody(res *helloviews.HelloView) *HelloOKResponseBody { body := &HelloOKResponseBody{ Greeting: *res.Greeting, - Outcome: *res.Outcome, } return body } diff --git a/httpstatus/gen/http/openapi.json b/httpstatus/gen/http/openapi.json index 801f8b9b4..c49a967fc 100644 --- a/httpstatus/gen/http/openapi.json +++ b/httpstatus/gen/http/openapi.json @@ -1 +1 @@ -{"swagger":"2.0","info":{"title":"","version":"0.0.1"},"host":"localhost:80","consumes":["application/json","application/xml","application/gob"],"produces":["application/json","application/xml","application/gob"],"paths":{"/hello/{greeting}":{"get":{"tags":["hello"],"summary":"hello hello","operationId":"hello#hello","parameters":[{"name":"greeting","in":"path","description":"The greeting message","required":true,"type":"string"}],"responses":{"200":{"description":"OK response.","schema":{"$ref":"#/definitions/Hello"}},"201":{"description":"Created response.","schema":{"$ref":"#/definitions/Hello"}},"202":{"description":"Accepted response.","schema":{"$ref":"#/definitions/Hello"}}},"schemes":["http"]}}},"definitions":{"Hello":{"title":"Mediatype identifier: application/vnd.hello; view=default","type":"object","properties":{"greeting":{"type":"string","description":"The greeting message","example":"Ea earum recusandae."}},"description":"HelloCreatedResponseBody result type (default view)","example":{"greeting":"Ea earum recusandae."},"required":["greeting"]}}} \ No newline at end of file +{"swagger":"2.0","info":{"title":"","version":"0.0.1"},"host":"localhost:80","consumes":["application/json","application/xml","application/gob"],"produces":["application/json","application/xml","application/gob"],"paths":{"/hello/{greeting}":{"get":{"tags":["hello"],"summary":"hello hello","operationId":"hello#hello","parameters":[{"name":"greeting","in":"path","description":"The greeting message","required":true,"type":"string"}],"responses":{"200":{"description":"OK response.","schema":{"$ref":"#/definitions/HelloHelloOKResponseBody","required":["greeting"]}},"201":{"description":"Created response.","schema":{"$ref":"#/definitions/Hello"}},"202":{"description":"Accepted response.","schema":{"$ref":"#/definitions/Hello"}}},"schemes":["http"]}}},"definitions":{"Hello":{"title":"Mediatype identifier: application/vnd.hello; view=default","type":"object","properties":{"greeting":{"type":"string","description":"The greeting message","example":"Ea earum recusandae."}},"description":"HelloCreatedResponseBody result type (default view)","example":{"greeting":"Ea earum recusandae."},"required":["greeting"]},"HelloHelloOKResponseBody":{"title":"HelloHelloOKResponseBody","type":"object","properties":{"greeting":{"type":"string","description":"The greeting message","example":"Rem tempora sed qui."}},"example":{"greeting":"Rem tempora sed qui."},"required":["greeting"]}}} \ No newline at end of file diff --git a/httpstatus/gen/http/openapi.yaml b/httpstatus/gen/http/openapi.yaml index 87fa244bb..fdc345f44 100644 --- a/httpstatus/gen/http/openapi.yaml +++ b/httpstatus/gen/http/openapi.yaml @@ -28,7 +28,9 @@ paths: "200": description: OK response. schema: - $ref: '#/definitions/Hello' + $ref: '#/definitions/HelloHelloOKResponseBody' + required: + - greeting "201": description: Created response. schema: @@ -53,3 +55,15 @@ definitions: greeting: Ea earum recusandae. required: - greeting + HelloHelloOKResponseBody: + title: HelloHelloOKResponseBody + type: object + properties: + greeting: + type: string + description: The greeting message + example: Rem tempora sed qui. + example: + greeting: Rem tempora sed qui. + required: + - greeting diff --git a/httpstatus/gen/http/openapi3.2.json b/httpstatus/gen/http/openapi3.2.json index 0d0ec0f5b..97b16c405 100644 --- a/httpstatus/gen/http/openapi3.2.json +++ b/httpstatus/gen/http/openapi3.2.json @@ -1 +1 @@ -{"openapi":"3.2.0","info":{"title":"Goa API","version":"0.0.1"},"servers":[{"url":"http://localhost:80","name":"hello","description":"Default server for hello"}],"paths":{"/hello/{greeting}":{"get":{"tags":["hello"],"summary":"hello hello","operationId":"hello#hello","parameters":[{"name":"greeting","in":"path","description":"The greeting message","required":true,"schema":{"type":"string","description":"The greeting message","example":"Dolor minima nisi cum."},"example":"Dolor minima nisi cum."}],"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Hello"},"example":{"greeting":"Rem tempora sed qui."}}}},"201":{"description":"Created response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Hello"},"example":{"greeting":"Ea earum recusandae."}}}},"202":{"description":"Accepted response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Hello"},"example":{"greeting":"Ex tempore iste."}}}}}}}},"components":{"schemas":{"Hello":{"type":"object","properties":{"greeting":{"type":"string","description":"The greeting message","example":"Ea earum recusandae."}},"example":{"greeting":"Ea earum recusandae."},"required":["greeting"]}}},"tags":[{"name":"hello","description":"The hello service returns greetings with various statuses."}]} \ No newline at end of file +{"openapi":"3.2.0","info":{"title":"Goa API","version":"0.0.1"},"servers":[{"url":"http://localhost:80","name":"hello","description":"Default server for hello"}],"paths":{"/hello/{greeting}":{"get":{"tags":["hello"],"summary":"hello hello","operationId":"hello#hello","parameters":[{"name":"greeting","in":"path","description":"The greeting message","required":true,"schema":{"type":"string","description":"The greeting message","example":"Dolor minima nisi cum."},"example":"Dolor minima nisi cum."}],"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HellohelloResponseBody"},"example":{"greeting":"Rem tempora sed qui."}}}},"201":{"description":"Created response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Hello"},"example":{"greeting":"Ea earum recusandae."}}}},"202":{"description":"Accepted response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Hello"},"example":{"greeting":"Ex tempore iste."}}}}}}}},"components":{"schemas":{"Hello":{"type":"object","properties":{"greeting":{"type":"string","description":"The greeting message","example":"Ea earum recusandae."}},"example":{"greeting":"Ea earum recusandae."},"required":["greeting"]},"HellohelloResponseBody":{"type":"object","properties":{"greeting":{"type":"string","description":"The greeting message","example":"Rem tempora sed qui."}},"example":{"greeting":"Rem tempora sed qui."},"required":["greeting"]}}},"tags":[{"name":"hello","description":"The hello service returns greetings with various statuses."}]} \ No newline at end of file diff --git a/httpstatus/gen/http/openapi3.2.yaml b/httpstatus/gen/http/openapi3.2.yaml index 5facdb300..8288de012 100644 --- a/httpstatus/gen/http/openapi3.2.yaml +++ b/httpstatus/gen/http/openapi3.2.yaml @@ -29,7 +29,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Hello' + $ref: '#/components/schemas/HellohelloResponseBody' example: greeting: Rem tempora sed qui. "201": @@ -61,6 +61,17 @@ components: greeting: Ea earum recusandae. required: - greeting + HellohelloResponseBody: + type: object + properties: + greeting: + type: string + description: The greeting message + example: Rem tempora sed qui. + example: + greeting: Rem tempora sed qui. + required: + - greeting tags: - name: hello description: The hello service returns greetings with various statuses. diff --git a/httpstatus/gen/http/openapi3.json b/httpstatus/gen/http/openapi3.json index 8f2d5509d..3cfbeddac 100644 --- a/httpstatus/gen/http/openapi3.json +++ b/httpstatus/gen/http/openapi3.json @@ -1 +1 @@ -{"openapi":"3.0.3","info":{"title":"Goa API","version":"0.0.1"},"servers":[{"url":"http://localhost:80","description":"Default server for hello"}],"paths":{"/hello/{greeting}":{"get":{"tags":["hello"],"summary":"hello hello","operationId":"hello#hello","parameters":[{"name":"greeting","in":"path","description":"The greeting message","required":true,"schema":{"type":"string","description":"The greeting message","example":"Dolor minima nisi cum."},"example":"Dolor minima nisi cum."}],"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Hello"},"example":{"greeting":"Rem tempora sed qui."}}}},"201":{"description":"Created response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Hello"},"example":{"greeting":"Ea earum recusandae."}}}},"202":{"description":"Accepted response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Hello"},"example":{"greeting":"Ex tempore iste."}}}}}}}},"components":{"schemas":{"Hello":{"type":"object","properties":{"greeting":{"type":"string","description":"The greeting message","example":"Ea earum recusandae."}},"example":{"greeting":"Ea earum recusandae."},"required":["greeting"]}}},"tags":[{"name":"hello","description":"The hello service returns greetings with various statuses."}]} \ No newline at end of file +{"openapi":"3.0.3","info":{"title":"Goa API","version":"0.0.1"},"servers":[{"url":"http://localhost:80","description":"Default server for hello"}],"paths":{"/hello/{greeting}":{"get":{"tags":["hello"],"summary":"hello hello","operationId":"hello#hello","parameters":[{"name":"greeting","in":"path","description":"The greeting message","required":true,"schema":{"type":"string","description":"The greeting message","example":"Dolor minima nisi cum."},"example":"Dolor minima nisi cum."}],"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HellohelloResponseBody"},"example":{"greeting":"Rem tempora sed qui."}}}},"201":{"description":"Created response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Hello"},"example":{"greeting":"Ea earum recusandae."}}}},"202":{"description":"Accepted response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Hello"},"example":{"greeting":"Ex tempore iste."}}}}}}}},"components":{"schemas":{"Hello":{"type":"object","properties":{"greeting":{"type":"string","description":"The greeting message","example":"Ea earum recusandae."}},"example":{"greeting":"Ea earum recusandae."},"required":["greeting"]},"HellohelloResponseBody":{"type":"object","properties":{"greeting":{"type":"string","description":"The greeting message","example":"Rem tempora sed qui."}},"example":{"greeting":"Rem tempora sed qui."},"required":["greeting"]}}},"tags":[{"name":"hello","description":"The hello service returns greetings with various statuses."}]} \ No newline at end of file diff --git a/httpstatus/gen/http/openapi3.yaml b/httpstatus/gen/http/openapi3.yaml index 2d3d2f8f9..e1edc1edd 100644 --- a/httpstatus/gen/http/openapi3.yaml +++ b/httpstatus/gen/http/openapi3.yaml @@ -28,7 +28,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Hello' + $ref: '#/components/schemas/HellohelloResponseBody' example: greeting: Rem tempora sed qui. "201": @@ -60,6 +60,17 @@ components: greeting: Ea earum recusandae. required: - greeting + HellohelloResponseBody: + type: object + properties: + greeting: + type: string + description: The greeting message + example: Rem tempora sed qui. + example: + greeting: Rem tempora sed qui. + required: + - greeting tags: - name: hello description: The hello service returns greetings with various statuses. diff --git a/httpstatus/go.mod b/httpstatus/go.mod index 5d7e243d4..58dea0000 100644 --- a/httpstatus/go.mod +++ b/httpstatus/go.mod @@ -2,7 +2,7 @@ module goa.design/examples/httpstatus go 1.26.0 -require goa.design/goa/v3 v3.30.1-0.20260825122644-ed7b72688709 +require goa.design/goa/v3 v3.30.1-0.20260825174000-15f11dc2fdee require ( github.com/dimfeld/httppath v0.0.0-20170720192232-ee938bf73598 // indirect @@ -19,6 +19,7 @@ require ( golang.org/x/sync v0.22.0 // indirect golang.org/x/text v0.41.0 // indirect golang.org/x/tools v0.49.0 // indirect + google.golang.org/protobuf v1.36.12 // indirect gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/httpstatus/go.sum b/httpstatus/go.sum index 38b30ded1..92dd77cb3 100644 --- a/httpstatus/go.sum +++ b/httpstatus/go.sum @@ -31,8 +31,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260825122644-ed7b72688709 h1:CUUmVjHssJLES+e+2BqBo29/usnQHEak2wtPcpJKqvs= -goa.design/goa/v3 v3.30.1-0.20260825122644-ed7b72688709/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260825174000-15f11dc2fdee h1:kHhMouwWXQwdReV0dGkgsx7WX0tzka0xnKZWHznWixQ= +goa.design/goa/v3 v3.30.1-0.20260825174000-15f11dc2fdee/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= @@ -41,6 +41,8 @@ golang.org/x/text v0.41.0 h1:vz/seA0lnX87Othu2f/0L24RcgrXD9/YFTSuGjj3rH8= golang.org/x/text v0.41.0/go.mod h1:jvf1O8ajNzZqhSrQBPbutR/EB83Cc0CFrezNQIwbb5M= golang.org/x/tools v0.49.0 h1:3NI7VXzL9+1WZD52Dx2ttoPwD5DWrFGpl9mFZDlmisI= golang.org/x/tools v0.49.0/go.mod h1:SJNXV9DBKT0UbdttsQjbfJlAE/q+y36++zo3uL3N0Oo= +google.golang.org/protobuf v1.36.12 h1:pJOKDDOyeXErUroCihFAd5LQuwXBSpVnKGrj5o/fwxc= +google.golang.org/protobuf v1.36.12/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= diff --git a/interceptors/go.mod b/interceptors/go.mod index 07a7f5048..d8855b974 100644 --- a/interceptors/go.mod +++ b/interceptors/go.mod @@ -6,7 +6,7 @@ require ( github.com/google/uuid v1.6.0 github.com/gorilla/websocket v1.5.3 goa.design/clue v1.2.6 - goa.design/goa/v3 v3.30.1-0.20260825122644-ed7b72688709 + goa.design/goa/v3 v3.30.1-0.20260825174000-15f11dc2fdee google.golang.org/grpc v1.83.1 google.golang.org/protobuf v1.36.12 ) diff --git a/interceptors/go.sum b/interceptors/go.sum index d396fa70d..b94db4453 100644 --- a/interceptors/go.sum +++ b/interceptors/go.sum @@ -55,8 +55,8 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/clue v1.2.6 h1:ensyUkwlvEbNy8FuTGMldKuvaNouh8YoDY9QaE+EtYg= goa.design/clue v1.2.6/go.mod h1:Y4RS5o2k6MZiGk2PT3XbKyntjR2xkr8dYOKQ591dIDM= -goa.design/goa/v3 v3.30.1-0.20260825122644-ed7b72688709 h1:CUUmVjHssJLES+e+2BqBo29/usnQHEak2wtPcpJKqvs= -goa.design/goa/v3 v3.30.1-0.20260825122644-ed7b72688709/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260825174000-15f11dc2fdee h1:kHhMouwWXQwdReV0dGkgsx7WX0tzka0xnKZWHznWixQ= +goa.design/goa/v3 v3.30.1-0.20260825174000-15f11dc2fdee/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/multipart/gen/http/resume/client/encode_decode.go b/multipart/gen/http/resume/client/encode_decode.go index b91968b04..cee97c4ac 100644 --- a/multipart/gen/http/resume/client/encode_decode.go +++ b/multipart/gen/http/resume/client/encode_decode.go @@ -248,7 +248,7 @@ func marshalResumeResumeToResumeRequestBody(v *resume.Resume) *ResumeRequestBody res.Experience[i] = nil continue } - res.Experience[i] = marshalResumeExperienceToExperienceRequestBodyOptional(val) + res.Experience[i] = marshalResumeExperienceToExperienceRequestBody(val) } } if v.Education != nil { @@ -258,19 +258,16 @@ func marshalResumeResumeToResumeRequestBody(v *resume.Resume) *ResumeRequestBody res.Education[i] = nil continue } - res.Education[i] = marshalResumeEducationToEducationRequestBodyOptional(val) + res.Education[i] = marshalResumeEducationToEducationRequestBody(val) } } return res } -// marshalResumeExperienceToExperienceRequestBodyOptional builds a value of -// type *ExperienceRequestBody from a value of type *resume.Experience. -func marshalResumeExperienceToExperienceRequestBodyOptional(v *resume.Experience) *ExperienceRequestBody { - if v == nil { - return nil - } +// marshalResumeExperienceToExperienceRequestBody builds a value of type +// *ExperienceRequestBody from a value of type *resume.Experience. +func marshalResumeExperienceToExperienceRequestBody(v *resume.Experience) *ExperienceRequestBody { res := &ExperienceRequestBody{ Company: v.Company, Role: v.Role, @@ -280,12 +277,9 @@ func marshalResumeExperienceToExperienceRequestBodyOptional(v *resume.Experience return res } -// marshalResumeEducationToEducationRequestBodyOptional builds a value of type +// marshalResumeEducationToEducationRequestBody builds a value of type // *EducationRequestBody from a value of type *resume.Education. -func marshalResumeEducationToEducationRequestBodyOptional(v *resume.Education) *EducationRequestBody { - if v == nil { - return nil - } +func marshalResumeEducationToEducationRequestBody(v *resume.Education) *EducationRequestBody { res := &EducationRequestBody{ Institution: v.Institution, Major: v.Major, @@ -307,7 +301,7 @@ func marshalResumeRequestBodyToResumeResume(v *ResumeRequestBody) *resume.Resume res.Experience[i] = nil continue } - res.Experience[i] = marshalExperienceRequestBodyToResumeExperienceOptional(val) + res.Experience[i] = marshalExperienceRequestBodyToResumeExperience(val) } } if v.Education != nil { @@ -317,19 +311,16 @@ func marshalResumeRequestBodyToResumeResume(v *ResumeRequestBody) *resume.Resume res.Education[i] = nil continue } - res.Education[i] = marshalEducationRequestBodyToResumeEducationOptional(val) + res.Education[i] = marshalEducationRequestBodyToResumeEducation(val) } } return res } -// marshalExperienceRequestBodyToResumeExperienceOptional builds a value of -// type *resume.Experience from a value of type *ExperienceRequestBody. -func marshalExperienceRequestBodyToResumeExperienceOptional(v *ExperienceRequestBody) *resume.Experience { - if v == nil { - return nil - } +// marshalExperienceRequestBodyToResumeExperience builds a value of type +// *resume.Experience from a value of type *ExperienceRequestBody. +func marshalExperienceRequestBodyToResumeExperience(v *ExperienceRequestBody) *resume.Experience { res := &resume.Experience{ Company: v.Company, Role: v.Role, @@ -339,12 +330,9 @@ func marshalExperienceRequestBodyToResumeExperienceOptional(v *ExperienceRequest return res } -// marshalEducationRequestBodyToResumeEducationOptional builds a value of type +// marshalEducationRequestBodyToResumeEducation builds a value of type // *resume.Education from a value of type *EducationRequestBody. -func marshalEducationRequestBodyToResumeEducationOptional(v *EducationRequestBody) *resume.Education { - if v == nil { - return nil - } +func marshalEducationRequestBodyToResumeEducation(v *EducationRequestBody) *resume.Education { res := &resume.Education{ Institution: v.Institution, Major: v.Major, diff --git a/multipart/gen/http/resume/server/encode_decode.go b/multipart/gen/http/resume/server/encode_decode.go index 437e012d1..1fb51bd79 100644 --- a/multipart/gen/http/resume/server/encode_decode.go +++ b/multipart/gen/http/resume/server/encode_decode.go @@ -170,7 +170,7 @@ func unmarshalResumeRequestBodyToResumeResume(v *ResumeRequestBody) *resume.Resu res.Experience[i] = nil continue } - res.Experience[i] = unmarshalExperienceRequestBodyToResumeExperienceOptional(val) + res.Experience[i] = unmarshalExperienceRequestBodyToResumeExperience(val) } } if v.Education != nil { @@ -180,19 +180,16 @@ func unmarshalResumeRequestBodyToResumeResume(v *ResumeRequestBody) *resume.Resu res.Education[i] = nil continue } - res.Education[i] = unmarshalEducationRequestBodyToResumeEducationOptional(val) + res.Education[i] = unmarshalEducationRequestBodyToResumeEducation(val) } } return res } -// unmarshalExperienceRequestBodyToResumeExperienceOptional builds a value of -// type *resume.Experience from a value of type *ExperienceRequestBody. -func unmarshalExperienceRequestBodyToResumeExperienceOptional(v *ExperienceRequestBody) *resume.Experience { - if v == nil { - return nil - } +// unmarshalExperienceRequestBodyToResumeExperience builds a value of type +// *resume.Experience from a value of type *ExperienceRequestBody. +func unmarshalExperienceRequestBodyToResumeExperience(v *ExperienceRequestBody) *resume.Experience { res := &resume.Experience{ Company: *v.Company, Role: *v.Role, @@ -202,12 +199,9 @@ func unmarshalExperienceRequestBodyToResumeExperienceOptional(v *ExperienceReque return res } -// unmarshalEducationRequestBodyToResumeEducationOptional builds a value of -// type *resume.Education from a value of type *EducationRequestBody. -func unmarshalEducationRequestBodyToResumeEducationOptional(v *EducationRequestBody) *resume.Education { - if v == nil { - return nil - } +// unmarshalEducationRequestBodyToResumeEducation builds a value of type +// *resume.Education from a value of type *EducationRequestBody. +func unmarshalEducationRequestBodyToResumeEducation(v *EducationRequestBody) *resume.Education { res := &resume.Education{ Institution: *v.Institution, Major: *v.Major, diff --git a/multipart/gen/resume/service.go b/multipart/gen/resume/service.go index c3acd68a7..4958b8c21 100644 --- a/multipart/gen/resume/service.go +++ b/multipart/gen/resume/service.go @@ -188,9 +188,6 @@ func newStoredResumeView(res *StoredResume) *resumeviews.StoredResumeView { // transformResumeviewsExperienceViewToExperience builds a value of type // *Experience from a value of type *resumeviews.ExperienceView. func transformResumeviewsExperienceViewToExperience(v *resumeviews.ExperienceView) *Experience { - if v == nil { - return nil - } res := &Experience{ Company: *v.Company, Role: *v.Role, @@ -203,9 +200,6 @@ func transformResumeviewsExperienceViewToExperience(v *resumeviews.ExperienceVie // transformResumeviewsEducationViewToEducation builds a value of type // *Education from a value of type *resumeviews.EducationView. func transformResumeviewsEducationViewToEducation(v *resumeviews.EducationView) *Education { - if v == nil { - return nil - } res := &Education{ Institution: *v.Institution, Major: *v.Major, diff --git a/multipart/go.mod b/multipart/go.mod index f2409043f..c49b13140 100644 --- a/multipart/go.mod +++ b/multipart/go.mod @@ -2,7 +2,7 @@ module goa.design/examples/multipart go 1.26.0 -require goa.design/goa/v3 v3.30.1-0.20260825122644-ed7b72688709 +require goa.design/goa/v3 v3.30.1-0.20260825174000-15f11dc2fdee require ( github.com/dimfeld/httppath v0.0.0-20170720192232-ee938bf73598 // indirect @@ -19,6 +19,7 @@ require ( golang.org/x/sync v0.22.0 // indirect golang.org/x/text v0.41.0 // indirect golang.org/x/tools v0.49.0 // indirect + google.golang.org/protobuf v1.36.12 // indirect gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/multipart/go.sum b/multipart/go.sum index 38b30ded1..92dd77cb3 100644 --- a/multipart/go.sum +++ b/multipart/go.sum @@ -31,8 +31,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260825122644-ed7b72688709 h1:CUUmVjHssJLES+e+2BqBo29/usnQHEak2wtPcpJKqvs= -goa.design/goa/v3 v3.30.1-0.20260825122644-ed7b72688709/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260825174000-15f11dc2fdee h1:kHhMouwWXQwdReV0dGkgsx7WX0tzka0xnKZWHznWixQ= +goa.design/goa/v3 v3.30.1-0.20260825174000-15f11dc2fdee/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= @@ -41,6 +41,8 @@ golang.org/x/text v0.41.0 h1:vz/seA0lnX87Othu2f/0L24RcgrXD9/YFTSuGjj3rH8= golang.org/x/text v0.41.0/go.mod h1:jvf1O8ajNzZqhSrQBPbutR/EB83Cc0CFrezNQIwbb5M= golang.org/x/tools v0.49.0 h1:3NI7VXzL9+1WZD52Dx2ttoPwD5DWrFGpl9mFZDlmisI= golang.org/x/tools v0.49.0/go.mod h1:SJNXV9DBKT0UbdttsQjbfJlAE/q+y36++zo3uL3N0Oo= +google.golang.org/protobuf v1.36.12 h1:pJOKDDOyeXErUroCihFAd5LQuwXBSpVnKGrj5o/fwxc= +google.golang.org/protobuf v1.36.12/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= diff --git a/retry/go.mod b/retry/go.mod index bf0aed941..0c69bae5a 100644 --- a/retry/go.mod +++ b/retry/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( goa.design/clue v1.2.6 - goa.design/goa/v3 v3.30.1-0.20260825122644-ed7b72688709 + goa.design/goa/v3 v3.30.1-0.20260825174000-15f11dc2fdee google.golang.org/grpc v1.83.1 google.golang.org/protobuf v1.36.12 ) diff --git a/retry/go.sum b/retry/go.sum index d3630ca53..27e59f860 100644 --- a/retry/go.sum +++ b/retry/go.sum @@ -52,8 +52,8 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/clue v1.2.6 h1:ensyUkwlvEbNy8FuTGMldKuvaNouh8YoDY9QaE+EtYg= goa.design/clue v1.2.6/go.mod h1:Y4RS5o2k6MZiGk2PT3XbKyntjR2xkr8dYOKQ591dIDM= -goa.design/goa/v3 v3.30.1-0.20260825122644-ed7b72688709 h1:CUUmVjHssJLES+e+2BqBo29/usnQHEak2wtPcpJKqvs= -goa.design/goa/v3 v3.30.1-0.20260825122644-ed7b72688709/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260825174000-15f11dc2fdee h1:kHhMouwWXQwdReV0dGkgsx7WX0tzka0xnKZWHznWixQ= +goa.design/goa/v3 v3.30.1-0.20260825174000-15f11dc2fdee/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/security/hierarchy/go.mod b/security/hierarchy/go.mod index e4fd62aa7..6aa8b5e0d 100644 --- a/security/hierarchy/go.mod +++ b/security/hierarchy/go.mod @@ -2,7 +2,7 @@ module goa.design/examples/security/hierarchy go 1.26.0 -require goa.design/goa/v3 v3.30.1-0.20260825122644-ed7b72688709 +require goa.design/goa/v3 v3.30.1-0.20260825174000-15f11dc2fdee require ( github.com/dimfeld/httppath v0.0.0-20170720192232-ee938bf73598 // indirect @@ -19,6 +19,7 @@ require ( golang.org/x/sync v0.22.0 // indirect golang.org/x/text v0.41.0 // indirect golang.org/x/tools v0.49.0 // indirect + google.golang.org/protobuf v1.36.12 // indirect gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/security/hierarchy/go.sum b/security/hierarchy/go.sum index 38b30ded1..92dd77cb3 100644 --- a/security/hierarchy/go.sum +++ b/security/hierarchy/go.sum @@ -31,8 +31,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260825122644-ed7b72688709 h1:CUUmVjHssJLES+e+2BqBo29/usnQHEak2wtPcpJKqvs= -goa.design/goa/v3 v3.30.1-0.20260825122644-ed7b72688709/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260825174000-15f11dc2fdee h1:kHhMouwWXQwdReV0dGkgsx7WX0tzka0xnKZWHznWixQ= +goa.design/goa/v3 v3.30.1-0.20260825174000-15f11dc2fdee/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= @@ -41,6 +41,8 @@ golang.org/x/text v0.41.0 h1:vz/seA0lnX87Othu2f/0L24RcgrXD9/YFTSuGjj3rH8= golang.org/x/text v0.41.0/go.mod h1:jvf1O8ajNzZqhSrQBPbutR/EB83Cc0CFrezNQIwbb5M= golang.org/x/tools v0.49.0 h1:3NI7VXzL9+1WZD52Dx2ttoPwD5DWrFGpl9mFZDlmisI= golang.org/x/tools v0.49.0/go.mod h1:SJNXV9DBKT0UbdttsQjbfJlAE/q+y36++zo3uL3N0Oo= +google.golang.org/protobuf v1.36.12 h1:pJOKDDOyeXErUroCihFAd5LQuwXBSpVnKGrj5o/fwxc= +google.golang.org/protobuf v1.36.12/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= diff --git a/security/multiauth/go.mod b/security/multiauth/go.mod index 41e673381..629250925 100644 --- a/security/multiauth/go.mod +++ b/security/multiauth/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( github.com/golang-jwt/jwt/v4 v4.5.2 - goa.design/goa/v3 v3.30.1-0.20260825122644-ed7b72688709 + goa.design/goa/v3 v3.30.1-0.20260825174000-15f11dc2fdee google.golang.org/grpc v1.83.1 google.golang.org/protobuf v1.36.12 ) diff --git a/security/multiauth/go.sum b/security/multiauth/go.sum index 2a3a6a2ba..a81848e3b 100644 --- a/security/multiauth/go.sum +++ b/security/multiauth/go.sum @@ -51,8 +51,8 @@ go.opentelemetry.io/otel/trace v1.44.0 h1:jxF5CsGYCe74MCRx2X4g7WsY/VBKRqqpNvXlX/ go.opentelemetry.io/otel/trace v1.44.0/go.mod h1:oLl1jrMQAVo6v3GAggN+1VH9VIz9iUSvW53sW1Q8PIE= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260825122644-ed7b72688709 h1:CUUmVjHssJLES+e+2BqBo29/usnQHEak2wtPcpJKqvs= -goa.design/goa/v3 v3.30.1-0.20260825122644-ed7b72688709/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260825174000-15f11dc2fdee h1:kHhMouwWXQwdReV0dGkgsx7WX0tzka0xnKZWHznWixQ= +goa.design/goa/v3 v3.30.1-0.20260825174000-15f11dc2fdee/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/sse/go.mod b/sse/go.mod index d7fa70496..e027df79a 100644 --- a/sse/go.mod +++ b/sse/go.mod @@ -5,7 +5,7 @@ go 1.26.0 require ( github.com/shirou/gopsutil/v3 v3.24.5 goa.design/clue v1.2.6 - goa.design/goa/v3 v3.30.1-0.20260825122644-ed7b72688709 + goa.design/goa/v3 v3.30.1-0.20260825174000-15f11dc2fdee ) require ( diff --git a/sse/go.sum b/sse/go.sum index 8988ed907..4165d433f 100644 --- a/sse/go.sum +++ b/sse/go.sum @@ -74,8 +74,8 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/clue v1.2.6 h1:ensyUkwlvEbNy8FuTGMldKuvaNouh8YoDY9QaE+EtYg= goa.design/clue v1.2.6/go.mod h1:Y4RS5o2k6MZiGk2PT3XbKyntjR2xkr8dYOKQ591dIDM= -goa.design/goa/v3 v3.30.1-0.20260825122644-ed7b72688709 h1:CUUmVjHssJLES+e+2BqBo29/usnQHEak2wtPcpJKqvs= -goa.design/goa/v3 v3.30.1-0.20260825122644-ed7b72688709/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260825174000-15f11dc2fdee h1:kHhMouwWXQwdReV0dGkgsx7WX0tzka0xnKZWHznWixQ= +goa.design/goa/v3 v3.30.1-0.20260825174000-15f11dc2fdee/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/streaming/go.mod b/streaming/go.mod index af8db4a42..50e305be9 100644 --- a/streaming/go.mod +++ b/streaming/go.mod @@ -5,7 +5,7 @@ go 1.26.0 require ( github.com/golang-jwt/jwt/v4 v4.5.2 github.com/gorilla/websocket v1.5.3 - goa.design/goa/v3 v3.30.1-0.20260825122644-ed7b72688709 + goa.design/goa/v3 v3.30.1-0.20260825174000-15f11dc2fdee google.golang.org/grpc v1.83.1 google.golang.org/protobuf v1.36.12 ) diff --git a/streaming/go.sum b/streaming/go.sum index 2a3a6a2ba..a81848e3b 100644 --- a/streaming/go.sum +++ b/streaming/go.sum @@ -51,8 +51,8 @@ go.opentelemetry.io/otel/trace v1.44.0 h1:jxF5CsGYCe74MCRx2X4g7WsY/VBKRqqpNvXlX/ go.opentelemetry.io/otel/trace v1.44.0/go.mod h1:oLl1jrMQAVo6v3GAggN+1VH9VIz9iUSvW53sW1Q8PIE= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260825122644-ed7b72688709 h1:CUUmVjHssJLES+e+2BqBo29/usnQHEak2wtPcpJKqvs= -goa.design/goa/v3 v3.30.1-0.20260825122644-ed7b72688709/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260825174000-15f11dc2fdee h1:kHhMouwWXQwdReV0dGkgsx7WX0tzka0xnKZWHznWixQ= +goa.design/goa/v3 v3.30.1-0.20260825174000-15f11dc2fdee/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/tracing/go.mod b/tracing/go.mod index de71c37b4..3b2b79bee 100644 --- a/tracing/go.mod +++ b/tracing/go.mod @@ -5,7 +5,7 @@ go 1.26.0 require ( github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 goa.design/examples/basic v0.0.0-20260810182504-f834f43955c5 - goa.design/goa/v3 v3.30.1-0.20260825122644-ed7b72688709 + goa.design/goa/v3 v3.30.1-0.20260825174000-15f11dc2fdee google.golang.org/grpc v1.83.1 ) diff --git a/tracing/go.sum b/tracing/go.sum index 52c991f65..a3c940cc8 100644 --- a/tracing/go.sum +++ b/tracing/go.sum @@ -81,8 +81,8 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/examples/basic v0.0.0-20260810182504-f834f43955c5 h1:SRSrUaLTTdA4bUXb8+zA5MDhMEx8YaP+Knd+pddBcrg= goa.design/examples/basic v0.0.0-20260810182504-f834f43955c5/go.mod h1:XRziIzNcLb9fk7ZrfiHx5FIeAj+orJ4fkzLG0nXpiAo= -goa.design/goa/v3 v3.30.1-0.20260825122644-ed7b72688709 h1:CUUmVjHssJLES+e+2BqBo29/usnQHEak2wtPcpJKqvs= -goa.design/goa/v3 v3.30.1-0.20260825122644-ed7b72688709/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260825174000-15f11dc2fdee h1:kHhMouwWXQwdReV0dGkgsx7WX0tzka0xnKZWHznWixQ= +goa.design/goa/v3 v3.30.1-0.20260825174000-15f11dc2fdee/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= diff --git a/tus/go.mod b/tus/go.mod index ab79c33d4..3d207eab8 100644 --- a/tus/go.mod +++ b/tus/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( github.com/rs/xid v1.6.0 - goa.design/goa/v3 v3.30.1-0.20260825122644-ed7b72688709 + goa.design/goa/v3 v3.30.1-0.20260825174000-15f11dc2fdee ) require ( @@ -22,6 +22,7 @@ require ( golang.org/x/sync v0.22.0 // indirect golang.org/x/text v0.41.0 // indirect golang.org/x/tools v0.49.0 // indirect + google.golang.org/protobuf v1.36.12 // indirect gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/tus/go.sum b/tus/go.sum index 505df9b65..176b7108f 100644 --- a/tus/go.sum +++ b/tus/go.sum @@ -33,8 +33,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260825122644-ed7b72688709 h1:CUUmVjHssJLES+e+2BqBo29/usnQHEak2wtPcpJKqvs= -goa.design/goa/v3 v3.30.1-0.20260825122644-ed7b72688709/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260825174000-15f11dc2fdee h1:kHhMouwWXQwdReV0dGkgsx7WX0tzka0xnKZWHznWixQ= +goa.design/goa/v3 v3.30.1-0.20260825174000-15f11dc2fdee/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= @@ -43,6 +43,8 @@ golang.org/x/text v0.41.0 h1:vz/seA0lnX87Othu2f/0L24RcgrXD9/YFTSuGjj3rH8= golang.org/x/text v0.41.0/go.mod h1:jvf1O8ajNzZqhSrQBPbutR/EB83Cc0CFrezNQIwbb5M= golang.org/x/tools v0.49.0 h1:3NI7VXzL9+1WZD52Dx2ttoPwD5DWrFGpl9mFZDlmisI= golang.org/x/tools v0.49.0/go.mod h1:SJNXV9DBKT0UbdttsQjbfJlAE/q+y36++zo3uL3N0Oo= +google.golang.org/protobuf v1.36.12 h1:pJOKDDOyeXErUroCihFAd5LQuwXBSpVnKGrj5o/fwxc= +google.golang.org/protobuf v1.36.12/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= diff --git a/upload_download/go.mod b/upload_download/go.mod index 87f19df0b..70eb738e0 100644 --- a/upload_download/go.mod +++ b/upload_download/go.mod @@ -2,7 +2,7 @@ module goa.design/examples/upload_download go 1.26.0 -require goa.design/goa/v3 v3.30.1-0.20260825122644-ed7b72688709 +require goa.design/goa/v3 v3.30.1-0.20260825174000-15f11dc2fdee require ( github.com/dimfeld/httppath v0.0.0-20170720192232-ee938bf73598 // indirect @@ -19,6 +19,7 @@ require ( golang.org/x/sync v0.22.0 // indirect golang.org/x/text v0.41.0 // indirect golang.org/x/tools v0.49.0 // indirect + google.golang.org/protobuf v1.36.12 // indirect gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/upload_download/go.sum b/upload_download/go.sum index 38b30ded1..92dd77cb3 100644 --- a/upload_download/go.sum +++ b/upload_download/go.sum @@ -31,8 +31,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260825122644-ed7b72688709 h1:CUUmVjHssJLES+e+2BqBo29/usnQHEak2wtPcpJKqvs= -goa.design/goa/v3 v3.30.1-0.20260825122644-ed7b72688709/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260825174000-15f11dc2fdee h1:kHhMouwWXQwdReV0dGkgsx7WX0tzka0xnKZWHznWixQ= +goa.design/goa/v3 v3.30.1-0.20260825174000-15f11dc2fdee/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= @@ -41,6 +41,8 @@ golang.org/x/text v0.41.0 h1:vz/seA0lnX87Othu2f/0L24RcgrXD9/YFTSuGjj3rH8= golang.org/x/text v0.41.0/go.mod h1:jvf1O8ajNzZqhSrQBPbutR/EB83Cc0CFrezNQIwbb5M= golang.org/x/tools v0.49.0 h1:3NI7VXzL9+1WZD52Dx2ttoPwD5DWrFGpl9mFZDlmisI= golang.org/x/tools v0.49.0/go.mod h1:SJNXV9DBKT0UbdttsQjbfJlAE/q+y36++zo3uL3N0Oo= +google.golang.org/protobuf v1.36.12 h1:pJOKDDOyeXErUroCihFAd5LQuwXBSpVnKGrj5o/fwxc= +google.golang.org/protobuf v1.36.12/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= From 40f4dda2d1fdf66fb58e941d62cdebafaf5233b4 Mon Sep 17 00:00:00 2001 From: "Raphael (manual office deploy after cloud-state fix)" Date: Tue, 25 Aug 2026 13:29:14 -0700 Subject: [PATCH 11/28] chore: verify examples with scoped Goa transforms --- basic/go.mod | 2 +- basic/go.sum | 2 ++ cellar/go.mod | 2 +- cellar/go.sum | 2 ++ concerts/go.mod | 2 +- concerts/go.sum | 2 ++ cookies/go.mod | 2 +- cookies/go.sum | 2 ++ encodings/cbor/go.mod | 2 +- encodings/cbor/go.sum | 2 ++ encodings/text/go.mod | 2 +- encodings/text/go.sum | 2 ++ error/go.mod | 2 +- error/go.sum | 2 ++ files/go.mod | 2 +- files/go.sum | 2 ++ go.work.sum | 2 ++ httpstatus/go.mod | 2 +- httpstatus/go.sum | 2 ++ interceptors/go.mod | 2 +- interceptors/go.sum | 2 ++ multipart/go.mod | 2 +- multipart/go.sum | 2 ++ retry/go.mod | 2 +- retry/go.sum | 2 ++ security/hierarchy/go.mod | 2 +- security/hierarchy/go.sum | 2 ++ security/multiauth/go.mod | 2 +- security/multiauth/go.sum | 2 ++ sse/go.mod | 2 +- sse/go.sum | 2 ++ streaming/go.mod | 2 +- streaming/go.sum | 2 ++ tracing/go.mod | 2 +- tus/go.mod | 2 +- tus/go.sum | 2 ++ upload_download/go.mod | 2 +- upload_download/go.sum | 2 ++ 38 files changed, 57 insertions(+), 19 deletions(-) diff --git a/basic/go.mod b/basic/go.mod index 15e9398cd..4e7c112bd 100644 --- a/basic/go.mod +++ b/basic/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( goa.design/clue v1.2.6 - goa.design/goa/v3 v3.30.1-0.20260825174000-15f11dc2fdee + goa.design/goa/v3 v3.30.1-0.20260825202211-245bb1440866 google.golang.org/grpc v1.83.1 google.golang.org/protobuf v1.36.12 ) diff --git a/basic/go.sum b/basic/go.sum index b94db4453..e3edfa8c2 100644 --- a/basic/go.sum +++ b/basic/go.sum @@ -57,6 +57,8 @@ goa.design/clue v1.2.6 h1:ensyUkwlvEbNy8FuTGMldKuvaNouh8YoDY9QaE+EtYg= goa.design/clue v1.2.6/go.mod h1:Y4RS5o2k6MZiGk2PT3XbKyntjR2xkr8dYOKQ591dIDM= goa.design/goa/v3 v3.30.1-0.20260825174000-15f11dc2fdee h1:kHhMouwWXQwdReV0dGkgsx7WX0tzka0xnKZWHznWixQ= goa.design/goa/v3 v3.30.1-0.20260825174000-15f11dc2fdee/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260825202211-245bb1440866 h1:iDfdv3DYb6jVKkTlg+pD8q0MZFuSuMA2lAtCQe9yfPA= +goa.design/goa/v3 v3.30.1-0.20260825202211-245bb1440866/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/cellar/go.mod b/cellar/go.mod index 21e3a228a..1a4774d79 100644 --- a/cellar/go.mod +++ b/cellar/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( github.com/boltdb/bolt v1.3.1 - goa.design/goa/v3 v3.30.1-0.20260825174000-15f11dc2fdee + goa.design/goa/v3 v3.30.1-0.20260825202211-245bb1440866 google.golang.org/grpc v1.83.1 google.golang.org/protobuf v1.36.12 ) diff --git a/cellar/go.sum b/cellar/go.sum index 8e4c5f320..1b23abc4d 100644 --- a/cellar/go.sum +++ b/cellar/go.sum @@ -53,6 +53,8 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/goa/v3 v3.30.1-0.20260825174000-15f11dc2fdee h1:kHhMouwWXQwdReV0dGkgsx7WX0tzka0xnKZWHznWixQ= goa.design/goa/v3 v3.30.1-0.20260825174000-15f11dc2fdee/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260825202211-245bb1440866 h1:iDfdv3DYb6jVKkTlg+pD8q0MZFuSuMA2lAtCQe9yfPA= +goa.design/goa/v3 v3.30.1-0.20260825202211-245bb1440866/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/concerts/go.mod b/concerts/go.mod index 8be635f0f..a2d8bfcc2 100644 --- a/concerts/go.mod +++ b/concerts/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( github.com/google/uuid v1.6.0 - goa.design/goa/v3 v3.30.1-0.20260825174000-15f11dc2fdee + goa.design/goa/v3 v3.30.1-0.20260825202211-245bb1440866 ) require ( diff --git a/concerts/go.sum b/concerts/go.sum index 92dd77cb3..92981cf8c 100644 --- a/concerts/go.sum +++ b/concerts/go.sum @@ -33,6 +33,8 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/goa/v3 v3.30.1-0.20260825174000-15f11dc2fdee h1:kHhMouwWXQwdReV0dGkgsx7WX0tzka0xnKZWHznWixQ= goa.design/goa/v3 v3.30.1-0.20260825174000-15f11dc2fdee/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260825202211-245bb1440866 h1:iDfdv3DYb6jVKkTlg+pD8q0MZFuSuMA2lAtCQe9yfPA= +goa.design/goa/v3 v3.30.1-0.20260825202211-245bb1440866/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= diff --git a/cookies/go.mod b/cookies/go.mod index 1c396b673..57796cb8b 100644 --- a/cookies/go.mod +++ b/cookies/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( github.com/rs/xid v1.6.0 - goa.design/goa/v3 v3.30.1-0.20260825174000-15f11dc2fdee + goa.design/goa/v3 v3.30.1-0.20260825202211-245bb1440866 ) require ( diff --git a/cookies/go.sum b/cookies/go.sum index 176b7108f..51b137735 100644 --- a/cookies/go.sum +++ b/cookies/go.sum @@ -35,6 +35,8 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/goa/v3 v3.30.1-0.20260825174000-15f11dc2fdee h1:kHhMouwWXQwdReV0dGkgsx7WX0tzka0xnKZWHznWixQ= goa.design/goa/v3 v3.30.1-0.20260825174000-15f11dc2fdee/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260825202211-245bb1440866 h1:iDfdv3DYb6jVKkTlg+pD8q0MZFuSuMA2lAtCQe9yfPA= +goa.design/goa/v3 v3.30.1-0.20260825202211-245bb1440866/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= diff --git a/encodings/cbor/go.mod b/encodings/cbor/go.mod index 0568378c7..16c08dea7 100644 --- a/encodings/cbor/go.mod +++ b/encodings/cbor/go.mod @@ -5,7 +5,7 @@ go 1.26.0 require ( github.com/fxamacker/cbor/v2 v2.9.2 goa.design/clue v1.2.6 - goa.design/goa/v3 v3.30.1-0.20260825174000-15f11dc2fdee + goa.design/goa/v3 v3.30.1-0.20260825202211-245bb1440866 ) require ( diff --git a/encodings/cbor/go.sum b/encodings/cbor/go.sum index 5027bf913..195eb98dd 100644 --- a/encodings/cbor/go.sum +++ b/encodings/cbor/go.sum @@ -61,6 +61,8 @@ goa.design/clue v1.2.6 h1:ensyUkwlvEbNy8FuTGMldKuvaNouh8YoDY9QaE+EtYg= goa.design/clue v1.2.6/go.mod h1:Y4RS5o2k6MZiGk2PT3XbKyntjR2xkr8dYOKQ591dIDM= goa.design/goa/v3 v3.30.1-0.20260825174000-15f11dc2fdee h1:kHhMouwWXQwdReV0dGkgsx7WX0tzka0xnKZWHznWixQ= goa.design/goa/v3 v3.30.1-0.20260825174000-15f11dc2fdee/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260825202211-245bb1440866 h1:iDfdv3DYb6jVKkTlg+pD8q0MZFuSuMA2lAtCQe9yfPA= +goa.design/goa/v3 v3.30.1-0.20260825202211-245bb1440866/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/encodings/text/go.mod b/encodings/text/go.mod index 5639eec02..76be0a3f6 100644 --- a/encodings/text/go.mod +++ b/encodings/text/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( goa.design/clue v1.2.6 - goa.design/goa/v3 v3.30.1-0.20260825174000-15f11dc2fdee + goa.design/goa/v3 v3.30.1-0.20260825202211-245bb1440866 ) require ( diff --git a/encodings/text/go.sum b/encodings/text/go.sum index b94db4453..e3edfa8c2 100644 --- a/encodings/text/go.sum +++ b/encodings/text/go.sum @@ -57,6 +57,8 @@ goa.design/clue v1.2.6 h1:ensyUkwlvEbNy8FuTGMldKuvaNouh8YoDY9QaE+EtYg= goa.design/clue v1.2.6/go.mod h1:Y4RS5o2k6MZiGk2PT3XbKyntjR2xkr8dYOKQ591dIDM= goa.design/goa/v3 v3.30.1-0.20260825174000-15f11dc2fdee h1:kHhMouwWXQwdReV0dGkgsx7WX0tzka0xnKZWHznWixQ= goa.design/goa/v3 v3.30.1-0.20260825174000-15f11dc2fdee/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260825202211-245bb1440866 h1:iDfdv3DYb6jVKkTlg+pD8q0MZFuSuMA2lAtCQe9yfPA= +goa.design/goa/v3 v3.30.1-0.20260825202211-245bb1440866/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/error/go.mod b/error/go.mod index 23552f7fa..59c15a06e 100644 --- a/error/go.mod +++ b/error/go.mod @@ -3,7 +3,7 @@ module goa.design/examples/error go 1.26.0 require ( - goa.design/goa/v3 v3.30.1-0.20260825174000-15f11dc2fdee + goa.design/goa/v3 v3.30.1-0.20260825202211-245bb1440866 google.golang.org/genproto v0.0.0-20260810153831-ec0a7760b754 google.golang.org/grpc v1.83.1 google.golang.org/protobuf v1.36.12 diff --git a/error/go.sum b/error/go.sum index b3b51efea..0b8937d3d 100644 --- a/error/go.sum +++ b/error/go.sum @@ -51,6 +51,8 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/goa/v3 v3.30.1-0.20260825174000-15f11dc2fdee h1:kHhMouwWXQwdReV0dGkgsx7WX0tzka0xnKZWHznWixQ= goa.design/goa/v3 v3.30.1-0.20260825174000-15f11dc2fdee/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260825202211-245bb1440866 h1:iDfdv3DYb6jVKkTlg+pD8q0MZFuSuMA2lAtCQe9yfPA= +goa.design/goa/v3 v3.30.1-0.20260825202211-245bb1440866/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/files/go.mod b/files/go.mod index 4d084de59..9df04d873 100644 --- a/files/go.mod +++ b/files/go.mod @@ -2,7 +2,7 @@ module goa.design/examples/files go 1.26.0 -require goa.design/goa/v3 v3.30.1-0.20260825174000-15f11dc2fdee +require goa.design/goa/v3 v3.30.1-0.20260825202211-245bb1440866 require ( github.com/dimfeld/httppath v0.0.0-20170720192232-ee938bf73598 // indirect diff --git a/files/go.sum b/files/go.sum index 92dd77cb3..92981cf8c 100644 --- a/files/go.sum +++ b/files/go.sum @@ -33,6 +33,8 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/goa/v3 v3.30.1-0.20260825174000-15f11dc2fdee h1:kHhMouwWXQwdReV0dGkgsx7WX0tzka0xnKZWHznWixQ= goa.design/goa/v3 v3.30.1-0.20260825174000-15f11dc2fdee/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260825202211-245bb1440866 h1:iDfdv3DYb6jVKkTlg+pD8q0MZFuSuMA2lAtCQe9yfPA= +goa.design/goa/v3 v3.30.1-0.20260825202211-245bb1440866/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= diff --git a/go.work.sum b/go.work.sum index 2224f5c17..f131fb855 100644 --- a/go.work.sum +++ b/go.work.sum @@ -488,6 +488,8 @@ go.opentelemetry.io/proto/otlp v1.9.0/go.mod h1:xE+Cx5E/eEHw+ISFkwPLwCZefwVjY+pq go.opentelemetry.io/proto/otlp v1.10.0/go.mod h1:/CV4QoCR/S9yaPj8utp3lvQPoqMtxXdzn7ozvvozVqk= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= goa.design/goa/v3 v3.21.5/go.mod h1:5THVDuChOIctYM+t3xmL4f2fJbFPzzwvrYMj3PQZg9g= +goa.design/goa/v3 v3.30.1-0.20260825202211-245bb1440866 h1:iDfdv3DYb6jVKkTlg+pD8q0MZFuSuMA2lAtCQe9yfPA= +goa.design/goa/v3 v3.30.1-0.20260825202211-245bb1440866/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/crypto v0.33.0/go.mod h1:bVdXmD7IV/4GdElGPozy6U7lWdRXA4qyRVGJV57uQ5M= golang.org/x/crypto v0.36.0/go.mod h1:Y4J0ReaxCR1IMaabaSMugxJES1EpwhBHhv2bDHklZvc= golang.org/x/crypto v0.38.0/go.mod h1:MvrbAqul58NNYPKnOra203SB9vpuZW0e+RRZV+Ggqjw= diff --git a/httpstatus/go.mod b/httpstatus/go.mod index 58dea0000..6a9561eb3 100644 --- a/httpstatus/go.mod +++ b/httpstatus/go.mod @@ -2,7 +2,7 @@ module goa.design/examples/httpstatus go 1.26.0 -require goa.design/goa/v3 v3.30.1-0.20260825174000-15f11dc2fdee +require goa.design/goa/v3 v3.30.1-0.20260825202211-245bb1440866 require ( github.com/dimfeld/httppath v0.0.0-20170720192232-ee938bf73598 // indirect diff --git a/httpstatus/go.sum b/httpstatus/go.sum index 92dd77cb3..92981cf8c 100644 --- a/httpstatus/go.sum +++ b/httpstatus/go.sum @@ -33,6 +33,8 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/goa/v3 v3.30.1-0.20260825174000-15f11dc2fdee h1:kHhMouwWXQwdReV0dGkgsx7WX0tzka0xnKZWHznWixQ= goa.design/goa/v3 v3.30.1-0.20260825174000-15f11dc2fdee/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260825202211-245bb1440866 h1:iDfdv3DYb6jVKkTlg+pD8q0MZFuSuMA2lAtCQe9yfPA= +goa.design/goa/v3 v3.30.1-0.20260825202211-245bb1440866/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= diff --git a/interceptors/go.mod b/interceptors/go.mod index d8855b974..e887fb95b 100644 --- a/interceptors/go.mod +++ b/interceptors/go.mod @@ -6,7 +6,7 @@ require ( github.com/google/uuid v1.6.0 github.com/gorilla/websocket v1.5.3 goa.design/clue v1.2.6 - goa.design/goa/v3 v3.30.1-0.20260825174000-15f11dc2fdee + goa.design/goa/v3 v3.30.1-0.20260825202211-245bb1440866 google.golang.org/grpc v1.83.1 google.golang.org/protobuf v1.36.12 ) diff --git a/interceptors/go.sum b/interceptors/go.sum index b94db4453..e3edfa8c2 100644 --- a/interceptors/go.sum +++ b/interceptors/go.sum @@ -57,6 +57,8 @@ goa.design/clue v1.2.6 h1:ensyUkwlvEbNy8FuTGMldKuvaNouh8YoDY9QaE+EtYg= goa.design/clue v1.2.6/go.mod h1:Y4RS5o2k6MZiGk2PT3XbKyntjR2xkr8dYOKQ591dIDM= goa.design/goa/v3 v3.30.1-0.20260825174000-15f11dc2fdee h1:kHhMouwWXQwdReV0dGkgsx7WX0tzka0xnKZWHznWixQ= goa.design/goa/v3 v3.30.1-0.20260825174000-15f11dc2fdee/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260825202211-245bb1440866 h1:iDfdv3DYb6jVKkTlg+pD8q0MZFuSuMA2lAtCQe9yfPA= +goa.design/goa/v3 v3.30.1-0.20260825202211-245bb1440866/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/multipart/go.mod b/multipart/go.mod index c49b13140..18b97662d 100644 --- a/multipart/go.mod +++ b/multipart/go.mod @@ -2,7 +2,7 @@ module goa.design/examples/multipart go 1.26.0 -require goa.design/goa/v3 v3.30.1-0.20260825174000-15f11dc2fdee +require goa.design/goa/v3 v3.30.1-0.20260825202211-245bb1440866 require ( github.com/dimfeld/httppath v0.0.0-20170720192232-ee938bf73598 // indirect diff --git a/multipart/go.sum b/multipart/go.sum index 92dd77cb3..92981cf8c 100644 --- a/multipart/go.sum +++ b/multipart/go.sum @@ -33,6 +33,8 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/goa/v3 v3.30.1-0.20260825174000-15f11dc2fdee h1:kHhMouwWXQwdReV0dGkgsx7WX0tzka0xnKZWHznWixQ= goa.design/goa/v3 v3.30.1-0.20260825174000-15f11dc2fdee/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260825202211-245bb1440866 h1:iDfdv3DYb6jVKkTlg+pD8q0MZFuSuMA2lAtCQe9yfPA= +goa.design/goa/v3 v3.30.1-0.20260825202211-245bb1440866/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= diff --git a/retry/go.mod b/retry/go.mod index 0c69bae5a..b9e55d2a6 100644 --- a/retry/go.mod +++ b/retry/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( goa.design/clue v1.2.6 - goa.design/goa/v3 v3.30.1-0.20260825174000-15f11dc2fdee + goa.design/goa/v3 v3.30.1-0.20260825202211-245bb1440866 google.golang.org/grpc v1.83.1 google.golang.org/protobuf v1.36.12 ) diff --git a/retry/go.sum b/retry/go.sum index 27e59f860..f2d45d680 100644 --- a/retry/go.sum +++ b/retry/go.sum @@ -54,6 +54,8 @@ goa.design/clue v1.2.6 h1:ensyUkwlvEbNy8FuTGMldKuvaNouh8YoDY9QaE+EtYg= goa.design/clue v1.2.6/go.mod h1:Y4RS5o2k6MZiGk2PT3XbKyntjR2xkr8dYOKQ591dIDM= goa.design/goa/v3 v3.30.1-0.20260825174000-15f11dc2fdee h1:kHhMouwWXQwdReV0dGkgsx7WX0tzka0xnKZWHznWixQ= goa.design/goa/v3 v3.30.1-0.20260825174000-15f11dc2fdee/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260825202211-245bb1440866 h1:iDfdv3DYb6jVKkTlg+pD8q0MZFuSuMA2lAtCQe9yfPA= +goa.design/goa/v3 v3.30.1-0.20260825202211-245bb1440866/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/security/hierarchy/go.mod b/security/hierarchy/go.mod index 6aa8b5e0d..cde75e424 100644 --- a/security/hierarchy/go.mod +++ b/security/hierarchy/go.mod @@ -2,7 +2,7 @@ module goa.design/examples/security/hierarchy go 1.26.0 -require goa.design/goa/v3 v3.30.1-0.20260825174000-15f11dc2fdee +require goa.design/goa/v3 v3.30.1-0.20260825202211-245bb1440866 require ( github.com/dimfeld/httppath v0.0.0-20170720192232-ee938bf73598 // indirect diff --git a/security/hierarchy/go.sum b/security/hierarchy/go.sum index 92dd77cb3..92981cf8c 100644 --- a/security/hierarchy/go.sum +++ b/security/hierarchy/go.sum @@ -33,6 +33,8 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/goa/v3 v3.30.1-0.20260825174000-15f11dc2fdee h1:kHhMouwWXQwdReV0dGkgsx7WX0tzka0xnKZWHznWixQ= goa.design/goa/v3 v3.30.1-0.20260825174000-15f11dc2fdee/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260825202211-245bb1440866 h1:iDfdv3DYb6jVKkTlg+pD8q0MZFuSuMA2lAtCQe9yfPA= +goa.design/goa/v3 v3.30.1-0.20260825202211-245bb1440866/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= diff --git a/security/multiauth/go.mod b/security/multiauth/go.mod index 629250925..ae79fad46 100644 --- a/security/multiauth/go.mod +++ b/security/multiauth/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( github.com/golang-jwt/jwt/v4 v4.5.2 - goa.design/goa/v3 v3.30.1-0.20260825174000-15f11dc2fdee + goa.design/goa/v3 v3.30.1-0.20260825202211-245bb1440866 google.golang.org/grpc v1.83.1 google.golang.org/protobuf v1.36.12 ) diff --git a/security/multiauth/go.sum b/security/multiauth/go.sum index a81848e3b..eb02a0cb8 100644 --- a/security/multiauth/go.sum +++ b/security/multiauth/go.sum @@ -53,6 +53,8 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/goa/v3 v3.30.1-0.20260825174000-15f11dc2fdee h1:kHhMouwWXQwdReV0dGkgsx7WX0tzka0xnKZWHznWixQ= goa.design/goa/v3 v3.30.1-0.20260825174000-15f11dc2fdee/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260825202211-245bb1440866 h1:iDfdv3DYb6jVKkTlg+pD8q0MZFuSuMA2lAtCQe9yfPA= +goa.design/goa/v3 v3.30.1-0.20260825202211-245bb1440866/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/sse/go.mod b/sse/go.mod index e027df79a..698c0fae6 100644 --- a/sse/go.mod +++ b/sse/go.mod @@ -5,7 +5,7 @@ go 1.26.0 require ( github.com/shirou/gopsutil/v3 v3.24.5 goa.design/clue v1.2.6 - goa.design/goa/v3 v3.30.1-0.20260825174000-15f11dc2fdee + goa.design/goa/v3 v3.30.1-0.20260825202211-245bb1440866 ) require ( diff --git a/sse/go.sum b/sse/go.sum index 4165d433f..137d12892 100644 --- a/sse/go.sum +++ b/sse/go.sum @@ -76,6 +76,8 @@ goa.design/clue v1.2.6 h1:ensyUkwlvEbNy8FuTGMldKuvaNouh8YoDY9QaE+EtYg= goa.design/clue v1.2.6/go.mod h1:Y4RS5o2k6MZiGk2PT3XbKyntjR2xkr8dYOKQ591dIDM= goa.design/goa/v3 v3.30.1-0.20260825174000-15f11dc2fdee h1:kHhMouwWXQwdReV0dGkgsx7WX0tzka0xnKZWHznWixQ= goa.design/goa/v3 v3.30.1-0.20260825174000-15f11dc2fdee/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260825202211-245bb1440866 h1:iDfdv3DYb6jVKkTlg+pD8q0MZFuSuMA2lAtCQe9yfPA= +goa.design/goa/v3 v3.30.1-0.20260825202211-245bb1440866/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/streaming/go.mod b/streaming/go.mod index 50e305be9..b037b6660 100644 --- a/streaming/go.mod +++ b/streaming/go.mod @@ -5,7 +5,7 @@ go 1.26.0 require ( github.com/golang-jwt/jwt/v4 v4.5.2 github.com/gorilla/websocket v1.5.3 - goa.design/goa/v3 v3.30.1-0.20260825174000-15f11dc2fdee + goa.design/goa/v3 v3.30.1-0.20260825202211-245bb1440866 google.golang.org/grpc v1.83.1 google.golang.org/protobuf v1.36.12 ) diff --git a/streaming/go.sum b/streaming/go.sum index a81848e3b..eb02a0cb8 100644 --- a/streaming/go.sum +++ b/streaming/go.sum @@ -53,6 +53,8 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/goa/v3 v3.30.1-0.20260825174000-15f11dc2fdee h1:kHhMouwWXQwdReV0dGkgsx7WX0tzka0xnKZWHznWixQ= goa.design/goa/v3 v3.30.1-0.20260825174000-15f11dc2fdee/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260825202211-245bb1440866 h1:iDfdv3DYb6jVKkTlg+pD8q0MZFuSuMA2lAtCQe9yfPA= +goa.design/goa/v3 v3.30.1-0.20260825202211-245bb1440866/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/tracing/go.mod b/tracing/go.mod index 3b2b79bee..4d2dcbab1 100644 --- a/tracing/go.mod +++ b/tracing/go.mod @@ -5,7 +5,7 @@ go 1.26.0 require ( github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 goa.design/examples/basic v0.0.0-20260810182504-f834f43955c5 - goa.design/goa/v3 v3.30.1-0.20260825174000-15f11dc2fdee + goa.design/goa/v3 v3.30.1-0.20260825202211-245bb1440866 google.golang.org/grpc v1.83.1 ) diff --git a/tus/go.mod b/tus/go.mod index 3d207eab8..03cb1a02a 100644 --- a/tus/go.mod +++ b/tus/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( github.com/rs/xid v1.6.0 - goa.design/goa/v3 v3.30.1-0.20260825174000-15f11dc2fdee + goa.design/goa/v3 v3.30.1-0.20260825202211-245bb1440866 ) require ( diff --git a/tus/go.sum b/tus/go.sum index 176b7108f..51b137735 100644 --- a/tus/go.sum +++ b/tus/go.sum @@ -35,6 +35,8 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/goa/v3 v3.30.1-0.20260825174000-15f11dc2fdee h1:kHhMouwWXQwdReV0dGkgsx7WX0tzka0xnKZWHznWixQ= goa.design/goa/v3 v3.30.1-0.20260825174000-15f11dc2fdee/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260825202211-245bb1440866 h1:iDfdv3DYb6jVKkTlg+pD8q0MZFuSuMA2lAtCQe9yfPA= +goa.design/goa/v3 v3.30.1-0.20260825202211-245bb1440866/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= diff --git a/upload_download/go.mod b/upload_download/go.mod index 70eb738e0..d9c8d025c 100644 --- a/upload_download/go.mod +++ b/upload_download/go.mod @@ -2,7 +2,7 @@ module goa.design/examples/upload_download go 1.26.0 -require goa.design/goa/v3 v3.30.1-0.20260825174000-15f11dc2fdee +require goa.design/goa/v3 v3.30.1-0.20260825202211-245bb1440866 require ( github.com/dimfeld/httppath v0.0.0-20170720192232-ee938bf73598 // indirect diff --git a/upload_download/go.sum b/upload_download/go.sum index 92dd77cb3..92981cf8c 100644 --- a/upload_download/go.sum +++ b/upload_download/go.sum @@ -33,6 +33,8 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/goa/v3 v3.30.1-0.20260825174000-15f11dc2fdee h1:kHhMouwWXQwdReV0dGkgsx7WX0tzka0xnKZWHznWixQ= goa.design/goa/v3 v3.30.1-0.20260825174000-15f11dc2fdee/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260825202211-245bb1440866 h1:iDfdv3DYb6jVKkTlg+pD8q0MZFuSuMA2lAtCQe9yfPA= +goa.design/goa/v3 v3.30.1-0.20260825202211-245bb1440866/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= From 35691c55b5915d0de86ef65ada8559b805699258 Mon Sep 17 00:00:00 2001 From: "Raphael (manual office deploy after cloud-state fix)" Date: Tue, 25 Aug 2026 13:49:13 -0700 Subject: [PATCH 12/28] chore: pin examples to final scoped Goa transforms --- basic/go.mod | 2 +- basic/go.sum | 6 ++---- cellar/go.mod | 2 +- cellar/go.sum | 6 ++---- concerts/go.mod | 2 +- concerts/go.sum | 6 ++---- cookies/go.mod | 2 +- cookies/go.sum | 6 ++---- encodings/cbor/go.mod | 2 +- encodings/cbor/go.sum | 6 ++---- encodings/text/go.mod | 2 +- encodings/text/go.sum | 6 ++---- error/go.mod | 2 +- error/go.sum | 6 ++---- files/go.mod | 2 +- files/go.sum | 6 ++---- httpstatus/go.mod | 2 +- httpstatus/go.sum | 6 ++---- interceptors/go.mod | 2 +- interceptors/go.sum | 6 ++---- multipart/go.mod | 2 +- multipart/go.sum | 6 ++---- retry/go.mod | 2 +- retry/go.sum | 6 ++---- security/hierarchy/go.mod | 2 +- security/hierarchy/go.sum | 6 ++---- security/multiauth/go.mod | 2 +- security/multiauth/go.sum | 6 ++---- sse/go.mod | 2 +- sse/go.sum | 6 ++---- streaming/go.mod | 2 +- streaming/go.sum | 6 ++---- tracing/go.mod | 2 +- tracing/go.sum | 4 ++-- tus/go.mod | 2 +- tus/go.sum | 6 ++---- upload_download/go.mod | 2 +- upload_download/go.sum | 6 ++---- 38 files changed, 57 insertions(+), 93 deletions(-) diff --git a/basic/go.mod b/basic/go.mod index 4e7c112bd..bfcf56a7c 100644 --- a/basic/go.mod +++ b/basic/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( goa.design/clue v1.2.6 - goa.design/goa/v3 v3.30.1-0.20260825202211-245bb1440866 + goa.design/goa/v3 v3.30.1-0.20260825203937-95933f068ade google.golang.org/grpc v1.83.1 google.golang.org/protobuf v1.36.12 ) diff --git a/basic/go.sum b/basic/go.sum index e3edfa8c2..9a0ac5cf1 100644 --- a/basic/go.sum +++ b/basic/go.sum @@ -55,10 +55,8 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/clue v1.2.6 h1:ensyUkwlvEbNy8FuTGMldKuvaNouh8YoDY9QaE+EtYg= goa.design/clue v1.2.6/go.mod h1:Y4RS5o2k6MZiGk2PT3XbKyntjR2xkr8dYOKQ591dIDM= -goa.design/goa/v3 v3.30.1-0.20260825174000-15f11dc2fdee h1:kHhMouwWXQwdReV0dGkgsx7WX0tzka0xnKZWHznWixQ= -goa.design/goa/v3 v3.30.1-0.20260825174000-15f11dc2fdee/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= -goa.design/goa/v3 v3.30.1-0.20260825202211-245bb1440866 h1:iDfdv3DYb6jVKkTlg+pD8q0MZFuSuMA2lAtCQe9yfPA= -goa.design/goa/v3 v3.30.1-0.20260825202211-245bb1440866/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260825203937-95933f068ade h1:gTHq43P69svXt3KfmtpA2Tr5+4dCt03xVmSi5g1xqRc= +goa.design/goa/v3 v3.30.1-0.20260825203937-95933f068ade/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/cellar/go.mod b/cellar/go.mod index 1a4774d79..9157ccb1b 100644 --- a/cellar/go.mod +++ b/cellar/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( github.com/boltdb/bolt v1.3.1 - goa.design/goa/v3 v3.30.1-0.20260825202211-245bb1440866 + goa.design/goa/v3 v3.30.1-0.20260825203937-95933f068ade google.golang.org/grpc v1.83.1 google.golang.org/protobuf v1.36.12 ) diff --git a/cellar/go.sum b/cellar/go.sum index 1b23abc4d..c05813df8 100644 --- a/cellar/go.sum +++ b/cellar/go.sum @@ -51,10 +51,8 @@ go.opentelemetry.io/otel/trace v1.44.0 h1:jxF5CsGYCe74MCRx2X4g7WsY/VBKRqqpNvXlX/ go.opentelemetry.io/otel/trace v1.44.0/go.mod h1:oLl1jrMQAVo6v3GAggN+1VH9VIz9iUSvW53sW1Q8PIE= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260825174000-15f11dc2fdee h1:kHhMouwWXQwdReV0dGkgsx7WX0tzka0xnKZWHznWixQ= -goa.design/goa/v3 v3.30.1-0.20260825174000-15f11dc2fdee/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= -goa.design/goa/v3 v3.30.1-0.20260825202211-245bb1440866 h1:iDfdv3DYb6jVKkTlg+pD8q0MZFuSuMA2lAtCQe9yfPA= -goa.design/goa/v3 v3.30.1-0.20260825202211-245bb1440866/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260825203937-95933f068ade h1:gTHq43P69svXt3KfmtpA2Tr5+4dCt03xVmSi5g1xqRc= +goa.design/goa/v3 v3.30.1-0.20260825203937-95933f068ade/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/concerts/go.mod b/concerts/go.mod index a2d8bfcc2..1652cd25a 100644 --- a/concerts/go.mod +++ b/concerts/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( github.com/google/uuid v1.6.0 - goa.design/goa/v3 v3.30.1-0.20260825202211-245bb1440866 + goa.design/goa/v3 v3.30.1-0.20260825203937-95933f068ade ) require ( diff --git a/concerts/go.sum b/concerts/go.sum index 92981cf8c..c2b5c8941 100644 --- a/concerts/go.sum +++ b/concerts/go.sum @@ -31,10 +31,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260825174000-15f11dc2fdee h1:kHhMouwWXQwdReV0dGkgsx7WX0tzka0xnKZWHznWixQ= -goa.design/goa/v3 v3.30.1-0.20260825174000-15f11dc2fdee/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= -goa.design/goa/v3 v3.30.1-0.20260825202211-245bb1440866 h1:iDfdv3DYb6jVKkTlg+pD8q0MZFuSuMA2lAtCQe9yfPA= -goa.design/goa/v3 v3.30.1-0.20260825202211-245bb1440866/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260825203937-95933f068ade h1:gTHq43P69svXt3KfmtpA2Tr5+4dCt03xVmSi5g1xqRc= +goa.design/goa/v3 v3.30.1-0.20260825203937-95933f068ade/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= diff --git a/cookies/go.mod b/cookies/go.mod index 57796cb8b..43c60a7e6 100644 --- a/cookies/go.mod +++ b/cookies/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( github.com/rs/xid v1.6.0 - goa.design/goa/v3 v3.30.1-0.20260825202211-245bb1440866 + goa.design/goa/v3 v3.30.1-0.20260825203937-95933f068ade ) require ( diff --git a/cookies/go.sum b/cookies/go.sum index 51b137735..d33e17d7c 100644 --- a/cookies/go.sum +++ b/cookies/go.sum @@ -33,10 +33,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260825174000-15f11dc2fdee h1:kHhMouwWXQwdReV0dGkgsx7WX0tzka0xnKZWHznWixQ= -goa.design/goa/v3 v3.30.1-0.20260825174000-15f11dc2fdee/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= -goa.design/goa/v3 v3.30.1-0.20260825202211-245bb1440866 h1:iDfdv3DYb6jVKkTlg+pD8q0MZFuSuMA2lAtCQe9yfPA= -goa.design/goa/v3 v3.30.1-0.20260825202211-245bb1440866/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260825203937-95933f068ade h1:gTHq43P69svXt3KfmtpA2Tr5+4dCt03xVmSi5g1xqRc= +goa.design/goa/v3 v3.30.1-0.20260825203937-95933f068ade/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= diff --git a/encodings/cbor/go.mod b/encodings/cbor/go.mod index 16c08dea7..2bfd16306 100644 --- a/encodings/cbor/go.mod +++ b/encodings/cbor/go.mod @@ -5,7 +5,7 @@ go 1.26.0 require ( github.com/fxamacker/cbor/v2 v2.9.2 goa.design/clue v1.2.6 - goa.design/goa/v3 v3.30.1-0.20260825202211-245bb1440866 + goa.design/goa/v3 v3.30.1-0.20260825203937-95933f068ade ) require ( diff --git a/encodings/cbor/go.sum b/encodings/cbor/go.sum index 195eb98dd..804db0c52 100644 --- a/encodings/cbor/go.sum +++ b/encodings/cbor/go.sum @@ -59,10 +59,8 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/clue v1.2.6 h1:ensyUkwlvEbNy8FuTGMldKuvaNouh8YoDY9QaE+EtYg= goa.design/clue v1.2.6/go.mod h1:Y4RS5o2k6MZiGk2PT3XbKyntjR2xkr8dYOKQ591dIDM= -goa.design/goa/v3 v3.30.1-0.20260825174000-15f11dc2fdee h1:kHhMouwWXQwdReV0dGkgsx7WX0tzka0xnKZWHznWixQ= -goa.design/goa/v3 v3.30.1-0.20260825174000-15f11dc2fdee/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= -goa.design/goa/v3 v3.30.1-0.20260825202211-245bb1440866 h1:iDfdv3DYb6jVKkTlg+pD8q0MZFuSuMA2lAtCQe9yfPA= -goa.design/goa/v3 v3.30.1-0.20260825202211-245bb1440866/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260825203937-95933f068ade h1:gTHq43P69svXt3KfmtpA2Tr5+4dCt03xVmSi5g1xqRc= +goa.design/goa/v3 v3.30.1-0.20260825203937-95933f068ade/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/encodings/text/go.mod b/encodings/text/go.mod index 76be0a3f6..dfae16ea7 100644 --- a/encodings/text/go.mod +++ b/encodings/text/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( goa.design/clue v1.2.6 - goa.design/goa/v3 v3.30.1-0.20260825202211-245bb1440866 + goa.design/goa/v3 v3.30.1-0.20260825203937-95933f068ade ) require ( diff --git a/encodings/text/go.sum b/encodings/text/go.sum index e3edfa8c2..9a0ac5cf1 100644 --- a/encodings/text/go.sum +++ b/encodings/text/go.sum @@ -55,10 +55,8 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/clue v1.2.6 h1:ensyUkwlvEbNy8FuTGMldKuvaNouh8YoDY9QaE+EtYg= goa.design/clue v1.2.6/go.mod h1:Y4RS5o2k6MZiGk2PT3XbKyntjR2xkr8dYOKQ591dIDM= -goa.design/goa/v3 v3.30.1-0.20260825174000-15f11dc2fdee h1:kHhMouwWXQwdReV0dGkgsx7WX0tzka0xnKZWHznWixQ= -goa.design/goa/v3 v3.30.1-0.20260825174000-15f11dc2fdee/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= -goa.design/goa/v3 v3.30.1-0.20260825202211-245bb1440866 h1:iDfdv3DYb6jVKkTlg+pD8q0MZFuSuMA2lAtCQe9yfPA= -goa.design/goa/v3 v3.30.1-0.20260825202211-245bb1440866/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260825203937-95933f068ade h1:gTHq43P69svXt3KfmtpA2Tr5+4dCt03xVmSi5g1xqRc= +goa.design/goa/v3 v3.30.1-0.20260825203937-95933f068ade/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/error/go.mod b/error/go.mod index 59c15a06e..ecf93c303 100644 --- a/error/go.mod +++ b/error/go.mod @@ -3,7 +3,7 @@ module goa.design/examples/error go 1.26.0 require ( - goa.design/goa/v3 v3.30.1-0.20260825202211-245bb1440866 + goa.design/goa/v3 v3.30.1-0.20260825203937-95933f068ade google.golang.org/genproto v0.0.0-20260810153831-ec0a7760b754 google.golang.org/grpc v1.83.1 google.golang.org/protobuf v1.36.12 diff --git a/error/go.sum b/error/go.sum index 0b8937d3d..5b8af05d6 100644 --- a/error/go.sum +++ b/error/go.sum @@ -49,10 +49,8 @@ go.opentelemetry.io/otel/trace v1.44.0 h1:jxF5CsGYCe74MCRx2X4g7WsY/VBKRqqpNvXlX/ go.opentelemetry.io/otel/trace v1.44.0/go.mod h1:oLl1jrMQAVo6v3GAggN+1VH9VIz9iUSvW53sW1Q8PIE= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260825174000-15f11dc2fdee h1:kHhMouwWXQwdReV0dGkgsx7WX0tzka0xnKZWHznWixQ= -goa.design/goa/v3 v3.30.1-0.20260825174000-15f11dc2fdee/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= -goa.design/goa/v3 v3.30.1-0.20260825202211-245bb1440866 h1:iDfdv3DYb6jVKkTlg+pD8q0MZFuSuMA2lAtCQe9yfPA= -goa.design/goa/v3 v3.30.1-0.20260825202211-245bb1440866/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260825203937-95933f068ade h1:gTHq43P69svXt3KfmtpA2Tr5+4dCt03xVmSi5g1xqRc= +goa.design/goa/v3 v3.30.1-0.20260825203937-95933f068ade/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/files/go.mod b/files/go.mod index 9df04d873..46879cc1a 100644 --- a/files/go.mod +++ b/files/go.mod @@ -2,7 +2,7 @@ module goa.design/examples/files go 1.26.0 -require goa.design/goa/v3 v3.30.1-0.20260825202211-245bb1440866 +require goa.design/goa/v3 v3.30.1-0.20260825203937-95933f068ade require ( github.com/dimfeld/httppath v0.0.0-20170720192232-ee938bf73598 // indirect diff --git a/files/go.sum b/files/go.sum index 92981cf8c..c2b5c8941 100644 --- a/files/go.sum +++ b/files/go.sum @@ -31,10 +31,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260825174000-15f11dc2fdee h1:kHhMouwWXQwdReV0dGkgsx7WX0tzka0xnKZWHznWixQ= -goa.design/goa/v3 v3.30.1-0.20260825174000-15f11dc2fdee/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= -goa.design/goa/v3 v3.30.1-0.20260825202211-245bb1440866 h1:iDfdv3DYb6jVKkTlg+pD8q0MZFuSuMA2lAtCQe9yfPA= -goa.design/goa/v3 v3.30.1-0.20260825202211-245bb1440866/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260825203937-95933f068ade h1:gTHq43P69svXt3KfmtpA2Tr5+4dCt03xVmSi5g1xqRc= +goa.design/goa/v3 v3.30.1-0.20260825203937-95933f068ade/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= diff --git a/httpstatus/go.mod b/httpstatus/go.mod index 6a9561eb3..3b91c1418 100644 --- a/httpstatus/go.mod +++ b/httpstatus/go.mod @@ -2,7 +2,7 @@ module goa.design/examples/httpstatus go 1.26.0 -require goa.design/goa/v3 v3.30.1-0.20260825202211-245bb1440866 +require goa.design/goa/v3 v3.30.1-0.20260825203937-95933f068ade require ( github.com/dimfeld/httppath v0.0.0-20170720192232-ee938bf73598 // indirect diff --git a/httpstatus/go.sum b/httpstatus/go.sum index 92981cf8c..c2b5c8941 100644 --- a/httpstatus/go.sum +++ b/httpstatus/go.sum @@ -31,10 +31,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260825174000-15f11dc2fdee h1:kHhMouwWXQwdReV0dGkgsx7WX0tzka0xnKZWHznWixQ= -goa.design/goa/v3 v3.30.1-0.20260825174000-15f11dc2fdee/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= -goa.design/goa/v3 v3.30.1-0.20260825202211-245bb1440866 h1:iDfdv3DYb6jVKkTlg+pD8q0MZFuSuMA2lAtCQe9yfPA= -goa.design/goa/v3 v3.30.1-0.20260825202211-245bb1440866/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260825203937-95933f068ade h1:gTHq43P69svXt3KfmtpA2Tr5+4dCt03xVmSi5g1xqRc= +goa.design/goa/v3 v3.30.1-0.20260825203937-95933f068ade/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= diff --git a/interceptors/go.mod b/interceptors/go.mod index e887fb95b..d823c1a35 100644 --- a/interceptors/go.mod +++ b/interceptors/go.mod @@ -6,7 +6,7 @@ require ( github.com/google/uuid v1.6.0 github.com/gorilla/websocket v1.5.3 goa.design/clue v1.2.6 - goa.design/goa/v3 v3.30.1-0.20260825202211-245bb1440866 + goa.design/goa/v3 v3.30.1-0.20260825203937-95933f068ade google.golang.org/grpc v1.83.1 google.golang.org/protobuf v1.36.12 ) diff --git a/interceptors/go.sum b/interceptors/go.sum index e3edfa8c2..9a0ac5cf1 100644 --- a/interceptors/go.sum +++ b/interceptors/go.sum @@ -55,10 +55,8 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/clue v1.2.6 h1:ensyUkwlvEbNy8FuTGMldKuvaNouh8YoDY9QaE+EtYg= goa.design/clue v1.2.6/go.mod h1:Y4RS5o2k6MZiGk2PT3XbKyntjR2xkr8dYOKQ591dIDM= -goa.design/goa/v3 v3.30.1-0.20260825174000-15f11dc2fdee h1:kHhMouwWXQwdReV0dGkgsx7WX0tzka0xnKZWHznWixQ= -goa.design/goa/v3 v3.30.1-0.20260825174000-15f11dc2fdee/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= -goa.design/goa/v3 v3.30.1-0.20260825202211-245bb1440866 h1:iDfdv3DYb6jVKkTlg+pD8q0MZFuSuMA2lAtCQe9yfPA= -goa.design/goa/v3 v3.30.1-0.20260825202211-245bb1440866/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260825203937-95933f068ade h1:gTHq43P69svXt3KfmtpA2Tr5+4dCt03xVmSi5g1xqRc= +goa.design/goa/v3 v3.30.1-0.20260825203937-95933f068ade/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/multipart/go.mod b/multipart/go.mod index 18b97662d..ff215d728 100644 --- a/multipart/go.mod +++ b/multipart/go.mod @@ -2,7 +2,7 @@ module goa.design/examples/multipart go 1.26.0 -require goa.design/goa/v3 v3.30.1-0.20260825202211-245bb1440866 +require goa.design/goa/v3 v3.30.1-0.20260825203937-95933f068ade require ( github.com/dimfeld/httppath v0.0.0-20170720192232-ee938bf73598 // indirect diff --git a/multipart/go.sum b/multipart/go.sum index 92981cf8c..c2b5c8941 100644 --- a/multipart/go.sum +++ b/multipart/go.sum @@ -31,10 +31,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260825174000-15f11dc2fdee h1:kHhMouwWXQwdReV0dGkgsx7WX0tzka0xnKZWHznWixQ= -goa.design/goa/v3 v3.30.1-0.20260825174000-15f11dc2fdee/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= -goa.design/goa/v3 v3.30.1-0.20260825202211-245bb1440866 h1:iDfdv3DYb6jVKkTlg+pD8q0MZFuSuMA2lAtCQe9yfPA= -goa.design/goa/v3 v3.30.1-0.20260825202211-245bb1440866/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260825203937-95933f068ade h1:gTHq43P69svXt3KfmtpA2Tr5+4dCt03xVmSi5g1xqRc= +goa.design/goa/v3 v3.30.1-0.20260825203937-95933f068ade/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= diff --git a/retry/go.mod b/retry/go.mod index b9e55d2a6..832164d95 100644 --- a/retry/go.mod +++ b/retry/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( goa.design/clue v1.2.6 - goa.design/goa/v3 v3.30.1-0.20260825202211-245bb1440866 + goa.design/goa/v3 v3.30.1-0.20260825203937-95933f068ade google.golang.org/grpc v1.83.1 google.golang.org/protobuf v1.36.12 ) diff --git a/retry/go.sum b/retry/go.sum index f2d45d680..97e0c54f3 100644 --- a/retry/go.sum +++ b/retry/go.sum @@ -52,10 +52,8 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/clue v1.2.6 h1:ensyUkwlvEbNy8FuTGMldKuvaNouh8YoDY9QaE+EtYg= goa.design/clue v1.2.6/go.mod h1:Y4RS5o2k6MZiGk2PT3XbKyntjR2xkr8dYOKQ591dIDM= -goa.design/goa/v3 v3.30.1-0.20260825174000-15f11dc2fdee h1:kHhMouwWXQwdReV0dGkgsx7WX0tzka0xnKZWHznWixQ= -goa.design/goa/v3 v3.30.1-0.20260825174000-15f11dc2fdee/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= -goa.design/goa/v3 v3.30.1-0.20260825202211-245bb1440866 h1:iDfdv3DYb6jVKkTlg+pD8q0MZFuSuMA2lAtCQe9yfPA= -goa.design/goa/v3 v3.30.1-0.20260825202211-245bb1440866/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260825203937-95933f068ade h1:gTHq43P69svXt3KfmtpA2Tr5+4dCt03xVmSi5g1xqRc= +goa.design/goa/v3 v3.30.1-0.20260825203937-95933f068ade/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/security/hierarchy/go.mod b/security/hierarchy/go.mod index cde75e424..8a2c46eb6 100644 --- a/security/hierarchy/go.mod +++ b/security/hierarchy/go.mod @@ -2,7 +2,7 @@ module goa.design/examples/security/hierarchy go 1.26.0 -require goa.design/goa/v3 v3.30.1-0.20260825202211-245bb1440866 +require goa.design/goa/v3 v3.30.1-0.20260825203937-95933f068ade require ( github.com/dimfeld/httppath v0.0.0-20170720192232-ee938bf73598 // indirect diff --git a/security/hierarchy/go.sum b/security/hierarchy/go.sum index 92981cf8c..c2b5c8941 100644 --- a/security/hierarchy/go.sum +++ b/security/hierarchy/go.sum @@ -31,10 +31,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260825174000-15f11dc2fdee h1:kHhMouwWXQwdReV0dGkgsx7WX0tzka0xnKZWHznWixQ= -goa.design/goa/v3 v3.30.1-0.20260825174000-15f11dc2fdee/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= -goa.design/goa/v3 v3.30.1-0.20260825202211-245bb1440866 h1:iDfdv3DYb6jVKkTlg+pD8q0MZFuSuMA2lAtCQe9yfPA= -goa.design/goa/v3 v3.30.1-0.20260825202211-245bb1440866/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260825203937-95933f068ade h1:gTHq43P69svXt3KfmtpA2Tr5+4dCt03xVmSi5g1xqRc= +goa.design/goa/v3 v3.30.1-0.20260825203937-95933f068ade/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= diff --git a/security/multiauth/go.mod b/security/multiauth/go.mod index ae79fad46..7f9cc65e8 100644 --- a/security/multiauth/go.mod +++ b/security/multiauth/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( github.com/golang-jwt/jwt/v4 v4.5.2 - goa.design/goa/v3 v3.30.1-0.20260825202211-245bb1440866 + goa.design/goa/v3 v3.30.1-0.20260825203937-95933f068ade google.golang.org/grpc v1.83.1 google.golang.org/protobuf v1.36.12 ) diff --git a/security/multiauth/go.sum b/security/multiauth/go.sum index eb02a0cb8..38d654ea1 100644 --- a/security/multiauth/go.sum +++ b/security/multiauth/go.sum @@ -51,10 +51,8 @@ go.opentelemetry.io/otel/trace v1.44.0 h1:jxF5CsGYCe74MCRx2X4g7WsY/VBKRqqpNvXlX/ go.opentelemetry.io/otel/trace v1.44.0/go.mod h1:oLl1jrMQAVo6v3GAggN+1VH9VIz9iUSvW53sW1Q8PIE= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260825174000-15f11dc2fdee h1:kHhMouwWXQwdReV0dGkgsx7WX0tzka0xnKZWHznWixQ= -goa.design/goa/v3 v3.30.1-0.20260825174000-15f11dc2fdee/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= -goa.design/goa/v3 v3.30.1-0.20260825202211-245bb1440866 h1:iDfdv3DYb6jVKkTlg+pD8q0MZFuSuMA2lAtCQe9yfPA= -goa.design/goa/v3 v3.30.1-0.20260825202211-245bb1440866/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260825203937-95933f068ade h1:gTHq43P69svXt3KfmtpA2Tr5+4dCt03xVmSi5g1xqRc= +goa.design/goa/v3 v3.30.1-0.20260825203937-95933f068ade/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/sse/go.mod b/sse/go.mod index 698c0fae6..f53a4d321 100644 --- a/sse/go.mod +++ b/sse/go.mod @@ -5,7 +5,7 @@ go 1.26.0 require ( github.com/shirou/gopsutil/v3 v3.24.5 goa.design/clue v1.2.6 - goa.design/goa/v3 v3.30.1-0.20260825202211-245bb1440866 + goa.design/goa/v3 v3.30.1-0.20260825203937-95933f068ade ) require ( diff --git a/sse/go.sum b/sse/go.sum index 137d12892..16a0d901e 100644 --- a/sse/go.sum +++ b/sse/go.sum @@ -74,10 +74,8 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/clue v1.2.6 h1:ensyUkwlvEbNy8FuTGMldKuvaNouh8YoDY9QaE+EtYg= goa.design/clue v1.2.6/go.mod h1:Y4RS5o2k6MZiGk2PT3XbKyntjR2xkr8dYOKQ591dIDM= -goa.design/goa/v3 v3.30.1-0.20260825174000-15f11dc2fdee h1:kHhMouwWXQwdReV0dGkgsx7WX0tzka0xnKZWHznWixQ= -goa.design/goa/v3 v3.30.1-0.20260825174000-15f11dc2fdee/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= -goa.design/goa/v3 v3.30.1-0.20260825202211-245bb1440866 h1:iDfdv3DYb6jVKkTlg+pD8q0MZFuSuMA2lAtCQe9yfPA= -goa.design/goa/v3 v3.30.1-0.20260825202211-245bb1440866/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260825203937-95933f068ade h1:gTHq43P69svXt3KfmtpA2Tr5+4dCt03xVmSi5g1xqRc= +goa.design/goa/v3 v3.30.1-0.20260825203937-95933f068ade/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/streaming/go.mod b/streaming/go.mod index b037b6660..c5f0837d8 100644 --- a/streaming/go.mod +++ b/streaming/go.mod @@ -5,7 +5,7 @@ go 1.26.0 require ( github.com/golang-jwt/jwt/v4 v4.5.2 github.com/gorilla/websocket v1.5.3 - goa.design/goa/v3 v3.30.1-0.20260825202211-245bb1440866 + goa.design/goa/v3 v3.30.1-0.20260825203937-95933f068ade google.golang.org/grpc v1.83.1 google.golang.org/protobuf v1.36.12 ) diff --git a/streaming/go.sum b/streaming/go.sum index eb02a0cb8..38d654ea1 100644 --- a/streaming/go.sum +++ b/streaming/go.sum @@ -51,10 +51,8 @@ go.opentelemetry.io/otel/trace v1.44.0 h1:jxF5CsGYCe74MCRx2X4g7WsY/VBKRqqpNvXlX/ go.opentelemetry.io/otel/trace v1.44.0/go.mod h1:oLl1jrMQAVo6v3GAggN+1VH9VIz9iUSvW53sW1Q8PIE= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260825174000-15f11dc2fdee h1:kHhMouwWXQwdReV0dGkgsx7WX0tzka0xnKZWHznWixQ= -goa.design/goa/v3 v3.30.1-0.20260825174000-15f11dc2fdee/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= -goa.design/goa/v3 v3.30.1-0.20260825202211-245bb1440866 h1:iDfdv3DYb6jVKkTlg+pD8q0MZFuSuMA2lAtCQe9yfPA= -goa.design/goa/v3 v3.30.1-0.20260825202211-245bb1440866/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260825203937-95933f068ade h1:gTHq43P69svXt3KfmtpA2Tr5+4dCt03xVmSi5g1xqRc= +goa.design/goa/v3 v3.30.1-0.20260825203937-95933f068ade/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/tracing/go.mod b/tracing/go.mod index 4d2dcbab1..6310089f8 100644 --- a/tracing/go.mod +++ b/tracing/go.mod @@ -5,7 +5,7 @@ go 1.26.0 require ( github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 goa.design/examples/basic v0.0.0-20260810182504-f834f43955c5 - goa.design/goa/v3 v3.30.1-0.20260825202211-245bb1440866 + goa.design/goa/v3 v3.30.1-0.20260825203937-95933f068ade google.golang.org/grpc v1.83.1 ) diff --git a/tracing/go.sum b/tracing/go.sum index a3c940cc8..85653aa70 100644 --- a/tracing/go.sum +++ b/tracing/go.sum @@ -81,8 +81,8 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/examples/basic v0.0.0-20260810182504-f834f43955c5 h1:SRSrUaLTTdA4bUXb8+zA5MDhMEx8YaP+Knd+pddBcrg= goa.design/examples/basic v0.0.0-20260810182504-f834f43955c5/go.mod h1:XRziIzNcLb9fk7ZrfiHx5FIeAj+orJ4fkzLG0nXpiAo= -goa.design/goa/v3 v3.30.1-0.20260825174000-15f11dc2fdee h1:kHhMouwWXQwdReV0dGkgsx7WX0tzka0xnKZWHznWixQ= -goa.design/goa/v3 v3.30.1-0.20260825174000-15f11dc2fdee/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260825203937-95933f068ade h1:gTHq43P69svXt3KfmtpA2Tr5+4dCt03xVmSi5g1xqRc= +goa.design/goa/v3 v3.30.1-0.20260825203937-95933f068ade/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= diff --git a/tus/go.mod b/tus/go.mod index 03cb1a02a..d364e1ef0 100644 --- a/tus/go.mod +++ b/tus/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( github.com/rs/xid v1.6.0 - goa.design/goa/v3 v3.30.1-0.20260825202211-245bb1440866 + goa.design/goa/v3 v3.30.1-0.20260825203937-95933f068ade ) require ( diff --git a/tus/go.sum b/tus/go.sum index 51b137735..d33e17d7c 100644 --- a/tus/go.sum +++ b/tus/go.sum @@ -33,10 +33,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260825174000-15f11dc2fdee h1:kHhMouwWXQwdReV0dGkgsx7WX0tzka0xnKZWHznWixQ= -goa.design/goa/v3 v3.30.1-0.20260825174000-15f11dc2fdee/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= -goa.design/goa/v3 v3.30.1-0.20260825202211-245bb1440866 h1:iDfdv3DYb6jVKkTlg+pD8q0MZFuSuMA2lAtCQe9yfPA= -goa.design/goa/v3 v3.30.1-0.20260825202211-245bb1440866/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260825203937-95933f068ade h1:gTHq43P69svXt3KfmtpA2Tr5+4dCt03xVmSi5g1xqRc= +goa.design/goa/v3 v3.30.1-0.20260825203937-95933f068ade/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= diff --git a/upload_download/go.mod b/upload_download/go.mod index d9c8d025c..0485101c4 100644 --- a/upload_download/go.mod +++ b/upload_download/go.mod @@ -2,7 +2,7 @@ module goa.design/examples/upload_download go 1.26.0 -require goa.design/goa/v3 v3.30.1-0.20260825202211-245bb1440866 +require goa.design/goa/v3 v3.30.1-0.20260825203937-95933f068ade require ( github.com/dimfeld/httppath v0.0.0-20170720192232-ee938bf73598 // indirect diff --git a/upload_download/go.sum b/upload_download/go.sum index 92981cf8c..c2b5c8941 100644 --- a/upload_download/go.sum +++ b/upload_download/go.sum @@ -31,10 +31,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260825174000-15f11dc2fdee h1:kHhMouwWXQwdReV0dGkgsx7WX0tzka0xnKZWHznWixQ= -goa.design/goa/v3 v3.30.1-0.20260825174000-15f11dc2fdee/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= -goa.design/goa/v3 v3.30.1-0.20260825202211-245bb1440866 h1:iDfdv3DYb6jVKkTlg+pD8q0MZFuSuMA2lAtCQe9yfPA= -goa.design/goa/v3 v3.30.1-0.20260825202211-245bb1440866/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260825203937-95933f068ade h1:gTHq43P69svXt3KfmtpA2Tr5+4dCt03xVmSi5g1xqRc= +goa.design/goa/v3 v3.30.1-0.20260825203937-95933f068ade/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= From 3f2fda74ca180e5bf4d6507c7ebde3473e98b89a Mon Sep 17 00:00:00 2001 From: "Raphael (manual office deploy after cloud-state fix)" Date: Tue, 25 Aug 2026 22:38:56 -0700 Subject: [PATCH 13/28] fix(cbor): use the documented transport codec --- encodings/cbor/cmd/concat-cli/http.go | 5 +- encodings/cbor/cmd/concat/http.go | 5 +- encodings/cbor/cmd/concat/http_test.go | 78 ++++++++++++++++++++++++++ 3 files changed, 84 insertions(+), 4 deletions(-) create mode 100644 encodings/cbor/cmd/concat/http_test.go diff --git a/encodings/cbor/cmd/concat-cli/http.go b/encodings/cbor/cmd/concat-cli/http.go index 2857ade42..c19d7641e 100644 --- a/encodings/cbor/cmd/concat-cli/http.go +++ b/encodings/cbor/cmd/concat-cli/http.go @@ -4,6 +4,7 @@ import ( "net/http" "time" + concatapi "goa.design/examples/encodings/cbor" cli "goa.design/examples/encodings/cbor/gen/http/cli/concat" goahttp "goa.design/goa/v3/http" goa "goa.design/goa/v3/pkg" @@ -24,8 +25,8 @@ func doHTTP(scheme, host string, timeout int, debug bool) (goa.Endpoint, any, er scheme, host, doer, - goahttp.RequestEncoder, - goahttp.ResponseDecoder, + concatapi.RequestEncoder, + concatapi.ResponseDecoder, debug, ) } diff --git a/encodings/cbor/cmd/concat/http.go b/encodings/cbor/cmd/concat/http.go index 1ec836cd9..b0462a76a 100644 --- a/encodings/cbor/cmd/concat/http.go +++ b/encodings/cbor/cmd/concat/http.go @@ -9,6 +9,7 @@ import ( "goa.design/clue/debug" "goa.design/clue/log" + concatapi "goa.design/examples/encodings/cbor" concat "goa.design/examples/encodings/cbor/gen/concat" concatsvr "goa.design/examples/encodings/cbor/gen/http/concat/server" goahttp "goa.design/goa/v3/http" @@ -23,8 +24,8 @@ func handleHTTPServer(ctx context.Context, u *url.URL, concatEndpoints *concat.E // Other encodings can be used by providing the corresponding functions, // see goa.design/implement/encoding. var ( - dec = goahttp.RequestDecoder - enc = goahttp.ResponseEncoder + dec = concatapi.RequestDecoder + enc = concatapi.ResponseEncoder ) // Build the service HTTP request multiplexer and mount debug and profiler diff --git a/encodings/cbor/cmd/concat/http_test.go b/encodings/cbor/cmd/concat/http_test.go new file mode 100644 index 000000000..d05db3c13 --- /dev/null +++ b/encodings/cbor/cmd/concat/http_test.go @@ -0,0 +1,78 @@ +// These tests verify that the example server uses its CBOR transport codecs. +package main + +import ( + "context" + "net" + "net/http" + "net/url" + "sync" + "testing" + "time" + + "github.com/fxamacker/cbor/v2" + "goa.design/clue/log" + concatapi "goa.design/examples/encodings/cbor" + genconcat "goa.design/examples/encodings/cbor/gen/concat" +) + +// TestHTTPServerUsesCBOR checks the response produced by the configured HTTP +// server rather than testing the codec functions on their own. +func TestHTTPServerUsesCBOR(t *testing.T) { + listener, err := net.Listen("tcp", "127.0.0.1:0") + if err != nil { + t.Fatalf("reserve HTTP address: %v", err) + } + address := listener.Addr().String() + if err := listener.Close(); err != nil { + t.Fatalf("release HTTP address: %v", err) + } + + serverURL := &url.URL{Scheme: "http", Host: address} + endpoints := genconcat.NewEndpoints(concatapi.NewConcat()) + logContext := log.Context(context.Background(), log.WithFormat(log.FormatJSON)) + ctx, cancel := context.WithCancel(logContext) + var waitGroup sync.WaitGroup + handleHTTPServer(ctx, serverURL, endpoints, &waitGroup, make(chan error, 1), false) + t.Cleanup(func() { + cancel() + waitGroup.Wait() + }) + + response := waitForHTTPResponse(t, "http://"+address+"/concat/a/b") + t.Cleanup(func() { + if err := response.Body.Close(); err != nil { + t.Errorf("close response body: %v", err) + } + }) + if got := response.Header.Get("Content-Type"); got != "application/cbor" { + t.Fatalf("Content-Type = %q, want application/cbor", got) + } + + var result string + if err := cbor.NewDecoder(response.Body).Decode(&result); err != nil { + t.Fatalf("decode CBOR response: %v", err) + } + if result != "ab" { + t.Fatalf("result = %q, want ab", result) + } +} + +// waitForHTTPResponse waits until the server accepts requests or the test +// timeout expires. +func waitForHTTPResponse(t *testing.T, requestURL string) *http.Response { + t.Helper() + + client := &http.Client{Timeout: 100 * time.Millisecond} + deadline := time.Now().Add(2 * time.Second) + for { + response, err := client.Get(requestURL) + if err == nil { + return response + } + if time.Now().After(deadline) { + t.Fatalf("GET %s: %v", requestURL, err) + } + time.Sleep(10 * time.Millisecond) + } +} From 90b065a850ea62c8ba0255194f1ad18fd2793de5 Mon Sep 17 00:00:00 2001 From: "Raphael (manual office deploy after cloud-state fix)" Date: Wed, 26 Aug 2026 05:22:11 -0700 Subject: [PATCH 14/28] chore: regenerate examples with Goa generation plan --- basic/gen/http/calc/client/paths.go | 4 +--- basic/gen/http/calc/server/paths.go | 4 +--- basic/gen/http/calc/server/types.go | 4 +--- basic/go.mod | 2 +- basic/go.sum | 4 ++-- cellar/gen/http/storage/client/paths.go | 4 +--- cellar/gen/http/storage/server/paths.go | 4 +--- cellar/go.mod | 2 +- cellar/go.sum | 4 ++-- concerts/gen/http/concerts/client/paths.go | 4 +--- concerts/gen/http/concerts/server/paths.go | 4 +--- concerts/go.mod | 2 +- concerts/go.sum | 4 ++-- cookies/go.mod | 2 +- cookies/go.sum | 4 ++-- encodings/cbor/gen/http/concat/client/paths.go | 4 +--- encodings/cbor/gen/http/concat/server/paths.go | 4 +--- encodings/cbor/gen/http/concat/server/types.go | 4 +--- encodings/cbor/go.mod | 2 +- encodings/cbor/go.sum | 4 ++-- encodings/text/gen/http/text/client/paths.go | 4 +--- encodings/text/gen/http/text/client/types.go | 4 +--- encodings/text/gen/http/text/server/paths.go | 4 +--- encodings/text/gen/http/text/server/types.go | 4 +--- encodings/text/go.mod | 2 +- encodings/text/go.sum | 4 ++-- error/go.mod | 2 +- error/go.sum | 4 ++-- files/go.mod | 2 +- files/go.sum | 4 ++-- httpstatus/gen/http/hello/client/paths.go | 4 +--- httpstatus/gen/http/hello/server/paths.go | 4 +--- httpstatus/go.mod | 2 +- httpstatus/go.sum | 4 ++-- interceptors/gen/http/interceptors/client/paths.go | 4 +--- interceptors/gen/http/interceptors/server/paths.go | 4 +--- interceptors/go.mod | 2 +- interceptors/go.sum | 4 ++-- multipart/go.mod | 2 +- multipart/go.sum | 4 ++-- retry/gen/http/retry/client/paths.go | 4 +--- retry/gen/http/retry/server/paths.go | 4 +--- retry/go.mod | 2 +- retry/go.sum | 4 ++-- security/hierarchy/gen/http/api_key_service/server/types.go | 4 +--- security/hierarchy/gen/http/default_service/server/types.go | 4 +--- security/hierarchy/go.mod | 2 +- security/hierarchy/go.sum | 4 ++-- security/multiauth/gen/http/secured_service/server/types.go | 4 +--- security/multiauth/go.mod | 2 +- security/multiauth/go.sum | 4 ++-- sse/gen/http/monitor/server/types.go | 4 +--- sse/go.mod | 2 +- sse/go.sum | 4 ++-- streaming/go.mod | 2 +- streaming/go.sum | 4 ++-- tracing/go.mod | 2 +- tracing/go.sum | 4 ++-- tus/gen/http/tus/client/paths.go | 4 +--- tus/gen/http/tus/server/paths.go | 4 +--- tus/go.mod | 2 +- tus/go.sum | 4 ++-- upload_download/gen/http/updown/client/paths.go | 4 +--- upload_download/gen/http/updown/server/paths.go | 4 +--- upload_download/go.mod | 2 +- upload_download/go.sum | 4 ++-- 66 files changed, 85 insertions(+), 141 deletions(-) diff --git a/basic/gen/http/calc/client/paths.go b/basic/gen/http/calc/client/paths.go index 0bc6443a4..1028b14bc 100644 --- a/basic/gen/http/calc/client/paths.go +++ b/basic/gen/http/calc/client/paths.go @@ -7,9 +7,7 @@ package client -import ( - "fmt" -) +import "fmt" // MultiplyCalcPath returns the URL path to the calc service multiply HTTP endpoint. func MultiplyCalcPath(a int, b int) string { diff --git a/basic/gen/http/calc/server/paths.go b/basic/gen/http/calc/server/paths.go index 8c7294f10..95300631b 100644 --- a/basic/gen/http/calc/server/paths.go +++ b/basic/gen/http/calc/server/paths.go @@ -7,9 +7,7 @@ package server -import ( - "fmt" -) +import "fmt" // MultiplyCalcPath returns the URL path to the calc service multiply HTTP endpoint. func MultiplyCalcPath(a int, b int) string { diff --git a/basic/gen/http/calc/server/types.go b/basic/gen/http/calc/server/types.go index 6fabccedc..b4e040aca 100644 --- a/basic/gen/http/calc/server/types.go +++ b/basic/gen/http/calc/server/types.go @@ -7,9 +7,7 @@ package server -import ( - calc "goa.design/examples/basic/gen/calc" -) +import calc "goa.design/examples/basic/gen/calc" // NewMultiplyPayload builds a calc service multiply endpoint payload. func NewMultiplyPayload(a int, b int) *calc.MultiplyPayload { diff --git a/basic/go.mod b/basic/go.mod index bfcf56a7c..b3ce79420 100644 --- a/basic/go.mod +++ b/basic/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( goa.design/clue v1.2.6 - goa.design/goa/v3 v3.30.1-0.20260825203937-95933f068ade + goa.design/goa/v3 v3.30.1-0.20260826121623-5f90d9cb72a2 google.golang.org/grpc v1.83.1 google.golang.org/protobuf v1.36.12 ) diff --git a/basic/go.sum b/basic/go.sum index 9a0ac5cf1..5080b87d9 100644 --- a/basic/go.sum +++ b/basic/go.sum @@ -55,8 +55,8 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/clue v1.2.6 h1:ensyUkwlvEbNy8FuTGMldKuvaNouh8YoDY9QaE+EtYg= goa.design/clue v1.2.6/go.mod h1:Y4RS5o2k6MZiGk2PT3XbKyntjR2xkr8dYOKQ591dIDM= -goa.design/goa/v3 v3.30.1-0.20260825203937-95933f068ade h1:gTHq43P69svXt3KfmtpA2Tr5+4dCt03xVmSi5g1xqRc= -goa.design/goa/v3 v3.30.1-0.20260825203937-95933f068ade/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826121623-5f90d9cb72a2 h1:qqU42d2tdZX1sNE6utS//I5CZmz8LS+T4joRDYN0ydY= +goa.design/goa/v3 v3.30.1-0.20260826121623-5f90d9cb72a2/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/cellar/gen/http/storage/client/paths.go b/cellar/gen/http/storage/client/paths.go index 43c972133..6e8c93d67 100644 --- a/cellar/gen/http/storage/client/paths.go +++ b/cellar/gen/http/storage/client/paths.go @@ -7,9 +7,7 @@ package client -import ( - "fmt" -) +import "fmt" // ListStoragePath returns the URL path to the storage service list HTTP endpoint. func ListStoragePath() string { diff --git a/cellar/gen/http/storage/server/paths.go b/cellar/gen/http/storage/server/paths.go index 8481d9fad..95cb08739 100644 --- a/cellar/gen/http/storage/server/paths.go +++ b/cellar/gen/http/storage/server/paths.go @@ -7,9 +7,7 @@ package server -import ( - "fmt" -) +import "fmt" // ListStoragePath returns the URL path to the storage service list HTTP endpoint. func ListStoragePath() string { diff --git a/cellar/go.mod b/cellar/go.mod index 9157ccb1b..7d2785202 100644 --- a/cellar/go.mod +++ b/cellar/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( github.com/boltdb/bolt v1.3.1 - goa.design/goa/v3 v3.30.1-0.20260825203937-95933f068ade + goa.design/goa/v3 v3.30.1-0.20260826121623-5f90d9cb72a2 google.golang.org/grpc v1.83.1 google.golang.org/protobuf v1.36.12 ) diff --git a/cellar/go.sum b/cellar/go.sum index c05813df8..ac907c17c 100644 --- a/cellar/go.sum +++ b/cellar/go.sum @@ -51,8 +51,8 @@ go.opentelemetry.io/otel/trace v1.44.0 h1:jxF5CsGYCe74MCRx2X4g7WsY/VBKRqqpNvXlX/ go.opentelemetry.io/otel/trace v1.44.0/go.mod h1:oLl1jrMQAVo6v3GAggN+1VH9VIz9iUSvW53sW1Q8PIE= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260825203937-95933f068ade h1:gTHq43P69svXt3KfmtpA2Tr5+4dCt03xVmSi5g1xqRc= -goa.design/goa/v3 v3.30.1-0.20260825203937-95933f068ade/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826121623-5f90d9cb72a2 h1:qqU42d2tdZX1sNE6utS//I5CZmz8LS+T4joRDYN0ydY= +goa.design/goa/v3 v3.30.1-0.20260826121623-5f90d9cb72a2/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/concerts/gen/http/concerts/client/paths.go b/concerts/gen/http/concerts/client/paths.go index d095b1c0a..93b7d583b 100644 --- a/concerts/gen/http/concerts/client/paths.go +++ b/concerts/gen/http/concerts/client/paths.go @@ -7,9 +7,7 @@ package client -import ( - "fmt" -) +import "fmt" // ListConcertsPath returns the URL path to the concerts service list HTTP endpoint. func ListConcertsPath() string { diff --git a/concerts/gen/http/concerts/server/paths.go b/concerts/gen/http/concerts/server/paths.go index c6ed3b4e8..758eb39f8 100644 --- a/concerts/gen/http/concerts/server/paths.go +++ b/concerts/gen/http/concerts/server/paths.go @@ -7,9 +7,7 @@ package server -import ( - "fmt" -) +import "fmt" // ListConcertsPath returns the URL path to the concerts service list HTTP endpoint. func ListConcertsPath() string { diff --git a/concerts/go.mod b/concerts/go.mod index 1652cd25a..6f8c054b9 100644 --- a/concerts/go.mod +++ b/concerts/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( github.com/google/uuid v1.6.0 - goa.design/goa/v3 v3.30.1-0.20260825203937-95933f068ade + goa.design/goa/v3 v3.30.1-0.20260826121623-5f90d9cb72a2 ) require ( diff --git a/concerts/go.sum b/concerts/go.sum index c2b5c8941..7d270bdbf 100644 --- a/concerts/go.sum +++ b/concerts/go.sum @@ -31,8 +31,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260825203937-95933f068ade h1:gTHq43P69svXt3KfmtpA2Tr5+4dCt03xVmSi5g1xqRc= -goa.design/goa/v3 v3.30.1-0.20260825203937-95933f068ade/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826121623-5f90d9cb72a2 h1:qqU42d2tdZX1sNE6utS//I5CZmz8LS+T4joRDYN0ydY= +goa.design/goa/v3 v3.30.1-0.20260826121623-5f90d9cb72a2/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= diff --git a/cookies/go.mod b/cookies/go.mod index 43c60a7e6..9beeabdb2 100644 --- a/cookies/go.mod +++ b/cookies/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( github.com/rs/xid v1.6.0 - goa.design/goa/v3 v3.30.1-0.20260825203937-95933f068ade + goa.design/goa/v3 v3.30.1-0.20260826121623-5f90d9cb72a2 ) require ( diff --git a/cookies/go.sum b/cookies/go.sum index d33e17d7c..b1c4207f9 100644 --- a/cookies/go.sum +++ b/cookies/go.sum @@ -33,8 +33,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260825203937-95933f068ade h1:gTHq43P69svXt3KfmtpA2Tr5+4dCt03xVmSi5g1xqRc= -goa.design/goa/v3 v3.30.1-0.20260825203937-95933f068ade/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826121623-5f90d9cb72a2 h1:qqU42d2tdZX1sNE6utS//I5CZmz8LS+T4joRDYN0ydY= +goa.design/goa/v3 v3.30.1-0.20260826121623-5f90d9cb72a2/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= diff --git a/encodings/cbor/gen/http/concat/client/paths.go b/encodings/cbor/gen/http/concat/client/paths.go index 13dca9e2f..d4cb6fd49 100644 --- a/encodings/cbor/gen/http/concat/client/paths.go +++ b/encodings/cbor/gen/http/concat/client/paths.go @@ -7,9 +7,7 @@ package client -import ( - "fmt" -) +import "fmt" // ConcatConcatPath returns the URL path to the concat service concat HTTP endpoint. func ConcatConcatPath(a string, b string) string { diff --git a/encodings/cbor/gen/http/concat/server/paths.go b/encodings/cbor/gen/http/concat/server/paths.go index c0f6f5357..eb4dae77e 100644 --- a/encodings/cbor/gen/http/concat/server/paths.go +++ b/encodings/cbor/gen/http/concat/server/paths.go @@ -7,9 +7,7 @@ package server -import ( - "fmt" -) +import "fmt" // ConcatConcatPath returns the URL path to the concat service concat HTTP endpoint. func ConcatConcatPath(a string, b string) string { diff --git a/encodings/cbor/gen/http/concat/server/types.go b/encodings/cbor/gen/http/concat/server/types.go index 24e49a878..3f6c7d4e1 100644 --- a/encodings/cbor/gen/http/concat/server/types.go +++ b/encodings/cbor/gen/http/concat/server/types.go @@ -7,9 +7,7 @@ package server -import ( - concat "goa.design/examples/encodings/cbor/gen/concat" -) +import concat "goa.design/examples/encodings/cbor/gen/concat" // NewConcatPayload builds a concat service concat endpoint payload. func NewConcatPayload(a string, b string) *concat.ConcatPayload { diff --git a/encodings/cbor/go.mod b/encodings/cbor/go.mod index 2bfd16306..c71162289 100644 --- a/encodings/cbor/go.mod +++ b/encodings/cbor/go.mod @@ -5,7 +5,7 @@ go 1.26.0 require ( github.com/fxamacker/cbor/v2 v2.9.2 goa.design/clue v1.2.6 - goa.design/goa/v3 v3.30.1-0.20260825203937-95933f068ade + goa.design/goa/v3 v3.30.1-0.20260826121623-5f90d9cb72a2 ) require ( diff --git a/encodings/cbor/go.sum b/encodings/cbor/go.sum index 804db0c52..b0d25daaa 100644 --- a/encodings/cbor/go.sum +++ b/encodings/cbor/go.sum @@ -59,8 +59,8 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/clue v1.2.6 h1:ensyUkwlvEbNy8FuTGMldKuvaNouh8YoDY9QaE+EtYg= goa.design/clue v1.2.6/go.mod h1:Y4RS5o2k6MZiGk2PT3XbKyntjR2xkr8dYOKQ591dIDM= -goa.design/goa/v3 v3.30.1-0.20260825203937-95933f068ade h1:gTHq43P69svXt3KfmtpA2Tr5+4dCt03xVmSi5g1xqRc= -goa.design/goa/v3 v3.30.1-0.20260825203937-95933f068ade/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826121623-5f90d9cb72a2 h1:qqU42d2tdZX1sNE6utS//I5CZmz8LS+T4joRDYN0ydY= +goa.design/goa/v3 v3.30.1-0.20260826121623-5f90d9cb72a2/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/encodings/text/gen/http/text/client/paths.go b/encodings/text/gen/http/text/client/paths.go index 0e207cfce..c6bd8491d 100644 --- a/encodings/text/gen/http/text/client/paths.go +++ b/encodings/text/gen/http/text/client/paths.go @@ -7,9 +7,7 @@ package client -import ( - "fmt" -) +import "fmt" // ConcatstringsTextPath returns the URL path to the text service concatstrings HTTP endpoint. func ConcatstringsTextPath(a string, b string) string { diff --git a/encodings/text/gen/http/text/client/types.go b/encodings/text/gen/http/text/client/types.go index 8b6b50ce6..1a16a94fc 100644 --- a/encodings/text/gen/http/text/client/types.go +++ b/encodings/text/gen/http/text/client/types.go @@ -7,9 +7,7 @@ package client -import ( - text "goa.design/examples/encodings/text/gen/text" -) +import text "goa.design/examples/encodings/text/gen/text" // NewConcatstringfieldMyConcatenationOK builds a "text" service // "concatstringfield" endpoint result from a HTTP "OK" response. diff --git a/encodings/text/gen/http/text/server/paths.go b/encodings/text/gen/http/text/server/paths.go index 5df2c69e4..380476fa8 100644 --- a/encodings/text/gen/http/text/server/paths.go +++ b/encodings/text/gen/http/text/server/paths.go @@ -7,9 +7,7 @@ package server -import ( - "fmt" -) +import "fmt" // ConcatstringsTextPath returns the URL path to the text service concatstrings HTTP endpoint. func ConcatstringsTextPath(a string, b string) string { diff --git a/encodings/text/gen/http/text/server/types.go b/encodings/text/gen/http/text/server/types.go index 7563a17e5..e9f34ce83 100644 --- a/encodings/text/gen/http/text/server/types.go +++ b/encodings/text/gen/http/text/server/types.go @@ -7,9 +7,7 @@ package server -import ( - text "goa.design/examples/encodings/text/gen/text" -) +import text "goa.design/examples/encodings/text/gen/text" // NewConcatstringsPayload builds a text service concatstrings endpoint payload. func NewConcatstringsPayload(a string, b string) *text.ConcatstringsPayload { diff --git a/encodings/text/go.mod b/encodings/text/go.mod index dfae16ea7..ff05563a1 100644 --- a/encodings/text/go.mod +++ b/encodings/text/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( goa.design/clue v1.2.6 - goa.design/goa/v3 v3.30.1-0.20260825203937-95933f068ade + goa.design/goa/v3 v3.30.1-0.20260826121623-5f90d9cb72a2 ) require ( diff --git a/encodings/text/go.sum b/encodings/text/go.sum index 9a0ac5cf1..5080b87d9 100644 --- a/encodings/text/go.sum +++ b/encodings/text/go.sum @@ -55,8 +55,8 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/clue v1.2.6 h1:ensyUkwlvEbNy8FuTGMldKuvaNouh8YoDY9QaE+EtYg= goa.design/clue v1.2.6/go.mod h1:Y4RS5o2k6MZiGk2PT3XbKyntjR2xkr8dYOKQ591dIDM= -goa.design/goa/v3 v3.30.1-0.20260825203937-95933f068ade h1:gTHq43P69svXt3KfmtpA2Tr5+4dCt03xVmSi5g1xqRc= -goa.design/goa/v3 v3.30.1-0.20260825203937-95933f068ade/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826121623-5f90d9cb72a2 h1:qqU42d2tdZX1sNE6utS//I5CZmz8LS+T4joRDYN0ydY= +goa.design/goa/v3 v3.30.1-0.20260826121623-5f90d9cb72a2/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/error/go.mod b/error/go.mod index ecf93c303..0bd342294 100644 --- a/error/go.mod +++ b/error/go.mod @@ -3,7 +3,7 @@ module goa.design/examples/error go 1.26.0 require ( - goa.design/goa/v3 v3.30.1-0.20260825203937-95933f068ade + goa.design/goa/v3 v3.30.1-0.20260826121623-5f90d9cb72a2 google.golang.org/genproto v0.0.0-20260810153831-ec0a7760b754 google.golang.org/grpc v1.83.1 google.golang.org/protobuf v1.36.12 diff --git a/error/go.sum b/error/go.sum index 5b8af05d6..573c09389 100644 --- a/error/go.sum +++ b/error/go.sum @@ -49,8 +49,8 @@ go.opentelemetry.io/otel/trace v1.44.0 h1:jxF5CsGYCe74MCRx2X4g7WsY/VBKRqqpNvXlX/ go.opentelemetry.io/otel/trace v1.44.0/go.mod h1:oLl1jrMQAVo6v3GAggN+1VH9VIz9iUSvW53sW1Q8PIE= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260825203937-95933f068ade h1:gTHq43P69svXt3KfmtpA2Tr5+4dCt03xVmSi5g1xqRc= -goa.design/goa/v3 v3.30.1-0.20260825203937-95933f068ade/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826121623-5f90d9cb72a2 h1:qqU42d2tdZX1sNE6utS//I5CZmz8LS+T4joRDYN0ydY= +goa.design/goa/v3 v3.30.1-0.20260826121623-5f90d9cb72a2/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/files/go.mod b/files/go.mod index 46879cc1a..6675b3f45 100644 --- a/files/go.mod +++ b/files/go.mod @@ -2,7 +2,7 @@ module goa.design/examples/files go 1.26.0 -require goa.design/goa/v3 v3.30.1-0.20260825203937-95933f068ade +require goa.design/goa/v3 v3.30.1-0.20260826121623-5f90d9cb72a2 require ( github.com/dimfeld/httppath v0.0.0-20170720192232-ee938bf73598 // indirect diff --git a/files/go.sum b/files/go.sum index c2b5c8941..7d270bdbf 100644 --- a/files/go.sum +++ b/files/go.sum @@ -31,8 +31,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260825203937-95933f068ade h1:gTHq43P69svXt3KfmtpA2Tr5+4dCt03xVmSi5g1xqRc= -goa.design/goa/v3 v3.30.1-0.20260825203937-95933f068ade/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826121623-5f90d9cb72a2 h1:qqU42d2tdZX1sNE6utS//I5CZmz8LS+T4joRDYN0ydY= +goa.design/goa/v3 v3.30.1-0.20260826121623-5f90d9cb72a2/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= diff --git a/httpstatus/gen/http/hello/client/paths.go b/httpstatus/gen/http/hello/client/paths.go index d88adc163..be74c5b3a 100644 --- a/httpstatus/gen/http/hello/client/paths.go +++ b/httpstatus/gen/http/hello/client/paths.go @@ -7,9 +7,7 @@ package client -import ( - "fmt" -) +import "fmt" // HelloHelloPath returns the URL path to the hello service hello HTTP endpoint. func HelloHelloPath(greeting string) string { diff --git a/httpstatus/gen/http/hello/server/paths.go b/httpstatus/gen/http/hello/server/paths.go index a27ce9c64..64c8d060a 100644 --- a/httpstatus/gen/http/hello/server/paths.go +++ b/httpstatus/gen/http/hello/server/paths.go @@ -7,9 +7,7 @@ package server -import ( - "fmt" -) +import "fmt" // HelloHelloPath returns the URL path to the hello service hello HTTP endpoint. func HelloHelloPath(greeting string) string { diff --git a/httpstatus/go.mod b/httpstatus/go.mod index 3b91c1418..6d6c72664 100644 --- a/httpstatus/go.mod +++ b/httpstatus/go.mod @@ -2,7 +2,7 @@ module goa.design/examples/httpstatus go 1.26.0 -require goa.design/goa/v3 v3.30.1-0.20260825203937-95933f068ade +require goa.design/goa/v3 v3.30.1-0.20260826121623-5f90d9cb72a2 require ( github.com/dimfeld/httppath v0.0.0-20170720192232-ee938bf73598 // indirect diff --git a/httpstatus/go.sum b/httpstatus/go.sum index c2b5c8941..7d270bdbf 100644 --- a/httpstatus/go.sum +++ b/httpstatus/go.sum @@ -31,8 +31,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260825203937-95933f068ade h1:gTHq43P69svXt3KfmtpA2Tr5+4dCt03xVmSi5g1xqRc= -goa.design/goa/v3 v3.30.1-0.20260825203937-95933f068ade/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826121623-5f90d9cb72a2 h1:qqU42d2tdZX1sNE6utS//I5CZmz8LS+T4joRDYN0ydY= +goa.design/goa/v3 v3.30.1-0.20260826121623-5f90d9cb72a2/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= diff --git a/interceptors/gen/http/interceptors/client/paths.go b/interceptors/gen/http/interceptors/client/paths.go index df459b491..05411616c 100644 --- a/interceptors/gen/http/interceptors/client/paths.go +++ b/interceptors/gen/http/interceptors/client/paths.go @@ -7,9 +7,7 @@ package client -import ( - "fmt" -) +import "fmt" // GetInterceptorsPath returns the URL path to the interceptors service get HTTP endpoint. func GetInterceptorsPath(tenantID string, recordID string) string { diff --git a/interceptors/gen/http/interceptors/server/paths.go b/interceptors/gen/http/interceptors/server/paths.go index bdeae03d7..b83a04d24 100644 --- a/interceptors/gen/http/interceptors/server/paths.go +++ b/interceptors/gen/http/interceptors/server/paths.go @@ -7,9 +7,7 @@ package server -import ( - "fmt" -) +import "fmt" // GetInterceptorsPath returns the URL path to the interceptors service get HTTP endpoint. func GetInterceptorsPath(tenantID string, recordID string) string { diff --git a/interceptors/go.mod b/interceptors/go.mod index d823c1a35..11c082a66 100644 --- a/interceptors/go.mod +++ b/interceptors/go.mod @@ -6,7 +6,7 @@ require ( github.com/google/uuid v1.6.0 github.com/gorilla/websocket v1.5.3 goa.design/clue v1.2.6 - goa.design/goa/v3 v3.30.1-0.20260825203937-95933f068ade + goa.design/goa/v3 v3.30.1-0.20260826121623-5f90d9cb72a2 google.golang.org/grpc v1.83.1 google.golang.org/protobuf v1.36.12 ) diff --git a/interceptors/go.sum b/interceptors/go.sum index 9a0ac5cf1..5080b87d9 100644 --- a/interceptors/go.sum +++ b/interceptors/go.sum @@ -55,8 +55,8 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/clue v1.2.6 h1:ensyUkwlvEbNy8FuTGMldKuvaNouh8YoDY9QaE+EtYg= goa.design/clue v1.2.6/go.mod h1:Y4RS5o2k6MZiGk2PT3XbKyntjR2xkr8dYOKQ591dIDM= -goa.design/goa/v3 v3.30.1-0.20260825203937-95933f068ade h1:gTHq43P69svXt3KfmtpA2Tr5+4dCt03xVmSi5g1xqRc= -goa.design/goa/v3 v3.30.1-0.20260825203937-95933f068ade/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826121623-5f90d9cb72a2 h1:qqU42d2tdZX1sNE6utS//I5CZmz8LS+T4joRDYN0ydY= +goa.design/goa/v3 v3.30.1-0.20260826121623-5f90d9cb72a2/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/multipart/go.mod b/multipart/go.mod index ff215d728..387d3c604 100644 --- a/multipart/go.mod +++ b/multipart/go.mod @@ -2,7 +2,7 @@ module goa.design/examples/multipart go 1.26.0 -require goa.design/goa/v3 v3.30.1-0.20260825203937-95933f068ade +require goa.design/goa/v3 v3.30.1-0.20260826121623-5f90d9cb72a2 require ( github.com/dimfeld/httppath v0.0.0-20170720192232-ee938bf73598 // indirect diff --git a/multipart/go.sum b/multipart/go.sum index c2b5c8941..7d270bdbf 100644 --- a/multipart/go.sum +++ b/multipart/go.sum @@ -31,8 +31,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260825203937-95933f068ade h1:gTHq43P69svXt3KfmtpA2Tr5+4dCt03xVmSi5g1xqRc= -goa.design/goa/v3 v3.30.1-0.20260825203937-95933f068ade/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826121623-5f90d9cb72a2 h1:qqU42d2tdZX1sNE6utS//I5CZmz8LS+T4joRDYN0ydY= +goa.design/goa/v3 v3.30.1-0.20260826121623-5f90d9cb72a2/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= diff --git a/retry/gen/http/retry/client/paths.go b/retry/gen/http/retry/client/paths.go index a23caafbe..6f19de7e0 100644 --- a/retry/gen/http/retry/client/paths.go +++ b/retry/gen/http/retry/client/paths.go @@ -7,9 +7,7 @@ package client -import ( - "fmt" -) +import "fmt" // GetMessageRetryPath returns the URL path to the retry service get_message HTTP endpoint. func GetMessageRetryPath(id string) string { diff --git a/retry/gen/http/retry/server/paths.go b/retry/gen/http/retry/server/paths.go index 8eb142433..ed3eb29b5 100644 --- a/retry/gen/http/retry/server/paths.go +++ b/retry/gen/http/retry/server/paths.go @@ -7,9 +7,7 @@ package server -import ( - "fmt" -) +import "fmt" // GetMessageRetryPath returns the URL path to the retry service get_message HTTP endpoint. func GetMessageRetryPath(id string) string { diff --git a/retry/go.mod b/retry/go.mod index 832164d95..5891ced91 100644 --- a/retry/go.mod +++ b/retry/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( goa.design/clue v1.2.6 - goa.design/goa/v3 v3.30.1-0.20260825203937-95933f068ade + goa.design/goa/v3 v3.30.1-0.20260826121623-5f90d9cb72a2 google.golang.org/grpc v1.83.1 google.golang.org/protobuf v1.36.12 ) diff --git a/retry/go.sum b/retry/go.sum index 97e0c54f3..d878888e9 100644 --- a/retry/go.sum +++ b/retry/go.sum @@ -52,8 +52,8 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/clue v1.2.6 h1:ensyUkwlvEbNy8FuTGMldKuvaNouh8YoDY9QaE+EtYg= goa.design/clue v1.2.6/go.mod h1:Y4RS5o2k6MZiGk2PT3XbKyntjR2xkr8dYOKQ591dIDM= -goa.design/goa/v3 v3.30.1-0.20260825203937-95933f068ade h1:gTHq43P69svXt3KfmtpA2Tr5+4dCt03xVmSi5g1xqRc= -goa.design/goa/v3 v3.30.1-0.20260825203937-95933f068ade/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826121623-5f90d9cb72a2 h1:qqU42d2tdZX1sNE6utS//I5CZmz8LS+T4joRDYN0ydY= +goa.design/goa/v3 v3.30.1-0.20260826121623-5f90d9cb72a2/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/security/hierarchy/gen/http/api_key_service/server/types.go b/security/hierarchy/gen/http/api_key_service/server/types.go index 65f640395..e1ca11738 100644 --- a/security/hierarchy/gen/http/api_key_service/server/types.go +++ b/security/hierarchy/gen/http/api_key_service/server/types.go @@ -7,9 +7,7 @@ package server -import ( - apikeyservice "goa.design/examples/security/hierarchy/gen/api_key_service" -) +import apikeyservice "goa.design/examples/security/hierarchy/gen/api_key_service" // NewDefaultPayload builds a api_key_service service default endpoint payload. func NewDefaultPayload(key string) *apikeyservice.DefaultPayload { diff --git a/security/hierarchy/gen/http/default_service/server/types.go b/security/hierarchy/gen/http/default_service/server/types.go index 6ad14ad34..890be43eb 100644 --- a/security/hierarchy/gen/http/default_service/server/types.go +++ b/security/hierarchy/gen/http/default_service/server/types.go @@ -7,9 +7,7 @@ package server -import ( - defaultservice "goa.design/examples/security/hierarchy/gen/default_service" -) +import defaultservice "goa.design/examples/security/hierarchy/gen/default_service" // NewDefaultPayload builds a default_service service default endpoint payload. func NewDefaultPayload() *defaultservice.DefaultPayload { diff --git a/security/hierarchy/go.mod b/security/hierarchy/go.mod index 8a2c46eb6..2ce8ad9ac 100644 --- a/security/hierarchy/go.mod +++ b/security/hierarchy/go.mod @@ -2,7 +2,7 @@ module goa.design/examples/security/hierarchy go 1.26.0 -require goa.design/goa/v3 v3.30.1-0.20260825203937-95933f068ade +require goa.design/goa/v3 v3.30.1-0.20260826121623-5f90d9cb72a2 require ( github.com/dimfeld/httppath v0.0.0-20170720192232-ee938bf73598 // indirect diff --git a/security/hierarchy/go.sum b/security/hierarchy/go.sum index c2b5c8941..7d270bdbf 100644 --- a/security/hierarchy/go.sum +++ b/security/hierarchy/go.sum @@ -31,8 +31,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260825203937-95933f068ade h1:gTHq43P69svXt3KfmtpA2Tr5+4dCt03xVmSi5g1xqRc= -goa.design/goa/v3 v3.30.1-0.20260825203937-95933f068ade/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826121623-5f90d9cb72a2 h1:qqU42d2tdZX1sNE6utS//I5CZmz8LS+T4joRDYN0ydY= +goa.design/goa/v3 v3.30.1-0.20260826121623-5f90d9cb72a2/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= diff --git a/security/multiauth/gen/http/secured_service/server/types.go b/security/multiauth/gen/http/secured_service/server/types.go index eef60f1a3..ff3b4322f 100644 --- a/security/multiauth/gen/http/secured_service/server/types.go +++ b/security/multiauth/gen/http/secured_service/server/types.go @@ -7,9 +7,7 @@ package server -import ( - securedservice "goa.design/examples/security/multiauth/gen/secured_service" -) +import securedservice "goa.design/examples/security/multiauth/gen/secured_service" // SigninResponseBody is the type of the "secured_service" service "signin" // endpoint HTTP response body. diff --git a/security/multiauth/go.mod b/security/multiauth/go.mod index 7f9cc65e8..7b18dc508 100644 --- a/security/multiauth/go.mod +++ b/security/multiauth/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( github.com/golang-jwt/jwt/v4 v4.5.2 - goa.design/goa/v3 v3.30.1-0.20260825203937-95933f068ade + goa.design/goa/v3 v3.30.1-0.20260826121623-5f90d9cb72a2 google.golang.org/grpc v1.83.1 google.golang.org/protobuf v1.36.12 ) diff --git a/security/multiauth/go.sum b/security/multiauth/go.sum index 38d654ea1..8397b2bc1 100644 --- a/security/multiauth/go.sum +++ b/security/multiauth/go.sum @@ -51,8 +51,8 @@ go.opentelemetry.io/otel/trace v1.44.0 h1:jxF5CsGYCe74MCRx2X4g7WsY/VBKRqqpNvXlX/ go.opentelemetry.io/otel/trace v1.44.0/go.mod h1:oLl1jrMQAVo6v3GAggN+1VH9VIz9iUSvW53sW1Q8PIE= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260825203937-95933f068ade h1:gTHq43P69svXt3KfmtpA2Tr5+4dCt03xVmSi5g1xqRc= -goa.design/goa/v3 v3.30.1-0.20260825203937-95933f068ade/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826121623-5f90d9cb72a2 h1:qqU42d2tdZX1sNE6utS//I5CZmz8LS+T4joRDYN0ydY= +goa.design/goa/v3 v3.30.1-0.20260826121623-5f90d9cb72a2/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/sse/gen/http/monitor/server/types.go b/sse/gen/http/monitor/server/types.go index 8c3a56443..37d7a326d 100644 --- a/sse/gen/http/monitor/server/types.go +++ b/sse/gen/http/monitor/server/types.go @@ -7,9 +7,7 @@ package server -import ( - monitor "goa.design/examples/sse/gen/monitor" -) +import monitor "goa.design/examples/sse/gen/monitor" // MonitorResponseBody is the type of the "monitor" service "monitor" endpoint // HTTP response body. diff --git a/sse/go.mod b/sse/go.mod index f53a4d321..153eba5ca 100644 --- a/sse/go.mod +++ b/sse/go.mod @@ -5,7 +5,7 @@ go 1.26.0 require ( github.com/shirou/gopsutil/v3 v3.24.5 goa.design/clue v1.2.6 - goa.design/goa/v3 v3.30.1-0.20260825203937-95933f068ade + goa.design/goa/v3 v3.30.1-0.20260826121623-5f90d9cb72a2 ) require ( diff --git a/sse/go.sum b/sse/go.sum index 16a0d901e..75d3a17ff 100644 --- a/sse/go.sum +++ b/sse/go.sum @@ -74,8 +74,8 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/clue v1.2.6 h1:ensyUkwlvEbNy8FuTGMldKuvaNouh8YoDY9QaE+EtYg= goa.design/clue v1.2.6/go.mod h1:Y4RS5o2k6MZiGk2PT3XbKyntjR2xkr8dYOKQ591dIDM= -goa.design/goa/v3 v3.30.1-0.20260825203937-95933f068ade h1:gTHq43P69svXt3KfmtpA2Tr5+4dCt03xVmSi5g1xqRc= -goa.design/goa/v3 v3.30.1-0.20260825203937-95933f068ade/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826121623-5f90d9cb72a2 h1:qqU42d2tdZX1sNE6utS//I5CZmz8LS+T4joRDYN0ydY= +goa.design/goa/v3 v3.30.1-0.20260826121623-5f90d9cb72a2/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/streaming/go.mod b/streaming/go.mod index c5f0837d8..2f2d44a5d 100644 --- a/streaming/go.mod +++ b/streaming/go.mod @@ -5,7 +5,7 @@ go 1.26.0 require ( github.com/golang-jwt/jwt/v4 v4.5.2 github.com/gorilla/websocket v1.5.3 - goa.design/goa/v3 v3.30.1-0.20260825203937-95933f068ade + goa.design/goa/v3 v3.30.1-0.20260826121623-5f90d9cb72a2 google.golang.org/grpc v1.83.1 google.golang.org/protobuf v1.36.12 ) diff --git a/streaming/go.sum b/streaming/go.sum index 38d654ea1..8397b2bc1 100644 --- a/streaming/go.sum +++ b/streaming/go.sum @@ -51,8 +51,8 @@ go.opentelemetry.io/otel/trace v1.44.0 h1:jxF5CsGYCe74MCRx2X4g7WsY/VBKRqqpNvXlX/ go.opentelemetry.io/otel/trace v1.44.0/go.mod h1:oLl1jrMQAVo6v3GAggN+1VH9VIz9iUSvW53sW1Q8PIE= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260825203937-95933f068ade h1:gTHq43P69svXt3KfmtpA2Tr5+4dCt03xVmSi5g1xqRc= -goa.design/goa/v3 v3.30.1-0.20260825203937-95933f068ade/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826121623-5f90d9cb72a2 h1:qqU42d2tdZX1sNE6utS//I5CZmz8LS+T4joRDYN0ydY= +goa.design/goa/v3 v3.30.1-0.20260826121623-5f90d9cb72a2/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/tracing/go.mod b/tracing/go.mod index 6310089f8..7a5e60d7e 100644 --- a/tracing/go.mod +++ b/tracing/go.mod @@ -5,7 +5,7 @@ go 1.26.0 require ( github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 goa.design/examples/basic v0.0.0-20260810182504-f834f43955c5 - goa.design/goa/v3 v3.30.1-0.20260825203937-95933f068ade + goa.design/goa/v3 v3.30.1-0.20260826121623-5f90d9cb72a2 google.golang.org/grpc v1.83.1 ) diff --git a/tracing/go.sum b/tracing/go.sum index 85653aa70..26fcabf97 100644 --- a/tracing/go.sum +++ b/tracing/go.sum @@ -81,8 +81,8 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/examples/basic v0.0.0-20260810182504-f834f43955c5 h1:SRSrUaLTTdA4bUXb8+zA5MDhMEx8YaP+Knd+pddBcrg= goa.design/examples/basic v0.0.0-20260810182504-f834f43955c5/go.mod h1:XRziIzNcLb9fk7ZrfiHx5FIeAj+orJ4fkzLG0nXpiAo= -goa.design/goa/v3 v3.30.1-0.20260825203937-95933f068ade h1:gTHq43P69svXt3KfmtpA2Tr5+4dCt03xVmSi5g1xqRc= -goa.design/goa/v3 v3.30.1-0.20260825203937-95933f068ade/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826121623-5f90d9cb72a2 h1:qqU42d2tdZX1sNE6utS//I5CZmz8LS+T4joRDYN0ydY= +goa.design/goa/v3 v3.30.1-0.20260826121623-5f90d9cb72a2/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= diff --git a/tus/gen/http/tus/client/paths.go b/tus/gen/http/tus/client/paths.go index 0552bfb33..3c1b8df2a 100644 --- a/tus/gen/http/tus/client/paths.go +++ b/tus/gen/http/tus/client/paths.go @@ -7,9 +7,7 @@ package client -import ( - "fmt" -) +import "fmt" // HeadTusPath returns the URL path to the tus service head HTTP endpoint. func HeadTusPath(id string) string { diff --git a/tus/gen/http/tus/server/paths.go b/tus/gen/http/tus/server/paths.go index 2be0151a8..5cc953322 100644 --- a/tus/gen/http/tus/server/paths.go +++ b/tus/gen/http/tus/server/paths.go @@ -7,9 +7,7 @@ package server -import ( - "fmt" -) +import "fmt" // HeadTusPath returns the URL path to the tus service head HTTP endpoint. func HeadTusPath(id string) string { diff --git a/tus/go.mod b/tus/go.mod index d364e1ef0..065cdf0e9 100644 --- a/tus/go.mod +++ b/tus/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( github.com/rs/xid v1.6.0 - goa.design/goa/v3 v3.30.1-0.20260825203937-95933f068ade + goa.design/goa/v3 v3.30.1-0.20260826121623-5f90d9cb72a2 ) require ( diff --git a/tus/go.sum b/tus/go.sum index d33e17d7c..b1c4207f9 100644 --- a/tus/go.sum +++ b/tus/go.sum @@ -33,8 +33,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260825203937-95933f068ade h1:gTHq43P69svXt3KfmtpA2Tr5+4dCt03xVmSi5g1xqRc= -goa.design/goa/v3 v3.30.1-0.20260825203937-95933f068ade/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826121623-5f90d9cb72a2 h1:qqU42d2tdZX1sNE6utS//I5CZmz8LS+T4joRDYN0ydY= +goa.design/goa/v3 v3.30.1-0.20260826121623-5f90d9cb72a2/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= diff --git a/upload_download/gen/http/updown/client/paths.go b/upload_download/gen/http/updown/client/paths.go index d69ccfef1..e37b0a62a 100644 --- a/upload_download/gen/http/updown/client/paths.go +++ b/upload_download/gen/http/updown/client/paths.go @@ -7,9 +7,7 @@ package client -import ( - "fmt" -) +import "fmt" // UploadUpdownPath returns the URL path to the updown service upload HTTP endpoint. func UploadUpdownPath(dir string) string { diff --git a/upload_download/gen/http/updown/server/paths.go b/upload_download/gen/http/updown/server/paths.go index 8630cc2ff..4a98cc345 100644 --- a/upload_download/gen/http/updown/server/paths.go +++ b/upload_download/gen/http/updown/server/paths.go @@ -7,9 +7,7 @@ package server -import ( - "fmt" -) +import "fmt" // UploadUpdownPath returns the URL path to the updown service upload HTTP endpoint. func UploadUpdownPath(dir string) string { diff --git a/upload_download/go.mod b/upload_download/go.mod index 0485101c4..0a528a839 100644 --- a/upload_download/go.mod +++ b/upload_download/go.mod @@ -2,7 +2,7 @@ module goa.design/examples/upload_download go 1.26.0 -require goa.design/goa/v3 v3.30.1-0.20260825203937-95933f068ade +require goa.design/goa/v3 v3.30.1-0.20260826121623-5f90d9cb72a2 require ( github.com/dimfeld/httppath v0.0.0-20170720192232-ee938bf73598 // indirect diff --git a/upload_download/go.sum b/upload_download/go.sum index c2b5c8941..7d270bdbf 100644 --- a/upload_download/go.sum +++ b/upload_download/go.sum @@ -31,8 +31,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260825203937-95933f068ade h1:gTHq43P69svXt3KfmtpA2Tr5+4dCt03xVmSi5g1xqRc= -goa.design/goa/v3 v3.30.1-0.20260825203937-95933f068ade/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826121623-5f90d9cb72a2 h1:qqU42d2tdZX1sNE6utS//I5CZmz8LS+T4joRDYN0ydY= +goa.design/goa/v3 v3.30.1-0.20260826121623-5f90d9cb72a2/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= From b49bf334564060db17ee8efcf15acefd9ce53c58 Mon Sep 17 00:00:00 2001 From: "Raphael (manual office deploy after cloud-state fix)" Date: Wed, 26 Aug 2026 05:34:08 -0700 Subject: [PATCH 15/28] chore: pin examples to latest Goa generation plan --- basic/go.mod | 2 +- basic/go.sum | 4 ++-- cellar/go.mod | 2 +- cellar/go.sum | 4 ++-- concerts/go.mod | 2 +- concerts/go.sum | 4 ++-- cookies/go.mod | 2 +- cookies/go.sum | 4 ++-- encodings/cbor/go.mod | 2 +- encodings/cbor/go.sum | 4 ++-- encodings/text/go.mod | 2 +- encodings/text/go.sum | 4 ++-- error/go.mod | 2 +- error/go.sum | 4 ++-- files/go.mod | 2 +- files/go.sum | 4 ++-- httpstatus/go.mod | 2 +- httpstatus/go.sum | 4 ++-- interceptors/go.mod | 2 +- interceptors/go.sum | 4 ++-- multipart/go.mod | 2 +- multipart/go.sum | 4 ++-- retry/go.mod | 2 +- retry/go.sum | 4 ++-- security/hierarchy/go.mod | 2 +- security/hierarchy/go.sum | 4 ++-- security/multiauth/go.mod | 2 +- security/multiauth/go.sum | 4 ++-- sse/go.mod | 2 +- sse/go.sum | 4 ++-- streaming/go.mod | 2 +- streaming/go.sum | 4 ++-- tracing/go.mod | 2 +- tracing/go.sum | 4 ++-- tus/go.mod | 2 +- tus/go.sum | 4 ++-- upload_download/go.mod | 2 +- upload_download/go.sum | 4 ++-- 38 files changed, 57 insertions(+), 57 deletions(-) diff --git a/basic/go.mod b/basic/go.mod index b3ce79420..499faf25f 100644 --- a/basic/go.mod +++ b/basic/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( goa.design/clue v1.2.6 - goa.design/goa/v3 v3.30.1-0.20260826121623-5f90d9cb72a2 + goa.design/goa/v3 v3.30.1-0.20260826122756-811e48b6ca13 google.golang.org/grpc v1.83.1 google.golang.org/protobuf v1.36.12 ) diff --git a/basic/go.sum b/basic/go.sum index 5080b87d9..d11a43343 100644 --- a/basic/go.sum +++ b/basic/go.sum @@ -55,8 +55,8 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/clue v1.2.6 h1:ensyUkwlvEbNy8FuTGMldKuvaNouh8YoDY9QaE+EtYg= goa.design/clue v1.2.6/go.mod h1:Y4RS5o2k6MZiGk2PT3XbKyntjR2xkr8dYOKQ591dIDM= -goa.design/goa/v3 v3.30.1-0.20260826121623-5f90d9cb72a2 h1:qqU42d2tdZX1sNE6utS//I5CZmz8LS+T4joRDYN0ydY= -goa.design/goa/v3 v3.30.1-0.20260826121623-5f90d9cb72a2/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826122756-811e48b6ca13 h1:BrONgYjW/mvH/5lAShNY5rbQiLgOmxup9bQe4xSAD8U= +goa.design/goa/v3 v3.30.1-0.20260826122756-811e48b6ca13/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/cellar/go.mod b/cellar/go.mod index 7d2785202..437705769 100644 --- a/cellar/go.mod +++ b/cellar/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( github.com/boltdb/bolt v1.3.1 - goa.design/goa/v3 v3.30.1-0.20260826121623-5f90d9cb72a2 + goa.design/goa/v3 v3.30.1-0.20260826122756-811e48b6ca13 google.golang.org/grpc v1.83.1 google.golang.org/protobuf v1.36.12 ) diff --git a/cellar/go.sum b/cellar/go.sum index ac907c17c..4f01f653b 100644 --- a/cellar/go.sum +++ b/cellar/go.sum @@ -51,8 +51,8 @@ go.opentelemetry.io/otel/trace v1.44.0 h1:jxF5CsGYCe74MCRx2X4g7WsY/VBKRqqpNvXlX/ go.opentelemetry.io/otel/trace v1.44.0/go.mod h1:oLl1jrMQAVo6v3GAggN+1VH9VIz9iUSvW53sW1Q8PIE= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260826121623-5f90d9cb72a2 h1:qqU42d2tdZX1sNE6utS//I5CZmz8LS+T4joRDYN0ydY= -goa.design/goa/v3 v3.30.1-0.20260826121623-5f90d9cb72a2/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826122756-811e48b6ca13 h1:BrONgYjW/mvH/5lAShNY5rbQiLgOmxup9bQe4xSAD8U= +goa.design/goa/v3 v3.30.1-0.20260826122756-811e48b6ca13/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/concerts/go.mod b/concerts/go.mod index 6f8c054b9..f36c4109a 100644 --- a/concerts/go.mod +++ b/concerts/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( github.com/google/uuid v1.6.0 - goa.design/goa/v3 v3.30.1-0.20260826121623-5f90d9cb72a2 + goa.design/goa/v3 v3.30.1-0.20260826122756-811e48b6ca13 ) require ( diff --git a/concerts/go.sum b/concerts/go.sum index 7d270bdbf..101c46e0a 100644 --- a/concerts/go.sum +++ b/concerts/go.sum @@ -31,8 +31,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260826121623-5f90d9cb72a2 h1:qqU42d2tdZX1sNE6utS//I5CZmz8LS+T4joRDYN0ydY= -goa.design/goa/v3 v3.30.1-0.20260826121623-5f90d9cb72a2/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826122756-811e48b6ca13 h1:BrONgYjW/mvH/5lAShNY5rbQiLgOmxup9bQe4xSAD8U= +goa.design/goa/v3 v3.30.1-0.20260826122756-811e48b6ca13/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= diff --git a/cookies/go.mod b/cookies/go.mod index 9beeabdb2..794fd1e9f 100644 --- a/cookies/go.mod +++ b/cookies/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( github.com/rs/xid v1.6.0 - goa.design/goa/v3 v3.30.1-0.20260826121623-5f90d9cb72a2 + goa.design/goa/v3 v3.30.1-0.20260826122756-811e48b6ca13 ) require ( diff --git a/cookies/go.sum b/cookies/go.sum index b1c4207f9..58f865b9b 100644 --- a/cookies/go.sum +++ b/cookies/go.sum @@ -33,8 +33,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260826121623-5f90d9cb72a2 h1:qqU42d2tdZX1sNE6utS//I5CZmz8LS+T4joRDYN0ydY= -goa.design/goa/v3 v3.30.1-0.20260826121623-5f90d9cb72a2/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826122756-811e48b6ca13 h1:BrONgYjW/mvH/5lAShNY5rbQiLgOmxup9bQe4xSAD8U= +goa.design/goa/v3 v3.30.1-0.20260826122756-811e48b6ca13/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= diff --git a/encodings/cbor/go.mod b/encodings/cbor/go.mod index c71162289..ac08dae12 100644 --- a/encodings/cbor/go.mod +++ b/encodings/cbor/go.mod @@ -5,7 +5,7 @@ go 1.26.0 require ( github.com/fxamacker/cbor/v2 v2.9.2 goa.design/clue v1.2.6 - goa.design/goa/v3 v3.30.1-0.20260826121623-5f90d9cb72a2 + goa.design/goa/v3 v3.30.1-0.20260826122756-811e48b6ca13 ) require ( diff --git a/encodings/cbor/go.sum b/encodings/cbor/go.sum index b0d25daaa..d75172f2d 100644 --- a/encodings/cbor/go.sum +++ b/encodings/cbor/go.sum @@ -59,8 +59,8 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/clue v1.2.6 h1:ensyUkwlvEbNy8FuTGMldKuvaNouh8YoDY9QaE+EtYg= goa.design/clue v1.2.6/go.mod h1:Y4RS5o2k6MZiGk2PT3XbKyntjR2xkr8dYOKQ591dIDM= -goa.design/goa/v3 v3.30.1-0.20260826121623-5f90d9cb72a2 h1:qqU42d2tdZX1sNE6utS//I5CZmz8LS+T4joRDYN0ydY= -goa.design/goa/v3 v3.30.1-0.20260826121623-5f90d9cb72a2/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826122756-811e48b6ca13 h1:BrONgYjW/mvH/5lAShNY5rbQiLgOmxup9bQe4xSAD8U= +goa.design/goa/v3 v3.30.1-0.20260826122756-811e48b6ca13/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/encodings/text/go.mod b/encodings/text/go.mod index ff05563a1..3a276d4a6 100644 --- a/encodings/text/go.mod +++ b/encodings/text/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( goa.design/clue v1.2.6 - goa.design/goa/v3 v3.30.1-0.20260826121623-5f90d9cb72a2 + goa.design/goa/v3 v3.30.1-0.20260826122756-811e48b6ca13 ) require ( diff --git a/encodings/text/go.sum b/encodings/text/go.sum index 5080b87d9..d11a43343 100644 --- a/encodings/text/go.sum +++ b/encodings/text/go.sum @@ -55,8 +55,8 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/clue v1.2.6 h1:ensyUkwlvEbNy8FuTGMldKuvaNouh8YoDY9QaE+EtYg= goa.design/clue v1.2.6/go.mod h1:Y4RS5o2k6MZiGk2PT3XbKyntjR2xkr8dYOKQ591dIDM= -goa.design/goa/v3 v3.30.1-0.20260826121623-5f90d9cb72a2 h1:qqU42d2tdZX1sNE6utS//I5CZmz8LS+T4joRDYN0ydY= -goa.design/goa/v3 v3.30.1-0.20260826121623-5f90d9cb72a2/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826122756-811e48b6ca13 h1:BrONgYjW/mvH/5lAShNY5rbQiLgOmxup9bQe4xSAD8U= +goa.design/goa/v3 v3.30.1-0.20260826122756-811e48b6ca13/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/error/go.mod b/error/go.mod index 0bd342294..109e21385 100644 --- a/error/go.mod +++ b/error/go.mod @@ -3,7 +3,7 @@ module goa.design/examples/error go 1.26.0 require ( - goa.design/goa/v3 v3.30.1-0.20260826121623-5f90d9cb72a2 + goa.design/goa/v3 v3.30.1-0.20260826122756-811e48b6ca13 google.golang.org/genproto v0.0.0-20260810153831-ec0a7760b754 google.golang.org/grpc v1.83.1 google.golang.org/protobuf v1.36.12 diff --git a/error/go.sum b/error/go.sum index 573c09389..b0323aab1 100644 --- a/error/go.sum +++ b/error/go.sum @@ -49,8 +49,8 @@ go.opentelemetry.io/otel/trace v1.44.0 h1:jxF5CsGYCe74MCRx2X4g7WsY/VBKRqqpNvXlX/ go.opentelemetry.io/otel/trace v1.44.0/go.mod h1:oLl1jrMQAVo6v3GAggN+1VH9VIz9iUSvW53sW1Q8PIE= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260826121623-5f90d9cb72a2 h1:qqU42d2tdZX1sNE6utS//I5CZmz8LS+T4joRDYN0ydY= -goa.design/goa/v3 v3.30.1-0.20260826121623-5f90d9cb72a2/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826122756-811e48b6ca13 h1:BrONgYjW/mvH/5lAShNY5rbQiLgOmxup9bQe4xSAD8U= +goa.design/goa/v3 v3.30.1-0.20260826122756-811e48b6ca13/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/files/go.mod b/files/go.mod index 6675b3f45..335636785 100644 --- a/files/go.mod +++ b/files/go.mod @@ -2,7 +2,7 @@ module goa.design/examples/files go 1.26.0 -require goa.design/goa/v3 v3.30.1-0.20260826121623-5f90d9cb72a2 +require goa.design/goa/v3 v3.30.1-0.20260826122756-811e48b6ca13 require ( github.com/dimfeld/httppath v0.0.0-20170720192232-ee938bf73598 // indirect diff --git a/files/go.sum b/files/go.sum index 7d270bdbf..101c46e0a 100644 --- a/files/go.sum +++ b/files/go.sum @@ -31,8 +31,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260826121623-5f90d9cb72a2 h1:qqU42d2tdZX1sNE6utS//I5CZmz8LS+T4joRDYN0ydY= -goa.design/goa/v3 v3.30.1-0.20260826121623-5f90d9cb72a2/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826122756-811e48b6ca13 h1:BrONgYjW/mvH/5lAShNY5rbQiLgOmxup9bQe4xSAD8U= +goa.design/goa/v3 v3.30.1-0.20260826122756-811e48b6ca13/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= diff --git a/httpstatus/go.mod b/httpstatus/go.mod index 6d6c72664..3551a4e50 100644 --- a/httpstatus/go.mod +++ b/httpstatus/go.mod @@ -2,7 +2,7 @@ module goa.design/examples/httpstatus go 1.26.0 -require goa.design/goa/v3 v3.30.1-0.20260826121623-5f90d9cb72a2 +require goa.design/goa/v3 v3.30.1-0.20260826122756-811e48b6ca13 require ( github.com/dimfeld/httppath v0.0.0-20170720192232-ee938bf73598 // indirect diff --git a/httpstatus/go.sum b/httpstatus/go.sum index 7d270bdbf..101c46e0a 100644 --- a/httpstatus/go.sum +++ b/httpstatus/go.sum @@ -31,8 +31,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260826121623-5f90d9cb72a2 h1:qqU42d2tdZX1sNE6utS//I5CZmz8LS+T4joRDYN0ydY= -goa.design/goa/v3 v3.30.1-0.20260826121623-5f90d9cb72a2/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826122756-811e48b6ca13 h1:BrONgYjW/mvH/5lAShNY5rbQiLgOmxup9bQe4xSAD8U= +goa.design/goa/v3 v3.30.1-0.20260826122756-811e48b6ca13/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= diff --git a/interceptors/go.mod b/interceptors/go.mod index 11c082a66..66c6c260b 100644 --- a/interceptors/go.mod +++ b/interceptors/go.mod @@ -6,7 +6,7 @@ require ( github.com/google/uuid v1.6.0 github.com/gorilla/websocket v1.5.3 goa.design/clue v1.2.6 - goa.design/goa/v3 v3.30.1-0.20260826121623-5f90d9cb72a2 + goa.design/goa/v3 v3.30.1-0.20260826122756-811e48b6ca13 google.golang.org/grpc v1.83.1 google.golang.org/protobuf v1.36.12 ) diff --git a/interceptors/go.sum b/interceptors/go.sum index 5080b87d9..d11a43343 100644 --- a/interceptors/go.sum +++ b/interceptors/go.sum @@ -55,8 +55,8 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/clue v1.2.6 h1:ensyUkwlvEbNy8FuTGMldKuvaNouh8YoDY9QaE+EtYg= goa.design/clue v1.2.6/go.mod h1:Y4RS5o2k6MZiGk2PT3XbKyntjR2xkr8dYOKQ591dIDM= -goa.design/goa/v3 v3.30.1-0.20260826121623-5f90d9cb72a2 h1:qqU42d2tdZX1sNE6utS//I5CZmz8LS+T4joRDYN0ydY= -goa.design/goa/v3 v3.30.1-0.20260826121623-5f90d9cb72a2/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826122756-811e48b6ca13 h1:BrONgYjW/mvH/5lAShNY5rbQiLgOmxup9bQe4xSAD8U= +goa.design/goa/v3 v3.30.1-0.20260826122756-811e48b6ca13/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/multipart/go.mod b/multipart/go.mod index 387d3c604..28f6c4a67 100644 --- a/multipart/go.mod +++ b/multipart/go.mod @@ -2,7 +2,7 @@ module goa.design/examples/multipart go 1.26.0 -require goa.design/goa/v3 v3.30.1-0.20260826121623-5f90d9cb72a2 +require goa.design/goa/v3 v3.30.1-0.20260826122756-811e48b6ca13 require ( github.com/dimfeld/httppath v0.0.0-20170720192232-ee938bf73598 // indirect diff --git a/multipart/go.sum b/multipart/go.sum index 7d270bdbf..101c46e0a 100644 --- a/multipart/go.sum +++ b/multipart/go.sum @@ -31,8 +31,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260826121623-5f90d9cb72a2 h1:qqU42d2tdZX1sNE6utS//I5CZmz8LS+T4joRDYN0ydY= -goa.design/goa/v3 v3.30.1-0.20260826121623-5f90d9cb72a2/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826122756-811e48b6ca13 h1:BrONgYjW/mvH/5lAShNY5rbQiLgOmxup9bQe4xSAD8U= +goa.design/goa/v3 v3.30.1-0.20260826122756-811e48b6ca13/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= diff --git a/retry/go.mod b/retry/go.mod index 5891ced91..b8c830365 100644 --- a/retry/go.mod +++ b/retry/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( goa.design/clue v1.2.6 - goa.design/goa/v3 v3.30.1-0.20260826121623-5f90d9cb72a2 + goa.design/goa/v3 v3.30.1-0.20260826122756-811e48b6ca13 google.golang.org/grpc v1.83.1 google.golang.org/protobuf v1.36.12 ) diff --git a/retry/go.sum b/retry/go.sum index d878888e9..56dde16d1 100644 --- a/retry/go.sum +++ b/retry/go.sum @@ -52,8 +52,8 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/clue v1.2.6 h1:ensyUkwlvEbNy8FuTGMldKuvaNouh8YoDY9QaE+EtYg= goa.design/clue v1.2.6/go.mod h1:Y4RS5o2k6MZiGk2PT3XbKyntjR2xkr8dYOKQ591dIDM= -goa.design/goa/v3 v3.30.1-0.20260826121623-5f90d9cb72a2 h1:qqU42d2tdZX1sNE6utS//I5CZmz8LS+T4joRDYN0ydY= -goa.design/goa/v3 v3.30.1-0.20260826121623-5f90d9cb72a2/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826122756-811e48b6ca13 h1:BrONgYjW/mvH/5lAShNY5rbQiLgOmxup9bQe4xSAD8U= +goa.design/goa/v3 v3.30.1-0.20260826122756-811e48b6ca13/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/security/hierarchy/go.mod b/security/hierarchy/go.mod index 2ce8ad9ac..591b8ff10 100644 --- a/security/hierarchy/go.mod +++ b/security/hierarchy/go.mod @@ -2,7 +2,7 @@ module goa.design/examples/security/hierarchy go 1.26.0 -require goa.design/goa/v3 v3.30.1-0.20260826121623-5f90d9cb72a2 +require goa.design/goa/v3 v3.30.1-0.20260826122756-811e48b6ca13 require ( github.com/dimfeld/httppath v0.0.0-20170720192232-ee938bf73598 // indirect diff --git a/security/hierarchy/go.sum b/security/hierarchy/go.sum index 7d270bdbf..101c46e0a 100644 --- a/security/hierarchy/go.sum +++ b/security/hierarchy/go.sum @@ -31,8 +31,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260826121623-5f90d9cb72a2 h1:qqU42d2tdZX1sNE6utS//I5CZmz8LS+T4joRDYN0ydY= -goa.design/goa/v3 v3.30.1-0.20260826121623-5f90d9cb72a2/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826122756-811e48b6ca13 h1:BrONgYjW/mvH/5lAShNY5rbQiLgOmxup9bQe4xSAD8U= +goa.design/goa/v3 v3.30.1-0.20260826122756-811e48b6ca13/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= diff --git a/security/multiauth/go.mod b/security/multiauth/go.mod index 7b18dc508..246acd571 100644 --- a/security/multiauth/go.mod +++ b/security/multiauth/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( github.com/golang-jwt/jwt/v4 v4.5.2 - goa.design/goa/v3 v3.30.1-0.20260826121623-5f90d9cb72a2 + goa.design/goa/v3 v3.30.1-0.20260826122756-811e48b6ca13 google.golang.org/grpc v1.83.1 google.golang.org/protobuf v1.36.12 ) diff --git a/security/multiauth/go.sum b/security/multiauth/go.sum index 8397b2bc1..80c56e528 100644 --- a/security/multiauth/go.sum +++ b/security/multiauth/go.sum @@ -51,8 +51,8 @@ go.opentelemetry.io/otel/trace v1.44.0 h1:jxF5CsGYCe74MCRx2X4g7WsY/VBKRqqpNvXlX/ go.opentelemetry.io/otel/trace v1.44.0/go.mod h1:oLl1jrMQAVo6v3GAggN+1VH9VIz9iUSvW53sW1Q8PIE= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260826121623-5f90d9cb72a2 h1:qqU42d2tdZX1sNE6utS//I5CZmz8LS+T4joRDYN0ydY= -goa.design/goa/v3 v3.30.1-0.20260826121623-5f90d9cb72a2/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826122756-811e48b6ca13 h1:BrONgYjW/mvH/5lAShNY5rbQiLgOmxup9bQe4xSAD8U= +goa.design/goa/v3 v3.30.1-0.20260826122756-811e48b6ca13/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/sse/go.mod b/sse/go.mod index 153eba5ca..abc6f7fe7 100644 --- a/sse/go.mod +++ b/sse/go.mod @@ -5,7 +5,7 @@ go 1.26.0 require ( github.com/shirou/gopsutil/v3 v3.24.5 goa.design/clue v1.2.6 - goa.design/goa/v3 v3.30.1-0.20260826121623-5f90d9cb72a2 + goa.design/goa/v3 v3.30.1-0.20260826122756-811e48b6ca13 ) require ( diff --git a/sse/go.sum b/sse/go.sum index 75d3a17ff..df8e77314 100644 --- a/sse/go.sum +++ b/sse/go.sum @@ -74,8 +74,8 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/clue v1.2.6 h1:ensyUkwlvEbNy8FuTGMldKuvaNouh8YoDY9QaE+EtYg= goa.design/clue v1.2.6/go.mod h1:Y4RS5o2k6MZiGk2PT3XbKyntjR2xkr8dYOKQ591dIDM= -goa.design/goa/v3 v3.30.1-0.20260826121623-5f90d9cb72a2 h1:qqU42d2tdZX1sNE6utS//I5CZmz8LS+T4joRDYN0ydY= -goa.design/goa/v3 v3.30.1-0.20260826121623-5f90d9cb72a2/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826122756-811e48b6ca13 h1:BrONgYjW/mvH/5lAShNY5rbQiLgOmxup9bQe4xSAD8U= +goa.design/goa/v3 v3.30.1-0.20260826122756-811e48b6ca13/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/streaming/go.mod b/streaming/go.mod index 2f2d44a5d..0f901cc03 100644 --- a/streaming/go.mod +++ b/streaming/go.mod @@ -5,7 +5,7 @@ go 1.26.0 require ( github.com/golang-jwt/jwt/v4 v4.5.2 github.com/gorilla/websocket v1.5.3 - goa.design/goa/v3 v3.30.1-0.20260826121623-5f90d9cb72a2 + goa.design/goa/v3 v3.30.1-0.20260826122756-811e48b6ca13 google.golang.org/grpc v1.83.1 google.golang.org/protobuf v1.36.12 ) diff --git a/streaming/go.sum b/streaming/go.sum index 8397b2bc1..80c56e528 100644 --- a/streaming/go.sum +++ b/streaming/go.sum @@ -51,8 +51,8 @@ go.opentelemetry.io/otel/trace v1.44.0 h1:jxF5CsGYCe74MCRx2X4g7WsY/VBKRqqpNvXlX/ go.opentelemetry.io/otel/trace v1.44.0/go.mod h1:oLl1jrMQAVo6v3GAggN+1VH9VIz9iUSvW53sW1Q8PIE= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260826121623-5f90d9cb72a2 h1:qqU42d2tdZX1sNE6utS//I5CZmz8LS+T4joRDYN0ydY= -goa.design/goa/v3 v3.30.1-0.20260826121623-5f90d9cb72a2/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826122756-811e48b6ca13 h1:BrONgYjW/mvH/5lAShNY5rbQiLgOmxup9bQe4xSAD8U= +goa.design/goa/v3 v3.30.1-0.20260826122756-811e48b6ca13/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/tracing/go.mod b/tracing/go.mod index 7a5e60d7e..0b8cbd748 100644 --- a/tracing/go.mod +++ b/tracing/go.mod @@ -5,7 +5,7 @@ go 1.26.0 require ( github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 goa.design/examples/basic v0.0.0-20260810182504-f834f43955c5 - goa.design/goa/v3 v3.30.1-0.20260826121623-5f90d9cb72a2 + goa.design/goa/v3 v3.30.1-0.20260826122756-811e48b6ca13 google.golang.org/grpc v1.83.1 ) diff --git a/tracing/go.sum b/tracing/go.sum index 26fcabf97..2958bcfe6 100644 --- a/tracing/go.sum +++ b/tracing/go.sum @@ -81,8 +81,8 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/examples/basic v0.0.0-20260810182504-f834f43955c5 h1:SRSrUaLTTdA4bUXb8+zA5MDhMEx8YaP+Knd+pddBcrg= goa.design/examples/basic v0.0.0-20260810182504-f834f43955c5/go.mod h1:XRziIzNcLb9fk7ZrfiHx5FIeAj+orJ4fkzLG0nXpiAo= -goa.design/goa/v3 v3.30.1-0.20260826121623-5f90d9cb72a2 h1:qqU42d2tdZX1sNE6utS//I5CZmz8LS+T4joRDYN0ydY= -goa.design/goa/v3 v3.30.1-0.20260826121623-5f90d9cb72a2/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826122756-811e48b6ca13 h1:BrONgYjW/mvH/5lAShNY5rbQiLgOmxup9bQe4xSAD8U= +goa.design/goa/v3 v3.30.1-0.20260826122756-811e48b6ca13/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= diff --git a/tus/go.mod b/tus/go.mod index 065cdf0e9..3e5b95663 100644 --- a/tus/go.mod +++ b/tus/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( github.com/rs/xid v1.6.0 - goa.design/goa/v3 v3.30.1-0.20260826121623-5f90d9cb72a2 + goa.design/goa/v3 v3.30.1-0.20260826122756-811e48b6ca13 ) require ( diff --git a/tus/go.sum b/tus/go.sum index b1c4207f9..58f865b9b 100644 --- a/tus/go.sum +++ b/tus/go.sum @@ -33,8 +33,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260826121623-5f90d9cb72a2 h1:qqU42d2tdZX1sNE6utS//I5CZmz8LS+T4joRDYN0ydY= -goa.design/goa/v3 v3.30.1-0.20260826121623-5f90d9cb72a2/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826122756-811e48b6ca13 h1:BrONgYjW/mvH/5lAShNY5rbQiLgOmxup9bQe4xSAD8U= +goa.design/goa/v3 v3.30.1-0.20260826122756-811e48b6ca13/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= diff --git a/upload_download/go.mod b/upload_download/go.mod index 0a528a839..cd1c3208b 100644 --- a/upload_download/go.mod +++ b/upload_download/go.mod @@ -2,7 +2,7 @@ module goa.design/examples/upload_download go 1.26.0 -require goa.design/goa/v3 v3.30.1-0.20260826121623-5f90d9cb72a2 +require goa.design/goa/v3 v3.30.1-0.20260826122756-811e48b6ca13 require ( github.com/dimfeld/httppath v0.0.0-20170720192232-ee938bf73598 // indirect diff --git a/upload_download/go.sum b/upload_download/go.sum index 7d270bdbf..101c46e0a 100644 --- a/upload_download/go.sum +++ b/upload_download/go.sum @@ -31,8 +31,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260826121623-5f90d9cb72a2 h1:qqU42d2tdZX1sNE6utS//I5CZmz8LS+T4joRDYN0ydY= -goa.design/goa/v3 v3.30.1-0.20260826121623-5f90d9cb72a2/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826122756-811e48b6ca13 h1:BrONgYjW/mvH/5lAShNY5rbQiLgOmxup9bQe4xSAD8U= +goa.design/goa/v3 v3.30.1-0.20260826122756-811e48b6ca13/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= From 8036c36d87ed91878812ced2ca1fe3b44ca5e1cb Mon Sep 17 00:00:00 2001 From: "Raphael (manual office deploy after cloud-state fix)" Date: Wed, 26 Aug 2026 06:47:44 -0700 Subject: [PATCH 16/28] chore: pin examples to final Goa generation plan --- basic/go.mod | 2 +- basic/go.sum | 4 ++-- cellar/go.mod | 2 +- cellar/go.sum | 4 ++-- concerts/go.mod | 2 +- concerts/go.sum | 4 ++-- cookies/go.mod | 2 +- cookies/go.sum | 4 ++-- encodings/cbor/go.mod | 2 +- encodings/cbor/go.sum | 4 ++-- encodings/text/go.mod | 2 +- encodings/text/go.sum | 4 ++-- error/go.mod | 2 +- error/go.sum | 4 ++-- files/go.mod | 2 +- files/go.sum | 4 ++-- httpstatus/go.mod | 2 +- httpstatus/go.sum | 4 ++-- interceptors/go.mod | 2 +- interceptors/go.sum | 4 ++-- multipart/go.mod | 2 +- multipart/go.sum | 4 ++-- retry/go.mod | 2 +- retry/go.sum | 4 ++-- security/hierarchy/go.mod | 2 +- security/hierarchy/go.sum | 4 ++-- security/multiauth/go.mod | 2 +- security/multiauth/go.sum | 4 ++-- sse/go.mod | 2 +- sse/go.sum | 4 ++-- streaming/go.mod | 2 +- streaming/go.sum | 4 ++-- tracing/go.mod | 2 +- tracing/go.sum | 4 ++-- tus/go.mod | 2 +- tus/go.sum | 4 ++-- upload_download/go.mod | 2 +- upload_download/go.sum | 4 ++-- 38 files changed, 57 insertions(+), 57 deletions(-) diff --git a/basic/go.mod b/basic/go.mod index 499faf25f..af0d7de67 100644 --- a/basic/go.mod +++ b/basic/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( goa.design/clue v1.2.6 - goa.design/goa/v3 v3.30.1-0.20260826122756-811e48b6ca13 + goa.design/goa/v3 v3.30.1-0.20260826132953-76b2e84da6dd google.golang.org/grpc v1.83.1 google.golang.org/protobuf v1.36.12 ) diff --git a/basic/go.sum b/basic/go.sum index d11a43343..072cbefb7 100644 --- a/basic/go.sum +++ b/basic/go.sum @@ -55,8 +55,8 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/clue v1.2.6 h1:ensyUkwlvEbNy8FuTGMldKuvaNouh8YoDY9QaE+EtYg= goa.design/clue v1.2.6/go.mod h1:Y4RS5o2k6MZiGk2PT3XbKyntjR2xkr8dYOKQ591dIDM= -goa.design/goa/v3 v3.30.1-0.20260826122756-811e48b6ca13 h1:BrONgYjW/mvH/5lAShNY5rbQiLgOmxup9bQe4xSAD8U= -goa.design/goa/v3 v3.30.1-0.20260826122756-811e48b6ca13/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826132953-76b2e84da6dd h1:lqsEHwRVNZB9E64QeKDODNRzD2YB14O8Q+gMpkO8cyw= +goa.design/goa/v3 v3.30.1-0.20260826132953-76b2e84da6dd/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/cellar/go.mod b/cellar/go.mod index 437705769..25d0126c3 100644 --- a/cellar/go.mod +++ b/cellar/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( github.com/boltdb/bolt v1.3.1 - goa.design/goa/v3 v3.30.1-0.20260826122756-811e48b6ca13 + goa.design/goa/v3 v3.30.1-0.20260826132953-76b2e84da6dd google.golang.org/grpc v1.83.1 google.golang.org/protobuf v1.36.12 ) diff --git a/cellar/go.sum b/cellar/go.sum index 4f01f653b..2ae394f18 100644 --- a/cellar/go.sum +++ b/cellar/go.sum @@ -51,8 +51,8 @@ go.opentelemetry.io/otel/trace v1.44.0 h1:jxF5CsGYCe74MCRx2X4g7WsY/VBKRqqpNvXlX/ go.opentelemetry.io/otel/trace v1.44.0/go.mod h1:oLl1jrMQAVo6v3GAggN+1VH9VIz9iUSvW53sW1Q8PIE= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260826122756-811e48b6ca13 h1:BrONgYjW/mvH/5lAShNY5rbQiLgOmxup9bQe4xSAD8U= -goa.design/goa/v3 v3.30.1-0.20260826122756-811e48b6ca13/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826132953-76b2e84da6dd h1:lqsEHwRVNZB9E64QeKDODNRzD2YB14O8Q+gMpkO8cyw= +goa.design/goa/v3 v3.30.1-0.20260826132953-76b2e84da6dd/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/concerts/go.mod b/concerts/go.mod index f36c4109a..4f0ac066b 100644 --- a/concerts/go.mod +++ b/concerts/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( github.com/google/uuid v1.6.0 - goa.design/goa/v3 v3.30.1-0.20260826122756-811e48b6ca13 + goa.design/goa/v3 v3.30.1-0.20260826132953-76b2e84da6dd ) require ( diff --git a/concerts/go.sum b/concerts/go.sum index 101c46e0a..333250c21 100644 --- a/concerts/go.sum +++ b/concerts/go.sum @@ -31,8 +31,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260826122756-811e48b6ca13 h1:BrONgYjW/mvH/5lAShNY5rbQiLgOmxup9bQe4xSAD8U= -goa.design/goa/v3 v3.30.1-0.20260826122756-811e48b6ca13/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826132953-76b2e84da6dd h1:lqsEHwRVNZB9E64QeKDODNRzD2YB14O8Q+gMpkO8cyw= +goa.design/goa/v3 v3.30.1-0.20260826132953-76b2e84da6dd/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= diff --git a/cookies/go.mod b/cookies/go.mod index 794fd1e9f..592f84b23 100644 --- a/cookies/go.mod +++ b/cookies/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( github.com/rs/xid v1.6.0 - goa.design/goa/v3 v3.30.1-0.20260826122756-811e48b6ca13 + goa.design/goa/v3 v3.30.1-0.20260826132953-76b2e84da6dd ) require ( diff --git a/cookies/go.sum b/cookies/go.sum index 58f865b9b..9adf89c1b 100644 --- a/cookies/go.sum +++ b/cookies/go.sum @@ -33,8 +33,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260826122756-811e48b6ca13 h1:BrONgYjW/mvH/5lAShNY5rbQiLgOmxup9bQe4xSAD8U= -goa.design/goa/v3 v3.30.1-0.20260826122756-811e48b6ca13/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826132953-76b2e84da6dd h1:lqsEHwRVNZB9E64QeKDODNRzD2YB14O8Q+gMpkO8cyw= +goa.design/goa/v3 v3.30.1-0.20260826132953-76b2e84da6dd/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= diff --git a/encodings/cbor/go.mod b/encodings/cbor/go.mod index ac08dae12..750fe7e8e 100644 --- a/encodings/cbor/go.mod +++ b/encodings/cbor/go.mod @@ -5,7 +5,7 @@ go 1.26.0 require ( github.com/fxamacker/cbor/v2 v2.9.2 goa.design/clue v1.2.6 - goa.design/goa/v3 v3.30.1-0.20260826122756-811e48b6ca13 + goa.design/goa/v3 v3.30.1-0.20260826132953-76b2e84da6dd ) require ( diff --git a/encodings/cbor/go.sum b/encodings/cbor/go.sum index d75172f2d..f0a918218 100644 --- a/encodings/cbor/go.sum +++ b/encodings/cbor/go.sum @@ -59,8 +59,8 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/clue v1.2.6 h1:ensyUkwlvEbNy8FuTGMldKuvaNouh8YoDY9QaE+EtYg= goa.design/clue v1.2.6/go.mod h1:Y4RS5o2k6MZiGk2PT3XbKyntjR2xkr8dYOKQ591dIDM= -goa.design/goa/v3 v3.30.1-0.20260826122756-811e48b6ca13 h1:BrONgYjW/mvH/5lAShNY5rbQiLgOmxup9bQe4xSAD8U= -goa.design/goa/v3 v3.30.1-0.20260826122756-811e48b6ca13/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826132953-76b2e84da6dd h1:lqsEHwRVNZB9E64QeKDODNRzD2YB14O8Q+gMpkO8cyw= +goa.design/goa/v3 v3.30.1-0.20260826132953-76b2e84da6dd/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/encodings/text/go.mod b/encodings/text/go.mod index 3a276d4a6..9144d3980 100644 --- a/encodings/text/go.mod +++ b/encodings/text/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( goa.design/clue v1.2.6 - goa.design/goa/v3 v3.30.1-0.20260826122756-811e48b6ca13 + goa.design/goa/v3 v3.30.1-0.20260826132953-76b2e84da6dd ) require ( diff --git a/encodings/text/go.sum b/encodings/text/go.sum index d11a43343..072cbefb7 100644 --- a/encodings/text/go.sum +++ b/encodings/text/go.sum @@ -55,8 +55,8 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/clue v1.2.6 h1:ensyUkwlvEbNy8FuTGMldKuvaNouh8YoDY9QaE+EtYg= goa.design/clue v1.2.6/go.mod h1:Y4RS5o2k6MZiGk2PT3XbKyntjR2xkr8dYOKQ591dIDM= -goa.design/goa/v3 v3.30.1-0.20260826122756-811e48b6ca13 h1:BrONgYjW/mvH/5lAShNY5rbQiLgOmxup9bQe4xSAD8U= -goa.design/goa/v3 v3.30.1-0.20260826122756-811e48b6ca13/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826132953-76b2e84da6dd h1:lqsEHwRVNZB9E64QeKDODNRzD2YB14O8Q+gMpkO8cyw= +goa.design/goa/v3 v3.30.1-0.20260826132953-76b2e84da6dd/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/error/go.mod b/error/go.mod index 109e21385..0360c7e4a 100644 --- a/error/go.mod +++ b/error/go.mod @@ -3,7 +3,7 @@ module goa.design/examples/error go 1.26.0 require ( - goa.design/goa/v3 v3.30.1-0.20260826122756-811e48b6ca13 + goa.design/goa/v3 v3.30.1-0.20260826132953-76b2e84da6dd google.golang.org/genproto v0.0.0-20260810153831-ec0a7760b754 google.golang.org/grpc v1.83.1 google.golang.org/protobuf v1.36.12 diff --git a/error/go.sum b/error/go.sum index b0323aab1..0cda2cd02 100644 --- a/error/go.sum +++ b/error/go.sum @@ -49,8 +49,8 @@ go.opentelemetry.io/otel/trace v1.44.0 h1:jxF5CsGYCe74MCRx2X4g7WsY/VBKRqqpNvXlX/ go.opentelemetry.io/otel/trace v1.44.0/go.mod h1:oLl1jrMQAVo6v3GAggN+1VH9VIz9iUSvW53sW1Q8PIE= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260826122756-811e48b6ca13 h1:BrONgYjW/mvH/5lAShNY5rbQiLgOmxup9bQe4xSAD8U= -goa.design/goa/v3 v3.30.1-0.20260826122756-811e48b6ca13/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826132953-76b2e84da6dd h1:lqsEHwRVNZB9E64QeKDODNRzD2YB14O8Q+gMpkO8cyw= +goa.design/goa/v3 v3.30.1-0.20260826132953-76b2e84da6dd/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/files/go.mod b/files/go.mod index 335636785..c8a191f3c 100644 --- a/files/go.mod +++ b/files/go.mod @@ -2,7 +2,7 @@ module goa.design/examples/files go 1.26.0 -require goa.design/goa/v3 v3.30.1-0.20260826122756-811e48b6ca13 +require goa.design/goa/v3 v3.30.1-0.20260826132953-76b2e84da6dd require ( github.com/dimfeld/httppath v0.0.0-20170720192232-ee938bf73598 // indirect diff --git a/files/go.sum b/files/go.sum index 101c46e0a..333250c21 100644 --- a/files/go.sum +++ b/files/go.sum @@ -31,8 +31,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260826122756-811e48b6ca13 h1:BrONgYjW/mvH/5lAShNY5rbQiLgOmxup9bQe4xSAD8U= -goa.design/goa/v3 v3.30.1-0.20260826122756-811e48b6ca13/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826132953-76b2e84da6dd h1:lqsEHwRVNZB9E64QeKDODNRzD2YB14O8Q+gMpkO8cyw= +goa.design/goa/v3 v3.30.1-0.20260826132953-76b2e84da6dd/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= diff --git a/httpstatus/go.mod b/httpstatus/go.mod index 3551a4e50..c40448598 100644 --- a/httpstatus/go.mod +++ b/httpstatus/go.mod @@ -2,7 +2,7 @@ module goa.design/examples/httpstatus go 1.26.0 -require goa.design/goa/v3 v3.30.1-0.20260826122756-811e48b6ca13 +require goa.design/goa/v3 v3.30.1-0.20260826132953-76b2e84da6dd require ( github.com/dimfeld/httppath v0.0.0-20170720192232-ee938bf73598 // indirect diff --git a/httpstatus/go.sum b/httpstatus/go.sum index 101c46e0a..333250c21 100644 --- a/httpstatus/go.sum +++ b/httpstatus/go.sum @@ -31,8 +31,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260826122756-811e48b6ca13 h1:BrONgYjW/mvH/5lAShNY5rbQiLgOmxup9bQe4xSAD8U= -goa.design/goa/v3 v3.30.1-0.20260826122756-811e48b6ca13/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826132953-76b2e84da6dd h1:lqsEHwRVNZB9E64QeKDODNRzD2YB14O8Q+gMpkO8cyw= +goa.design/goa/v3 v3.30.1-0.20260826132953-76b2e84da6dd/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= diff --git a/interceptors/go.mod b/interceptors/go.mod index 66c6c260b..d098724cf 100644 --- a/interceptors/go.mod +++ b/interceptors/go.mod @@ -6,7 +6,7 @@ require ( github.com/google/uuid v1.6.0 github.com/gorilla/websocket v1.5.3 goa.design/clue v1.2.6 - goa.design/goa/v3 v3.30.1-0.20260826122756-811e48b6ca13 + goa.design/goa/v3 v3.30.1-0.20260826132953-76b2e84da6dd google.golang.org/grpc v1.83.1 google.golang.org/protobuf v1.36.12 ) diff --git a/interceptors/go.sum b/interceptors/go.sum index d11a43343..072cbefb7 100644 --- a/interceptors/go.sum +++ b/interceptors/go.sum @@ -55,8 +55,8 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/clue v1.2.6 h1:ensyUkwlvEbNy8FuTGMldKuvaNouh8YoDY9QaE+EtYg= goa.design/clue v1.2.6/go.mod h1:Y4RS5o2k6MZiGk2PT3XbKyntjR2xkr8dYOKQ591dIDM= -goa.design/goa/v3 v3.30.1-0.20260826122756-811e48b6ca13 h1:BrONgYjW/mvH/5lAShNY5rbQiLgOmxup9bQe4xSAD8U= -goa.design/goa/v3 v3.30.1-0.20260826122756-811e48b6ca13/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826132953-76b2e84da6dd h1:lqsEHwRVNZB9E64QeKDODNRzD2YB14O8Q+gMpkO8cyw= +goa.design/goa/v3 v3.30.1-0.20260826132953-76b2e84da6dd/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/multipart/go.mod b/multipart/go.mod index 28f6c4a67..24bae203a 100644 --- a/multipart/go.mod +++ b/multipart/go.mod @@ -2,7 +2,7 @@ module goa.design/examples/multipart go 1.26.0 -require goa.design/goa/v3 v3.30.1-0.20260826122756-811e48b6ca13 +require goa.design/goa/v3 v3.30.1-0.20260826132953-76b2e84da6dd require ( github.com/dimfeld/httppath v0.0.0-20170720192232-ee938bf73598 // indirect diff --git a/multipart/go.sum b/multipart/go.sum index 101c46e0a..333250c21 100644 --- a/multipart/go.sum +++ b/multipart/go.sum @@ -31,8 +31,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260826122756-811e48b6ca13 h1:BrONgYjW/mvH/5lAShNY5rbQiLgOmxup9bQe4xSAD8U= -goa.design/goa/v3 v3.30.1-0.20260826122756-811e48b6ca13/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826132953-76b2e84da6dd h1:lqsEHwRVNZB9E64QeKDODNRzD2YB14O8Q+gMpkO8cyw= +goa.design/goa/v3 v3.30.1-0.20260826132953-76b2e84da6dd/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= diff --git a/retry/go.mod b/retry/go.mod index b8c830365..2024dca95 100644 --- a/retry/go.mod +++ b/retry/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( goa.design/clue v1.2.6 - goa.design/goa/v3 v3.30.1-0.20260826122756-811e48b6ca13 + goa.design/goa/v3 v3.30.1-0.20260826132953-76b2e84da6dd google.golang.org/grpc v1.83.1 google.golang.org/protobuf v1.36.12 ) diff --git a/retry/go.sum b/retry/go.sum index 56dde16d1..0b70f25f7 100644 --- a/retry/go.sum +++ b/retry/go.sum @@ -52,8 +52,8 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/clue v1.2.6 h1:ensyUkwlvEbNy8FuTGMldKuvaNouh8YoDY9QaE+EtYg= goa.design/clue v1.2.6/go.mod h1:Y4RS5o2k6MZiGk2PT3XbKyntjR2xkr8dYOKQ591dIDM= -goa.design/goa/v3 v3.30.1-0.20260826122756-811e48b6ca13 h1:BrONgYjW/mvH/5lAShNY5rbQiLgOmxup9bQe4xSAD8U= -goa.design/goa/v3 v3.30.1-0.20260826122756-811e48b6ca13/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826132953-76b2e84da6dd h1:lqsEHwRVNZB9E64QeKDODNRzD2YB14O8Q+gMpkO8cyw= +goa.design/goa/v3 v3.30.1-0.20260826132953-76b2e84da6dd/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/security/hierarchy/go.mod b/security/hierarchy/go.mod index 591b8ff10..7b8c37c90 100644 --- a/security/hierarchy/go.mod +++ b/security/hierarchy/go.mod @@ -2,7 +2,7 @@ module goa.design/examples/security/hierarchy go 1.26.0 -require goa.design/goa/v3 v3.30.1-0.20260826122756-811e48b6ca13 +require goa.design/goa/v3 v3.30.1-0.20260826132953-76b2e84da6dd require ( github.com/dimfeld/httppath v0.0.0-20170720192232-ee938bf73598 // indirect diff --git a/security/hierarchy/go.sum b/security/hierarchy/go.sum index 101c46e0a..333250c21 100644 --- a/security/hierarchy/go.sum +++ b/security/hierarchy/go.sum @@ -31,8 +31,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260826122756-811e48b6ca13 h1:BrONgYjW/mvH/5lAShNY5rbQiLgOmxup9bQe4xSAD8U= -goa.design/goa/v3 v3.30.1-0.20260826122756-811e48b6ca13/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826132953-76b2e84da6dd h1:lqsEHwRVNZB9E64QeKDODNRzD2YB14O8Q+gMpkO8cyw= +goa.design/goa/v3 v3.30.1-0.20260826132953-76b2e84da6dd/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= diff --git a/security/multiauth/go.mod b/security/multiauth/go.mod index 246acd571..9a94c2b81 100644 --- a/security/multiauth/go.mod +++ b/security/multiauth/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( github.com/golang-jwt/jwt/v4 v4.5.2 - goa.design/goa/v3 v3.30.1-0.20260826122756-811e48b6ca13 + goa.design/goa/v3 v3.30.1-0.20260826132953-76b2e84da6dd google.golang.org/grpc v1.83.1 google.golang.org/protobuf v1.36.12 ) diff --git a/security/multiauth/go.sum b/security/multiauth/go.sum index 80c56e528..85a7adccb 100644 --- a/security/multiauth/go.sum +++ b/security/multiauth/go.sum @@ -51,8 +51,8 @@ go.opentelemetry.io/otel/trace v1.44.0 h1:jxF5CsGYCe74MCRx2X4g7WsY/VBKRqqpNvXlX/ go.opentelemetry.io/otel/trace v1.44.0/go.mod h1:oLl1jrMQAVo6v3GAggN+1VH9VIz9iUSvW53sW1Q8PIE= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260826122756-811e48b6ca13 h1:BrONgYjW/mvH/5lAShNY5rbQiLgOmxup9bQe4xSAD8U= -goa.design/goa/v3 v3.30.1-0.20260826122756-811e48b6ca13/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826132953-76b2e84da6dd h1:lqsEHwRVNZB9E64QeKDODNRzD2YB14O8Q+gMpkO8cyw= +goa.design/goa/v3 v3.30.1-0.20260826132953-76b2e84da6dd/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/sse/go.mod b/sse/go.mod index abc6f7fe7..e9aab9b90 100644 --- a/sse/go.mod +++ b/sse/go.mod @@ -5,7 +5,7 @@ go 1.26.0 require ( github.com/shirou/gopsutil/v3 v3.24.5 goa.design/clue v1.2.6 - goa.design/goa/v3 v3.30.1-0.20260826122756-811e48b6ca13 + goa.design/goa/v3 v3.30.1-0.20260826132953-76b2e84da6dd ) require ( diff --git a/sse/go.sum b/sse/go.sum index df8e77314..e96a01003 100644 --- a/sse/go.sum +++ b/sse/go.sum @@ -74,8 +74,8 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/clue v1.2.6 h1:ensyUkwlvEbNy8FuTGMldKuvaNouh8YoDY9QaE+EtYg= goa.design/clue v1.2.6/go.mod h1:Y4RS5o2k6MZiGk2PT3XbKyntjR2xkr8dYOKQ591dIDM= -goa.design/goa/v3 v3.30.1-0.20260826122756-811e48b6ca13 h1:BrONgYjW/mvH/5lAShNY5rbQiLgOmxup9bQe4xSAD8U= -goa.design/goa/v3 v3.30.1-0.20260826122756-811e48b6ca13/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826132953-76b2e84da6dd h1:lqsEHwRVNZB9E64QeKDODNRzD2YB14O8Q+gMpkO8cyw= +goa.design/goa/v3 v3.30.1-0.20260826132953-76b2e84da6dd/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/streaming/go.mod b/streaming/go.mod index 0f901cc03..463550f4d 100644 --- a/streaming/go.mod +++ b/streaming/go.mod @@ -5,7 +5,7 @@ go 1.26.0 require ( github.com/golang-jwt/jwt/v4 v4.5.2 github.com/gorilla/websocket v1.5.3 - goa.design/goa/v3 v3.30.1-0.20260826122756-811e48b6ca13 + goa.design/goa/v3 v3.30.1-0.20260826132953-76b2e84da6dd google.golang.org/grpc v1.83.1 google.golang.org/protobuf v1.36.12 ) diff --git a/streaming/go.sum b/streaming/go.sum index 80c56e528..85a7adccb 100644 --- a/streaming/go.sum +++ b/streaming/go.sum @@ -51,8 +51,8 @@ go.opentelemetry.io/otel/trace v1.44.0 h1:jxF5CsGYCe74MCRx2X4g7WsY/VBKRqqpNvXlX/ go.opentelemetry.io/otel/trace v1.44.0/go.mod h1:oLl1jrMQAVo6v3GAggN+1VH9VIz9iUSvW53sW1Q8PIE= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260826122756-811e48b6ca13 h1:BrONgYjW/mvH/5lAShNY5rbQiLgOmxup9bQe4xSAD8U= -goa.design/goa/v3 v3.30.1-0.20260826122756-811e48b6ca13/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826132953-76b2e84da6dd h1:lqsEHwRVNZB9E64QeKDODNRzD2YB14O8Q+gMpkO8cyw= +goa.design/goa/v3 v3.30.1-0.20260826132953-76b2e84da6dd/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/tracing/go.mod b/tracing/go.mod index 0b8cbd748..b414752f7 100644 --- a/tracing/go.mod +++ b/tracing/go.mod @@ -5,7 +5,7 @@ go 1.26.0 require ( github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 goa.design/examples/basic v0.0.0-20260810182504-f834f43955c5 - goa.design/goa/v3 v3.30.1-0.20260826122756-811e48b6ca13 + goa.design/goa/v3 v3.30.1-0.20260826132953-76b2e84da6dd google.golang.org/grpc v1.83.1 ) diff --git a/tracing/go.sum b/tracing/go.sum index 2958bcfe6..1e056459f 100644 --- a/tracing/go.sum +++ b/tracing/go.sum @@ -81,8 +81,8 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/examples/basic v0.0.0-20260810182504-f834f43955c5 h1:SRSrUaLTTdA4bUXb8+zA5MDhMEx8YaP+Knd+pddBcrg= goa.design/examples/basic v0.0.0-20260810182504-f834f43955c5/go.mod h1:XRziIzNcLb9fk7ZrfiHx5FIeAj+orJ4fkzLG0nXpiAo= -goa.design/goa/v3 v3.30.1-0.20260826122756-811e48b6ca13 h1:BrONgYjW/mvH/5lAShNY5rbQiLgOmxup9bQe4xSAD8U= -goa.design/goa/v3 v3.30.1-0.20260826122756-811e48b6ca13/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826132953-76b2e84da6dd h1:lqsEHwRVNZB9E64QeKDODNRzD2YB14O8Q+gMpkO8cyw= +goa.design/goa/v3 v3.30.1-0.20260826132953-76b2e84da6dd/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= diff --git a/tus/go.mod b/tus/go.mod index 3e5b95663..f8d03c064 100644 --- a/tus/go.mod +++ b/tus/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( github.com/rs/xid v1.6.0 - goa.design/goa/v3 v3.30.1-0.20260826122756-811e48b6ca13 + goa.design/goa/v3 v3.30.1-0.20260826132953-76b2e84da6dd ) require ( diff --git a/tus/go.sum b/tus/go.sum index 58f865b9b..9adf89c1b 100644 --- a/tus/go.sum +++ b/tus/go.sum @@ -33,8 +33,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260826122756-811e48b6ca13 h1:BrONgYjW/mvH/5lAShNY5rbQiLgOmxup9bQe4xSAD8U= -goa.design/goa/v3 v3.30.1-0.20260826122756-811e48b6ca13/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826132953-76b2e84da6dd h1:lqsEHwRVNZB9E64QeKDODNRzD2YB14O8Q+gMpkO8cyw= +goa.design/goa/v3 v3.30.1-0.20260826132953-76b2e84da6dd/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= diff --git a/upload_download/go.mod b/upload_download/go.mod index cd1c3208b..04774c4c4 100644 --- a/upload_download/go.mod +++ b/upload_download/go.mod @@ -2,7 +2,7 @@ module goa.design/examples/upload_download go 1.26.0 -require goa.design/goa/v3 v3.30.1-0.20260826122756-811e48b6ca13 +require goa.design/goa/v3 v3.30.1-0.20260826132953-76b2e84da6dd require ( github.com/dimfeld/httppath v0.0.0-20170720192232-ee938bf73598 // indirect diff --git a/upload_download/go.sum b/upload_download/go.sum index 101c46e0a..333250c21 100644 --- a/upload_download/go.sum +++ b/upload_download/go.sum @@ -31,8 +31,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260826122756-811e48b6ca13 h1:BrONgYjW/mvH/5lAShNY5rbQiLgOmxup9bQe4xSAD8U= -goa.design/goa/v3 v3.30.1-0.20260826122756-811e48b6ca13/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826132953-76b2e84da6dd h1:lqsEHwRVNZB9E64QeKDODNRzD2YB14O8Q+gMpkO8cyw= +goa.design/goa/v3 v3.30.1-0.20260826132953-76b2e84da6dd/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= From 0f9e46042ef1b78d60364640195aef0718729622 Mon Sep 17 00:00:00 2001 From: "Raphael (manual office deploy after cloud-state fix)" Date: Wed, 26 Aug 2026 09:37:17 -0700 Subject: [PATCH 17/28] chore: pin examples to shared Goa helpers --- basic/go.mod | 2 +- basic/go.sum | 4 +- cellar/gen/grpc/sommelier/client/types.go | 21 +++++----- cellar/gen/grpc/storage/client/types.go | 46 ++++++++++++---------- cellar/gen/grpc/storage/server/types.go | 26 ++++++------ cellar/go.mod | 2 +- cellar/go.sum | 4 +- concerts/go.mod | 2 +- concerts/go.sum | 4 +- cookies/go.mod | 2 +- cookies/go.sum | 4 +- encodings/cbor/go.mod | 2 +- encodings/cbor/go.sum | 4 +- encodings/text/go.mod | 2 +- encodings/text/go.sum | 4 +- error/go.mod | 2 +- error/go.sum | 4 +- files/go.mod | 2 +- files/go.sum | 4 +- httpstatus/go.mod | 2 +- httpstatus/go.sum | 4 +- interceptors/go.mod | 2 +- interceptors/go.sum | 4 +- multipart/go.mod | 2 +- multipart/go.sum | 4 +- retry/go.mod | 2 +- retry/go.sum | 4 +- security/hierarchy/go.mod | 2 +- security/hierarchy/go.sum | 4 +- security/multiauth/go.mod | 2 +- security/multiauth/go.sum | 4 +- sse/go.mod | 2 +- sse/go.sum | 4 +- streaming/gen/grpc/chatter/client/types.go | 7 ++-- streaming/go.mod | 2 +- streaming/go.sum | 4 +- tracing/go.mod | 2 +- tracing/go.sum | 4 +- tus/go.mod | 2 +- tus/go.sum | 4 +- upload_download/go.mod | 2 +- upload_download/go.sum | 4 +- 42 files changed, 112 insertions(+), 102 deletions(-) diff --git a/basic/go.mod b/basic/go.mod index af0d7de67..5d261006c 100644 --- a/basic/go.mod +++ b/basic/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( goa.design/clue v1.2.6 - goa.design/goa/v3 v3.30.1-0.20260826132953-76b2e84da6dd + goa.design/goa/v3 v3.30.1-0.20260826161049-5e4c64c6087d google.golang.org/grpc v1.83.1 google.golang.org/protobuf v1.36.12 ) diff --git a/basic/go.sum b/basic/go.sum index 072cbefb7..a8ce74e72 100644 --- a/basic/go.sum +++ b/basic/go.sum @@ -55,8 +55,8 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/clue v1.2.6 h1:ensyUkwlvEbNy8FuTGMldKuvaNouh8YoDY9QaE+EtYg= goa.design/clue v1.2.6/go.mod h1:Y4RS5o2k6MZiGk2PT3XbKyntjR2xkr8dYOKQ591dIDM= -goa.design/goa/v3 v3.30.1-0.20260826132953-76b2e84da6dd h1:lqsEHwRVNZB9E64QeKDODNRzD2YB14O8Q+gMpkO8cyw= -goa.design/goa/v3 v3.30.1-0.20260826132953-76b2e84da6dd/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826161049-5e4c64c6087d h1:iKDq3QEkUYUa3d85cp208gGwBH36e/NpgE37ezzwK5Q= +goa.design/goa/v3 v3.30.1-0.20260826161049-5e4c64c6087d/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/cellar/gen/grpc/sommelier/client/types.go b/cellar/gen/grpc/sommelier/client/types.go index 8f014b7df..b9d5eed09 100644 --- a/cellar/gen/grpc/sommelier/client/types.go +++ b/cellar/gen/grpc/sommelier/client/types.go @@ -64,7 +64,7 @@ func NewPickResult(message *sommelierpb.StoredBottleCollection) sommelierviews.S func ValidateStoredBottleCollection(message *sommelierpb.StoredBottleCollection) (err error) { for _, e := range message.Field { if e != nil { - if err2 := ValidateStoredBottle(e); err2 != nil { + if err2 := validatecellar_sommelier_StoredBottle_At_elem(e); err2 != nil { err = goa.MergeErrors(err, err2) } } @@ -72,8 +72,9 @@ func ValidateStoredBottleCollection(message *sommelierpb.StoredBottleCollection) return } -// ValidateStoredBottle runs the validations defined on StoredBottle. -func ValidateStoredBottle(elem *sommelierpb.StoredBottle) (err error) { +// validatecellar_sommelier_StoredBottle_At_elem runs the validations defined +// on StoredBottle. +func validatecellar_sommelier_StoredBottle_At_elem(elem *sommelierpb.StoredBottle) (err error) { if elem.Id == nil { err = goa.MergeErrors(err, goa.MissingFieldError("id", "elem")) } @@ -92,7 +93,7 @@ func ValidateStoredBottle(elem *sommelierpb.StoredBottle) (err error) { } } if elem.Winery != nil { - if err2 := ValidateWinery(elem.Winery); err2 != nil { + if err2 := validatecellar_sommelier_Winery_At_winery(elem.Winery); err2 != nil { err = goa.MergeErrors(err, err2) } } @@ -106,7 +107,7 @@ func ValidateStoredBottle(elem *sommelierpb.StoredBottle) (err error) { } for _, e := range elem.Composition { if e != nil { - if err2 := ValidateComponent(e); err2 != nil { + if err2 := validatecellar_sommelier_Component_At_elem(e); err2 != nil { err = goa.MergeErrors(err, err2) } } @@ -127,16 +128,18 @@ func ValidateStoredBottle(elem *sommelierpb.StoredBottle) (err error) { return } -// ValidateWinery runs the validations defined on Winery. -func ValidateWinery(winery *sommelierpb.Winery) (err error) { +// validatecellar_sommelier_Winery_At_winery runs the validations defined on +// Winery. +func validatecellar_sommelier_Winery_At_winery(winery *sommelierpb.Winery) (err error) { if winery.Name == nil { err = goa.MergeErrors(err, goa.MissingFieldError("name", "winery")) } return } -// ValidateComponent runs the validations defined on Component. -func ValidateComponent(elem *sommelierpb.Component) (err error) { +// validatecellar_sommelier_Component_At_elem runs the validations defined on +// Component. +func validatecellar_sommelier_Component_At_elem(elem *sommelierpb.Component) (err error) { if elem.Varietal == nil { err = goa.MergeErrors(err, goa.MissingFieldError("varietal", "elem")) } diff --git a/cellar/gen/grpc/storage/client/types.go b/cellar/gen/grpc/storage/client/types.go index 81936718c..35e912de7 100644 --- a/cellar/gen/grpc/storage/client/types.go +++ b/cellar/gen/grpc/storage/client/types.go @@ -226,7 +226,7 @@ func NewProtoMultiUpdateRequest(payload *storage.MultiUpdatePayload) *storagepb. func ValidateStoredBottleCollectionTiny(message *storagepb.StoredBottleCollection) (err error) { for _, e := range message.Field { if e != nil { - if err2 := ValidateStoredBottleTiny(e); err2 != nil { + if err2 := validatecellar_storage_StoredBottle_At_elem(e); err2 != nil { err = goa.MergeErrors(err, err2) } } @@ -234,8 +234,9 @@ func ValidateStoredBottleCollectionTiny(message *storagepb.StoredBottleCollectio return } -// ValidateStoredBottleTiny runs the validations defined on StoredBottle. -func ValidateStoredBottleTiny(elem *storagepb.StoredBottle) (err error) { +// validatecellar_storage_StoredBottle_At_elem runs the validations defined on +// StoredBottle. +func validatecellar_storage_StoredBottle_At_elem(elem *storagepb.StoredBottle) (err error) { if elem.Id == nil { err = goa.MergeErrors(err, goa.MissingFieldError("id", "elem")) } @@ -251,15 +252,16 @@ func ValidateStoredBottleTiny(elem *storagepb.StoredBottle) (err error) { } } if elem.Winery != nil { - if err2 := ValidateWineryTiny(elem.Winery); err2 != nil { + if err2 := validatecellar_storage_Winery_At_winery_From_list_Response_View_tiny_Field_field_ArrayElement_Field_winery(elem.Winery); err2 != nil { err = goa.MergeErrors(err, err2) } } return } -// ValidateWineryTiny runs the validations defined on Winery. -func ValidateWineryTiny(winery *storagepb.Winery) (err error) { +// validatecellar_storage_Winery_At_winery_From_list_Response_View_tiny_Field_field_ArrayElement_Field_winery +// runs the validations defined on Winery. +func validatecellar_storage_Winery_At_winery_From_list_Response_View_tiny_Field_field_ArrayElement_Field_winery(winery *storagepb.Winery) (err error) { if winery.Name == nil { err = goa.MergeErrors(err, goa.MissingFieldError("name", "winery")) } @@ -294,7 +296,7 @@ func ValidateShowResponse(message *storagepb.ShowResponse) (err error) { } } if message.Winery != nil { - if err2 := ValidateWineryTiny(message.Winery); err2 != nil { + if err2 := validatecellar_storage_Winery_At_winery_From_list_Response_View_tiny_Field_field_ArrayElement_Field_winery(message.Winery); err2 != nil { err = goa.MergeErrors(err, err2) } } @@ -308,7 +310,7 @@ func ValidateShowResponse(message *storagepb.ShowResponse) (err error) { } for _, e := range message.Composition { if e != nil { - if err2 := ValidateComponent(e); err2 != nil { + if err2 := validatecellar_storage_Component_At_elem(e); err2 != nil { err = goa.MergeErrors(err, err2) } } @@ -329,8 +331,9 @@ func ValidateShowResponse(message *storagepb.ShowResponse) (err error) { return } -// ValidateComponent runs the validations defined on Component. -func ValidateComponent(elem *storagepb.Component) (err error) { +// validatecellar_storage_Component_At_elem runs the validations defined on +// Component. +func validatecellar_storage_Component_At_elem(elem *storagepb.Component) (err error) { if elem.Varietal == nil { err = goa.MergeErrors(err, goa.MissingFieldError("varietal", "elem")) } @@ -368,7 +371,7 @@ func ValidateShowResponseTiny(message *storagepb.ShowResponse) (err error) { } } if message.Winery != nil { - if err2 := ValidateWineryTiny(message.Winery); err2 != nil { + if err2 := validatecellar_storage_Winery_At_winery_From_list_Response_View_tiny_Field_field_ArrayElement_Field_winery(message.Winery); err2 != nil { err = goa.MergeErrors(err, err2) } } @@ -403,7 +406,7 @@ func ValidateAddRequest(message *storagepb.AddRequest) (err error) { } } if message.Winery != nil { - if err2 := ValidateWinery(message.Winery); err2 != nil { + if err2 := validatecellar_storage_Winery_At_winery_From_add_Request_Field_winery(message.Winery); err2 != nil { err = goa.MergeErrors(err, err2) } } @@ -417,7 +420,7 @@ func ValidateAddRequest(message *storagepb.AddRequest) (err error) { } for _, e := range message.Composition { if e != nil { - if err2 := ValidateComponent(e); err2 != nil { + if err2 := validatecellar_storage_Component_At_elem(e); err2 != nil { err = goa.MergeErrors(err, err2) } } @@ -438,8 +441,9 @@ func ValidateAddRequest(message *storagepb.AddRequest) (err error) { return } -// ValidateWinery runs the validations defined on Winery. -func ValidateWinery(winery *storagepb.Winery) (err error) { +// validatecellar_storage_Winery_At_winery_From_add_Request_Field_winery runs +// the validations defined on Winery. +func validatecellar_storage_Winery_At_winery_From_add_Request_Field_winery(winery *storagepb.Winery) (err error) { if winery.Name == nil { err = goa.MergeErrors(err, goa.MissingFieldError("name", "winery")) } @@ -481,7 +485,7 @@ func ValidateRemoveRequest(message *storagepb.RemoveRequest) (err error) { func ValidateMultiAddRequest(message *storagepb.MultiAddRequest) (err error) { for _, e := range message.Field { if e != nil { - if err2 := ValidateBottle(e); err2 != nil { + if err2 := validatecellar_storage_Bottle_At_elem(e); err2 != nil { err = goa.MergeErrors(err, err2) } } @@ -489,8 +493,8 @@ func ValidateMultiAddRequest(message *storagepb.MultiAddRequest) (err error) { return } -// ValidateBottle runs the validations defined on Bottle. -func ValidateBottle(elem *storagepb.Bottle) (err error) { +// validatecellar_storage_Bottle_At_elem runs the validations defined on Bottle. +func validatecellar_storage_Bottle_At_elem(elem *storagepb.Bottle) (err error) { if elem.Name == nil { err = goa.MergeErrors(err, goa.MissingFieldError("name", "elem")) } @@ -506,7 +510,7 @@ func ValidateBottle(elem *storagepb.Bottle) (err error) { } } if elem.Winery != nil { - if err2 := ValidateWinery(elem.Winery); err2 != nil { + if err2 := validatecellar_storage_Winery_At_winery_From_add_Request_Field_winery(elem.Winery); err2 != nil { err = goa.MergeErrors(err, err2) } } @@ -520,7 +524,7 @@ func ValidateBottle(elem *storagepb.Bottle) (err error) { } for _, e := range elem.Composition { if e != nil { - if err2 := ValidateComponent(e); err2 != nil { + if err2 := validatecellar_storage_Component_At_elem(e); err2 != nil { err = goa.MergeErrors(err, err2) } } @@ -552,7 +556,7 @@ func ValidateMultiUpdateRequest(message *storagepb.MultiUpdateRequest) (err erro } for _, e := range message.Bottles { if e != nil { - if err2 := ValidateBottle(e); err2 != nil { + if err2 := validatecellar_storage_Bottle_At_elem(e); err2 != nil { err = goa.MergeErrors(err, err2) } } diff --git a/cellar/gen/grpc/storage/server/types.go b/cellar/gen/grpc/storage/server/types.go index e1ee5d11e..c0abe0483 100644 --- a/cellar/gen/grpc/storage/server/types.go +++ b/cellar/gen/grpc/storage/server/types.go @@ -266,7 +266,7 @@ func ValidateAddRequest(message *storagepb.AddRequest) (err error) { } } if message.Winery != nil { - if err2 := ValidateWinery(message.Winery); err2 != nil { + if err2 := validatecellar_storage_Winery_At_winery(message.Winery); err2 != nil { err = goa.MergeErrors(err, err2) } } @@ -280,7 +280,7 @@ func ValidateAddRequest(message *storagepb.AddRequest) (err error) { } for _, e := range message.Composition { if e != nil { - if err2 := ValidateComponent(e); err2 != nil { + if err2 := validatecellar_storage_Component_At_elem(e); err2 != nil { err = goa.MergeErrors(err, err2) } } @@ -301,8 +301,9 @@ func ValidateAddRequest(message *storagepb.AddRequest) (err error) { return } -// ValidateWinery runs the validations defined on Winery. -func ValidateWinery(winery *storagepb.Winery) (err error) { +// validatecellar_storage_Winery_At_winery runs the validations defined on +// Winery. +func validatecellar_storage_Winery_At_winery(winery *storagepb.Winery) (err error) { if winery.Name == nil { err = goa.MergeErrors(err, goa.MissingFieldError("name", "winery")) } @@ -324,8 +325,9 @@ func ValidateWinery(winery *storagepb.Winery) (err error) { return } -// ValidateComponent runs the validations defined on Component. -func ValidateComponent(elem *storagepb.Component) (err error) { +// validatecellar_storage_Component_At_elem runs the validations defined on +// Component. +func validatecellar_storage_Component_At_elem(elem *storagepb.Component) (err error) { if elem.Varietal == nil { err = goa.MergeErrors(err, goa.MissingFieldError("varietal", "elem")) } @@ -358,7 +360,7 @@ func ValidateRemoveRequest(message *storagepb.RemoveRequest) (err error) { func ValidateMultiAddRequest(message *storagepb.MultiAddRequest) (err error) { for _, e := range message.Field { if e != nil { - if err2 := ValidateBottle(e); err2 != nil { + if err2 := validatecellar_storage_Bottle_At_elem(e); err2 != nil { err = goa.MergeErrors(err, err2) } } @@ -366,8 +368,8 @@ func ValidateMultiAddRequest(message *storagepb.MultiAddRequest) (err error) { return } -// ValidateBottle runs the validations defined on Bottle. -func ValidateBottle(elem *storagepb.Bottle) (err error) { +// validatecellar_storage_Bottle_At_elem runs the validations defined on Bottle. +func validatecellar_storage_Bottle_At_elem(elem *storagepb.Bottle) (err error) { if elem.Name == nil { err = goa.MergeErrors(err, goa.MissingFieldError("name", "elem")) } @@ -383,7 +385,7 @@ func ValidateBottle(elem *storagepb.Bottle) (err error) { } } if elem.Winery != nil { - if err2 := ValidateWinery(elem.Winery); err2 != nil { + if err2 := validatecellar_storage_Winery_At_winery(elem.Winery); err2 != nil { err = goa.MergeErrors(err, err2) } } @@ -397,7 +399,7 @@ func ValidateBottle(elem *storagepb.Bottle) (err error) { } for _, e := range elem.Composition { if e != nil { - if err2 := ValidateComponent(e); err2 != nil { + if err2 := validatecellar_storage_Component_At_elem(e); err2 != nil { err = goa.MergeErrors(err, err2) } } @@ -429,7 +431,7 @@ func ValidateMultiUpdateRequest(message *storagepb.MultiUpdateRequest) (err erro } for _, e := range message.Bottles { if e != nil { - if err2 := ValidateBottle(e); err2 != nil { + if err2 := validatecellar_storage_Bottle_At_elem(e); err2 != nil { err = goa.MergeErrors(err, err2) } } diff --git a/cellar/go.mod b/cellar/go.mod index 25d0126c3..6c333a112 100644 --- a/cellar/go.mod +++ b/cellar/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( github.com/boltdb/bolt v1.3.1 - goa.design/goa/v3 v3.30.1-0.20260826132953-76b2e84da6dd + goa.design/goa/v3 v3.30.1-0.20260826161049-5e4c64c6087d google.golang.org/grpc v1.83.1 google.golang.org/protobuf v1.36.12 ) diff --git a/cellar/go.sum b/cellar/go.sum index 2ae394f18..89ba3f97f 100644 --- a/cellar/go.sum +++ b/cellar/go.sum @@ -51,8 +51,8 @@ go.opentelemetry.io/otel/trace v1.44.0 h1:jxF5CsGYCe74MCRx2X4g7WsY/VBKRqqpNvXlX/ go.opentelemetry.io/otel/trace v1.44.0/go.mod h1:oLl1jrMQAVo6v3GAggN+1VH9VIz9iUSvW53sW1Q8PIE= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260826132953-76b2e84da6dd h1:lqsEHwRVNZB9E64QeKDODNRzD2YB14O8Q+gMpkO8cyw= -goa.design/goa/v3 v3.30.1-0.20260826132953-76b2e84da6dd/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826161049-5e4c64c6087d h1:iKDq3QEkUYUa3d85cp208gGwBH36e/NpgE37ezzwK5Q= +goa.design/goa/v3 v3.30.1-0.20260826161049-5e4c64c6087d/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/concerts/go.mod b/concerts/go.mod index 4f0ac066b..7953f0b69 100644 --- a/concerts/go.mod +++ b/concerts/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( github.com/google/uuid v1.6.0 - goa.design/goa/v3 v3.30.1-0.20260826132953-76b2e84da6dd + goa.design/goa/v3 v3.30.1-0.20260826161049-5e4c64c6087d ) require ( diff --git a/concerts/go.sum b/concerts/go.sum index 333250c21..8cb30e89a 100644 --- a/concerts/go.sum +++ b/concerts/go.sum @@ -31,8 +31,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260826132953-76b2e84da6dd h1:lqsEHwRVNZB9E64QeKDODNRzD2YB14O8Q+gMpkO8cyw= -goa.design/goa/v3 v3.30.1-0.20260826132953-76b2e84da6dd/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826161049-5e4c64c6087d h1:iKDq3QEkUYUa3d85cp208gGwBH36e/NpgE37ezzwK5Q= +goa.design/goa/v3 v3.30.1-0.20260826161049-5e4c64c6087d/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= diff --git a/cookies/go.mod b/cookies/go.mod index 592f84b23..be448b779 100644 --- a/cookies/go.mod +++ b/cookies/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( github.com/rs/xid v1.6.0 - goa.design/goa/v3 v3.30.1-0.20260826132953-76b2e84da6dd + goa.design/goa/v3 v3.30.1-0.20260826161049-5e4c64c6087d ) require ( diff --git a/cookies/go.sum b/cookies/go.sum index 9adf89c1b..c1758d9e2 100644 --- a/cookies/go.sum +++ b/cookies/go.sum @@ -33,8 +33,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260826132953-76b2e84da6dd h1:lqsEHwRVNZB9E64QeKDODNRzD2YB14O8Q+gMpkO8cyw= -goa.design/goa/v3 v3.30.1-0.20260826132953-76b2e84da6dd/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826161049-5e4c64c6087d h1:iKDq3QEkUYUa3d85cp208gGwBH36e/NpgE37ezzwK5Q= +goa.design/goa/v3 v3.30.1-0.20260826161049-5e4c64c6087d/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= diff --git a/encodings/cbor/go.mod b/encodings/cbor/go.mod index 750fe7e8e..5976fd817 100644 --- a/encodings/cbor/go.mod +++ b/encodings/cbor/go.mod @@ -5,7 +5,7 @@ go 1.26.0 require ( github.com/fxamacker/cbor/v2 v2.9.2 goa.design/clue v1.2.6 - goa.design/goa/v3 v3.30.1-0.20260826132953-76b2e84da6dd + goa.design/goa/v3 v3.30.1-0.20260826161049-5e4c64c6087d ) require ( diff --git a/encodings/cbor/go.sum b/encodings/cbor/go.sum index f0a918218..2b517a620 100644 --- a/encodings/cbor/go.sum +++ b/encodings/cbor/go.sum @@ -59,8 +59,8 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/clue v1.2.6 h1:ensyUkwlvEbNy8FuTGMldKuvaNouh8YoDY9QaE+EtYg= goa.design/clue v1.2.6/go.mod h1:Y4RS5o2k6MZiGk2PT3XbKyntjR2xkr8dYOKQ591dIDM= -goa.design/goa/v3 v3.30.1-0.20260826132953-76b2e84da6dd h1:lqsEHwRVNZB9E64QeKDODNRzD2YB14O8Q+gMpkO8cyw= -goa.design/goa/v3 v3.30.1-0.20260826132953-76b2e84da6dd/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826161049-5e4c64c6087d h1:iKDq3QEkUYUa3d85cp208gGwBH36e/NpgE37ezzwK5Q= +goa.design/goa/v3 v3.30.1-0.20260826161049-5e4c64c6087d/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/encodings/text/go.mod b/encodings/text/go.mod index 9144d3980..395d4ed96 100644 --- a/encodings/text/go.mod +++ b/encodings/text/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( goa.design/clue v1.2.6 - goa.design/goa/v3 v3.30.1-0.20260826132953-76b2e84da6dd + goa.design/goa/v3 v3.30.1-0.20260826161049-5e4c64c6087d ) require ( diff --git a/encodings/text/go.sum b/encodings/text/go.sum index 072cbefb7..a8ce74e72 100644 --- a/encodings/text/go.sum +++ b/encodings/text/go.sum @@ -55,8 +55,8 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/clue v1.2.6 h1:ensyUkwlvEbNy8FuTGMldKuvaNouh8YoDY9QaE+EtYg= goa.design/clue v1.2.6/go.mod h1:Y4RS5o2k6MZiGk2PT3XbKyntjR2xkr8dYOKQ591dIDM= -goa.design/goa/v3 v3.30.1-0.20260826132953-76b2e84da6dd h1:lqsEHwRVNZB9E64QeKDODNRzD2YB14O8Q+gMpkO8cyw= -goa.design/goa/v3 v3.30.1-0.20260826132953-76b2e84da6dd/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826161049-5e4c64c6087d h1:iKDq3QEkUYUa3d85cp208gGwBH36e/NpgE37ezzwK5Q= +goa.design/goa/v3 v3.30.1-0.20260826161049-5e4c64c6087d/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/error/go.mod b/error/go.mod index 0360c7e4a..deb2608d1 100644 --- a/error/go.mod +++ b/error/go.mod @@ -3,7 +3,7 @@ module goa.design/examples/error go 1.26.0 require ( - goa.design/goa/v3 v3.30.1-0.20260826132953-76b2e84da6dd + goa.design/goa/v3 v3.30.1-0.20260826161049-5e4c64c6087d google.golang.org/genproto v0.0.0-20260810153831-ec0a7760b754 google.golang.org/grpc v1.83.1 google.golang.org/protobuf v1.36.12 diff --git a/error/go.sum b/error/go.sum index 0cda2cd02..0c297c207 100644 --- a/error/go.sum +++ b/error/go.sum @@ -49,8 +49,8 @@ go.opentelemetry.io/otel/trace v1.44.0 h1:jxF5CsGYCe74MCRx2X4g7WsY/VBKRqqpNvXlX/ go.opentelemetry.io/otel/trace v1.44.0/go.mod h1:oLl1jrMQAVo6v3GAggN+1VH9VIz9iUSvW53sW1Q8PIE= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260826132953-76b2e84da6dd h1:lqsEHwRVNZB9E64QeKDODNRzD2YB14O8Q+gMpkO8cyw= -goa.design/goa/v3 v3.30.1-0.20260826132953-76b2e84da6dd/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826161049-5e4c64c6087d h1:iKDq3QEkUYUa3d85cp208gGwBH36e/NpgE37ezzwK5Q= +goa.design/goa/v3 v3.30.1-0.20260826161049-5e4c64c6087d/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/files/go.mod b/files/go.mod index c8a191f3c..8b8c67082 100644 --- a/files/go.mod +++ b/files/go.mod @@ -2,7 +2,7 @@ module goa.design/examples/files go 1.26.0 -require goa.design/goa/v3 v3.30.1-0.20260826132953-76b2e84da6dd +require goa.design/goa/v3 v3.30.1-0.20260826161049-5e4c64c6087d require ( github.com/dimfeld/httppath v0.0.0-20170720192232-ee938bf73598 // indirect diff --git a/files/go.sum b/files/go.sum index 333250c21..8cb30e89a 100644 --- a/files/go.sum +++ b/files/go.sum @@ -31,8 +31,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260826132953-76b2e84da6dd h1:lqsEHwRVNZB9E64QeKDODNRzD2YB14O8Q+gMpkO8cyw= -goa.design/goa/v3 v3.30.1-0.20260826132953-76b2e84da6dd/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826161049-5e4c64c6087d h1:iKDq3QEkUYUa3d85cp208gGwBH36e/NpgE37ezzwK5Q= +goa.design/goa/v3 v3.30.1-0.20260826161049-5e4c64c6087d/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= diff --git a/httpstatus/go.mod b/httpstatus/go.mod index c40448598..88e34c6cb 100644 --- a/httpstatus/go.mod +++ b/httpstatus/go.mod @@ -2,7 +2,7 @@ module goa.design/examples/httpstatus go 1.26.0 -require goa.design/goa/v3 v3.30.1-0.20260826132953-76b2e84da6dd +require goa.design/goa/v3 v3.30.1-0.20260826161049-5e4c64c6087d require ( github.com/dimfeld/httppath v0.0.0-20170720192232-ee938bf73598 // indirect diff --git a/httpstatus/go.sum b/httpstatus/go.sum index 333250c21..8cb30e89a 100644 --- a/httpstatus/go.sum +++ b/httpstatus/go.sum @@ -31,8 +31,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260826132953-76b2e84da6dd h1:lqsEHwRVNZB9E64QeKDODNRzD2YB14O8Q+gMpkO8cyw= -goa.design/goa/v3 v3.30.1-0.20260826132953-76b2e84da6dd/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826161049-5e4c64c6087d h1:iKDq3QEkUYUa3d85cp208gGwBH36e/NpgE37ezzwK5Q= +goa.design/goa/v3 v3.30.1-0.20260826161049-5e4c64c6087d/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= diff --git a/interceptors/go.mod b/interceptors/go.mod index d098724cf..51d8caa97 100644 --- a/interceptors/go.mod +++ b/interceptors/go.mod @@ -6,7 +6,7 @@ require ( github.com/google/uuid v1.6.0 github.com/gorilla/websocket v1.5.3 goa.design/clue v1.2.6 - goa.design/goa/v3 v3.30.1-0.20260826132953-76b2e84da6dd + goa.design/goa/v3 v3.30.1-0.20260826161049-5e4c64c6087d google.golang.org/grpc v1.83.1 google.golang.org/protobuf v1.36.12 ) diff --git a/interceptors/go.sum b/interceptors/go.sum index 072cbefb7..a8ce74e72 100644 --- a/interceptors/go.sum +++ b/interceptors/go.sum @@ -55,8 +55,8 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/clue v1.2.6 h1:ensyUkwlvEbNy8FuTGMldKuvaNouh8YoDY9QaE+EtYg= goa.design/clue v1.2.6/go.mod h1:Y4RS5o2k6MZiGk2PT3XbKyntjR2xkr8dYOKQ591dIDM= -goa.design/goa/v3 v3.30.1-0.20260826132953-76b2e84da6dd h1:lqsEHwRVNZB9E64QeKDODNRzD2YB14O8Q+gMpkO8cyw= -goa.design/goa/v3 v3.30.1-0.20260826132953-76b2e84da6dd/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826161049-5e4c64c6087d h1:iKDq3QEkUYUa3d85cp208gGwBH36e/NpgE37ezzwK5Q= +goa.design/goa/v3 v3.30.1-0.20260826161049-5e4c64c6087d/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/multipart/go.mod b/multipart/go.mod index 24bae203a..1d7a2a37f 100644 --- a/multipart/go.mod +++ b/multipart/go.mod @@ -2,7 +2,7 @@ module goa.design/examples/multipart go 1.26.0 -require goa.design/goa/v3 v3.30.1-0.20260826132953-76b2e84da6dd +require goa.design/goa/v3 v3.30.1-0.20260826161049-5e4c64c6087d require ( github.com/dimfeld/httppath v0.0.0-20170720192232-ee938bf73598 // indirect diff --git a/multipart/go.sum b/multipart/go.sum index 333250c21..8cb30e89a 100644 --- a/multipart/go.sum +++ b/multipart/go.sum @@ -31,8 +31,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260826132953-76b2e84da6dd h1:lqsEHwRVNZB9E64QeKDODNRzD2YB14O8Q+gMpkO8cyw= -goa.design/goa/v3 v3.30.1-0.20260826132953-76b2e84da6dd/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826161049-5e4c64c6087d h1:iKDq3QEkUYUa3d85cp208gGwBH36e/NpgE37ezzwK5Q= +goa.design/goa/v3 v3.30.1-0.20260826161049-5e4c64c6087d/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= diff --git a/retry/go.mod b/retry/go.mod index 2024dca95..17fbbaf64 100644 --- a/retry/go.mod +++ b/retry/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( goa.design/clue v1.2.6 - goa.design/goa/v3 v3.30.1-0.20260826132953-76b2e84da6dd + goa.design/goa/v3 v3.30.1-0.20260826161049-5e4c64c6087d google.golang.org/grpc v1.83.1 google.golang.org/protobuf v1.36.12 ) diff --git a/retry/go.sum b/retry/go.sum index 0b70f25f7..820f67703 100644 --- a/retry/go.sum +++ b/retry/go.sum @@ -52,8 +52,8 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/clue v1.2.6 h1:ensyUkwlvEbNy8FuTGMldKuvaNouh8YoDY9QaE+EtYg= goa.design/clue v1.2.6/go.mod h1:Y4RS5o2k6MZiGk2PT3XbKyntjR2xkr8dYOKQ591dIDM= -goa.design/goa/v3 v3.30.1-0.20260826132953-76b2e84da6dd h1:lqsEHwRVNZB9E64QeKDODNRzD2YB14O8Q+gMpkO8cyw= -goa.design/goa/v3 v3.30.1-0.20260826132953-76b2e84da6dd/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826161049-5e4c64c6087d h1:iKDq3QEkUYUa3d85cp208gGwBH36e/NpgE37ezzwK5Q= +goa.design/goa/v3 v3.30.1-0.20260826161049-5e4c64c6087d/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/security/hierarchy/go.mod b/security/hierarchy/go.mod index 7b8c37c90..eee31378f 100644 --- a/security/hierarchy/go.mod +++ b/security/hierarchy/go.mod @@ -2,7 +2,7 @@ module goa.design/examples/security/hierarchy go 1.26.0 -require goa.design/goa/v3 v3.30.1-0.20260826132953-76b2e84da6dd +require goa.design/goa/v3 v3.30.1-0.20260826161049-5e4c64c6087d require ( github.com/dimfeld/httppath v0.0.0-20170720192232-ee938bf73598 // indirect diff --git a/security/hierarchy/go.sum b/security/hierarchy/go.sum index 333250c21..8cb30e89a 100644 --- a/security/hierarchy/go.sum +++ b/security/hierarchy/go.sum @@ -31,8 +31,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260826132953-76b2e84da6dd h1:lqsEHwRVNZB9E64QeKDODNRzD2YB14O8Q+gMpkO8cyw= -goa.design/goa/v3 v3.30.1-0.20260826132953-76b2e84da6dd/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826161049-5e4c64c6087d h1:iKDq3QEkUYUa3d85cp208gGwBH36e/NpgE37ezzwK5Q= +goa.design/goa/v3 v3.30.1-0.20260826161049-5e4c64c6087d/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= diff --git a/security/multiauth/go.mod b/security/multiauth/go.mod index 9a94c2b81..14a4ca7cf 100644 --- a/security/multiauth/go.mod +++ b/security/multiauth/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( github.com/golang-jwt/jwt/v4 v4.5.2 - goa.design/goa/v3 v3.30.1-0.20260826132953-76b2e84da6dd + goa.design/goa/v3 v3.30.1-0.20260826161049-5e4c64c6087d google.golang.org/grpc v1.83.1 google.golang.org/protobuf v1.36.12 ) diff --git a/security/multiauth/go.sum b/security/multiauth/go.sum index 85a7adccb..a95c4f9e3 100644 --- a/security/multiauth/go.sum +++ b/security/multiauth/go.sum @@ -51,8 +51,8 @@ go.opentelemetry.io/otel/trace v1.44.0 h1:jxF5CsGYCe74MCRx2X4g7WsY/VBKRqqpNvXlX/ go.opentelemetry.io/otel/trace v1.44.0/go.mod h1:oLl1jrMQAVo6v3GAggN+1VH9VIz9iUSvW53sW1Q8PIE= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260826132953-76b2e84da6dd h1:lqsEHwRVNZB9E64QeKDODNRzD2YB14O8Q+gMpkO8cyw= -goa.design/goa/v3 v3.30.1-0.20260826132953-76b2e84da6dd/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826161049-5e4c64c6087d h1:iKDq3QEkUYUa3d85cp208gGwBH36e/NpgE37ezzwK5Q= +goa.design/goa/v3 v3.30.1-0.20260826161049-5e4c64c6087d/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/sse/go.mod b/sse/go.mod index e9aab9b90..3706245bf 100644 --- a/sse/go.mod +++ b/sse/go.mod @@ -5,7 +5,7 @@ go 1.26.0 require ( github.com/shirou/gopsutil/v3 v3.24.5 goa.design/clue v1.2.6 - goa.design/goa/v3 v3.30.1-0.20260826132953-76b2e84da6dd + goa.design/goa/v3 v3.30.1-0.20260826161049-5e4c64c6087d ) require ( diff --git a/sse/go.sum b/sse/go.sum index e96a01003..d5d4b310b 100644 --- a/sse/go.sum +++ b/sse/go.sum @@ -74,8 +74,8 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/clue v1.2.6 h1:ensyUkwlvEbNy8FuTGMldKuvaNouh8YoDY9QaE+EtYg= goa.design/clue v1.2.6/go.mod h1:Y4RS5o2k6MZiGk2PT3XbKyntjR2xkr8dYOKQ591dIDM= -goa.design/goa/v3 v3.30.1-0.20260826132953-76b2e84da6dd h1:lqsEHwRVNZB9E64QeKDODNRzD2YB14O8Q+gMpkO8cyw= -goa.design/goa/v3 v3.30.1-0.20260826132953-76b2e84da6dd/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826161049-5e4c64c6087d h1:iKDq3QEkUYUa3d85cp208gGwBH36e/NpgE37ezzwK5Q= +goa.design/goa/v3 v3.30.1-0.20260826161049-5e4c64c6087d/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/streaming/gen/grpc/chatter/client/types.go b/streaming/gen/grpc/chatter/client/types.go index 7d1fb3bfc..f3c2e469b 100644 --- a/streaming/gen/grpc/chatter/client/types.go +++ b/streaming/gen/grpc/chatter/client/types.go @@ -146,7 +146,7 @@ func ValidateEchoerResponse(message *chatterpb.EchoerResponse) (err error) { func ValidateChatSummaryCollection(message *chatterpb.ChatSummaryCollection) (err error) { for _, e := range message.Field { if e != nil { - if err2 := ValidateChatSummary(e); err2 != nil { + if err2 := validatechatter_chatter_ChatSummary_At_elem(e); err2 != nil { err = goa.MergeErrors(err, err2) } } @@ -154,8 +154,9 @@ func ValidateChatSummaryCollection(message *chatterpb.ChatSummaryCollection) (er return } -// ValidateChatSummary runs the validations defined on ChatSummary. -func ValidateChatSummary(elem *chatterpb.ChatSummary) (err error) { +// validatechatter_chatter_ChatSummary_At_elem runs the validations defined on +// ChatSummary. +func validatechatter_chatter_ChatSummary_At_elem(elem *chatterpb.ChatSummary) (err error) { if elem.Message_ == nil { err = goa.MergeErrors(err, goa.MissingFieldError("message", "elem")) } diff --git a/streaming/go.mod b/streaming/go.mod index 463550f4d..54b4cc2e8 100644 --- a/streaming/go.mod +++ b/streaming/go.mod @@ -5,7 +5,7 @@ go 1.26.0 require ( github.com/golang-jwt/jwt/v4 v4.5.2 github.com/gorilla/websocket v1.5.3 - goa.design/goa/v3 v3.30.1-0.20260826132953-76b2e84da6dd + goa.design/goa/v3 v3.30.1-0.20260826161049-5e4c64c6087d google.golang.org/grpc v1.83.1 google.golang.org/protobuf v1.36.12 ) diff --git a/streaming/go.sum b/streaming/go.sum index 85a7adccb..a95c4f9e3 100644 --- a/streaming/go.sum +++ b/streaming/go.sum @@ -51,8 +51,8 @@ go.opentelemetry.io/otel/trace v1.44.0 h1:jxF5CsGYCe74MCRx2X4g7WsY/VBKRqqpNvXlX/ go.opentelemetry.io/otel/trace v1.44.0/go.mod h1:oLl1jrMQAVo6v3GAggN+1VH9VIz9iUSvW53sW1Q8PIE= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260826132953-76b2e84da6dd h1:lqsEHwRVNZB9E64QeKDODNRzD2YB14O8Q+gMpkO8cyw= -goa.design/goa/v3 v3.30.1-0.20260826132953-76b2e84da6dd/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826161049-5e4c64c6087d h1:iKDq3QEkUYUa3d85cp208gGwBH36e/NpgE37ezzwK5Q= +goa.design/goa/v3 v3.30.1-0.20260826161049-5e4c64c6087d/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/tracing/go.mod b/tracing/go.mod index b414752f7..ce31df10b 100644 --- a/tracing/go.mod +++ b/tracing/go.mod @@ -5,7 +5,7 @@ go 1.26.0 require ( github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 goa.design/examples/basic v0.0.0-20260810182504-f834f43955c5 - goa.design/goa/v3 v3.30.1-0.20260826132953-76b2e84da6dd + goa.design/goa/v3 v3.30.1-0.20260826161049-5e4c64c6087d google.golang.org/grpc v1.83.1 ) diff --git a/tracing/go.sum b/tracing/go.sum index 1e056459f..073ddbdfd 100644 --- a/tracing/go.sum +++ b/tracing/go.sum @@ -81,8 +81,8 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/examples/basic v0.0.0-20260810182504-f834f43955c5 h1:SRSrUaLTTdA4bUXb8+zA5MDhMEx8YaP+Knd+pddBcrg= goa.design/examples/basic v0.0.0-20260810182504-f834f43955c5/go.mod h1:XRziIzNcLb9fk7ZrfiHx5FIeAj+orJ4fkzLG0nXpiAo= -goa.design/goa/v3 v3.30.1-0.20260826132953-76b2e84da6dd h1:lqsEHwRVNZB9E64QeKDODNRzD2YB14O8Q+gMpkO8cyw= -goa.design/goa/v3 v3.30.1-0.20260826132953-76b2e84da6dd/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826161049-5e4c64c6087d h1:iKDq3QEkUYUa3d85cp208gGwBH36e/NpgE37ezzwK5Q= +goa.design/goa/v3 v3.30.1-0.20260826161049-5e4c64c6087d/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= diff --git a/tus/go.mod b/tus/go.mod index f8d03c064..da37c12c2 100644 --- a/tus/go.mod +++ b/tus/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( github.com/rs/xid v1.6.0 - goa.design/goa/v3 v3.30.1-0.20260826132953-76b2e84da6dd + goa.design/goa/v3 v3.30.1-0.20260826161049-5e4c64c6087d ) require ( diff --git a/tus/go.sum b/tus/go.sum index 9adf89c1b..c1758d9e2 100644 --- a/tus/go.sum +++ b/tus/go.sum @@ -33,8 +33,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260826132953-76b2e84da6dd h1:lqsEHwRVNZB9E64QeKDODNRzD2YB14O8Q+gMpkO8cyw= -goa.design/goa/v3 v3.30.1-0.20260826132953-76b2e84da6dd/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826161049-5e4c64c6087d h1:iKDq3QEkUYUa3d85cp208gGwBH36e/NpgE37ezzwK5Q= +goa.design/goa/v3 v3.30.1-0.20260826161049-5e4c64c6087d/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= diff --git a/upload_download/go.mod b/upload_download/go.mod index 04774c4c4..9b48618e7 100644 --- a/upload_download/go.mod +++ b/upload_download/go.mod @@ -2,7 +2,7 @@ module goa.design/examples/upload_download go 1.26.0 -require goa.design/goa/v3 v3.30.1-0.20260826132953-76b2e84da6dd +require goa.design/goa/v3 v3.30.1-0.20260826161049-5e4c64c6087d require ( github.com/dimfeld/httppath v0.0.0-20170720192232-ee938bf73598 // indirect diff --git a/upload_download/go.sum b/upload_download/go.sum index 333250c21..8cb30e89a 100644 --- a/upload_download/go.sum +++ b/upload_download/go.sum @@ -31,8 +31,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260826132953-76b2e84da6dd h1:lqsEHwRVNZB9E64QeKDODNRzD2YB14O8Q+gMpkO8cyw= -goa.design/goa/v3 v3.30.1-0.20260826132953-76b2e84da6dd/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826161049-5e4c64c6087d h1:iKDq3QEkUYUa3d85cp208gGwBH36e/NpgE37ezzwK5Q= +goa.design/goa/v3 v3.30.1-0.20260826161049-5e4c64c6087d/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= From b685cc65e349c0641f2038019a965e199e6e09d1 Mon Sep 17 00:00:00 2001 From: "Raphael (manual office deploy after cloud-state fix)" Date: Wed, 26 Aug 2026 10:36:32 -0700 Subject: [PATCH 18/28] chore: pin examples to final Goa generation plan --- basic/go.mod | 2 +- basic/go.sum | 4 ++-- cellar/go.mod | 2 +- cellar/go.sum | 4 ++-- concerts/go.mod | 2 +- concerts/go.sum | 4 ++-- cookies/go.mod | 2 +- cookies/go.sum | 4 ++-- encodings/cbor/go.mod | 2 +- encodings/cbor/go.sum | 4 ++-- encodings/text/go.mod | 2 +- encodings/text/go.sum | 4 ++-- error/go.mod | 2 +- error/go.sum | 4 ++-- files/go.mod | 2 +- files/go.sum | 4 ++-- httpstatus/go.mod | 2 +- httpstatus/go.sum | 4 ++-- interceptors/go.mod | 2 +- interceptors/go.sum | 4 ++-- multipart/go.mod | 2 +- multipart/go.sum | 4 ++-- retry/go.mod | 2 +- retry/go.sum | 4 ++-- security/hierarchy/go.mod | 2 +- security/hierarchy/go.sum | 4 ++-- security/multiauth/go.mod | 2 +- security/multiauth/go.sum | 4 ++-- sse/go.mod | 2 +- sse/go.sum | 4 ++-- streaming/go.mod | 2 +- streaming/go.sum | 4 ++-- tracing/go.mod | 2 +- tracing/go.sum | 4 ++-- tus/go.mod | 2 +- tus/go.sum | 4 ++-- upload_download/go.mod | 2 +- upload_download/go.sum | 4 ++-- 38 files changed, 57 insertions(+), 57 deletions(-) diff --git a/basic/go.mod b/basic/go.mod index 5d261006c..e77bd5695 100644 --- a/basic/go.mod +++ b/basic/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( goa.design/clue v1.2.6 - goa.design/goa/v3 v3.30.1-0.20260826161049-5e4c64c6087d + goa.design/goa/v3 v3.30.1-0.20260826171120-899b46415849 google.golang.org/grpc v1.83.1 google.golang.org/protobuf v1.36.12 ) diff --git a/basic/go.sum b/basic/go.sum index a8ce74e72..930bdbc38 100644 --- a/basic/go.sum +++ b/basic/go.sum @@ -55,8 +55,8 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/clue v1.2.6 h1:ensyUkwlvEbNy8FuTGMldKuvaNouh8YoDY9QaE+EtYg= goa.design/clue v1.2.6/go.mod h1:Y4RS5o2k6MZiGk2PT3XbKyntjR2xkr8dYOKQ591dIDM= -goa.design/goa/v3 v3.30.1-0.20260826161049-5e4c64c6087d h1:iKDq3QEkUYUa3d85cp208gGwBH36e/NpgE37ezzwK5Q= -goa.design/goa/v3 v3.30.1-0.20260826161049-5e4c64c6087d/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826171120-899b46415849 h1:hJE2Y7DflXvYIMmkDg8I1LfmaFgOyynWh9Na7LW4acg= +goa.design/goa/v3 v3.30.1-0.20260826171120-899b46415849/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/cellar/go.mod b/cellar/go.mod index 6c333a112..340735fdb 100644 --- a/cellar/go.mod +++ b/cellar/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( github.com/boltdb/bolt v1.3.1 - goa.design/goa/v3 v3.30.1-0.20260826161049-5e4c64c6087d + goa.design/goa/v3 v3.30.1-0.20260826171120-899b46415849 google.golang.org/grpc v1.83.1 google.golang.org/protobuf v1.36.12 ) diff --git a/cellar/go.sum b/cellar/go.sum index 89ba3f97f..e6f6dfb03 100644 --- a/cellar/go.sum +++ b/cellar/go.sum @@ -51,8 +51,8 @@ go.opentelemetry.io/otel/trace v1.44.0 h1:jxF5CsGYCe74MCRx2X4g7WsY/VBKRqqpNvXlX/ go.opentelemetry.io/otel/trace v1.44.0/go.mod h1:oLl1jrMQAVo6v3GAggN+1VH9VIz9iUSvW53sW1Q8PIE= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260826161049-5e4c64c6087d h1:iKDq3QEkUYUa3d85cp208gGwBH36e/NpgE37ezzwK5Q= -goa.design/goa/v3 v3.30.1-0.20260826161049-5e4c64c6087d/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826171120-899b46415849 h1:hJE2Y7DflXvYIMmkDg8I1LfmaFgOyynWh9Na7LW4acg= +goa.design/goa/v3 v3.30.1-0.20260826171120-899b46415849/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/concerts/go.mod b/concerts/go.mod index 7953f0b69..aa2370515 100644 --- a/concerts/go.mod +++ b/concerts/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( github.com/google/uuid v1.6.0 - goa.design/goa/v3 v3.30.1-0.20260826161049-5e4c64c6087d + goa.design/goa/v3 v3.30.1-0.20260826171120-899b46415849 ) require ( diff --git a/concerts/go.sum b/concerts/go.sum index 8cb30e89a..2060e9dbd 100644 --- a/concerts/go.sum +++ b/concerts/go.sum @@ -31,8 +31,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260826161049-5e4c64c6087d h1:iKDq3QEkUYUa3d85cp208gGwBH36e/NpgE37ezzwK5Q= -goa.design/goa/v3 v3.30.1-0.20260826161049-5e4c64c6087d/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826171120-899b46415849 h1:hJE2Y7DflXvYIMmkDg8I1LfmaFgOyynWh9Na7LW4acg= +goa.design/goa/v3 v3.30.1-0.20260826171120-899b46415849/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= diff --git a/cookies/go.mod b/cookies/go.mod index be448b779..664b42027 100644 --- a/cookies/go.mod +++ b/cookies/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( github.com/rs/xid v1.6.0 - goa.design/goa/v3 v3.30.1-0.20260826161049-5e4c64c6087d + goa.design/goa/v3 v3.30.1-0.20260826171120-899b46415849 ) require ( diff --git a/cookies/go.sum b/cookies/go.sum index c1758d9e2..5608a3a74 100644 --- a/cookies/go.sum +++ b/cookies/go.sum @@ -33,8 +33,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260826161049-5e4c64c6087d h1:iKDq3QEkUYUa3d85cp208gGwBH36e/NpgE37ezzwK5Q= -goa.design/goa/v3 v3.30.1-0.20260826161049-5e4c64c6087d/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826171120-899b46415849 h1:hJE2Y7DflXvYIMmkDg8I1LfmaFgOyynWh9Na7LW4acg= +goa.design/goa/v3 v3.30.1-0.20260826171120-899b46415849/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= diff --git a/encodings/cbor/go.mod b/encodings/cbor/go.mod index 5976fd817..d7e51fb9b 100644 --- a/encodings/cbor/go.mod +++ b/encodings/cbor/go.mod @@ -5,7 +5,7 @@ go 1.26.0 require ( github.com/fxamacker/cbor/v2 v2.9.2 goa.design/clue v1.2.6 - goa.design/goa/v3 v3.30.1-0.20260826161049-5e4c64c6087d + goa.design/goa/v3 v3.30.1-0.20260826171120-899b46415849 ) require ( diff --git a/encodings/cbor/go.sum b/encodings/cbor/go.sum index 2b517a620..46e71a336 100644 --- a/encodings/cbor/go.sum +++ b/encodings/cbor/go.sum @@ -59,8 +59,8 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/clue v1.2.6 h1:ensyUkwlvEbNy8FuTGMldKuvaNouh8YoDY9QaE+EtYg= goa.design/clue v1.2.6/go.mod h1:Y4RS5o2k6MZiGk2PT3XbKyntjR2xkr8dYOKQ591dIDM= -goa.design/goa/v3 v3.30.1-0.20260826161049-5e4c64c6087d h1:iKDq3QEkUYUa3d85cp208gGwBH36e/NpgE37ezzwK5Q= -goa.design/goa/v3 v3.30.1-0.20260826161049-5e4c64c6087d/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826171120-899b46415849 h1:hJE2Y7DflXvYIMmkDg8I1LfmaFgOyynWh9Na7LW4acg= +goa.design/goa/v3 v3.30.1-0.20260826171120-899b46415849/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/encodings/text/go.mod b/encodings/text/go.mod index 395d4ed96..6dc4b33b2 100644 --- a/encodings/text/go.mod +++ b/encodings/text/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( goa.design/clue v1.2.6 - goa.design/goa/v3 v3.30.1-0.20260826161049-5e4c64c6087d + goa.design/goa/v3 v3.30.1-0.20260826171120-899b46415849 ) require ( diff --git a/encodings/text/go.sum b/encodings/text/go.sum index a8ce74e72..930bdbc38 100644 --- a/encodings/text/go.sum +++ b/encodings/text/go.sum @@ -55,8 +55,8 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/clue v1.2.6 h1:ensyUkwlvEbNy8FuTGMldKuvaNouh8YoDY9QaE+EtYg= goa.design/clue v1.2.6/go.mod h1:Y4RS5o2k6MZiGk2PT3XbKyntjR2xkr8dYOKQ591dIDM= -goa.design/goa/v3 v3.30.1-0.20260826161049-5e4c64c6087d h1:iKDq3QEkUYUa3d85cp208gGwBH36e/NpgE37ezzwK5Q= -goa.design/goa/v3 v3.30.1-0.20260826161049-5e4c64c6087d/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826171120-899b46415849 h1:hJE2Y7DflXvYIMmkDg8I1LfmaFgOyynWh9Na7LW4acg= +goa.design/goa/v3 v3.30.1-0.20260826171120-899b46415849/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/error/go.mod b/error/go.mod index deb2608d1..578bab551 100644 --- a/error/go.mod +++ b/error/go.mod @@ -3,7 +3,7 @@ module goa.design/examples/error go 1.26.0 require ( - goa.design/goa/v3 v3.30.1-0.20260826161049-5e4c64c6087d + goa.design/goa/v3 v3.30.1-0.20260826171120-899b46415849 google.golang.org/genproto v0.0.0-20260810153831-ec0a7760b754 google.golang.org/grpc v1.83.1 google.golang.org/protobuf v1.36.12 diff --git a/error/go.sum b/error/go.sum index 0c297c207..66410a718 100644 --- a/error/go.sum +++ b/error/go.sum @@ -49,8 +49,8 @@ go.opentelemetry.io/otel/trace v1.44.0 h1:jxF5CsGYCe74MCRx2X4g7WsY/VBKRqqpNvXlX/ go.opentelemetry.io/otel/trace v1.44.0/go.mod h1:oLl1jrMQAVo6v3GAggN+1VH9VIz9iUSvW53sW1Q8PIE= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260826161049-5e4c64c6087d h1:iKDq3QEkUYUa3d85cp208gGwBH36e/NpgE37ezzwK5Q= -goa.design/goa/v3 v3.30.1-0.20260826161049-5e4c64c6087d/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826171120-899b46415849 h1:hJE2Y7DflXvYIMmkDg8I1LfmaFgOyynWh9Na7LW4acg= +goa.design/goa/v3 v3.30.1-0.20260826171120-899b46415849/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/files/go.mod b/files/go.mod index 8b8c67082..50c716fdb 100644 --- a/files/go.mod +++ b/files/go.mod @@ -2,7 +2,7 @@ module goa.design/examples/files go 1.26.0 -require goa.design/goa/v3 v3.30.1-0.20260826161049-5e4c64c6087d +require goa.design/goa/v3 v3.30.1-0.20260826171120-899b46415849 require ( github.com/dimfeld/httppath v0.0.0-20170720192232-ee938bf73598 // indirect diff --git a/files/go.sum b/files/go.sum index 8cb30e89a..2060e9dbd 100644 --- a/files/go.sum +++ b/files/go.sum @@ -31,8 +31,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260826161049-5e4c64c6087d h1:iKDq3QEkUYUa3d85cp208gGwBH36e/NpgE37ezzwK5Q= -goa.design/goa/v3 v3.30.1-0.20260826161049-5e4c64c6087d/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826171120-899b46415849 h1:hJE2Y7DflXvYIMmkDg8I1LfmaFgOyynWh9Na7LW4acg= +goa.design/goa/v3 v3.30.1-0.20260826171120-899b46415849/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= diff --git a/httpstatus/go.mod b/httpstatus/go.mod index 88e34c6cb..52fd7a560 100644 --- a/httpstatus/go.mod +++ b/httpstatus/go.mod @@ -2,7 +2,7 @@ module goa.design/examples/httpstatus go 1.26.0 -require goa.design/goa/v3 v3.30.1-0.20260826161049-5e4c64c6087d +require goa.design/goa/v3 v3.30.1-0.20260826171120-899b46415849 require ( github.com/dimfeld/httppath v0.0.0-20170720192232-ee938bf73598 // indirect diff --git a/httpstatus/go.sum b/httpstatus/go.sum index 8cb30e89a..2060e9dbd 100644 --- a/httpstatus/go.sum +++ b/httpstatus/go.sum @@ -31,8 +31,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260826161049-5e4c64c6087d h1:iKDq3QEkUYUa3d85cp208gGwBH36e/NpgE37ezzwK5Q= -goa.design/goa/v3 v3.30.1-0.20260826161049-5e4c64c6087d/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826171120-899b46415849 h1:hJE2Y7DflXvYIMmkDg8I1LfmaFgOyynWh9Na7LW4acg= +goa.design/goa/v3 v3.30.1-0.20260826171120-899b46415849/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= diff --git a/interceptors/go.mod b/interceptors/go.mod index 51d8caa97..f8dc43765 100644 --- a/interceptors/go.mod +++ b/interceptors/go.mod @@ -6,7 +6,7 @@ require ( github.com/google/uuid v1.6.0 github.com/gorilla/websocket v1.5.3 goa.design/clue v1.2.6 - goa.design/goa/v3 v3.30.1-0.20260826161049-5e4c64c6087d + goa.design/goa/v3 v3.30.1-0.20260826171120-899b46415849 google.golang.org/grpc v1.83.1 google.golang.org/protobuf v1.36.12 ) diff --git a/interceptors/go.sum b/interceptors/go.sum index a8ce74e72..930bdbc38 100644 --- a/interceptors/go.sum +++ b/interceptors/go.sum @@ -55,8 +55,8 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/clue v1.2.6 h1:ensyUkwlvEbNy8FuTGMldKuvaNouh8YoDY9QaE+EtYg= goa.design/clue v1.2.6/go.mod h1:Y4RS5o2k6MZiGk2PT3XbKyntjR2xkr8dYOKQ591dIDM= -goa.design/goa/v3 v3.30.1-0.20260826161049-5e4c64c6087d h1:iKDq3QEkUYUa3d85cp208gGwBH36e/NpgE37ezzwK5Q= -goa.design/goa/v3 v3.30.1-0.20260826161049-5e4c64c6087d/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826171120-899b46415849 h1:hJE2Y7DflXvYIMmkDg8I1LfmaFgOyynWh9Na7LW4acg= +goa.design/goa/v3 v3.30.1-0.20260826171120-899b46415849/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/multipart/go.mod b/multipart/go.mod index 1d7a2a37f..21776a4e5 100644 --- a/multipart/go.mod +++ b/multipart/go.mod @@ -2,7 +2,7 @@ module goa.design/examples/multipart go 1.26.0 -require goa.design/goa/v3 v3.30.1-0.20260826161049-5e4c64c6087d +require goa.design/goa/v3 v3.30.1-0.20260826171120-899b46415849 require ( github.com/dimfeld/httppath v0.0.0-20170720192232-ee938bf73598 // indirect diff --git a/multipart/go.sum b/multipart/go.sum index 8cb30e89a..2060e9dbd 100644 --- a/multipart/go.sum +++ b/multipart/go.sum @@ -31,8 +31,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260826161049-5e4c64c6087d h1:iKDq3QEkUYUa3d85cp208gGwBH36e/NpgE37ezzwK5Q= -goa.design/goa/v3 v3.30.1-0.20260826161049-5e4c64c6087d/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826171120-899b46415849 h1:hJE2Y7DflXvYIMmkDg8I1LfmaFgOyynWh9Na7LW4acg= +goa.design/goa/v3 v3.30.1-0.20260826171120-899b46415849/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= diff --git a/retry/go.mod b/retry/go.mod index 17fbbaf64..00d34a6cd 100644 --- a/retry/go.mod +++ b/retry/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( goa.design/clue v1.2.6 - goa.design/goa/v3 v3.30.1-0.20260826161049-5e4c64c6087d + goa.design/goa/v3 v3.30.1-0.20260826171120-899b46415849 google.golang.org/grpc v1.83.1 google.golang.org/protobuf v1.36.12 ) diff --git a/retry/go.sum b/retry/go.sum index 820f67703..05ba477b4 100644 --- a/retry/go.sum +++ b/retry/go.sum @@ -52,8 +52,8 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/clue v1.2.6 h1:ensyUkwlvEbNy8FuTGMldKuvaNouh8YoDY9QaE+EtYg= goa.design/clue v1.2.6/go.mod h1:Y4RS5o2k6MZiGk2PT3XbKyntjR2xkr8dYOKQ591dIDM= -goa.design/goa/v3 v3.30.1-0.20260826161049-5e4c64c6087d h1:iKDq3QEkUYUa3d85cp208gGwBH36e/NpgE37ezzwK5Q= -goa.design/goa/v3 v3.30.1-0.20260826161049-5e4c64c6087d/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826171120-899b46415849 h1:hJE2Y7DflXvYIMmkDg8I1LfmaFgOyynWh9Na7LW4acg= +goa.design/goa/v3 v3.30.1-0.20260826171120-899b46415849/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/security/hierarchy/go.mod b/security/hierarchy/go.mod index eee31378f..355f3088b 100644 --- a/security/hierarchy/go.mod +++ b/security/hierarchy/go.mod @@ -2,7 +2,7 @@ module goa.design/examples/security/hierarchy go 1.26.0 -require goa.design/goa/v3 v3.30.1-0.20260826161049-5e4c64c6087d +require goa.design/goa/v3 v3.30.1-0.20260826171120-899b46415849 require ( github.com/dimfeld/httppath v0.0.0-20170720192232-ee938bf73598 // indirect diff --git a/security/hierarchy/go.sum b/security/hierarchy/go.sum index 8cb30e89a..2060e9dbd 100644 --- a/security/hierarchy/go.sum +++ b/security/hierarchy/go.sum @@ -31,8 +31,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260826161049-5e4c64c6087d h1:iKDq3QEkUYUa3d85cp208gGwBH36e/NpgE37ezzwK5Q= -goa.design/goa/v3 v3.30.1-0.20260826161049-5e4c64c6087d/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826171120-899b46415849 h1:hJE2Y7DflXvYIMmkDg8I1LfmaFgOyynWh9Na7LW4acg= +goa.design/goa/v3 v3.30.1-0.20260826171120-899b46415849/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= diff --git a/security/multiauth/go.mod b/security/multiauth/go.mod index 14a4ca7cf..cd213ede8 100644 --- a/security/multiauth/go.mod +++ b/security/multiauth/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( github.com/golang-jwt/jwt/v4 v4.5.2 - goa.design/goa/v3 v3.30.1-0.20260826161049-5e4c64c6087d + goa.design/goa/v3 v3.30.1-0.20260826171120-899b46415849 google.golang.org/grpc v1.83.1 google.golang.org/protobuf v1.36.12 ) diff --git a/security/multiauth/go.sum b/security/multiauth/go.sum index a95c4f9e3..011fca0c3 100644 --- a/security/multiauth/go.sum +++ b/security/multiauth/go.sum @@ -51,8 +51,8 @@ go.opentelemetry.io/otel/trace v1.44.0 h1:jxF5CsGYCe74MCRx2X4g7WsY/VBKRqqpNvXlX/ go.opentelemetry.io/otel/trace v1.44.0/go.mod h1:oLl1jrMQAVo6v3GAggN+1VH9VIz9iUSvW53sW1Q8PIE= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260826161049-5e4c64c6087d h1:iKDq3QEkUYUa3d85cp208gGwBH36e/NpgE37ezzwK5Q= -goa.design/goa/v3 v3.30.1-0.20260826161049-5e4c64c6087d/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826171120-899b46415849 h1:hJE2Y7DflXvYIMmkDg8I1LfmaFgOyynWh9Na7LW4acg= +goa.design/goa/v3 v3.30.1-0.20260826171120-899b46415849/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/sse/go.mod b/sse/go.mod index 3706245bf..8aa086c31 100644 --- a/sse/go.mod +++ b/sse/go.mod @@ -5,7 +5,7 @@ go 1.26.0 require ( github.com/shirou/gopsutil/v3 v3.24.5 goa.design/clue v1.2.6 - goa.design/goa/v3 v3.30.1-0.20260826161049-5e4c64c6087d + goa.design/goa/v3 v3.30.1-0.20260826171120-899b46415849 ) require ( diff --git a/sse/go.sum b/sse/go.sum index d5d4b310b..6504e30cb 100644 --- a/sse/go.sum +++ b/sse/go.sum @@ -74,8 +74,8 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/clue v1.2.6 h1:ensyUkwlvEbNy8FuTGMldKuvaNouh8YoDY9QaE+EtYg= goa.design/clue v1.2.6/go.mod h1:Y4RS5o2k6MZiGk2PT3XbKyntjR2xkr8dYOKQ591dIDM= -goa.design/goa/v3 v3.30.1-0.20260826161049-5e4c64c6087d h1:iKDq3QEkUYUa3d85cp208gGwBH36e/NpgE37ezzwK5Q= -goa.design/goa/v3 v3.30.1-0.20260826161049-5e4c64c6087d/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826171120-899b46415849 h1:hJE2Y7DflXvYIMmkDg8I1LfmaFgOyynWh9Na7LW4acg= +goa.design/goa/v3 v3.30.1-0.20260826171120-899b46415849/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/streaming/go.mod b/streaming/go.mod index 54b4cc2e8..58dd583d6 100644 --- a/streaming/go.mod +++ b/streaming/go.mod @@ -5,7 +5,7 @@ go 1.26.0 require ( github.com/golang-jwt/jwt/v4 v4.5.2 github.com/gorilla/websocket v1.5.3 - goa.design/goa/v3 v3.30.1-0.20260826161049-5e4c64c6087d + goa.design/goa/v3 v3.30.1-0.20260826171120-899b46415849 google.golang.org/grpc v1.83.1 google.golang.org/protobuf v1.36.12 ) diff --git a/streaming/go.sum b/streaming/go.sum index a95c4f9e3..011fca0c3 100644 --- a/streaming/go.sum +++ b/streaming/go.sum @@ -51,8 +51,8 @@ go.opentelemetry.io/otel/trace v1.44.0 h1:jxF5CsGYCe74MCRx2X4g7WsY/VBKRqqpNvXlX/ go.opentelemetry.io/otel/trace v1.44.0/go.mod h1:oLl1jrMQAVo6v3GAggN+1VH9VIz9iUSvW53sW1Q8PIE= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260826161049-5e4c64c6087d h1:iKDq3QEkUYUa3d85cp208gGwBH36e/NpgE37ezzwK5Q= -goa.design/goa/v3 v3.30.1-0.20260826161049-5e4c64c6087d/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826171120-899b46415849 h1:hJE2Y7DflXvYIMmkDg8I1LfmaFgOyynWh9Na7LW4acg= +goa.design/goa/v3 v3.30.1-0.20260826171120-899b46415849/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/tracing/go.mod b/tracing/go.mod index ce31df10b..5b3552019 100644 --- a/tracing/go.mod +++ b/tracing/go.mod @@ -5,7 +5,7 @@ go 1.26.0 require ( github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 goa.design/examples/basic v0.0.0-20260810182504-f834f43955c5 - goa.design/goa/v3 v3.30.1-0.20260826161049-5e4c64c6087d + goa.design/goa/v3 v3.30.1-0.20260826171120-899b46415849 google.golang.org/grpc v1.83.1 ) diff --git a/tracing/go.sum b/tracing/go.sum index 073ddbdfd..605b5c3ad 100644 --- a/tracing/go.sum +++ b/tracing/go.sum @@ -81,8 +81,8 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/examples/basic v0.0.0-20260810182504-f834f43955c5 h1:SRSrUaLTTdA4bUXb8+zA5MDhMEx8YaP+Knd+pddBcrg= goa.design/examples/basic v0.0.0-20260810182504-f834f43955c5/go.mod h1:XRziIzNcLb9fk7ZrfiHx5FIeAj+orJ4fkzLG0nXpiAo= -goa.design/goa/v3 v3.30.1-0.20260826161049-5e4c64c6087d h1:iKDq3QEkUYUa3d85cp208gGwBH36e/NpgE37ezzwK5Q= -goa.design/goa/v3 v3.30.1-0.20260826161049-5e4c64c6087d/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826171120-899b46415849 h1:hJE2Y7DflXvYIMmkDg8I1LfmaFgOyynWh9Na7LW4acg= +goa.design/goa/v3 v3.30.1-0.20260826171120-899b46415849/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= diff --git a/tus/go.mod b/tus/go.mod index da37c12c2..b4c955eba 100644 --- a/tus/go.mod +++ b/tus/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( github.com/rs/xid v1.6.0 - goa.design/goa/v3 v3.30.1-0.20260826161049-5e4c64c6087d + goa.design/goa/v3 v3.30.1-0.20260826171120-899b46415849 ) require ( diff --git a/tus/go.sum b/tus/go.sum index c1758d9e2..5608a3a74 100644 --- a/tus/go.sum +++ b/tus/go.sum @@ -33,8 +33,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260826161049-5e4c64c6087d h1:iKDq3QEkUYUa3d85cp208gGwBH36e/NpgE37ezzwK5Q= -goa.design/goa/v3 v3.30.1-0.20260826161049-5e4c64c6087d/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826171120-899b46415849 h1:hJE2Y7DflXvYIMmkDg8I1LfmaFgOyynWh9Na7LW4acg= +goa.design/goa/v3 v3.30.1-0.20260826171120-899b46415849/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= diff --git a/upload_download/go.mod b/upload_download/go.mod index 9b48618e7..a90b3f9a8 100644 --- a/upload_download/go.mod +++ b/upload_download/go.mod @@ -2,7 +2,7 @@ module goa.design/examples/upload_download go 1.26.0 -require goa.design/goa/v3 v3.30.1-0.20260826161049-5e4c64c6087d +require goa.design/goa/v3 v3.30.1-0.20260826171120-899b46415849 require ( github.com/dimfeld/httppath v0.0.0-20170720192232-ee938bf73598 // indirect diff --git a/upload_download/go.sum b/upload_download/go.sum index 8cb30e89a..2060e9dbd 100644 --- a/upload_download/go.sum +++ b/upload_download/go.sum @@ -31,8 +31,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260826161049-5e4c64c6087d h1:iKDq3QEkUYUa3d85cp208gGwBH36e/NpgE37ezzwK5Q= -goa.design/goa/v3 v3.30.1-0.20260826161049-5e4c64c6087d/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826171120-899b46415849 h1:hJE2Y7DflXvYIMmkDg8I1LfmaFgOyynWh9Na7LW4acg= +goa.design/goa/v3 v3.30.1-0.20260826171120-899b46415849/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= From a8d1b3cf1165b046134540db710952f09b26de0c Mon Sep 17 00:00:00 2001 From: "Raphael (manual office deploy after cloud-state fix)" Date: Wed, 26 Aug 2026 11:55:28 -0700 Subject: [PATCH 19/28] chore: pin examples to final Goa API --- basic/go.mod | 2 +- basic/go.sum | 4 ++-- cellar/go.mod | 2 +- cellar/go.sum | 4 ++-- concerts/go.mod | 2 +- concerts/go.sum | 4 ++-- cookies/go.mod | 2 +- cookies/go.sum | 4 ++-- encodings/cbor/go.mod | 2 +- encodings/cbor/go.sum | 4 ++-- encodings/text/go.mod | 2 +- encodings/text/go.sum | 4 ++-- error/go.mod | 2 +- error/go.sum | 4 ++-- files/go.mod | 2 +- files/go.sum | 4 ++-- httpstatus/go.mod | 3 +-- httpstatus/go.sum | 6 ++---- interceptors/go.mod | 2 +- interceptors/go.sum | 4 ++-- multipart/go.mod | 2 +- multipart/go.sum | 4 ++-- retry/go.mod | 2 +- retry/go.sum | 4 ++-- security/hierarchy/go.mod | 2 +- security/hierarchy/go.sum | 4 ++-- security/multiauth/go.mod | 2 +- security/multiauth/go.sum | 4 ++-- sse/go.mod | 2 +- sse/go.sum | 4 ++-- streaming/go.mod | 2 +- streaming/go.sum | 4 ++-- tracing/go.mod | 2 +- tracing/go.sum | 4 ++-- tus/go.mod | 2 +- tus/go.sum | 4 ++-- upload_download/go.mod | 2 +- upload_download/go.sum | 4 ++-- 38 files changed, 57 insertions(+), 60 deletions(-) diff --git a/basic/go.mod b/basic/go.mod index e77bd5695..4e19ec81a 100644 --- a/basic/go.mod +++ b/basic/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( goa.design/clue v1.2.6 - goa.design/goa/v3 v3.30.1-0.20260826171120-899b46415849 + goa.design/goa/v3 v3.30.1-0.20260826184016-9e4a965c104e google.golang.org/grpc v1.83.1 google.golang.org/protobuf v1.36.12 ) diff --git a/basic/go.sum b/basic/go.sum index 930bdbc38..9c72ec951 100644 --- a/basic/go.sum +++ b/basic/go.sum @@ -55,8 +55,8 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/clue v1.2.6 h1:ensyUkwlvEbNy8FuTGMldKuvaNouh8YoDY9QaE+EtYg= goa.design/clue v1.2.6/go.mod h1:Y4RS5o2k6MZiGk2PT3XbKyntjR2xkr8dYOKQ591dIDM= -goa.design/goa/v3 v3.30.1-0.20260826171120-899b46415849 h1:hJE2Y7DflXvYIMmkDg8I1LfmaFgOyynWh9Na7LW4acg= -goa.design/goa/v3 v3.30.1-0.20260826171120-899b46415849/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826184016-9e4a965c104e h1:QnJ0egMXHnPUfKUCLb9+BqwRDDAtOahNbKWU3bWbrgQ= +goa.design/goa/v3 v3.30.1-0.20260826184016-9e4a965c104e/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/cellar/go.mod b/cellar/go.mod index 340735fdb..c3e663c42 100644 --- a/cellar/go.mod +++ b/cellar/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( github.com/boltdb/bolt v1.3.1 - goa.design/goa/v3 v3.30.1-0.20260826171120-899b46415849 + goa.design/goa/v3 v3.30.1-0.20260826184016-9e4a965c104e google.golang.org/grpc v1.83.1 google.golang.org/protobuf v1.36.12 ) diff --git a/cellar/go.sum b/cellar/go.sum index e6f6dfb03..be64d8371 100644 --- a/cellar/go.sum +++ b/cellar/go.sum @@ -51,8 +51,8 @@ go.opentelemetry.io/otel/trace v1.44.0 h1:jxF5CsGYCe74MCRx2X4g7WsY/VBKRqqpNvXlX/ go.opentelemetry.io/otel/trace v1.44.0/go.mod h1:oLl1jrMQAVo6v3GAggN+1VH9VIz9iUSvW53sW1Q8PIE= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260826171120-899b46415849 h1:hJE2Y7DflXvYIMmkDg8I1LfmaFgOyynWh9Na7LW4acg= -goa.design/goa/v3 v3.30.1-0.20260826171120-899b46415849/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826184016-9e4a965c104e h1:QnJ0egMXHnPUfKUCLb9+BqwRDDAtOahNbKWU3bWbrgQ= +goa.design/goa/v3 v3.30.1-0.20260826184016-9e4a965c104e/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/concerts/go.mod b/concerts/go.mod index aa2370515..1cd3a59a4 100644 --- a/concerts/go.mod +++ b/concerts/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( github.com/google/uuid v1.6.0 - goa.design/goa/v3 v3.30.1-0.20260826171120-899b46415849 + goa.design/goa/v3 v3.30.1-0.20260826184016-9e4a965c104e ) require ( diff --git a/concerts/go.sum b/concerts/go.sum index 2060e9dbd..9f851e536 100644 --- a/concerts/go.sum +++ b/concerts/go.sum @@ -31,8 +31,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260826171120-899b46415849 h1:hJE2Y7DflXvYIMmkDg8I1LfmaFgOyynWh9Na7LW4acg= -goa.design/goa/v3 v3.30.1-0.20260826171120-899b46415849/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826184016-9e4a965c104e h1:QnJ0egMXHnPUfKUCLb9+BqwRDDAtOahNbKWU3bWbrgQ= +goa.design/goa/v3 v3.30.1-0.20260826184016-9e4a965c104e/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= diff --git a/cookies/go.mod b/cookies/go.mod index 664b42027..9807508ea 100644 --- a/cookies/go.mod +++ b/cookies/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( github.com/rs/xid v1.6.0 - goa.design/goa/v3 v3.30.1-0.20260826171120-899b46415849 + goa.design/goa/v3 v3.30.1-0.20260826184016-9e4a965c104e ) require ( diff --git a/cookies/go.sum b/cookies/go.sum index 5608a3a74..da8571fb3 100644 --- a/cookies/go.sum +++ b/cookies/go.sum @@ -33,8 +33,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260826171120-899b46415849 h1:hJE2Y7DflXvYIMmkDg8I1LfmaFgOyynWh9Na7LW4acg= -goa.design/goa/v3 v3.30.1-0.20260826171120-899b46415849/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826184016-9e4a965c104e h1:QnJ0egMXHnPUfKUCLb9+BqwRDDAtOahNbKWU3bWbrgQ= +goa.design/goa/v3 v3.30.1-0.20260826184016-9e4a965c104e/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= diff --git a/encodings/cbor/go.mod b/encodings/cbor/go.mod index d7e51fb9b..2c741dbb6 100644 --- a/encodings/cbor/go.mod +++ b/encodings/cbor/go.mod @@ -5,7 +5,7 @@ go 1.26.0 require ( github.com/fxamacker/cbor/v2 v2.9.2 goa.design/clue v1.2.6 - goa.design/goa/v3 v3.30.1-0.20260826171120-899b46415849 + goa.design/goa/v3 v3.30.1-0.20260826184016-9e4a965c104e ) require ( diff --git a/encodings/cbor/go.sum b/encodings/cbor/go.sum index 46e71a336..1ded1c288 100644 --- a/encodings/cbor/go.sum +++ b/encodings/cbor/go.sum @@ -59,8 +59,8 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/clue v1.2.6 h1:ensyUkwlvEbNy8FuTGMldKuvaNouh8YoDY9QaE+EtYg= goa.design/clue v1.2.6/go.mod h1:Y4RS5o2k6MZiGk2PT3XbKyntjR2xkr8dYOKQ591dIDM= -goa.design/goa/v3 v3.30.1-0.20260826171120-899b46415849 h1:hJE2Y7DflXvYIMmkDg8I1LfmaFgOyynWh9Na7LW4acg= -goa.design/goa/v3 v3.30.1-0.20260826171120-899b46415849/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826184016-9e4a965c104e h1:QnJ0egMXHnPUfKUCLb9+BqwRDDAtOahNbKWU3bWbrgQ= +goa.design/goa/v3 v3.30.1-0.20260826184016-9e4a965c104e/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/encodings/text/go.mod b/encodings/text/go.mod index 6dc4b33b2..369895090 100644 --- a/encodings/text/go.mod +++ b/encodings/text/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( goa.design/clue v1.2.6 - goa.design/goa/v3 v3.30.1-0.20260826171120-899b46415849 + goa.design/goa/v3 v3.30.1-0.20260826184016-9e4a965c104e ) require ( diff --git a/encodings/text/go.sum b/encodings/text/go.sum index 930bdbc38..9c72ec951 100644 --- a/encodings/text/go.sum +++ b/encodings/text/go.sum @@ -55,8 +55,8 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/clue v1.2.6 h1:ensyUkwlvEbNy8FuTGMldKuvaNouh8YoDY9QaE+EtYg= goa.design/clue v1.2.6/go.mod h1:Y4RS5o2k6MZiGk2PT3XbKyntjR2xkr8dYOKQ591dIDM= -goa.design/goa/v3 v3.30.1-0.20260826171120-899b46415849 h1:hJE2Y7DflXvYIMmkDg8I1LfmaFgOyynWh9Na7LW4acg= -goa.design/goa/v3 v3.30.1-0.20260826171120-899b46415849/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826184016-9e4a965c104e h1:QnJ0egMXHnPUfKUCLb9+BqwRDDAtOahNbKWU3bWbrgQ= +goa.design/goa/v3 v3.30.1-0.20260826184016-9e4a965c104e/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/error/go.mod b/error/go.mod index 578bab551..50f9ed542 100644 --- a/error/go.mod +++ b/error/go.mod @@ -3,7 +3,7 @@ module goa.design/examples/error go 1.26.0 require ( - goa.design/goa/v3 v3.30.1-0.20260826171120-899b46415849 + goa.design/goa/v3 v3.30.1-0.20260826184016-9e4a965c104e google.golang.org/genproto v0.0.0-20260810153831-ec0a7760b754 google.golang.org/grpc v1.83.1 google.golang.org/protobuf v1.36.12 diff --git a/error/go.sum b/error/go.sum index 66410a718..eafe4b8d0 100644 --- a/error/go.sum +++ b/error/go.sum @@ -49,8 +49,8 @@ go.opentelemetry.io/otel/trace v1.44.0 h1:jxF5CsGYCe74MCRx2X4g7WsY/VBKRqqpNvXlX/ go.opentelemetry.io/otel/trace v1.44.0/go.mod h1:oLl1jrMQAVo6v3GAggN+1VH9VIz9iUSvW53sW1Q8PIE= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260826171120-899b46415849 h1:hJE2Y7DflXvYIMmkDg8I1LfmaFgOyynWh9Na7LW4acg= -goa.design/goa/v3 v3.30.1-0.20260826171120-899b46415849/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826184016-9e4a965c104e h1:QnJ0egMXHnPUfKUCLb9+BqwRDDAtOahNbKWU3bWbrgQ= +goa.design/goa/v3 v3.30.1-0.20260826184016-9e4a965c104e/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/files/go.mod b/files/go.mod index 50c716fdb..5ad39573e 100644 --- a/files/go.mod +++ b/files/go.mod @@ -2,7 +2,7 @@ module goa.design/examples/files go 1.26.0 -require goa.design/goa/v3 v3.30.1-0.20260826171120-899b46415849 +require goa.design/goa/v3 v3.30.1-0.20260826184016-9e4a965c104e require ( github.com/dimfeld/httppath v0.0.0-20170720192232-ee938bf73598 // indirect diff --git a/files/go.sum b/files/go.sum index 2060e9dbd..9f851e536 100644 --- a/files/go.sum +++ b/files/go.sum @@ -31,8 +31,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260826171120-899b46415849 h1:hJE2Y7DflXvYIMmkDg8I1LfmaFgOyynWh9Na7LW4acg= -goa.design/goa/v3 v3.30.1-0.20260826171120-899b46415849/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826184016-9e4a965c104e h1:QnJ0egMXHnPUfKUCLb9+BqwRDDAtOahNbKWU3bWbrgQ= +goa.design/goa/v3 v3.30.1-0.20260826184016-9e4a965c104e/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= diff --git a/httpstatus/go.mod b/httpstatus/go.mod index 52fd7a560..be934d68a 100644 --- a/httpstatus/go.mod +++ b/httpstatus/go.mod @@ -2,7 +2,7 @@ module goa.design/examples/httpstatus go 1.26.0 -require goa.design/goa/v3 v3.30.1-0.20260826171120-899b46415849 +require goa.design/goa/v3 v3.30.1-0.20260826184016-9e4a965c104e require ( github.com/dimfeld/httppath v0.0.0-20170720192232-ee938bf73598 // indirect @@ -19,7 +19,6 @@ require ( golang.org/x/sync v0.22.0 // indirect golang.org/x/text v0.41.0 // indirect golang.org/x/tools v0.49.0 // indirect - google.golang.org/protobuf v1.36.12 // indirect gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/httpstatus/go.sum b/httpstatus/go.sum index 2060e9dbd..356613474 100644 --- a/httpstatus/go.sum +++ b/httpstatus/go.sum @@ -31,8 +31,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260826171120-899b46415849 h1:hJE2Y7DflXvYIMmkDg8I1LfmaFgOyynWh9Na7LW4acg= -goa.design/goa/v3 v3.30.1-0.20260826171120-899b46415849/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826184016-9e4a965c104e h1:QnJ0egMXHnPUfKUCLb9+BqwRDDAtOahNbKWU3bWbrgQ= +goa.design/goa/v3 v3.30.1-0.20260826184016-9e4a965c104e/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= @@ -41,8 +41,6 @@ golang.org/x/text v0.41.0 h1:vz/seA0lnX87Othu2f/0L24RcgrXD9/YFTSuGjj3rH8= golang.org/x/text v0.41.0/go.mod h1:jvf1O8ajNzZqhSrQBPbutR/EB83Cc0CFrezNQIwbb5M= golang.org/x/tools v0.49.0 h1:3NI7VXzL9+1WZD52Dx2ttoPwD5DWrFGpl9mFZDlmisI= golang.org/x/tools v0.49.0/go.mod h1:SJNXV9DBKT0UbdttsQjbfJlAE/q+y36++zo3uL3N0Oo= -google.golang.org/protobuf v1.36.12 h1:pJOKDDOyeXErUroCihFAd5LQuwXBSpVnKGrj5o/fwxc= -google.golang.org/protobuf v1.36.12/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= diff --git a/interceptors/go.mod b/interceptors/go.mod index f8dc43765..6de676608 100644 --- a/interceptors/go.mod +++ b/interceptors/go.mod @@ -6,7 +6,7 @@ require ( github.com/google/uuid v1.6.0 github.com/gorilla/websocket v1.5.3 goa.design/clue v1.2.6 - goa.design/goa/v3 v3.30.1-0.20260826171120-899b46415849 + goa.design/goa/v3 v3.30.1-0.20260826184016-9e4a965c104e google.golang.org/grpc v1.83.1 google.golang.org/protobuf v1.36.12 ) diff --git a/interceptors/go.sum b/interceptors/go.sum index 930bdbc38..9c72ec951 100644 --- a/interceptors/go.sum +++ b/interceptors/go.sum @@ -55,8 +55,8 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/clue v1.2.6 h1:ensyUkwlvEbNy8FuTGMldKuvaNouh8YoDY9QaE+EtYg= goa.design/clue v1.2.6/go.mod h1:Y4RS5o2k6MZiGk2PT3XbKyntjR2xkr8dYOKQ591dIDM= -goa.design/goa/v3 v3.30.1-0.20260826171120-899b46415849 h1:hJE2Y7DflXvYIMmkDg8I1LfmaFgOyynWh9Na7LW4acg= -goa.design/goa/v3 v3.30.1-0.20260826171120-899b46415849/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826184016-9e4a965c104e h1:QnJ0egMXHnPUfKUCLb9+BqwRDDAtOahNbKWU3bWbrgQ= +goa.design/goa/v3 v3.30.1-0.20260826184016-9e4a965c104e/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/multipart/go.mod b/multipart/go.mod index 21776a4e5..d95d248ed 100644 --- a/multipart/go.mod +++ b/multipart/go.mod @@ -2,7 +2,7 @@ module goa.design/examples/multipart go 1.26.0 -require goa.design/goa/v3 v3.30.1-0.20260826171120-899b46415849 +require goa.design/goa/v3 v3.30.1-0.20260826184016-9e4a965c104e require ( github.com/dimfeld/httppath v0.0.0-20170720192232-ee938bf73598 // indirect diff --git a/multipart/go.sum b/multipart/go.sum index 2060e9dbd..9f851e536 100644 --- a/multipart/go.sum +++ b/multipart/go.sum @@ -31,8 +31,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260826171120-899b46415849 h1:hJE2Y7DflXvYIMmkDg8I1LfmaFgOyynWh9Na7LW4acg= -goa.design/goa/v3 v3.30.1-0.20260826171120-899b46415849/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826184016-9e4a965c104e h1:QnJ0egMXHnPUfKUCLb9+BqwRDDAtOahNbKWU3bWbrgQ= +goa.design/goa/v3 v3.30.1-0.20260826184016-9e4a965c104e/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= diff --git a/retry/go.mod b/retry/go.mod index 00d34a6cd..f587e87c3 100644 --- a/retry/go.mod +++ b/retry/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( goa.design/clue v1.2.6 - goa.design/goa/v3 v3.30.1-0.20260826171120-899b46415849 + goa.design/goa/v3 v3.30.1-0.20260826184016-9e4a965c104e google.golang.org/grpc v1.83.1 google.golang.org/protobuf v1.36.12 ) diff --git a/retry/go.sum b/retry/go.sum index 05ba477b4..97163c6df 100644 --- a/retry/go.sum +++ b/retry/go.sum @@ -52,8 +52,8 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/clue v1.2.6 h1:ensyUkwlvEbNy8FuTGMldKuvaNouh8YoDY9QaE+EtYg= goa.design/clue v1.2.6/go.mod h1:Y4RS5o2k6MZiGk2PT3XbKyntjR2xkr8dYOKQ591dIDM= -goa.design/goa/v3 v3.30.1-0.20260826171120-899b46415849 h1:hJE2Y7DflXvYIMmkDg8I1LfmaFgOyynWh9Na7LW4acg= -goa.design/goa/v3 v3.30.1-0.20260826171120-899b46415849/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826184016-9e4a965c104e h1:QnJ0egMXHnPUfKUCLb9+BqwRDDAtOahNbKWU3bWbrgQ= +goa.design/goa/v3 v3.30.1-0.20260826184016-9e4a965c104e/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/security/hierarchy/go.mod b/security/hierarchy/go.mod index 355f3088b..50bcf55bd 100644 --- a/security/hierarchy/go.mod +++ b/security/hierarchy/go.mod @@ -2,7 +2,7 @@ module goa.design/examples/security/hierarchy go 1.26.0 -require goa.design/goa/v3 v3.30.1-0.20260826171120-899b46415849 +require goa.design/goa/v3 v3.30.1-0.20260826184016-9e4a965c104e require ( github.com/dimfeld/httppath v0.0.0-20170720192232-ee938bf73598 // indirect diff --git a/security/hierarchy/go.sum b/security/hierarchy/go.sum index 2060e9dbd..9f851e536 100644 --- a/security/hierarchy/go.sum +++ b/security/hierarchy/go.sum @@ -31,8 +31,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260826171120-899b46415849 h1:hJE2Y7DflXvYIMmkDg8I1LfmaFgOyynWh9Na7LW4acg= -goa.design/goa/v3 v3.30.1-0.20260826171120-899b46415849/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826184016-9e4a965c104e h1:QnJ0egMXHnPUfKUCLb9+BqwRDDAtOahNbKWU3bWbrgQ= +goa.design/goa/v3 v3.30.1-0.20260826184016-9e4a965c104e/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= diff --git a/security/multiauth/go.mod b/security/multiauth/go.mod index cd213ede8..a770ad520 100644 --- a/security/multiauth/go.mod +++ b/security/multiauth/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( github.com/golang-jwt/jwt/v4 v4.5.2 - goa.design/goa/v3 v3.30.1-0.20260826171120-899b46415849 + goa.design/goa/v3 v3.30.1-0.20260826184016-9e4a965c104e google.golang.org/grpc v1.83.1 google.golang.org/protobuf v1.36.12 ) diff --git a/security/multiauth/go.sum b/security/multiauth/go.sum index 011fca0c3..6189abcfc 100644 --- a/security/multiauth/go.sum +++ b/security/multiauth/go.sum @@ -51,8 +51,8 @@ go.opentelemetry.io/otel/trace v1.44.0 h1:jxF5CsGYCe74MCRx2X4g7WsY/VBKRqqpNvXlX/ go.opentelemetry.io/otel/trace v1.44.0/go.mod h1:oLl1jrMQAVo6v3GAggN+1VH9VIz9iUSvW53sW1Q8PIE= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260826171120-899b46415849 h1:hJE2Y7DflXvYIMmkDg8I1LfmaFgOyynWh9Na7LW4acg= -goa.design/goa/v3 v3.30.1-0.20260826171120-899b46415849/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826184016-9e4a965c104e h1:QnJ0egMXHnPUfKUCLb9+BqwRDDAtOahNbKWU3bWbrgQ= +goa.design/goa/v3 v3.30.1-0.20260826184016-9e4a965c104e/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/sse/go.mod b/sse/go.mod index 8aa086c31..101da68c6 100644 --- a/sse/go.mod +++ b/sse/go.mod @@ -5,7 +5,7 @@ go 1.26.0 require ( github.com/shirou/gopsutil/v3 v3.24.5 goa.design/clue v1.2.6 - goa.design/goa/v3 v3.30.1-0.20260826171120-899b46415849 + goa.design/goa/v3 v3.30.1-0.20260826184016-9e4a965c104e ) require ( diff --git a/sse/go.sum b/sse/go.sum index 6504e30cb..aa8159ecd 100644 --- a/sse/go.sum +++ b/sse/go.sum @@ -74,8 +74,8 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/clue v1.2.6 h1:ensyUkwlvEbNy8FuTGMldKuvaNouh8YoDY9QaE+EtYg= goa.design/clue v1.2.6/go.mod h1:Y4RS5o2k6MZiGk2PT3XbKyntjR2xkr8dYOKQ591dIDM= -goa.design/goa/v3 v3.30.1-0.20260826171120-899b46415849 h1:hJE2Y7DflXvYIMmkDg8I1LfmaFgOyynWh9Na7LW4acg= -goa.design/goa/v3 v3.30.1-0.20260826171120-899b46415849/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826184016-9e4a965c104e h1:QnJ0egMXHnPUfKUCLb9+BqwRDDAtOahNbKWU3bWbrgQ= +goa.design/goa/v3 v3.30.1-0.20260826184016-9e4a965c104e/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/streaming/go.mod b/streaming/go.mod index 58dd583d6..4622b0916 100644 --- a/streaming/go.mod +++ b/streaming/go.mod @@ -5,7 +5,7 @@ go 1.26.0 require ( github.com/golang-jwt/jwt/v4 v4.5.2 github.com/gorilla/websocket v1.5.3 - goa.design/goa/v3 v3.30.1-0.20260826171120-899b46415849 + goa.design/goa/v3 v3.30.1-0.20260826184016-9e4a965c104e google.golang.org/grpc v1.83.1 google.golang.org/protobuf v1.36.12 ) diff --git a/streaming/go.sum b/streaming/go.sum index 011fca0c3..6189abcfc 100644 --- a/streaming/go.sum +++ b/streaming/go.sum @@ -51,8 +51,8 @@ go.opentelemetry.io/otel/trace v1.44.0 h1:jxF5CsGYCe74MCRx2X4g7WsY/VBKRqqpNvXlX/ go.opentelemetry.io/otel/trace v1.44.0/go.mod h1:oLl1jrMQAVo6v3GAggN+1VH9VIz9iUSvW53sW1Q8PIE= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260826171120-899b46415849 h1:hJE2Y7DflXvYIMmkDg8I1LfmaFgOyynWh9Na7LW4acg= -goa.design/goa/v3 v3.30.1-0.20260826171120-899b46415849/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826184016-9e4a965c104e h1:QnJ0egMXHnPUfKUCLb9+BqwRDDAtOahNbKWU3bWbrgQ= +goa.design/goa/v3 v3.30.1-0.20260826184016-9e4a965c104e/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/tracing/go.mod b/tracing/go.mod index 5b3552019..fd02c1254 100644 --- a/tracing/go.mod +++ b/tracing/go.mod @@ -5,7 +5,7 @@ go 1.26.0 require ( github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 goa.design/examples/basic v0.0.0-20260810182504-f834f43955c5 - goa.design/goa/v3 v3.30.1-0.20260826171120-899b46415849 + goa.design/goa/v3 v3.30.1-0.20260826184016-9e4a965c104e google.golang.org/grpc v1.83.1 ) diff --git a/tracing/go.sum b/tracing/go.sum index 605b5c3ad..ed99b3fc6 100644 --- a/tracing/go.sum +++ b/tracing/go.sum @@ -81,8 +81,8 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/examples/basic v0.0.0-20260810182504-f834f43955c5 h1:SRSrUaLTTdA4bUXb8+zA5MDhMEx8YaP+Knd+pddBcrg= goa.design/examples/basic v0.0.0-20260810182504-f834f43955c5/go.mod h1:XRziIzNcLb9fk7ZrfiHx5FIeAj+orJ4fkzLG0nXpiAo= -goa.design/goa/v3 v3.30.1-0.20260826171120-899b46415849 h1:hJE2Y7DflXvYIMmkDg8I1LfmaFgOyynWh9Na7LW4acg= -goa.design/goa/v3 v3.30.1-0.20260826171120-899b46415849/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826184016-9e4a965c104e h1:QnJ0egMXHnPUfKUCLb9+BqwRDDAtOahNbKWU3bWbrgQ= +goa.design/goa/v3 v3.30.1-0.20260826184016-9e4a965c104e/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= diff --git a/tus/go.mod b/tus/go.mod index b4c955eba..e1d46ab16 100644 --- a/tus/go.mod +++ b/tus/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( github.com/rs/xid v1.6.0 - goa.design/goa/v3 v3.30.1-0.20260826171120-899b46415849 + goa.design/goa/v3 v3.30.1-0.20260826184016-9e4a965c104e ) require ( diff --git a/tus/go.sum b/tus/go.sum index 5608a3a74..da8571fb3 100644 --- a/tus/go.sum +++ b/tus/go.sum @@ -33,8 +33,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260826171120-899b46415849 h1:hJE2Y7DflXvYIMmkDg8I1LfmaFgOyynWh9Na7LW4acg= -goa.design/goa/v3 v3.30.1-0.20260826171120-899b46415849/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826184016-9e4a965c104e h1:QnJ0egMXHnPUfKUCLb9+BqwRDDAtOahNbKWU3bWbrgQ= +goa.design/goa/v3 v3.30.1-0.20260826184016-9e4a965c104e/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= diff --git a/upload_download/go.mod b/upload_download/go.mod index a90b3f9a8..e6790fb3d 100644 --- a/upload_download/go.mod +++ b/upload_download/go.mod @@ -2,7 +2,7 @@ module goa.design/examples/upload_download go 1.26.0 -require goa.design/goa/v3 v3.30.1-0.20260826171120-899b46415849 +require goa.design/goa/v3 v3.30.1-0.20260826184016-9e4a965c104e require ( github.com/dimfeld/httppath v0.0.0-20170720192232-ee938bf73598 // indirect diff --git a/upload_download/go.sum b/upload_download/go.sum index 2060e9dbd..9f851e536 100644 --- a/upload_download/go.sum +++ b/upload_download/go.sum @@ -31,8 +31,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260826171120-899b46415849 h1:hJE2Y7DflXvYIMmkDg8I1LfmaFgOyynWh9Na7LW4acg= -goa.design/goa/v3 v3.30.1-0.20260826171120-899b46415849/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826184016-9e4a965c104e h1:QnJ0egMXHnPUfKUCLb9+BqwRDDAtOahNbKWU3bWbrgQ= +goa.design/goa/v3 v3.30.1-0.20260826184016-9e4a965c104e/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= From 886fb34e85a75eecc61812c6c2d2a309fc331cb6 Mon Sep 17 00:00:00 2001 From: "Raphael (manual office deploy after cloud-state fix)" Date: Wed, 26 Aug 2026 12:13:38 -0700 Subject: [PATCH 20/28] chore: pin examples to latest Goa API --- basic/go.mod | 2 +- basic/go.sum | 4 ++-- cellar/go.mod | 2 +- cellar/go.sum | 4 ++-- concerts/go.mod | 2 +- concerts/go.sum | 4 ++-- cookies/go.mod | 2 +- cookies/go.sum | 4 ++-- encodings/cbor/go.mod | 2 +- encodings/cbor/go.sum | 4 ++-- encodings/text/go.mod | 2 +- encodings/text/go.sum | 4 ++-- error/go.mod | 2 +- error/go.sum | 4 ++-- files/go.mod | 2 +- files/go.sum | 4 ++-- httpstatus/go.mod | 2 +- httpstatus/go.sum | 4 ++-- interceptors/go.mod | 2 +- interceptors/go.sum | 4 ++-- multipart/go.mod | 2 +- multipart/go.sum | 4 ++-- retry/go.mod | 2 +- retry/go.sum | 4 ++-- security/hierarchy/go.mod | 2 +- security/hierarchy/go.sum | 4 ++-- security/multiauth/go.mod | 2 +- security/multiauth/go.sum | 4 ++-- sse/go.mod | 2 +- sse/go.sum | 4 ++-- streaming/go.mod | 2 +- streaming/go.sum | 4 ++-- tracing/go.mod | 2 +- tracing/go.sum | 4 ++-- tus/go.mod | 2 +- tus/go.sum | 4 ++-- upload_download/go.mod | 2 +- upload_download/go.sum | 4 ++-- 38 files changed, 57 insertions(+), 57 deletions(-) diff --git a/basic/go.mod b/basic/go.mod index 4e19ec81a..7faa8a0c3 100644 --- a/basic/go.mod +++ b/basic/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( goa.design/clue v1.2.6 - goa.design/goa/v3 v3.30.1-0.20260826184016-9e4a965c104e + goa.design/goa/v3 v3.30.1-0.20260826190237-ed9cac596472 google.golang.org/grpc v1.83.1 google.golang.org/protobuf v1.36.12 ) diff --git a/basic/go.sum b/basic/go.sum index 9c72ec951..21fc5e7b2 100644 --- a/basic/go.sum +++ b/basic/go.sum @@ -55,8 +55,8 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/clue v1.2.6 h1:ensyUkwlvEbNy8FuTGMldKuvaNouh8YoDY9QaE+EtYg= goa.design/clue v1.2.6/go.mod h1:Y4RS5o2k6MZiGk2PT3XbKyntjR2xkr8dYOKQ591dIDM= -goa.design/goa/v3 v3.30.1-0.20260826184016-9e4a965c104e h1:QnJ0egMXHnPUfKUCLb9+BqwRDDAtOahNbKWU3bWbrgQ= -goa.design/goa/v3 v3.30.1-0.20260826184016-9e4a965c104e/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826190237-ed9cac596472 h1:mb8UEehe+YsY2g0z3TF9h6q50jIpsMBkYJfEodM8/TY= +goa.design/goa/v3 v3.30.1-0.20260826190237-ed9cac596472/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/cellar/go.mod b/cellar/go.mod index c3e663c42..318262183 100644 --- a/cellar/go.mod +++ b/cellar/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( github.com/boltdb/bolt v1.3.1 - goa.design/goa/v3 v3.30.1-0.20260826184016-9e4a965c104e + goa.design/goa/v3 v3.30.1-0.20260826190237-ed9cac596472 google.golang.org/grpc v1.83.1 google.golang.org/protobuf v1.36.12 ) diff --git a/cellar/go.sum b/cellar/go.sum index be64d8371..63a73a458 100644 --- a/cellar/go.sum +++ b/cellar/go.sum @@ -51,8 +51,8 @@ go.opentelemetry.io/otel/trace v1.44.0 h1:jxF5CsGYCe74MCRx2X4g7WsY/VBKRqqpNvXlX/ go.opentelemetry.io/otel/trace v1.44.0/go.mod h1:oLl1jrMQAVo6v3GAggN+1VH9VIz9iUSvW53sW1Q8PIE= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260826184016-9e4a965c104e h1:QnJ0egMXHnPUfKUCLb9+BqwRDDAtOahNbKWU3bWbrgQ= -goa.design/goa/v3 v3.30.1-0.20260826184016-9e4a965c104e/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826190237-ed9cac596472 h1:mb8UEehe+YsY2g0z3TF9h6q50jIpsMBkYJfEodM8/TY= +goa.design/goa/v3 v3.30.1-0.20260826190237-ed9cac596472/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/concerts/go.mod b/concerts/go.mod index 1cd3a59a4..9db4f3a27 100644 --- a/concerts/go.mod +++ b/concerts/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( github.com/google/uuid v1.6.0 - goa.design/goa/v3 v3.30.1-0.20260826184016-9e4a965c104e + goa.design/goa/v3 v3.30.1-0.20260826190237-ed9cac596472 ) require ( diff --git a/concerts/go.sum b/concerts/go.sum index 9f851e536..4167eee24 100644 --- a/concerts/go.sum +++ b/concerts/go.sum @@ -31,8 +31,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260826184016-9e4a965c104e h1:QnJ0egMXHnPUfKUCLb9+BqwRDDAtOahNbKWU3bWbrgQ= -goa.design/goa/v3 v3.30.1-0.20260826184016-9e4a965c104e/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826190237-ed9cac596472 h1:mb8UEehe+YsY2g0z3TF9h6q50jIpsMBkYJfEodM8/TY= +goa.design/goa/v3 v3.30.1-0.20260826190237-ed9cac596472/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= diff --git a/cookies/go.mod b/cookies/go.mod index 9807508ea..2a5dc873f 100644 --- a/cookies/go.mod +++ b/cookies/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( github.com/rs/xid v1.6.0 - goa.design/goa/v3 v3.30.1-0.20260826184016-9e4a965c104e + goa.design/goa/v3 v3.30.1-0.20260826190237-ed9cac596472 ) require ( diff --git a/cookies/go.sum b/cookies/go.sum index da8571fb3..96b8fe088 100644 --- a/cookies/go.sum +++ b/cookies/go.sum @@ -33,8 +33,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260826184016-9e4a965c104e h1:QnJ0egMXHnPUfKUCLb9+BqwRDDAtOahNbKWU3bWbrgQ= -goa.design/goa/v3 v3.30.1-0.20260826184016-9e4a965c104e/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826190237-ed9cac596472 h1:mb8UEehe+YsY2g0z3TF9h6q50jIpsMBkYJfEodM8/TY= +goa.design/goa/v3 v3.30.1-0.20260826190237-ed9cac596472/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= diff --git a/encodings/cbor/go.mod b/encodings/cbor/go.mod index 2c741dbb6..ca5909477 100644 --- a/encodings/cbor/go.mod +++ b/encodings/cbor/go.mod @@ -5,7 +5,7 @@ go 1.26.0 require ( github.com/fxamacker/cbor/v2 v2.9.2 goa.design/clue v1.2.6 - goa.design/goa/v3 v3.30.1-0.20260826184016-9e4a965c104e + goa.design/goa/v3 v3.30.1-0.20260826190237-ed9cac596472 ) require ( diff --git a/encodings/cbor/go.sum b/encodings/cbor/go.sum index 1ded1c288..1bda9e65a 100644 --- a/encodings/cbor/go.sum +++ b/encodings/cbor/go.sum @@ -59,8 +59,8 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/clue v1.2.6 h1:ensyUkwlvEbNy8FuTGMldKuvaNouh8YoDY9QaE+EtYg= goa.design/clue v1.2.6/go.mod h1:Y4RS5o2k6MZiGk2PT3XbKyntjR2xkr8dYOKQ591dIDM= -goa.design/goa/v3 v3.30.1-0.20260826184016-9e4a965c104e h1:QnJ0egMXHnPUfKUCLb9+BqwRDDAtOahNbKWU3bWbrgQ= -goa.design/goa/v3 v3.30.1-0.20260826184016-9e4a965c104e/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826190237-ed9cac596472 h1:mb8UEehe+YsY2g0z3TF9h6q50jIpsMBkYJfEodM8/TY= +goa.design/goa/v3 v3.30.1-0.20260826190237-ed9cac596472/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/encodings/text/go.mod b/encodings/text/go.mod index 369895090..87ee7b851 100644 --- a/encodings/text/go.mod +++ b/encodings/text/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( goa.design/clue v1.2.6 - goa.design/goa/v3 v3.30.1-0.20260826184016-9e4a965c104e + goa.design/goa/v3 v3.30.1-0.20260826190237-ed9cac596472 ) require ( diff --git a/encodings/text/go.sum b/encodings/text/go.sum index 9c72ec951..21fc5e7b2 100644 --- a/encodings/text/go.sum +++ b/encodings/text/go.sum @@ -55,8 +55,8 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/clue v1.2.6 h1:ensyUkwlvEbNy8FuTGMldKuvaNouh8YoDY9QaE+EtYg= goa.design/clue v1.2.6/go.mod h1:Y4RS5o2k6MZiGk2PT3XbKyntjR2xkr8dYOKQ591dIDM= -goa.design/goa/v3 v3.30.1-0.20260826184016-9e4a965c104e h1:QnJ0egMXHnPUfKUCLb9+BqwRDDAtOahNbKWU3bWbrgQ= -goa.design/goa/v3 v3.30.1-0.20260826184016-9e4a965c104e/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826190237-ed9cac596472 h1:mb8UEehe+YsY2g0z3TF9h6q50jIpsMBkYJfEodM8/TY= +goa.design/goa/v3 v3.30.1-0.20260826190237-ed9cac596472/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/error/go.mod b/error/go.mod index 50f9ed542..f9aae7e01 100644 --- a/error/go.mod +++ b/error/go.mod @@ -3,7 +3,7 @@ module goa.design/examples/error go 1.26.0 require ( - goa.design/goa/v3 v3.30.1-0.20260826184016-9e4a965c104e + goa.design/goa/v3 v3.30.1-0.20260826190237-ed9cac596472 google.golang.org/genproto v0.0.0-20260810153831-ec0a7760b754 google.golang.org/grpc v1.83.1 google.golang.org/protobuf v1.36.12 diff --git a/error/go.sum b/error/go.sum index eafe4b8d0..18a6dc45d 100644 --- a/error/go.sum +++ b/error/go.sum @@ -49,8 +49,8 @@ go.opentelemetry.io/otel/trace v1.44.0 h1:jxF5CsGYCe74MCRx2X4g7WsY/VBKRqqpNvXlX/ go.opentelemetry.io/otel/trace v1.44.0/go.mod h1:oLl1jrMQAVo6v3GAggN+1VH9VIz9iUSvW53sW1Q8PIE= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260826184016-9e4a965c104e h1:QnJ0egMXHnPUfKUCLb9+BqwRDDAtOahNbKWU3bWbrgQ= -goa.design/goa/v3 v3.30.1-0.20260826184016-9e4a965c104e/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826190237-ed9cac596472 h1:mb8UEehe+YsY2g0z3TF9h6q50jIpsMBkYJfEodM8/TY= +goa.design/goa/v3 v3.30.1-0.20260826190237-ed9cac596472/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/files/go.mod b/files/go.mod index 5ad39573e..4fb9b5d90 100644 --- a/files/go.mod +++ b/files/go.mod @@ -2,7 +2,7 @@ module goa.design/examples/files go 1.26.0 -require goa.design/goa/v3 v3.30.1-0.20260826184016-9e4a965c104e +require goa.design/goa/v3 v3.30.1-0.20260826190237-ed9cac596472 require ( github.com/dimfeld/httppath v0.0.0-20170720192232-ee938bf73598 // indirect diff --git a/files/go.sum b/files/go.sum index 9f851e536..4167eee24 100644 --- a/files/go.sum +++ b/files/go.sum @@ -31,8 +31,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260826184016-9e4a965c104e h1:QnJ0egMXHnPUfKUCLb9+BqwRDDAtOahNbKWU3bWbrgQ= -goa.design/goa/v3 v3.30.1-0.20260826184016-9e4a965c104e/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826190237-ed9cac596472 h1:mb8UEehe+YsY2g0z3TF9h6q50jIpsMBkYJfEodM8/TY= +goa.design/goa/v3 v3.30.1-0.20260826190237-ed9cac596472/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= diff --git a/httpstatus/go.mod b/httpstatus/go.mod index be934d68a..eb4e67d91 100644 --- a/httpstatus/go.mod +++ b/httpstatus/go.mod @@ -2,7 +2,7 @@ module goa.design/examples/httpstatus go 1.26.0 -require goa.design/goa/v3 v3.30.1-0.20260826184016-9e4a965c104e +require goa.design/goa/v3 v3.30.1-0.20260826190237-ed9cac596472 require ( github.com/dimfeld/httppath v0.0.0-20170720192232-ee938bf73598 // indirect diff --git a/httpstatus/go.sum b/httpstatus/go.sum index 356613474..53f606c6d 100644 --- a/httpstatus/go.sum +++ b/httpstatus/go.sum @@ -31,8 +31,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260826184016-9e4a965c104e h1:QnJ0egMXHnPUfKUCLb9+BqwRDDAtOahNbKWU3bWbrgQ= -goa.design/goa/v3 v3.30.1-0.20260826184016-9e4a965c104e/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826190237-ed9cac596472 h1:mb8UEehe+YsY2g0z3TF9h6q50jIpsMBkYJfEodM8/TY= +goa.design/goa/v3 v3.30.1-0.20260826190237-ed9cac596472/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= diff --git a/interceptors/go.mod b/interceptors/go.mod index 6de676608..72bdcca25 100644 --- a/interceptors/go.mod +++ b/interceptors/go.mod @@ -6,7 +6,7 @@ require ( github.com/google/uuid v1.6.0 github.com/gorilla/websocket v1.5.3 goa.design/clue v1.2.6 - goa.design/goa/v3 v3.30.1-0.20260826184016-9e4a965c104e + goa.design/goa/v3 v3.30.1-0.20260826190237-ed9cac596472 google.golang.org/grpc v1.83.1 google.golang.org/protobuf v1.36.12 ) diff --git a/interceptors/go.sum b/interceptors/go.sum index 9c72ec951..21fc5e7b2 100644 --- a/interceptors/go.sum +++ b/interceptors/go.sum @@ -55,8 +55,8 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/clue v1.2.6 h1:ensyUkwlvEbNy8FuTGMldKuvaNouh8YoDY9QaE+EtYg= goa.design/clue v1.2.6/go.mod h1:Y4RS5o2k6MZiGk2PT3XbKyntjR2xkr8dYOKQ591dIDM= -goa.design/goa/v3 v3.30.1-0.20260826184016-9e4a965c104e h1:QnJ0egMXHnPUfKUCLb9+BqwRDDAtOahNbKWU3bWbrgQ= -goa.design/goa/v3 v3.30.1-0.20260826184016-9e4a965c104e/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826190237-ed9cac596472 h1:mb8UEehe+YsY2g0z3TF9h6q50jIpsMBkYJfEodM8/TY= +goa.design/goa/v3 v3.30.1-0.20260826190237-ed9cac596472/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/multipart/go.mod b/multipart/go.mod index d95d248ed..3b40a9527 100644 --- a/multipart/go.mod +++ b/multipart/go.mod @@ -2,7 +2,7 @@ module goa.design/examples/multipart go 1.26.0 -require goa.design/goa/v3 v3.30.1-0.20260826184016-9e4a965c104e +require goa.design/goa/v3 v3.30.1-0.20260826190237-ed9cac596472 require ( github.com/dimfeld/httppath v0.0.0-20170720192232-ee938bf73598 // indirect diff --git a/multipart/go.sum b/multipart/go.sum index 9f851e536..4167eee24 100644 --- a/multipart/go.sum +++ b/multipart/go.sum @@ -31,8 +31,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260826184016-9e4a965c104e h1:QnJ0egMXHnPUfKUCLb9+BqwRDDAtOahNbKWU3bWbrgQ= -goa.design/goa/v3 v3.30.1-0.20260826184016-9e4a965c104e/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826190237-ed9cac596472 h1:mb8UEehe+YsY2g0z3TF9h6q50jIpsMBkYJfEodM8/TY= +goa.design/goa/v3 v3.30.1-0.20260826190237-ed9cac596472/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= diff --git a/retry/go.mod b/retry/go.mod index f587e87c3..e4410a77a 100644 --- a/retry/go.mod +++ b/retry/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( goa.design/clue v1.2.6 - goa.design/goa/v3 v3.30.1-0.20260826184016-9e4a965c104e + goa.design/goa/v3 v3.30.1-0.20260826190237-ed9cac596472 google.golang.org/grpc v1.83.1 google.golang.org/protobuf v1.36.12 ) diff --git a/retry/go.sum b/retry/go.sum index 97163c6df..2578bcc95 100644 --- a/retry/go.sum +++ b/retry/go.sum @@ -52,8 +52,8 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/clue v1.2.6 h1:ensyUkwlvEbNy8FuTGMldKuvaNouh8YoDY9QaE+EtYg= goa.design/clue v1.2.6/go.mod h1:Y4RS5o2k6MZiGk2PT3XbKyntjR2xkr8dYOKQ591dIDM= -goa.design/goa/v3 v3.30.1-0.20260826184016-9e4a965c104e h1:QnJ0egMXHnPUfKUCLb9+BqwRDDAtOahNbKWU3bWbrgQ= -goa.design/goa/v3 v3.30.1-0.20260826184016-9e4a965c104e/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826190237-ed9cac596472 h1:mb8UEehe+YsY2g0z3TF9h6q50jIpsMBkYJfEodM8/TY= +goa.design/goa/v3 v3.30.1-0.20260826190237-ed9cac596472/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/security/hierarchy/go.mod b/security/hierarchy/go.mod index 50bcf55bd..03a990c41 100644 --- a/security/hierarchy/go.mod +++ b/security/hierarchy/go.mod @@ -2,7 +2,7 @@ module goa.design/examples/security/hierarchy go 1.26.0 -require goa.design/goa/v3 v3.30.1-0.20260826184016-9e4a965c104e +require goa.design/goa/v3 v3.30.1-0.20260826190237-ed9cac596472 require ( github.com/dimfeld/httppath v0.0.0-20170720192232-ee938bf73598 // indirect diff --git a/security/hierarchy/go.sum b/security/hierarchy/go.sum index 9f851e536..4167eee24 100644 --- a/security/hierarchy/go.sum +++ b/security/hierarchy/go.sum @@ -31,8 +31,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260826184016-9e4a965c104e h1:QnJ0egMXHnPUfKUCLb9+BqwRDDAtOahNbKWU3bWbrgQ= -goa.design/goa/v3 v3.30.1-0.20260826184016-9e4a965c104e/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826190237-ed9cac596472 h1:mb8UEehe+YsY2g0z3TF9h6q50jIpsMBkYJfEodM8/TY= +goa.design/goa/v3 v3.30.1-0.20260826190237-ed9cac596472/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= diff --git a/security/multiauth/go.mod b/security/multiauth/go.mod index a770ad520..b8516cfff 100644 --- a/security/multiauth/go.mod +++ b/security/multiauth/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( github.com/golang-jwt/jwt/v4 v4.5.2 - goa.design/goa/v3 v3.30.1-0.20260826184016-9e4a965c104e + goa.design/goa/v3 v3.30.1-0.20260826190237-ed9cac596472 google.golang.org/grpc v1.83.1 google.golang.org/protobuf v1.36.12 ) diff --git a/security/multiauth/go.sum b/security/multiauth/go.sum index 6189abcfc..bb1b4c8f1 100644 --- a/security/multiauth/go.sum +++ b/security/multiauth/go.sum @@ -51,8 +51,8 @@ go.opentelemetry.io/otel/trace v1.44.0 h1:jxF5CsGYCe74MCRx2X4g7WsY/VBKRqqpNvXlX/ go.opentelemetry.io/otel/trace v1.44.0/go.mod h1:oLl1jrMQAVo6v3GAggN+1VH9VIz9iUSvW53sW1Q8PIE= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260826184016-9e4a965c104e h1:QnJ0egMXHnPUfKUCLb9+BqwRDDAtOahNbKWU3bWbrgQ= -goa.design/goa/v3 v3.30.1-0.20260826184016-9e4a965c104e/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826190237-ed9cac596472 h1:mb8UEehe+YsY2g0z3TF9h6q50jIpsMBkYJfEodM8/TY= +goa.design/goa/v3 v3.30.1-0.20260826190237-ed9cac596472/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/sse/go.mod b/sse/go.mod index 101da68c6..a5801429f 100644 --- a/sse/go.mod +++ b/sse/go.mod @@ -5,7 +5,7 @@ go 1.26.0 require ( github.com/shirou/gopsutil/v3 v3.24.5 goa.design/clue v1.2.6 - goa.design/goa/v3 v3.30.1-0.20260826184016-9e4a965c104e + goa.design/goa/v3 v3.30.1-0.20260826190237-ed9cac596472 ) require ( diff --git a/sse/go.sum b/sse/go.sum index aa8159ecd..a28baef06 100644 --- a/sse/go.sum +++ b/sse/go.sum @@ -74,8 +74,8 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/clue v1.2.6 h1:ensyUkwlvEbNy8FuTGMldKuvaNouh8YoDY9QaE+EtYg= goa.design/clue v1.2.6/go.mod h1:Y4RS5o2k6MZiGk2PT3XbKyntjR2xkr8dYOKQ591dIDM= -goa.design/goa/v3 v3.30.1-0.20260826184016-9e4a965c104e h1:QnJ0egMXHnPUfKUCLb9+BqwRDDAtOahNbKWU3bWbrgQ= -goa.design/goa/v3 v3.30.1-0.20260826184016-9e4a965c104e/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826190237-ed9cac596472 h1:mb8UEehe+YsY2g0z3TF9h6q50jIpsMBkYJfEodM8/TY= +goa.design/goa/v3 v3.30.1-0.20260826190237-ed9cac596472/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/streaming/go.mod b/streaming/go.mod index 4622b0916..099b6d921 100644 --- a/streaming/go.mod +++ b/streaming/go.mod @@ -5,7 +5,7 @@ go 1.26.0 require ( github.com/golang-jwt/jwt/v4 v4.5.2 github.com/gorilla/websocket v1.5.3 - goa.design/goa/v3 v3.30.1-0.20260826184016-9e4a965c104e + goa.design/goa/v3 v3.30.1-0.20260826190237-ed9cac596472 google.golang.org/grpc v1.83.1 google.golang.org/protobuf v1.36.12 ) diff --git a/streaming/go.sum b/streaming/go.sum index 6189abcfc..bb1b4c8f1 100644 --- a/streaming/go.sum +++ b/streaming/go.sum @@ -51,8 +51,8 @@ go.opentelemetry.io/otel/trace v1.44.0 h1:jxF5CsGYCe74MCRx2X4g7WsY/VBKRqqpNvXlX/ go.opentelemetry.io/otel/trace v1.44.0/go.mod h1:oLl1jrMQAVo6v3GAggN+1VH9VIz9iUSvW53sW1Q8PIE= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260826184016-9e4a965c104e h1:QnJ0egMXHnPUfKUCLb9+BqwRDDAtOahNbKWU3bWbrgQ= -goa.design/goa/v3 v3.30.1-0.20260826184016-9e4a965c104e/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826190237-ed9cac596472 h1:mb8UEehe+YsY2g0z3TF9h6q50jIpsMBkYJfEodM8/TY= +goa.design/goa/v3 v3.30.1-0.20260826190237-ed9cac596472/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/tracing/go.mod b/tracing/go.mod index fd02c1254..9a9083caa 100644 --- a/tracing/go.mod +++ b/tracing/go.mod @@ -5,7 +5,7 @@ go 1.26.0 require ( github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 goa.design/examples/basic v0.0.0-20260810182504-f834f43955c5 - goa.design/goa/v3 v3.30.1-0.20260826184016-9e4a965c104e + goa.design/goa/v3 v3.30.1-0.20260826190237-ed9cac596472 google.golang.org/grpc v1.83.1 ) diff --git a/tracing/go.sum b/tracing/go.sum index ed99b3fc6..4c68799fd 100644 --- a/tracing/go.sum +++ b/tracing/go.sum @@ -81,8 +81,8 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/examples/basic v0.0.0-20260810182504-f834f43955c5 h1:SRSrUaLTTdA4bUXb8+zA5MDhMEx8YaP+Knd+pddBcrg= goa.design/examples/basic v0.0.0-20260810182504-f834f43955c5/go.mod h1:XRziIzNcLb9fk7ZrfiHx5FIeAj+orJ4fkzLG0nXpiAo= -goa.design/goa/v3 v3.30.1-0.20260826184016-9e4a965c104e h1:QnJ0egMXHnPUfKUCLb9+BqwRDDAtOahNbKWU3bWbrgQ= -goa.design/goa/v3 v3.30.1-0.20260826184016-9e4a965c104e/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826190237-ed9cac596472 h1:mb8UEehe+YsY2g0z3TF9h6q50jIpsMBkYJfEodM8/TY= +goa.design/goa/v3 v3.30.1-0.20260826190237-ed9cac596472/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= diff --git a/tus/go.mod b/tus/go.mod index e1d46ab16..8fdd21e7a 100644 --- a/tus/go.mod +++ b/tus/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( github.com/rs/xid v1.6.0 - goa.design/goa/v3 v3.30.1-0.20260826184016-9e4a965c104e + goa.design/goa/v3 v3.30.1-0.20260826190237-ed9cac596472 ) require ( diff --git a/tus/go.sum b/tus/go.sum index da8571fb3..96b8fe088 100644 --- a/tus/go.sum +++ b/tus/go.sum @@ -33,8 +33,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260826184016-9e4a965c104e h1:QnJ0egMXHnPUfKUCLb9+BqwRDDAtOahNbKWU3bWbrgQ= -goa.design/goa/v3 v3.30.1-0.20260826184016-9e4a965c104e/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826190237-ed9cac596472 h1:mb8UEehe+YsY2g0z3TF9h6q50jIpsMBkYJfEodM8/TY= +goa.design/goa/v3 v3.30.1-0.20260826190237-ed9cac596472/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= diff --git a/upload_download/go.mod b/upload_download/go.mod index e6790fb3d..6d80b0673 100644 --- a/upload_download/go.mod +++ b/upload_download/go.mod @@ -2,7 +2,7 @@ module goa.design/examples/upload_download go 1.26.0 -require goa.design/goa/v3 v3.30.1-0.20260826184016-9e4a965c104e +require goa.design/goa/v3 v3.30.1-0.20260826190237-ed9cac596472 require ( github.com/dimfeld/httppath v0.0.0-20170720192232-ee938bf73598 // indirect diff --git a/upload_download/go.sum b/upload_download/go.sum index 9f851e536..4167eee24 100644 --- a/upload_download/go.sum +++ b/upload_download/go.sum @@ -31,8 +31,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260826184016-9e4a965c104e h1:QnJ0egMXHnPUfKUCLb9+BqwRDDAtOahNbKWU3bWbrgQ= -goa.design/goa/v3 v3.30.1-0.20260826184016-9e4a965c104e/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826190237-ed9cac596472 h1:mb8UEehe+YsY2g0z3TF9h6q50jIpsMBkYJfEodM8/TY= +goa.design/goa/v3 v3.30.1-0.20260826190237-ed9cac596472/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= From b638c192664d512dc4b276d3e11367dfb38622fc Mon Sep 17 00:00:00 2001 From: "Raphael (manual office deploy after cloud-state fix)" Date: Wed, 26 Aug 2026 14:14:10 -0700 Subject: [PATCH 21/28] chore: pin examples to wrapped Goa transforms --- basic/go.mod | 2 +- basic/go.sum | 4 +- cellar/gen/grpc/storage/client/cli.go | 6 +- cellar/gen/grpc/storage/client/types.go | 101 ++++-------------------- cellar/gen/grpc/storage/server/types.go | 71 +++-------------- cellar/go.mod | 3 +- cellar/go.sum | 32 +++++--- concerts/go.mod | 2 +- concerts/go.sum | 4 +- cookies/go.mod | 2 +- cookies/go.sum | 4 +- encodings/cbor/go.mod | 2 +- encodings/cbor/go.sum | 4 +- encodings/text/go.mod | 2 +- encodings/text/go.sum | 4 +- error/go.mod | 3 +- error/go.sum | 20 ++--- files/go.mod | 2 +- files/go.sum | 4 +- httpstatus/go.mod | 3 +- httpstatus/go.sum | 6 +- interceptors/go.mod | 2 +- interceptors/go.sum | 4 +- multipart/go.mod | 2 +- multipart/go.sum | 4 +- retry/go.mod | 12 +-- retry/go.sum | 34 ++++---- security/hierarchy/go.mod | 2 +- security/hierarchy/go.sum | 4 +- security/multiauth/go.mod | 3 +- security/multiauth/go.sum | 20 ++--- sse/go.mod | 2 +- sse/go.sum | 4 +- streaming/go.mod | 3 +- streaming/go.sum | 20 ++--- tracing/go.mod | 3 +- tracing/go.sum | 8 +- tus/go.mod | 2 +- tus/go.sum | 4 +- upload_download/go.mod | 2 +- upload_download/go.sum | 4 +- 41 files changed, 163 insertions(+), 257 deletions(-) diff --git a/basic/go.mod b/basic/go.mod index 7faa8a0c3..b6c6ce530 100644 --- a/basic/go.mod +++ b/basic/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( goa.design/clue v1.2.6 - goa.design/goa/v3 v3.30.1-0.20260826190237-ed9cac596472 + goa.design/goa/v3 v3.30.1-0.20260826205939-36e92a56a054 google.golang.org/grpc v1.83.1 google.golang.org/protobuf v1.36.12 ) diff --git a/basic/go.sum b/basic/go.sum index 21fc5e7b2..3e1872de8 100644 --- a/basic/go.sum +++ b/basic/go.sum @@ -55,8 +55,8 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/clue v1.2.6 h1:ensyUkwlvEbNy8FuTGMldKuvaNouh8YoDY9QaE+EtYg= goa.design/clue v1.2.6/go.mod h1:Y4RS5o2k6MZiGk2PT3XbKyntjR2xkr8dYOKQ591dIDM= -goa.design/goa/v3 v3.30.1-0.20260826190237-ed9cac596472 h1:mb8UEehe+YsY2g0z3TF9h6q50jIpsMBkYJfEodM8/TY= -goa.design/goa/v3 v3.30.1-0.20260826190237-ed9cac596472/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826205939-36e92a56a054 h1:j+HyJr3A4zZ642ewmdO4lDfsJ6foFqj90XX8hQOxFJw= +goa.design/goa/v3 v3.30.1-0.20260826205939-36e92a56a054/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/cellar/gen/grpc/storage/client/cli.go b/cellar/gen/grpc/storage/client/cli.go index 132ca0eb5..4bb674834 100644 --- a/cellar/gen/grpc/storage/client/cli.go +++ b/cellar/gen/grpc/storage/client/cli.go @@ -77,7 +77,7 @@ func BuildAddPayload(storageAddMessage *string) (*storage.Bottle, error) { Rating: message.Rating, } if message.Winery != nil { - v.Winery = transformProtoAddRequestWineryToBottleWinery(message.Winery) + v.Winery = transformProtoWineryToWinery(message.Winery) } if message.Composition != nil { v.Composition = make([]*storage.Component, len(message.Composition)) @@ -170,7 +170,7 @@ func BuildMultiAddPayload(storageMultiAddMessage *string) ([]*storage.Bottle, er Rating: val.Rating, } if val.Winery != nil { - v[i].Winery = transformProtoMultiAddRequestWineryToMultiAddRequestWinery(val.Winery) + v[i].Winery = transformProtoWineryToWinery(val.Winery) } if val.Composition != nil { v[i].Composition = make([]*storage.Component, len(val.Composition)) @@ -219,7 +219,7 @@ func BuildMultiUpdatePayload(storageMultiUpdateMessage *string) (*storage.MultiU Rating: val.Rating, } if val.Winery != nil { - v.Bottles[i].Winery = transformProtoMultiUpdateRequestWineryToMultiUpdatePayloadWinery(val.Winery) + v.Bottles[i].Winery = transformProtoWineryToWinery(val.Winery) } if val.Composition != nil { v.Bottles[i].Composition = make([]*storage.Component, len(val.Composition)) diff --git a/cellar/gen/grpc/storage/client/types.go b/cellar/gen/grpc/storage/client/types.go index 35e912de7..d0aab2360 100644 --- a/cellar/gen/grpc/storage/client/types.go +++ b/cellar/gen/grpc/storage/client/types.go @@ -32,7 +32,7 @@ func NewListResult(message *storagepb.StoredBottleCollection) storageviews.Store Name: val.Name, } if val.Winery != nil { - result[i].Winery = transformProtoStoredBottleCollectionWineryToStoredBottleCollectionViewWineryView(val.Winery) + result[i].Winery = transformProtoWineryToWineryView(val.Winery) } } return result @@ -57,7 +57,7 @@ func NewShowResult(message *storagepb.ShowResponse) *storageviews.StoredBottleVi Rating: message.Rating, } if message.Winery != nil { - result.Winery = transformProtoShowResponseWineryToStoredBottleViewWineryView(message.Winery) + result.Winery = transformProtoWineryToWineryView(message.Winery) } if message.Composition != nil { result.Composition = make([]*storageviews.ComponentView, len(message.Composition)) @@ -79,7 +79,7 @@ func NewShowResultTiny(message *storagepb.ShowResponse) *storageviews.StoredBott Name: message.Name, } if message.Winery != nil { - result.Winery = transformProtoWineryToWineryViewTiny(message.Winery) + result.Winery = transformProtoWineryToWineryView(message.Winery) } return result } @@ -103,7 +103,7 @@ func NewProtoAddRequest(payload *storage.Bottle) *storagepb.AddRequest { Rating: payload.Rating, } if payload.Winery != nil { - message.Winery = transformBottleWineryToProtoAddRequestWinery(payload.Winery) + message.Winery = transformWineryToProtoWinery(payload.Winery) } if payload.Composition != nil { message.Composition = make([]*storagepb.Component, len(payload.Composition)) @@ -161,7 +161,7 @@ func NewProtoMultiAddRequest(payload []*storage.Bottle) *storagepb.MultiAddReque Rating: val.Rating, } if val.Winery != nil { - message.Field[i].Winery = transformMultiAddRequestWineryToProtoMultiAddRequestWinery(val.Winery) + message.Field[i].Winery = transformWineryToProtoWinery(val.Winery) } if val.Composition != nil { message.Field[i].Composition = make([]*storagepb.Component, len(val.Composition)) @@ -205,7 +205,7 @@ func NewProtoMultiUpdateRequest(payload *storage.MultiUpdatePayload) *storagepb. Rating: val.Rating, } if val.Winery != nil { - message.Bottles[i].Winery = transformMultiUpdatePayloadWineryToProtoMultiUpdateRequestWinery(val.Winery) + message.Bottles[i].Winery = transformWineryToProtoWinery(val.Winery) } if val.Composition != nil { message.Bottles[i].Composition = make([]*storagepb.Component, len(val.Composition)) @@ -564,30 +564,9 @@ func ValidateMultiUpdateRequest(message *storagepb.MultiUpdateRequest) (err erro return } -// transformProtoStoredBottleCollectionWineryToStoredBottleCollectionViewWineryView -// builds a value of type *storageviews.WineryView from a value of type -// *storagepb.Winery. -func transformProtoStoredBottleCollectionWineryToStoredBottleCollectionViewWineryView(v *storagepb.Winery) *storageviews.WineryView { - res := &storageviews.WineryView{ - Name: v.Name, - } - - return res -} - -// transformProtoShowResponseWineryToStoredBottleViewWineryView builds a value -// of type *storageviews.WineryView from a value of type *storagepb.Winery. -func transformProtoShowResponseWineryToStoredBottleViewWineryView(v *storagepb.Winery) *storageviews.WineryView { - res := &storageviews.WineryView{ - Name: v.Name, - } - - return res -} - -// transformProtoWineryToWineryViewTiny builds a value of type +// transformProtoWineryToWineryView builds a value of type // *storageviews.WineryView from a value of type *storagepb.Winery. -func transformProtoWineryToWineryViewTiny(v *storagepb.Winery) *storageviews.WineryView { +func transformProtoWineryToWineryView(v *storagepb.Winery) *storageviews.WineryView { res := &storageviews.WineryView{ Name: v.Name, } @@ -595,61 +574,9 @@ func transformProtoWineryToWineryViewTiny(v *storagepb.Winery) *storageviews.Win return res } -// transformBottleWineryToProtoAddRequestWinery builds a value of type -// *storagepb.Winery from a value of type *storage.Winery. -func transformBottleWineryToProtoAddRequestWinery(v *storage.Winery) *storagepb.Winery { - res := &storagepb.Winery{ - Name: &v.Name, - Region: &v.Region, - Country: &v.Country, - Url: v.URL, - } - - return res -} - -// transformProtoAddRequestWineryToBottleWinery builds a value of type -// *storage.Winery from a value of type *storagepb.Winery. -func transformProtoAddRequestWineryToBottleWinery(v *storagepb.Winery) *storage.Winery { - res := &storage.Winery{ - Name: *v.Name, - Region: *v.Region, - Country: *v.Country, - URL: v.Url, - } - - return res -} - -// transformMultiAddRequestWineryToProtoMultiAddRequestWinery builds a value of -// type *storagepb.Winery from a value of type *storage.Winery. -func transformMultiAddRequestWineryToProtoMultiAddRequestWinery(v *storage.Winery) *storagepb.Winery { - res := &storagepb.Winery{ - Name: &v.Name, - Region: &v.Region, - Country: &v.Country, - Url: v.URL, - } - - return res -} - -// transformProtoMultiAddRequestWineryToMultiAddRequestWinery builds a value of -// type *storage.Winery from a value of type *storagepb.Winery. -func transformProtoMultiAddRequestWineryToMultiAddRequestWinery(v *storagepb.Winery) *storage.Winery { - res := &storage.Winery{ - Name: *v.Name, - Region: *v.Region, - Country: *v.Country, - URL: v.Url, - } - - return res -} - -// transformMultiUpdatePayloadWineryToProtoMultiUpdateRequestWinery builds a -// value of type *storagepb.Winery from a value of type *storage.Winery. -func transformMultiUpdatePayloadWineryToProtoMultiUpdateRequestWinery(v *storage.Winery) *storagepb.Winery { +// transformWineryToProtoWinery builds a value of type *storagepb.Winery from a +// value of type *storage.Winery. +func transformWineryToProtoWinery(v *storage.Winery) *storagepb.Winery { res := &storagepb.Winery{ Name: &v.Name, Region: &v.Region, @@ -660,9 +587,9 @@ func transformMultiUpdatePayloadWineryToProtoMultiUpdateRequestWinery(v *storage return res } -// transformProtoMultiUpdateRequestWineryToMultiUpdatePayloadWinery builds a -// value of type *storage.Winery from a value of type *storagepb.Winery. -func transformProtoMultiUpdateRequestWineryToMultiUpdatePayloadWinery(v *storagepb.Winery) *storage.Winery { +// transformProtoWineryToWinery builds a value of type *storage.Winery from a +// value of type *storagepb.Winery. +func transformProtoWineryToWinery(v *storagepb.Winery) *storage.Winery { res := &storage.Winery{ Name: *v.Name, Region: *v.Region, diff --git a/cellar/gen/grpc/storage/server/types.go b/cellar/gen/grpc/storage/server/types.go index c0abe0483..af6d0bf9f 100644 --- a/cellar/gen/grpc/storage/server/types.go +++ b/cellar/gen/grpc/storage/server/types.go @@ -27,7 +27,7 @@ func NewProtoStoredBottleCollection(result storageviews.StoredBottleCollectionVi Name: val.Name, } if val.Winery != nil { - message.Field[i].Winery = transformStoredBottleCollectionViewWineryViewToProtoStoredBottleCollectionWinery(val.Winery) + message.Field[i].Winery = transformWineryViewToProtoWinery(val.Winery) } } return message @@ -57,7 +57,7 @@ func NewProtoShowResponse(result *storageviews.StoredBottleView) *storagepb.Show Rating: result.Rating, } if result.Winery != nil { - message.Winery = transformStoredBottleViewWineryViewToProtoShowResponseWinery(result.Winery) + message.Winery = transformWineryViewToProtoWinery(result.Winery) } if result.Composition != nil { message.Composition = make([]*storagepb.Component, len(result.Composition)) @@ -79,7 +79,7 @@ func NewProtoShowResponseTiny(result *storageviews.StoredBottleView) *storagepb. Name: result.Name, } if result.Winery != nil { - message.Winery = transformWineryViewToProtoWineryTiny(result.Winery) + message.Winery = transformWineryViewToProtoWinery(result.Winery) } return message } @@ -103,7 +103,7 @@ func NewAddPayload(message *storagepb.AddRequest) *storage.Bottle { Rating: message.Rating, } if message.Winery != nil { - v.Winery = transformProtoAddRequestWineryToBottleWinery(message.Winery) + v.Winery = transformProtoWineryToWinery(message.Winery) } if message.Composition != nil { v.Composition = make([]*storage.Component, len(message.Composition)) @@ -173,7 +173,7 @@ func NewMultiAddPayload(message *storagepb.MultiAddRequest) []*storage.Bottle { Rating: val.Rating, } if val.Winery != nil { - v[i].Winery = transformProtoMultiAddRequestWineryToMultiAddRequestWinery(val.Winery) + v[i].Winery = transformProtoWineryToWinery(val.Winery) } if val.Composition != nil { v[i].Composition = make([]*storage.Component, len(val.Composition)) @@ -218,7 +218,7 @@ func NewMultiUpdatePayload(message *storagepb.MultiUpdateRequest) *storage.Multi Rating: val.Rating, } if val.Winery != nil { - v.Bottles[i].Winery = transformProtoMultiUpdateRequestWineryToMultiUpdatePayloadWinery(val.Winery) + v.Bottles[i].Winery = transformProtoWineryToWinery(val.Winery) } if val.Composition != nil { v.Bottles[i].Composition = make([]*storage.Component, len(val.Composition)) @@ -439,10 +439,9 @@ func ValidateMultiUpdateRequest(message *storagepb.MultiUpdateRequest) (err erro return } -// transformStoredBottleCollectionViewWineryViewToProtoStoredBottleCollectionWinery -// builds a value of type *storagepb.Winery from a value of type -// *storageviews.WineryView. -func transformStoredBottleCollectionViewWineryViewToProtoStoredBottleCollectionWinery(v *storageviews.WineryView) *storagepb.Winery { +// transformWineryViewToProtoWinery builds a value of type *storagepb.Winery +// from a value of type *storageviews.WineryView. +func transformWineryViewToProtoWinery(v *storageviews.WineryView) *storagepb.Winery { res := &storagepb.Winery{ Name: v.Name, } @@ -450,55 +449,9 @@ func transformStoredBottleCollectionViewWineryViewToProtoStoredBottleCollectionW return res } -// transformStoredBottleViewWineryViewToProtoShowResponseWinery builds a value -// of type *storagepb.Winery from a value of type *storageviews.WineryView. -func transformStoredBottleViewWineryViewToProtoShowResponseWinery(v *storageviews.WineryView) *storagepb.Winery { - res := &storagepb.Winery{ - Name: v.Name, - } - - return res -} - -// transformWineryViewToProtoWineryTiny builds a value of type -// *storagepb.Winery from a value of type *storageviews.WineryView. -func transformWineryViewToProtoWineryTiny(v *storageviews.WineryView) *storagepb.Winery { - res := &storagepb.Winery{ - Name: v.Name, - } - - return res -} - -// transformProtoAddRequestWineryToBottleWinery builds a value of type -// *storage.Winery from a value of type *storagepb.Winery. -func transformProtoAddRequestWineryToBottleWinery(v *storagepb.Winery) *storage.Winery { - res := &storage.Winery{ - Name: *v.Name, - Region: *v.Region, - Country: *v.Country, - URL: v.Url, - } - - return res -} - -// transformProtoMultiAddRequestWineryToMultiAddRequestWinery builds a value of -// type *storage.Winery from a value of type *storagepb.Winery. -func transformProtoMultiAddRequestWineryToMultiAddRequestWinery(v *storagepb.Winery) *storage.Winery { - res := &storage.Winery{ - Name: *v.Name, - Region: *v.Region, - Country: *v.Country, - URL: v.Url, - } - - return res -} - -// transformProtoMultiUpdateRequestWineryToMultiUpdatePayloadWinery builds a -// value of type *storage.Winery from a value of type *storagepb.Winery. -func transformProtoMultiUpdateRequestWineryToMultiUpdatePayloadWinery(v *storagepb.Winery) *storage.Winery { +// transformProtoWineryToWinery builds a value of type *storage.Winery from a +// value of type *storagepb.Winery. +func transformProtoWineryToWinery(v *storagepb.Winery) *storage.Winery { res := &storage.Winery{ Name: *v.Name, Region: *v.Region, diff --git a/cellar/go.mod b/cellar/go.mod index 318262183..6df05fff0 100644 --- a/cellar/go.mod +++ b/cellar/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( github.com/boltdb/bolt v1.3.1 - goa.design/goa/v3 v3.30.1-0.20260826190237-ed9cac596472 + goa.design/goa/v3 v3.30.1-0.20260826205939-36e92a56a054 google.golang.org/grpc v1.83.1 google.golang.org/protobuf v1.36.12 ) @@ -18,6 +18,7 @@ require ( github.com/manveru/faker v0.0.0-20171103152722-9fbc68a78c4d // indirect github.com/rogpeppe/go-internal v1.14.1 // indirect github.com/stretchr/testify v1.12.1 // indirect + go.opentelemetry.io/otel v1.45.0 // indirect go.yaml.in/yaml/v3 v3.0.5 // indirect golang.org/x/mod v0.40.0 // indirect golang.org/x/net v0.58.0 // indirect diff --git a/cellar/go.sum b/cellar/go.sum index 63a73a458..e47708dd1 100644 --- a/cellar/go.sum +++ b/cellar/go.sum @@ -6,12 +6,18 @@ github.com/dimfeld/httppath v0.0.0-20170720192232-ee938bf73598 h1:MGKhKyiYrvMDZs github.com/dimfeld/httppath v0.0.0-20170720192232-ee938bf73598/go.mod h1:0FpDmbrt36utu8jEmeU05dPC9AB5tsLYVVi+ZHfyuwI= github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8= github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= +github.com/getkin/kin-openapi v0.144.0 h1:hIRcTH+KjLfkLpYU6bSSfdFpi0fZi1fp+hSPi4aQu9Y= +github.com/getkin/kin-openapi v0.144.0/go.mod h1:3BH9M9XDe/y9M5DSvEocVYAYq1w0qrhJHjC/vZi0AaY= github.com/go-chi/chi/v5 v5.3.1 h1:3j4HZLGZQ3JpMCrPJF/Jl3mYJfWLKBfNJ6quurUGCf8= github.com/go-chi/chi/v5 v5.3.1/go.mod h1:R+tYY2hNuVUUjxoPtqUdgBqevM9s9njzkTLutVsOCto= -github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI= -github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/logr v1.4.4 h1:tG4xh9yMsRCAiodLVTxyrkzSZ9+o0L1Kg/+cPVcbP/8= +github.com/go-logr/logr v1.4.4/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= +github.com/go-openapi/jsonpointer v0.22.5 h1:8on/0Yp4uTb9f4XvTrM2+1CPrV05QPZXu+rvu2o9jcA= +github.com/go-openapi/jsonpointer v0.22.5/go.mod h1:gyUR3sCvGSWchA2sUBJGluYMbe1zazrYWIkWPjjMUY0= +github.com/go-openapi/swag/jsonname v0.25.5 h1:8p150i44rv/Drip4vWI3kGi9+4W9TdI3US3uUYSFhSo= +github.com/go-openapi/swag/jsonname v0.25.5/go.mod h1:jNqqikyiAK56uS7n8sLkdaNY/uq6+D2m2LANat09pKU= github.com/gohugoio/hashstructure v1.0.0 h1:vWYuyzs1n0LdI0F54TJQeYAiB44fHX7H9hCp9X6gHKg= github.com/gohugoio/hashstructure v1.0.0/go.mod h1:FSbTK4QwxucJ2bC4Lvrs9a6x0DbQDXNoyBO+h4nlCgE= github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= @@ -33,26 +39,32 @@ github.com/manveru/faker v0.0.0-20171103152722-9fbc68a78c4d h1:Zj+PHjnhRYWBK6RqC github.com/manveru/faker v0.0.0-20171103152722-9fbc68a78c4d/go.mod h1:WZy8Q5coAB1zhY9AOBJP0O6J4BuDfbupUDavKY+I3+s= github.com/manveru/gobdd v0.0.0-20131210092515-f1a17fdd710b h1:3E44bLeN8uKYdfQqVQycPnaVviZdBLbizFhU49mtbe4= github.com/manveru/gobdd v0.0.0-20131210092515-f1a17fdd710b/go.mod h1:Bj8LjjP0ReT1eKt5QlKjwgi5AFm5mI6O1A2G4ChI0Ag= +github.com/oasdiff/yaml v0.1.1 h1:6nHx+pn9gBRM6YpBlFZFQGCCd1nuvqOBtTD3KKTgGxY= +github.com/oasdiff/yaml v0.1.1/go.mod h1:EYJNoyktvWMJ0Hmhx+6qTaqMOsalUaRGT8Sj1hNcegU= +github.com/oasdiff/yaml3 v0.0.14 h1:aLJee3hxBK2H5wdXd9iPcIXb93Nty1Ge0pT171eHtkw= +github.com/oasdiff/yaml3 v0.0.14/go.mod h1:csto2xfDjYccdUn/yw/bPjj/cYTdp6HtFA0J4TWG+gg= github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ= github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7so1lCWt35ZSgc= +github.com/santhosh-tekuri/jsonschema/v6 v6.0.2 h1:KRzFb2m7YtdldCEkzs6KqmJw4nqEVZGK7IN2kJkjTuQ= +github.com/santhosh-tekuri/jsonschema/v6 v6.0.2/go.mod h1:JXeL+ps8p7/KNMjDQk3TCwPpBy0wYklyWTfbkIzdIFU= github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWDWE= github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.opentelemetry.io/auto/sdk v1.2.1 h1:jXsnJ4Lmnqd11kwkBV2LgLoFMZKizbCi5fNZ/ipaZ64= go.opentelemetry.io/auto/sdk v1.2.1/go.mod h1:KRTj+aOaElaLi+wW1kO/DZRXwkF4C5xPbEe3ZiIhN7Y= -go.opentelemetry.io/otel v1.44.0 h1:JjwHmHpA4iZ3wBxluu2fbbE7j4kqlE8jXyAyPXH7HqU= -go.opentelemetry.io/otel v1.44.0/go.mod h1:BMgjTHL9WPRlRjL2oZCBTL4whCGtXch2H4BhOPIAyYc= -go.opentelemetry.io/otel/metric v1.44.0 h1:1w0gILTcHdr3YI+ixLyjemwrVnsMURbTZFrSYCdDdmc= -go.opentelemetry.io/otel/metric v1.44.0/go.mod h1:8O7hanEPBNgEMmybD3s2VBKcgWOCsA6tzHBPODAiquo= +go.opentelemetry.io/otel v1.45.0 h1:pdrWmLHofpubmArBv1LgFSv1Z0Ie/ppdZzu+kUN5EeU= +go.opentelemetry.io/otel v1.45.0/go.mod h1:XZxIqPapzEYnhNSScF5DIqXhm/rYi0FzCe2XddAwZfQ= +go.opentelemetry.io/otel/metric v1.45.0 h1:7Eg1uH7CJ5cXv9is6tnBe1FI6rj1nwUdbFypRm3br/M= +go.opentelemetry.io/otel/metric v1.45.0/go.mod h1:HAPbm1nd3p1PmFH7v2dR+6BjXxw+Lq4a2+pndMAm08s= go.opentelemetry.io/otel/sdk v1.44.0 h1:nHYwb9lK+fJPU/dnT6s7W7Z8itMWyqrnVfbheVYrZ58= go.opentelemetry.io/otel/sdk v1.44.0/go.mod h1:Osuydd3Se74nqjAKxid74N5eC+jfEqfTegHRnq58oK0= go.opentelemetry.io/otel/sdk/metric v1.44.0 h1:3LlKgI+VjbVsjNRFZJZAJ30WjXC5VkNRks6si09iEfI= go.opentelemetry.io/otel/sdk/metric v1.44.0/go.mod h1:5B5pMARnXxKhltooO4xUuCBorl65a4EpnTalObqOigA= -go.opentelemetry.io/otel/trace v1.44.0 h1:jxF5CsGYCe74MCRx2X4g7WsY/VBKRqqpNvXlX/6gtIk= -go.opentelemetry.io/otel/trace v1.44.0/go.mod h1:oLl1jrMQAVo6v3GAggN+1VH9VIz9iUSvW53sW1Q8PIE= +go.opentelemetry.io/otel/trace v1.45.0 h1:l/mP6Uv7oNO7/TblbhpbgMidxhq1uO/rPsikOyVhxag= +go.opentelemetry.io/otel/trace v1.45.0/go.mod h1:qoJJA2xNMnxRrdISU/kLtfUH2wNeQbiv+jhs/CxI8bc= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260826190237-ed9cac596472 h1:mb8UEehe+YsY2g0z3TF9h6q50jIpsMBkYJfEodM8/TY= -goa.design/goa/v3 v3.30.1-0.20260826190237-ed9cac596472/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826205939-36e92a56a054 h1:j+HyJr3A4zZ642ewmdO4lDfsJ6foFqj90XX8hQOxFJw= +goa.design/goa/v3 v3.30.1-0.20260826205939-36e92a56a054/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/concerts/go.mod b/concerts/go.mod index 9db4f3a27..51072f9b0 100644 --- a/concerts/go.mod +++ b/concerts/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( github.com/google/uuid v1.6.0 - goa.design/goa/v3 v3.30.1-0.20260826190237-ed9cac596472 + goa.design/goa/v3 v3.30.1-0.20260826205939-36e92a56a054 ) require ( diff --git a/concerts/go.sum b/concerts/go.sum index 4167eee24..b332e19e9 100644 --- a/concerts/go.sum +++ b/concerts/go.sum @@ -31,8 +31,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260826190237-ed9cac596472 h1:mb8UEehe+YsY2g0z3TF9h6q50jIpsMBkYJfEodM8/TY= -goa.design/goa/v3 v3.30.1-0.20260826190237-ed9cac596472/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826205939-36e92a56a054 h1:j+HyJr3A4zZ642ewmdO4lDfsJ6foFqj90XX8hQOxFJw= +goa.design/goa/v3 v3.30.1-0.20260826205939-36e92a56a054/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= diff --git a/cookies/go.mod b/cookies/go.mod index 2a5dc873f..aec18f64d 100644 --- a/cookies/go.mod +++ b/cookies/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( github.com/rs/xid v1.6.0 - goa.design/goa/v3 v3.30.1-0.20260826190237-ed9cac596472 + goa.design/goa/v3 v3.30.1-0.20260826205939-36e92a56a054 ) require ( diff --git a/cookies/go.sum b/cookies/go.sum index 96b8fe088..84f3a96f7 100644 --- a/cookies/go.sum +++ b/cookies/go.sum @@ -33,8 +33,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260826190237-ed9cac596472 h1:mb8UEehe+YsY2g0z3TF9h6q50jIpsMBkYJfEodM8/TY= -goa.design/goa/v3 v3.30.1-0.20260826190237-ed9cac596472/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826205939-36e92a56a054 h1:j+HyJr3A4zZ642ewmdO4lDfsJ6foFqj90XX8hQOxFJw= +goa.design/goa/v3 v3.30.1-0.20260826205939-36e92a56a054/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= diff --git a/encodings/cbor/go.mod b/encodings/cbor/go.mod index ca5909477..153d2de9e 100644 --- a/encodings/cbor/go.mod +++ b/encodings/cbor/go.mod @@ -5,7 +5,7 @@ go 1.26.0 require ( github.com/fxamacker/cbor/v2 v2.9.2 goa.design/clue v1.2.6 - goa.design/goa/v3 v3.30.1-0.20260826190237-ed9cac596472 + goa.design/goa/v3 v3.30.1-0.20260826205939-36e92a56a054 ) require ( diff --git a/encodings/cbor/go.sum b/encodings/cbor/go.sum index 1bda9e65a..e0ad66ecf 100644 --- a/encodings/cbor/go.sum +++ b/encodings/cbor/go.sum @@ -59,8 +59,8 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/clue v1.2.6 h1:ensyUkwlvEbNy8FuTGMldKuvaNouh8YoDY9QaE+EtYg= goa.design/clue v1.2.6/go.mod h1:Y4RS5o2k6MZiGk2PT3XbKyntjR2xkr8dYOKQ591dIDM= -goa.design/goa/v3 v3.30.1-0.20260826190237-ed9cac596472 h1:mb8UEehe+YsY2g0z3TF9h6q50jIpsMBkYJfEodM8/TY= -goa.design/goa/v3 v3.30.1-0.20260826190237-ed9cac596472/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826205939-36e92a56a054 h1:j+HyJr3A4zZ642ewmdO4lDfsJ6foFqj90XX8hQOxFJw= +goa.design/goa/v3 v3.30.1-0.20260826205939-36e92a56a054/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/encodings/text/go.mod b/encodings/text/go.mod index 87ee7b851..4faee90e8 100644 --- a/encodings/text/go.mod +++ b/encodings/text/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( goa.design/clue v1.2.6 - goa.design/goa/v3 v3.30.1-0.20260826190237-ed9cac596472 + goa.design/goa/v3 v3.30.1-0.20260826205939-36e92a56a054 ) require ( diff --git a/encodings/text/go.sum b/encodings/text/go.sum index 21fc5e7b2..3e1872de8 100644 --- a/encodings/text/go.sum +++ b/encodings/text/go.sum @@ -55,8 +55,8 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/clue v1.2.6 h1:ensyUkwlvEbNy8FuTGMldKuvaNouh8YoDY9QaE+EtYg= goa.design/clue v1.2.6/go.mod h1:Y4RS5o2k6MZiGk2PT3XbKyntjR2xkr8dYOKQ591dIDM= -goa.design/goa/v3 v3.30.1-0.20260826190237-ed9cac596472 h1:mb8UEehe+YsY2g0z3TF9h6q50jIpsMBkYJfEodM8/TY= -goa.design/goa/v3 v3.30.1-0.20260826190237-ed9cac596472/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826205939-36e92a56a054 h1:j+HyJr3A4zZ642ewmdO4lDfsJ6foFqj90XX8hQOxFJw= +goa.design/goa/v3 v3.30.1-0.20260826205939-36e92a56a054/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/error/go.mod b/error/go.mod index f9aae7e01..2a2fb3d87 100644 --- a/error/go.mod +++ b/error/go.mod @@ -3,7 +3,7 @@ module goa.design/examples/error go 1.26.0 require ( - goa.design/goa/v3 v3.30.1-0.20260826190237-ed9cac596472 + goa.design/goa/v3 v3.30.1-0.20260826205939-36e92a56a054 google.golang.org/genproto v0.0.0-20260810153831-ec0a7760b754 google.golang.org/grpc v1.83.1 google.golang.org/protobuf v1.36.12 @@ -18,6 +18,7 @@ require ( github.com/manveru/faker v0.0.0-20171103152722-9fbc68a78c4d // indirect github.com/rogpeppe/go-internal v1.14.1 // indirect github.com/stretchr/testify v1.12.1 // indirect + go.opentelemetry.io/otel v1.45.0 // indirect go.yaml.in/yaml/v3 v3.0.5 // indirect golang.org/x/mod v0.40.0 // indirect golang.org/x/net v0.58.0 // indirect diff --git a/error/go.sum b/error/go.sum index 18a6dc45d..0c7eb5e45 100644 --- a/error/go.sum +++ b/error/go.sum @@ -6,8 +6,8 @@ github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHk github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= github.com/go-chi/chi/v5 v5.3.1 h1:3j4HZLGZQ3JpMCrPJF/Jl3mYJfWLKBfNJ6quurUGCf8= github.com/go-chi/chi/v5 v5.3.1/go.mod h1:R+tYY2hNuVUUjxoPtqUdgBqevM9s9njzkTLutVsOCto= -github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI= -github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/logr v1.4.4 h1:tG4xh9yMsRCAiodLVTxyrkzSZ9+o0L1Kg/+cPVcbP/8= +github.com/go-logr/logr v1.4.4/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/gohugoio/hashstructure v1.0.0 h1:vWYuyzs1n0LdI0F54TJQeYAiB44fHX7H9hCp9X6gHKg= @@ -37,20 +37,20 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.opentelemetry.io/auto/sdk v1.2.1 h1:jXsnJ4Lmnqd11kwkBV2LgLoFMZKizbCi5fNZ/ipaZ64= go.opentelemetry.io/auto/sdk v1.2.1/go.mod h1:KRTj+aOaElaLi+wW1kO/DZRXwkF4C5xPbEe3ZiIhN7Y= -go.opentelemetry.io/otel v1.44.0 h1:JjwHmHpA4iZ3wBxluu2fbbE7j4kqlE8jXyAyPXH7HqU= -go.opentelemetry.io/otel v1.44.0/go.mod h1:BMgjTHL9WPRlRjL2oZCBTL4whCGtXch2H4BhOPIAyYc= -go.opentelemetry.io/otel/metric v1.44.0 h1:1w0gILTcHdr3YI+ixLyjemwrVnsMURbTZFrSYCdDdmc= -go.opentelemetry.io/otel/metric v1.44.0/go.mod h1:8O7hanEPBNgEMmybD3s2VBKcgWOCsA6tzHBPODAiquo= +go.opentelemetry.io/otel v1.45.0 h1:pdrWmLHofpubmArBv1LgFSv1Z0Ie/ppdZzu+kUN5EeU= +go.opentelemetry.io/otel v1.45.0/go.mod h1:XZxIqPapzEYnhNSScF5DIqXhm/rYi0FzCe2XddAwZfQ= +go.opentelemetry.io/otel/metric v1.45.0 h1:7Eg1uH7CJ5cXv9is6tnBe1FI6rj1nwUdbFypRm3br/M= +go.opentelemetry.io/otel/metric v1.45.0/go.mod h1:HAPbm1nd3p1PmFH7v2dR+6BjXxw+Lq4a2+pndMAm08s= go.opentelemetry.io/otel/sdk v1.44.0 h1:nHYwb9lK+fJPU/dnT6s7W7Z8itMWyqrnVfbheVYrZ58= go.opentelemetry.io/otel/sdk v1.44.0/go.mod h1:Osuydd3Se74nqjAKxid74N5eC+jfEqfTegHRnq58oK0= go.opentelemetry.io/otel/sdk/metric v1.44.0 h1:3LlKgI+VjbVsjNRFZJZAJ30WjXC5VkNRks6si09iEfI= go.opentelemetry.io/otel/sdk/metric v1.44.0/go.mod h1:5B5pMARnXxKhltooO4xUuCBorl65a4EpnTalObqOigA= -go.opentelemetry.io/otel/trace v1.44.0 h1:jxF5CsGYCe74MCRx2X4g7WsY/VBKRqqpNvXlX/6gtIk= -go.opentelemetry.io/otel/trace v1.44.0/go.mod h1:oLl1jrMQAVo6v3GAggN+1VH9VIz9iUSvW53sW1Q8PIE= +go.opentelemetry.io/otel/trace v1.45.0 h1:l/mP6Uv7oNO7/TblbhpbgMidxhq1uO/rPsikOyVhxag= +go.opentelemetry.io/otel/trace v1.45.0/go.mod h1:qoJJA2xNMnxRrdISU/kLtfUH2wNeQbiv+jhs/CxI8bc= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260826190237-ed9cac596472 h1:mb8UEehe+YsY2g0z3TF9h6q50jIpsMBkYJfEodM8/TY= -goa.design/goa/v3 v3.30.1-0.20260826190237-ed9cac596472/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826205939-36e92a56a054 h1:j+HyJr3A4zZ642ewmdO4lDfsJ6foFqj90XX8hQOxFJw= +goa.design/goa/v3 v3.30.1-0.20260826205939-36e92a56a054/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/files/go.mod b/files/go.mod index 4fb9b5d90..756ba3c25 100644 --- a/files/go.mod +++ b/files/go.mod @@ -2,7 +2,7 @@ module goa.design/examples/files go 1.26.0 -require goa.design/goa/v3 v3.30.1-0.20260826190237-ed9cac596472 +require goa.design/goa/v3 v3.30.1-0.20260826205939-36e92a56a054 require ( github.com/dimfeld/httppath v0.0.0-20170720192232-ee938bf73598 // indirect diff --git a/files/go.sum b/files/go.sum index 4167eee24..b332e19e9 100644 --- a/files/go.sum +++ b/files/go.sum @@ -31,8 +31,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260826190237-ed9cac596472 h1:mb8UEehe+YsY2g0z3TF9h6q50jIpsMBkYJfEodM8/TY= -goa.design/goa/v3 v3.30.1-0.20260826190237-ed9cac596472/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826205939-36e92a56a054 h1:j+HyJr3A4zZ642ewmdO4lDfsJ6foFqj90XX8hQOxFJw= +goa.design/goa/v3 v3.30.1-0.20260826205939-36e92a56a054/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= diff --git a/httpstatus/go.mod b/httpstatus/go.mod index eb4e67d91..62e04005a 100644 --- a/httpstatus/go.mod +++ b/httpstatus/go.mod @@ -2,7 +2,7 @@ module goa.design/examples/httpstatus go 1.26.0 -require goa.design/goa/v3 v3.30.1-0.20260826190237-ed9cac596472 +require goa.design/goa/v3 v3.30.1-0.20260826205939-36e92a56a054 require ( github.com/dimfeld/httppath v0.0.0-20170720192232-ee938bf73598 // indirect @@ -19,6 +19,7 @@ require ( golang.org/x/sync v0.22.0 // indirect golang.org/x/text v0.41.0 // indirect golang.org/x/tools v0.49.0 // indirect + google.golang.org/protobuf v1.36.12 // indirect gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/httpstatus/go.sum b/httpstatus/go.sum index 53f606c6d..b332e19e9 100644 --- a/httpstatus/go.sum +++ b/httpstatus/go.sum @@ -31,8 +31,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260826190237-ed9cac596472 h1:mb8UEehe+YsY2g0z3TF9h6q50jIpsMBkYJfEodM8/TY= -goa.design/goa/v3 v3.30.1-0.20260826190237-ed9cac596472/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826205939-36e92a56a054 h1:j+HyJr3A4zZ642ewmdO4lDfsJ6foFqj90XX8hQOxFJw= +goa.design/goa/v3 v3.30.1-0.20260826205939-36e92a56a054/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= @@ -41,6 +41,8 @@ golang.org/x/text v0.41.0 h1:vz/seA0lnX87Othu2f/0L24RcgrXD9/YFTSuGjj3rH8= golang.org/x/text v0.41.0/go.mod h1:jvf1O8ajNzZqhSrQBPbutR/EB83Cc0CFrezNQIwbb5M= golang.org/x/tools v0.49.0 h1:3NI7VXzL9+1WZD52Dx2ttoPwD5DWrFGpl9mFZDlmisI= golang.org/x/tools v0.49.0/go.mod h1:SJNXV9DBKT0UbdttsQjbfJlAE/q+y36++zo3uL3N0Oo= +google.golang.org/protobuf v1.36.12 h1:pJOKDDOyeXErUroCihFAd5LQuwXBSpVnKGrj5o/fwxc= +google.golang.org/protobuf v1.36.12/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= diff --git a/interceptors/go.mod b/interceptors/go.mod index 72bdcca25..057332543 100644 --- a/interceptors/go.mod +++ b/interceptors/go.mod @@ -6,7 +6,7 @@ require ( github.com/google/uuid v1.6.0 github.com/gorilla/websocket v1.5.3 goa.design/clue v1.2.6 - goa.design/goa/v3 v3.30.1-0.20260826190237-ed9cac596472 + goa.design/goa/v3 v3.30.1-0.20260826205939-36e92a56a054 google.golang.org/grpc v1.83.1 google.golang.org/protobuf v1.36.12 ) diff --git a/interceptors/go.sum b/interceptors/go.sum index 21fc5e7b2..3e1872de8 100644 --- a/interceptors/go.sum +++ b/interceptors/go.sum @@ -55,8 +55,8 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/clue v1.2.6 h1:ensyUkwlvEbNy8FuTGMldKuvaNouh8YoDY9QaE+EtYg= goa.design/clue v1.2.6/go.mod h1:Y4RS5o2k6MZiGk2PT3XbKyntjR2xkr8dYOKQ591dIDM= -goa.design/goa/v3 v3.30.1-0.20260826190237-ed9cac596472 h1:mb8UEehe+YsY2g0z3TF9h6q50jIpsMBkYJfEodM8/TY= -goa.design/goa/v3 v3.30.1-0.20260826190237-ed9cac596472/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826205939-36e92a56a054 h1:j+HyJr3A4zZ642ewmdO4lDfsJ6foFqj90XX8hQOxFJw= +goa.design/goa/v3 v3.30.1-0.20260826205939-36e92a56a054/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/multipart/go.mod b/multipart/go.mod index 3b40a9527..81fcea4c4 100644 --- a/multipart/go.mod +++ b/multipart/go.mod @@ -2,7 +2,7 @@ module goa.design/examples/multipart go 1.26.0 -require goa.design/goa/v3 v3.30.1-0.20260826190237-ed9cac596472 +require goa.design/goa/v3 v3.30.1-0.20260826205939-36e92a56a054 require ( github.com/dimfeld/httppath v0.0.0-20170720192232-ee938bf73598 // indirect diff --git a/multipart/go.sum b/multipart/go.sum index 4167eee24..b332e19e9 100644 --- a/multipart/go.sum +++ b/multipart/go.sum @@ -31,8 +31,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260826190237-ed9cac596472 h1:mb8UEehe+YsY2g0z3TF9h6q50jIpsMBkYJfEodM8/TY= -goa.design/goa/v3 v3.30.1-0.20260826190237-ed9cac596472/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826205939-36e92a56a054 h1:j+HyJr3A4zZ642ewmdO4lDfsJ6foFqj90XX8hQOxFJw= +goa.design/goa/v3 v3.30.1-0.20260826205939-36e92a56a054/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= diff --git a/retry/go.mod b/retry/go.mod index e4410a77a..56592b702 100644 --- a/retry/go.mod +++ b/retry/go.mod @@ -4,24 +4,25 @@ go 1.26.0 require ( goa.design/clue v1.2.6 - goa.design/goa/v3 v3.30.1-0.20260826190237-ed9cac596472 + goa.design/goa/v3 v3.30.1-0.20260826205939-36e92a56a054 google.golang.org/grpc v1.83.1 google.golang.org/protobuf v1.36.12 ) require ( - github.com/aws/smithy-go v1.26.0 // indirect + github.com/aws/smithy-go v1.27.8 // indirect github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/dimfeld/httppath v0.0.0-20170720192232-ee938bf73598 // indirect github.com/go-chi/chi/v5 v5.3.1 // indirect - github.com/go-logr/logr v1.4.3 // indirect + github.com/go-logr/logr v1.4.4 // indirect github.com/gohugoio/hashstructure v1.0.0 // indirect github.com/google/uuid v1.6.0 // indirect github.com/gorilla/websocket v1.5.3 // indirect github.com/manveru/faker v0.0.0-20171103152722-9fbc68a78c4d // indirect + github.com/rogpeppe/go-internal v1.14.1 // indirect github.com/stretchr/testify v1.12.1 // indirect - go.opentelemetry.io/otel v1.44.0 // indirect - go.opentelemetry.io/otel/trace v1.44.0 // indirect + go.opentelemetry.io/otel v1.45.0 // indirect + go.opentelemetry.io/otel/trace v1.45.0 // indirect go.yaml.in/yaml/v3 v3.0.5 // indirect golang.org/x/mod v0.40.0 // indirect golang.org/x/net v0.58.0 // indirect @@ -31,5 +32,6 @@ require ( golang.org/x/text v0.41.0 // indirect golang.org/x/tools v0.49.0 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20260819154853-08b0e4226688 // indirect + gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/retry/go.sum b/retry/go.sum index 2578bcc95..3e1872de8 100644 --- a/retry/go.sum +++ b/retry/go.sum @@ -1,5 +1,5 @@ -github.com/aws/smithy-go v1.26.0 h1:9ouqbi+NyKP7fV3Te7UElCwdAb6Y8uk7LGwPE5tVe/s= -github.com/aws/smithy-go v1.26.0/go.mod h1:YE2RhdIuDbA5E5bTdciG9KrW3+TiEONeUWCqxX9i1Fc= +github.com/aws/smithy-go v1.27.8 h1:FR0dxZfIlV7Z8eh2iHfIofdunw382XsDV3Mxt9nUvRY= +github.com/aws/smithy-go v1.27.8/go.mod h1:YE2RhdIuDbA5E5bTdciG9KrW3+TiEONeUWCqxX9i1Fc= github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/dimfeld/httppath v0.0.0-20170720192232-ee938bf73598 h1:MGKhKyiYrvMDZsmLR/+RGffQSXwEkXgfLSA08qDn9AI= @@ -8,8 +8,8 @@ github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHk github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= github.com/go-chi/chi/v5 v5.3.1 h1:3j4HZLGZQ3JpMCrPJF/Jl3mYJfWLKBfNJ6quurUGCf8= github.com/go-chi/chi/v5 v5.3.1/go.mod h1:R+tYY2hNuVUUjxoPtqUdgBqevM9s9njzkTLutVsOCto= -github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI= -github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/logr v1.4.4 h1:tG4xh9yMsRCAiodLVTxyrkzSZ9+o0L1Kg/+cPVcbP/8= +github.com/go-logr/logr v1.4.4/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/gohugoio/hashstructure v1.0.0 h1:vWYuyzs1n0LdI0F54TJQeYAiB44fHX7H9hCp9X6gHKg= @@ -22,38 +22,41 @@ github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/gorilla/websocket v1.5.3 h1:saDtZ6Pbx/0u+bgYQ3q96pZgCzfhKXGPqt7kZ72aNNg= github.com/gorilla/websocket v1.5.3/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/manveru/faker v0.0.0-20171103152722-9fbc68a78c4d h1:Zj+PHjnhRYWBK6RqCDBcAhLXoi3TzC27Zad/Vn+gnVQ= github.com/manveru/faker v0.0.0-20171103152722-9fbc68a78c4d/go.mod h1:WZy8Q5coAB1zhY9AOBJP0O6J4BuDfbupUDavKY+I3+s= github.com/manveru/gobdd v0.0.0-20131210092515-f1a17fdd710b h1:3E44bLeN8uKYdfQqVQycPnaVviZdBLbizFhU49mtbe4= github.com/manveru/gobdd v0.0.0-20131210092515-f1a17fdd710b/go.mod h1:Bj8LjjP0ReT1eKt5QlKjwgi5AFm5mI6O1A2G4ChI0Ag= -github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZVejAe8= -github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= +github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ= +github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7so1lCWt35ZSgc= github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWDWE= github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.opentelemetry.io/auto/sdk v1.2.1 h1:jXsnJ4Lmnqd11kwkBV2LgLoFMZKizbCi5fNZ/ipaZ64= go.opentelemetry.io/auto/sdk v1.2.1/go.mod h1:KRTj+aOaElaLi+wW1kO/DZRXwkF4C5xPbEe3ZiIhN7Y= -go.opentelemetry.io/otel v1.44.0 h1:JjwHmHpA4iZ3wBxluu2fbbE7j4kqlE8jXyAyPXH7HqU= -go.opentelemetry.io/otel v1.44.0/go.mod h1:BMgjTHL9WPRlRjL2oZCBTL4whCGtXch2H4BhOPIAyYc= +go.opentelemetry.io/otel v1.45.0 h1:pdrWmLHofpubmArBv1LgFSv1Z0Ie/ppdZzu+kUN5EeU= +go.opentelemetry.io/otel v1.45.0/go.mod h1:XZxIqPapzEYnhNSScF5DIqXhm/rYi0FzCe2XddAwZfQ= go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.43.0 h1:mS47AX77OtFfKG4vtp+84kuGSFZHTyxtXIN269vChY0= go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.43.0/go.mod h1:PJnsC41lAGncJlPUniSwM81gc80GkgWJWr3cu2nKEtU= -go.opentelemetry.io/otel/metric v1.44.0 h1:1w0gILTcHdr3YI+ixLyjemwrVnsMURbTZFrSYCdDdmc= -go.opentelemetry.io/otel/metric v1.44.0/go.mod h1:8O7hanEPBNgEMmybD3s2VBKcgWOCsA6tzHBPODAiquo= +go.opentelemetry.io/otel/metric v1.45.0 h1:7Eg1uH7CJ5cXv9is6tnBe1FI6rj1nwUdbFypRm3br/M= +go.opentelemetry.io/otel/metric v1.45.0/go.mod h1:HAPbm1nd3p1PmFH7v2dR+6BjXxw+Lq4a2+pndMAm08s= go.opentelemetry.io/otel/sdk v1.44.0 h1:nHYwb9lK+fJPU/dnT6s7W7Z8itMWyqrnVfbheVYrZ58= go.opentelemetry.io/otel/sdk v1.44.0/go.mod h1:Osuydd3Se74nqjAKxid74N5eC+jfEqfTegHRnq58oK0= go.opentelemetry.io/otel/sdk/metric v1.44.0 h1:3LlKgI+VjbVsjNRFZJZAJ30WjXC5VkNRks6si09iEfI= go.opentelemetry.io/otel/sdk/metric v1.44.0/go.mod h1:5B5pMARnXxKhltooO4xUuCBorl65a4EpnTalObqOigA= -go.opentelemetry.io/otel/trace v1.44.0 h1:jxF5CsGYCe74MCRx2X4g7WsY/VBKRqqpNvXlX/6gtIk= -go.opentelemetry.io/otel/trace v1.44.0/go.mod h1:oLl1jrMQAVo6v3GAggN+1VH9VIz9iUSvW53sW1Q8PIE= +go.opentelemetry.io/otel/trace v1.45.0 h1:l/mP6Uv7oNO7/TblbhpbgMidxhq1uO/rPsikOyVhxag= +go.opentelemetry.io/otel/trace v1.45.0/go.mod h1:qoJJA2xNMnxRrdISU/kLtfUH2wNeQbiv+jhs/CxI8bc= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/clue v1.2.6 h1:ensyUkwlvEbNy8FuTGMldKuvaNouh8YoDY9QaE+EtYg= goa.design/clue v1.2.6/go.mod h1:Y4RS5o2k6MZiGk2PT3XbKyntjR2xkr8dYOKQ591dIDM= -goa.design/goa/v3 v3.30.1-0.20260826190237-ed9cac596472 h1:mb8UEehe+YsY2g0z3TF9h6q50jIpsMBkYJfEodM8/TY= -goa.design/goa/v3 v3.30.1-0.20260826190237-ed9cac596472/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826205939-36e92a56a054 h1:j+HyJr3A4zZ642ewmdO4lDfsJ6foFqj90XX8hQOxFJw= +goa.design/goa/v3 v3.30.1-0.20260826205939-36e92a56a054/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= @@ -76,7 +79,8 @@ google.golang.org/grpc v1.83.1 h1:HIO0+BEtBP6soyqvqC8sNUjZ7bTs+0hFQuFF+RAy++Y= google.golang.org/grpc v1.83.1/go.mod h1:kDyl6SKsiHKt0uylY5gtn5cEjkrIOhQOGDgIc4JGwzQ= google.golang.org/protobuf v1.36.12 h1:pJOKDDOyeXErUroCihFAd5LQuwXBSpVnKGrj5o/fwxc= google.golang.org/protobuf v1.36.12/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/security/hierarchy/go.mod b/security/hierarchy/go.mod index 03a990c41..930c71d64 100644 --- a/security/hierarchy/go.mod +++ b/security/hierarchy/go.mod @@ -2,7 +2,7 @@ module goa.design/examples/security/hierarchy go 1.26.0 -require goa.design/goa/v3 v3.30.1-0.20260826190237-ed9cac596472 +require goa.design/goa/v3 v3.30.1-0.20260826205939-36e92a56a054 require ( github.com/dimfeld/httppath v0.0.0-20170720192232-ee938bf73598 // indirect diff --git a/security/hierarchy/go.sum b/security/hierarchy/go.sum index 4167eee24..b332e19e9 100644 --- a/security/hierarchy/go.sum +++ b/security/hierarchy/go.sum @@ -31,8 +31,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260826190237-ed9cac596472 h1:mb8UEehe+YsY2g0z3TF9h6q50jIpsMBkYJfEodM8/TY= -goa.design/goa/v3 v3.30.1-0.20260826190237-ed9cac596472/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826205939-36e92a56a054 h1:j+HyJr3A4zZ642ewmdO4lDfsJ6foFqj90XX8hQOxFJw= +goa.design/goa/v3 v3.30.1-0.20260826205939-36e92a56a054/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= diff --git a/security/multiauth/go.mod b/security/multiauth/go.mod index b8516cfff..89247aead 100644 --- a/security/multiauth/go.mod +++ b/security/multiauth/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( github.com/golang-jwt/jwt/v4 v4.5.2 - goa.design/goa/v3 v3.30.1-0.20260826190237-ed9cac596472 + goa.design/goa/v3 v3.30.1-0.20260826205939-36e92a56a054 google.golang.org/grpc v1.83.1 google.golang.org/protobuf v1.36.12 ) @@ -18,6 +18,7 @@ require ( github.com/manveru/faker v0.0.0-20171103152722-9fbc68a78c4d // indirect github.com/rogpeppe/go-internal v1.14.1 // indirect github.com/stretchr/testify v1.12.1 // indirect + go.opentelemetry.io/otel v1.45.0 // indirect go.yaml.in/yaml/v3 v3.0.5 // indirect golang.org/x/mod v0.40.0 // indirect golang.org/x/net v0.58.0 // indirect diff --git a/security/multiauth/go.sum b/security/multiauth/go.sum index bb1b4c8f1..55193089f 100644 --- a/security/multiauth/go.sum +++ b/security/multiauth/go.sum @@ -6,8 +6,8 @@ github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHk github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= github.com/go-chi/chi/v5 v5.3.1 h1:3j4HZLGZQ3JpMCrPJF/Jl3mYJfWLKBfNJ6quurUGCf8= github.com/go-chi/chi/v5 v5.3.1/go.mod h1:R+tYY2hNuVUUjxoPtqUdgBqevM9s9njzkTLutVsOCto= -github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI= -github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/logr v1.4.4 h1:tG4xh9yMsRCAiodLVTxyrkzSZ9+o0L1Kg/+cPVcbP/8= +github.com/go-logr/logr v1.4.4/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/gohugoio/hashstructure v1.0.0 h1:vWYuyzs1n0LdI0F54TJQeYAiB44fHX7H9hCp9X6gHKg= @@ -39,20 +39,20 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.opentelemetry.io/auto/sdk v1.2.1 h1:jXsnJ4Lmnqd11kwkBV2LgLoFMZKizbCi5fNZ/ipaZ64= go.opentelemetry.io/auto/sdk v1.2.1/go.mod h1:KRTj+aOaElaLi+wW1kO/DZRXwkF4C5xPbEe3ZiIhN7Y= -go.opentelemetry.io/otel v1.44.0 h1:JjwHmHpA4iZ3wBxluu2fbbE7j4kqlE8jXyAyPXH7HqU= -go.opentelemetry.io/otel v1.44.0/go.mod h1:BMgjTHL9WPRlRjL2oZCBTL4whCGtXch2H4BhOPIAyYc= -go.opentelemetry.io/otel/metric v1.44.0 h1:1w0gILTcHdr3YI+ixLyjemwrVnsMURbTZFrSYCdDdmc= -go.opentelemetry.io/otel/metric v1.44.0/go.mod h1:8O7hanEPBNgEMmybD3s2VBKcgWOCsA6tzHBPODAiquo= +go.opentelemetry.io/otel v1.45.0 h1:pdrWmLHofpubmArBv1LgFSv1Z0Ie/ppdZzu+kUN5EeU= +go.opentelemetry.io/otel v1.45.0/go.mod h1:XZxIqPapzEYnhNSScF5DIqXhm/rYi0FzCe2XddAwZfQ= +go.opentelemetry.io/otel/metric v1.45.0 h1:7Eg1uH7CJ5cXv9is6tnBe1FI6rj1nwUdbFypRm3br/M= +go.opentelemetry.io/otel/metric v1.45.0/go.mod h1:HAPbm1nd3p1PmFH7v2dR+6BjXxw+Lq4a2+pndMAm08s= go.opentelemetry.io/otel/sdk v1.44.0 h1:nHYwb9lK+fJPU/dnT6s7W7Z8itMWyqrnVfbheVYrZ58= go.opentelemetry.io/otel/sdk v1.44.0/go.mod h1:Osuydd3Se74nqjAKxid74N5eC+jfEqfTegHRnq58oK0= go.opentelemetry.io/otel/sdk/metric v1.44.0 h1:3LlKgI+VjbVsjNRFZJZAJ30WjXC5VkNRks6si09iEfI= go.opentelemetry.io/otel/sdk/metric v1.44.0/go.mod h1:5B5pMARnXxKhltooO4xUuCBorl65a4EpnTalObqOigA= -go.opentelemetry.io/otel/trace v1.44.0 h1:jxF5CsGYCe74MCRx2X4g7WsY/VBKRqqpNvXlX/6gtIk= -go.opentelemetry.io/otel/trace v1.44.0/go.mod h1:oLl1jrMQAVo6v3GAggN+1VH9VIz9iUSvW53sW1Q8PIE= +go.opentelemetry.io/otel/trace v1.45.0 h1:l/mP6Uv7oNO7/TblbhpbgMidxhq1uO/rPsikOyVhxag= +go.opentelemetry.io/otel/trace v1.45.0/go.mod h1:qoJJA2xNMnxRrdISU/kLtfUH2wNeQbiv+jhs/CxI8bc= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260826190237-ed9cac596472 h1:mb8UEehe+YsY2g0z3TF9h6q50jIpsMBkYJfEodM8/TY= -goa.design/goa/v3 v3.30.1-0.20260826190237-ed9cac596472/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826205939-36e92a56a054 h1:j+HyJr3A4zZ642ewmdO4lDfsJ6foFqj90XX8hQOxFJw= +goa.design/goa/v3 v3.30.1-0.20260826205939-36e92a56a054/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/sse/go.mod b/sse/go.mod index a5801429f..e10b1a6fc 100644 --- a/sse/go.mod +++ b/sse/go.mod @@ -5,7 +5,7 @@ go 1.26.0 require ( github.com/shirou/gopsutil/v3 v3.24.5 goa.design/clue v1.2.6 - goa.design/goa/v3 v3.30.1-0.20260826190237-ed9cac596472 + goa.design/goa/v3 v3.30.1-0.20260826205939-36e92a56a054 ) require ( diff --git a/sse/go.sum b/sse/go.sum index a28baef06..32bde76d6 100644 --- a/sse/go.sum +++ b/sse/go.sum @@ -74,8 +74,8 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/clue v1.2.6 h1:ensyUkwlvEbNy8FuTGMldKuvaNouh8YoDY9QaE+EtYg= goa.design/clue v1.2.6/go.mod h1:Y4RS5o2k6MZiGk2PT3XbKyntjR2xkr8dYOKQ591dIDM= -goa.design/goa/v3 v3.30.1-0.20260826190237-ed9cac596472 h1:mb8UEehe+YsY2g0z3TF9h6q50jIpsMBkYJfEodM8/TY= -goa.design/goa/v3 v3.30.1-0.20260826190237-ed9cac596472/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826205939-36e92a56a054 h1:j+HyJr3A4zZ642ewmdO4lDfsJ6foFqj90XX8hQOxFJw= +goa.design/goa/v3 v3.30.1-0.20260826205939-36e92a56a054/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/streaming/go.mod b/streaming/go.mod index 099b6d921..ba7422629 100644 --- a/streaming/go.mod +++ b/streaming/go.mod @@ -5,7 +5,7 @@ go 1.26.0 require ( github.com/golang-jwt/jwt/v4 v4.5.2 github.com/gorilla/websocket v1.5.3 - goa.design/goa/v3 v3.30.1-0.20260826190237-ed9cac596472 + goa.design/goa/v3 v3.30.1-0.20260826205939-36e92a56a054 google.golang.org/grpc v1.83.1 google.golang.org/protobuf v1.36.12 ) @@ -18,6 +18,7 @@ require ( github.com/manveru/faker v0.0.0-20171103152722-9fbc68a78c4d // indirect github.com/rogpeppe/go-internal v1.14.1 // indirect github.com/stretchr/testify v1.12.1 // indirect + go.opentelemetry.io/otel v1.45.0 // indirect go.yaml.in/yaml/v3 v3.0.5 // indirect golang.org/x/mod v0.40.0 // indirect golang.org/x/net v0.58.0 // indirect diff --git a/streaming/go.sum b/streaming/go.sum index bb1b4c8f1..55193089f 100644 --- a/streaming/go.sum +++ b/streaming/go.sum @@ -6,8 +6,8 @@ github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHk github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= github.com/go-chi/chi/v5 v5.3.1 h1:3j4HZLGZQ3JpMCrPJF/Jl3mYJfWLKBfNJ6quurUGCf8= github.com/go-chi/chi/v5 v5.3.1/go.mod h1:R+tYY2hNuVUUjxoPtqUdgBqevM9s9njzkTLutVsOCto= -github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI= -github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/logr v1.4.4 h1:tG4xh9yMsRCAiodLVTxyrkzSZ9+o0L1Kg/+cPVcbP/8= +github.com/go-logr/logr v1.4.4/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/gohugoio/hashstructure v1.0.0 h1:vWYuyzs1n0LdI0F54TJQeYAiB44fHX7H9hCp9X6gHKg= @@ -39,20 +39,20 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.opentelemetry.io/auto/sdk v1.2.1 h1:jXsnJ4Lmnqd11kwkBV2LgLoFMZKizbCi5fNZ/ipaZ64= go.opentelemetry.io/auto/sdk v1.2.1/go.mod h1:KRTj+aOaElaLi+wW1kO/DZRXwkF4C5xPbEe3ZiIhN7Y= -go.opentelemetry.io/otel v1.44.0 h1:JjwHmHpA4iZ3wBxluu2fbbE7j4kqlE8jXyAyPXH7HqU= -go.opentelemetry.io/otel v1.44.0/go.mod h1:BMgjTHL9WPRlRjL2oZCBTL4whCGtXch2H4BhOPIAyYc= -go.opentelemetry.io/otel/metric v1.44.0 h1:1w0gILTcHdr3YI+ixLyjemwrVnsMURbTZFrSYCdDdmc= -go.opentelemetry.io/otel/metric v1.44.0/go.mod h1:8O7hanEPBNgEMmybD3s2VBKcgWOCsA6tzHBPODAiquo= +go.opentelemetry.io/otel v1.45.0 h1:pdrWmLHofpubmArBv1LgFSv1Z0Ie/ppdZzu+kUN5EeU= +go.opentelemetry.io/otel v1.45.0/go.mod h1:XZxIqPapzEYnhNSScF5DIqXhm/rYi0FzCe2XddAwZfQ= +go.opentelemetry.io/otel/metric v1.45.0 h1:7Eg1uH7CJ5cXv9is6tnBe1FI6rj1nwUdbFypRm3br/M= +go.opentelemetry.io/otel/metric v1.45.0/go.mod h1:HAPbm1nd3p1PmFH7v2dR+6BjXxw+Lq4a2+pndMAm08s= go.opentelemetry.io/otel/sdk v1.44.0 h1:nHYwb9lK+fJPU/dnT6s7W7Z8itMWyqrnVfbheVYrZ58= go.opentelemetry.io/otel/sdk v1.44.0/go.mod h1:Osuydd3Se74nqjAKxid74N5eC+jfEqfTegHRnq58oK0= go.opentelemetry.io/otel/sdk/metric v1.44.0 h1:3LlKgI+VjbVsjNRFZJZAJ30WjXC5VkNRks6si09iEfI= go.opentelemetry.io/otel/sdk/metric v1.44.0/go.mod h1:5B5pMARnXxKhltooO4xUuCBorl65a4EpnTalObqOigA= -go.opentelemetry.io/otel/trace v1.44.0 h1:jxF5CsGYCe74MCRx2X4g7WsY/VBKRqqpNvXlX/6gtIk= -go.opentelemetry.io/otel/trace v1.44.0/go.mod h1:oLl1jrMQAVo6v3GAggN+1VH9VIz9iUSvW53sW1Q8PIE= +go.opentelemetry.io/otel/trace v1.45.0 h1:l/mP6Uv7oNO7/TblbhpbgMidxhq1uO/rPsikOyVhxag= +go.opentelemetry.io/otel/trace v1.45.0/go.mod h1:qoJJA2xNMnxRrdISU/kLtfUH2wNeQbiv+jhs/CxI8bc= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260826190237-ed9cac596472 h1:mb8UEehe+YsY2g0z3TF9h6q50jIpsMBkYJfEodM8/TY= -goa.design/goa/v3 v3.30.1-0.20260826190237-ed9cac596472/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826205939-36e92a56a054 h1:j+HyJr3A4zZ642ewmdO4lDfsJ6foFqj90XX8hQOxFJw= +goa.design/goa/v3 v3.30.1-0.20260826205939-36e92a56a054/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/tracing/go.mod b/tracing/go.mod index 9a9083caa..fe38ff4c5 100644 --- a/tracing/go.mod +++ b/tracing/go.mod @@ -5,7 +5,7 @@ go 1.26.0 require ( github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 goa.design/examples/basic v0.0.0-20260810182504-f834f43955c5 - goa.design/goa/v3 v3.30.1-0.20260826190237-ed9cac596472 + goa.design/goa/v3 v3.30.1-0.20260826205939-36e92a56a054 google.golang.org/grpc v1.83.1 ) @@ -14,6 +14,7 @@ require ( github.com/google/uuid v1.6.0 // indirect github.com/gorilla/websocket v1.5.3 // indirect github.com/pkg/errors v0.9.1 // indirect + go.opentelemetry.io/otel/metric v1.45.0 // indirect golang.org/x/net v0.58.0 // indirect golang.org/x/sys v0.47.0 // indirect golang.org/x/text v0.41.0 // indirect diff --git a/tracing/go.sum b/tracing/go.sum index 4c68799fd..635c3e0ba 100644 --- a/tracing/go.sum +++ b/tracing/go.sum @@ -65,8 +65,8 @@ go.opentelemetry.io/auto/sdk v1.2.1 h1:jXsnJ4Lmnqd11kwkBV2LgLoFMZKizbCi5fNZ/ipaZ go.opentelemetry.io/auto/sdk v1.2.1/go.mod h1:KRTj+aOaElaLi+wW1kO/DZRXwkF4C5xPbEe3ZiIhN7Y= go.opentelemetry.io/otel v1.45.0 h1:pdrWmLHofpubmArBv1LgFSv1Z0Ie/ppdZzu+kUN5EeU= go.opentelemetry.io/otel v1.45.0/go.mod h1:XZxIqPapzEYnhNSScF5DIqXhm/rYi0FzCe2XddAwZfQ= -go.opentelemetry.io/otel/metric v1.44.0 h1:1w0gILTcHdr3YI+ixLyjemwrVnsMURbTZFrSYCdDdmc= -go.opentelemetry.io/otel/metric v1.44.0/go.mod h1:8O7hanEPBNgEMmybD3s2VBKcgWOCsA6tzHBPODAiquo= +go.opentelemetry.io/otel/metric v1.45.0 h1:7Eg1uH7CJ5cXv9is6tnBe1FI6rj1nwUdbFypRm3br/M= +go.opentelemetry.io/otel/metric v1.45.0/go.mod h1:HAPbm1nd3p1PmFH7v2dR+6BjXxw+Lq4a2+pndMAm08s= go.opentelemetry.io/otel/sdk v1.44.0 h1:nHYwb9lK+fJPU/dnT6s7W7Z8itMWyqrnVfbheVYrZ58= go.opentelemetry.io/otel/sdk v1.44.0/go.mod h1:Osuydd3Se74nqjAKxid74N5eC+jfEqfTegHRnq58oK0= go.opentelemetry.io/otel/sdk/metric v1.44.0 h1:3LlKgI+VjbVsjNRFZJZAJ30WjXC5VkNRks6si09iEfI= @@ -81,8 +81,8 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/examples/basic v0.0.0-20260810182504-f834f43955c5 h1:SRSrUaLTTdA4bUXb8+zA5MDhMEx8YaP+Knd+pddBcrg= goa.design/examples/basic v0.0.0-20260810182504-f834f43955c5/go.mod h1:XRziIzNcLb9fk7ZrfiHx5FIeAj+orJ4fkzLG0nXpiAo= -goa.design/goa/v3 v3.30.1-0.20260826190237-ed9cac596472 h1:mb8UEehe+YsY2g0z3TF9h6q50jIpsMBkYJfEodM8/TY= -goa.design/goa/v3 v3.30.1-0.20260826190237-ed9cac596472/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826205939-36e92a56a054 h1:j+HyJr3A4zZ642ewmdO4lDfsJ6foFqj90XX8hQOxFJw= +goa.design/goa/v3 v3.30.1-0.20260826205939-36e92a56a054/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= diff --git a/tus/go.mod b/tus/go.mod index 8fdd21e7a..d2ab588a1 100644 --- a/tus/go.mod +++ b/tus/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( github.com/rs/xid v1.6.0 - goa.design/goa/v3 v3.30.1-0.20260826190237-ed9cac596472 + goa.design/goa/v3 v3.30.1-0.20260826205939-36e92a56a054 ) require ( diff --git a/tus/go.sum b/tus/go.sum index 96b8fe088..84f3a96f7 100644 --- a/tus/go.sum +++ b/tus/go.sum @@ -33,8 +33,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260826190237-ed9cac596472 h1:mb8UEehe+YsY2g0z3TF9h6q50jIpsMBkYJfEodM8/TY= -goa.design/goa/v3 v3.30.1-0.20260826190237-ed9cac596472/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826205939-36e92a56a054 h1:j+HyJr3A4zZ642ewmdO4lDfsJ6foFqj90XX8hQOxFJw= +goa.design/goa/v3 v3.30.1-0.20260826205939-36e92a56a054/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= diff --git a/upload_download/go.mod b/upload_download/go.mod index 6d80b0673..90d0165c3 100644 --- a/upload_download/go.mod +++ b/upload_download/go.mod @@ -2,7 +2,7 @@ module goa.design/examples/upload_download go 1.26.0 -require goa.design/goa/v3 v3.30.1-0.20260826190237-ed9cac596472 +require goa.design/goa/v3 v3.30.1-0.20260826205939-36e92a56a054 require ( github.com/dimfeld/httppath v0.0.0-20170720192232-ee938bf73598 // indirect diff --git a/upload_download/go.sum b/upload_download/go.sum index 4167eee24..b332e19e9 100644 --- a/upload_download/go.sum +++ b/upload_download/go.sum @@ -31,8 +31,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260826190237-ed9cac596472 h1:mb8UEehe+YsY2g0z3TF9h6q50jIpsMBkYJfEodM8/TY= -goa.design/goa/v3 v3.30.1-0.20260826190237-ed9cac596472/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826205939-36e92a56a054 h1:j+HyJr3A4zZ642ewmdO4lDfsJ6foFqj90XX8hQOxFJw= +goa.design/goa/v3 v3.30.1-0.20260826205939-36e92a56a054/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= From 213ae3f2e42234fc1f9eb05115ae9735920a6e1a Mon Sep 17 00:00:00 2001 From: "Raphael (manual office deploy after cloud-state fix)" Date: Wed, 26 Aug 2026 15:02:33 -0700 Subject: [PATCH 22/28] chore: pin examples to final Goa helpers --- basic/go.mod | 2 +- basic/go.sum | 4 ++-- cellar/go.mod | 2 +- cellar/go.sum | 16 ++-------------- concerts/go.mod | 2 +- concerts/go.sum | 4 ++-- cookies/go.mod | 2 +- cookies/go.sum | 4 ++-- encodings/cbor/go.mod | 2 +- encodings/cbor/go.sum | 4 ++-- encodings/text/go.mod | 2 +- encodings/text/go.sum | 4 ++-- error/go.mod | 2 +- error/go.sum | 4 ++-- files/go.mod | 2 +- files/go.sum | 4 ++-- httpstatus/go.mod | 2 +- httpstatus/go.sum | 4 ++-- interceptors/go.mod | 2 +- interceptors/go.sum | 4 ++-- multipart/go.mod | 2 +- multipart/go.sum | 4 ++-- retry/go.mod | 2 +- retry/go.sum | 4 ++-- security/hierarchy/go.mod | 2 +- security/hierarchy/go.sum | 4 ++-- security/multiauth/go.mod | 2 +- security/multiauth/go.sum | 4 ++-- sse/go.mod | 2 +- sse/go.sum | 4 ++-- streaming/go.mod | 2 +- streaming/go.sum | 4 ++-- tracing/go.mod | 2 +- tracing/go.sum | 4 ++-- tus/go.mod | 2 +- tus/go.sum | 4 ++-- upload_download/go.mod | 2 +- upload_download/go.sum | 4 ++-- 38 files changed, 57 insertions(+), 69 deletions(-) diff --git a/basic/go.mod b/basic/go.mod index b6c6ce530..fb08c623d 100644 --- a/basic/go.mod +++ b/basic/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( goa.design/clue v1.2.6 - goa.design/goa/v3 v3.30.1-0.20260826205939-36e92a56a054 + goa.design/goa/v3 v3.30.1-0.20260826213606-c30c5e1423e7 google.golang.org/grpc v1.83.1 google.golang.org/protobuf v1.36.12 ) diff --git a/basic/go.sum b/basic/go.sum index 3e1872de8..41ac077d3 100644 --- a/basic/go.sum +++ b/basic/go.sum @@ -55,8 +55,8 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/clue v1.2.6 h1:ensyUkwlvEbNy8FuTGMldKuvaNouh8YoDY9QaE+EtYg= goa.design/clue v1.2.6/go.mod h1:Y4RS5o2k6MZiGk2PT3XbKyntjR2xkr8dYOKQ591dIDM= -goa.design/goa/v3 v3.30.1-0.20260826205939-36e92a56a054 h1:j+HyJr3A4zZ642ewmdO4lDfsJ6foFqj90XX8hQOxFJw= -goa.design/goa/v3 v3.30.1-0.20260826205939-36e92a56a054/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826213606-c30c5e1423e7 h1:z/GUg4DrWWQsH/UqH7QUmqdiUWSX8VWBr61dOs4UtOc= +goa.design/goa/v3 v3.30.1-0.20260826213606-c30c5e1423e7/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/cellar/go.mod b/cellar/go.mod index 6df05fff0..b5938c74e 100644 --- a/cellar/go.mod +++ b/cellar/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( github.com/boltdb/bolt v1.3.1 - goa.design/goa/v3 v3.30.1-0.20260826205939-36e92a56a054 + goa.design/goa/v3 v3.30.1-0.20260826213606-c30c5e1423e7 google.golang.org/grpc v1.83.1 google.golang.org/protobuf v1.36.12 ) diff --git a/cellar/go.sum b/cellar/go.sum index e47708dd1..d93e16303 100644 --- a/cellar/go.sum +++ b/cellar/go.sum @@ -6,18 +6,12 @@ github.com/dimfeld/httppath v0.0.0-20170720192232-ee938bf73598 h1:MGKhKyiYrvMDZs github.com/dimfeld/httppath v0.0.0-20170720192232-ee938bf73598/go.mod h1:0FpDmbrt36utu8jEmeU05dPC9AB5tsLYVVi+ZHfyuwI= github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8= github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= -github.com/getkin/kin-openapi v0.144.0 h1:hIRcTH+KjLfkLpYU6bSSfdFpi0fZi1fp+hSPi4aQu9Y= -github.com/getkin/kin-openapi v0.144.0/go.mod h1:3BH9M9XDe/y9M5DSvEocVYAYq1w0qrhJHjC/vZi0AaY= github.com/go-chi/chi/v5 v5.3.1 h1:3j4HZLGZQ3JpMCrPJF/Jl3mYJfWLKBfNJ6quurUGCf8= github.com/go-chi/chi/v5 v5.3.1/go.mod h1:R+tYY2hNuVUUjxoPtqUdgBqevM9s9njzkTLutVsOCto= github.com/go-logr/logr v1.4.4 h1:tG4xh9yMsRCAiodLVTxyrkzSZ9+o0L1Kg/+cPVcbP/8= github.com/go-logr/logr v1.4.4/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= -github.com/go-openapi/jsonpointer v0.22.5 h1:8on/0Yp4uTb9f4XvTrM2+1CPrV05QPZXu+rvu2o9jcA= -github.com/go-openapi/jsonpointer v0.22.5/go.mod h1:gyUR3sCvGSWchA2sUBJGluYMbe1zazrYWIkWPjjMUY0= -github.com/go-openapi/swag/jsonname v0.25.5 h1:8p150i44rv/Drip4vWI3kGi9+4W9TdI3US3uUYSFhSo= -github.com/go-openapi/swag/jsonname v0.25.5/go.mod h1:jNqqikyiAK56uS7n8sLkdaNY/uq6+D2m2LANat09pKU= github.com/gohugoio/hashstructure v1.0.0 h1:vWYuyzs1n0LdI0F54TJQeYAiB44fHX7H9hCp9X6gHKg= github.com/gohugoio/hashstructure v1.0.0/go.mod h1:FSbTK4QwxucJ2bC4Lvrs9a6x0DbQDXNoyBO+h4nlCgE= github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= @@ -39,14 +33,8 @@ github.com/manveru/faker v0.0.0-20171103152722-9fbc68a78c4d h1:Zj+PHjnhRYWBK6RqC github.com/manveru/faker v0.0.0-20171103152722-9fbc68a78c4d/go.mod h1:WZy8Q5coAB1zhY9AOBJP0O6J4BuDfbupUDavKY+I3+s= github.com/manveru/gobdd v0.0.0-20131210092515-f1a17fdd710b h1:3E44bLeN8uKYdfQqVQycPnaVviZdBLbizFhU49mtbe4= github.com/manveru/gobdd v0.0.0-20131210092515-f1a17fdd710b/go.mod h1:Bj8LjjP0ReT1eKt5QlKjwgi5AFm5mI6O1A2G4ChI0Ag= -github.com/oasdiff/yaml v0.1.1 h1:6nHx+pn9gBRM6YpBlFZFQGCCd1nuvqOBtTD3KKTgGxY= -github.com/oasdiff/yaml v0.1.1/go.mod h1:EYJNoyktvWMJ0Hmhx+6qTaqMOsalUaRGT8Sj1hNcegU= -github.com/oasdiff/yaml3 v0.0.14 h1:aLJee3hxBK2H5wdXd9iPcIXb93Nty1Ge0pT171eHtkw= -github.com/oasdiff/yaml3 v0.0.14/go.mod h1:csto2xfDjYccdUn/yw/bPjj/cYTdp6HtFA0J4TWG+gg= github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ= github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7so1lCWt35ZSgc= -github.com/santhosh-tekuri/jsonschema/v6 v6.0.2 h1:KRzFb2m7YtdldCEkzs6KqmJw4nqEVZGK7IN2kJkjTuQ= -github.com/santhosh-tekuri/jsonschema/v6 v6.0.2/go.mod h1:JXeL+ps8p7/KNMjDQk3TCwPpBy0wYklyWTfbkIzdIFU= github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWDWE= github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.opentelemetry.io/auto/sdk v1.2.1 h1:jXsnJ4Lmnqd11kwkBV2LgLoFMZKizbCi5fNZ/ipaZ64= @@ -63,8 +51,8 @@ go.opentelemetry.io/otel/trace v1.45.0 h1:l/mP6Uv7oNO7/TblbhpbgMidxhq1uO/rPsikOy go.opentelemetry.io/otel/trace v1.45.0/go.mod h1:qoJJA2xNMnxRrdISU/kLtfUH2wNeQbiv+jhs/CxI8bc= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260826205939-36e92a56a054 h1:j+HyJr3A4zZ642ewmdO4lDfsJ6foFqj90XX8hQOxFJw= -goa.design/goa/v3 v3.30.1-0.20260826205939-36e92a56a054/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826213606-c30c5e1423e7 h1:z/GUg4DrWWQsH/UqH7QUmqdiUWSX8VWBr61dOs4UtOc= +goa.design/goa/v3 v3.30.1-0.20260826213606-c30c5e1423e7/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/concerts/go.mod b/concerts/go.mod index 51072f9b0..1193a9794 100644 --- a/concerts/go.mod +++ b/concerts/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( github.com/google/uuid v1.6.0 - goa.design/goa/v3 v3.30.1-0.20260826205939-36e92a56a054 + goa.design/goa/v3 v3.30.1-0.20260826213606-c30c5e1423e7 ) require ( diff --git a/concerts/go.sum b/concerts/go.sum index b332e19e9..aea2d5af9 100644 --- a/concerts/go.sum +++ b/concerts/go.sum @@ -31,8 +31,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260826205939-36e92a56a054 h1:j+HyJr3A4zZ642ewmdO4lDfsJ6foFqj90XX8hQOxFJw= -goa.design/goa/v3 v3.30.1-0.20260826205939-36e92a56a054/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826213606-c30c5e1423e7 h1:z/GUg4DrWWQsH/UqH7QUmqdiUWSX8VWBr61dOs4UtOc= +goa.design/goa/v3 v3.30.1-0.20260826213606-c30c5e1423e7/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= diff --git a/cookies/go.mod b/cookies/go.mod index aec18f64d..27cd34eba 100644 --- a/cookies/go.mod +++ b/cookies/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( github.com/rs/xid v1.6.0 - goa.design/goa/v3 v3.30.1-0.20260826205939-36e92a56a054 + goa.design/goa/v3 v3.30.1-0.20260826213606-c30c5e1423e7 ) require ( diff --git a/cookies/go.sum b/cookies/go.sum index 84f3a96f7..5bced1127 100644 --- a/cookies/go.sum +++ b/cookies/go.sum @@ -33,8 +33,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260826205939-36e92a56a054 h1:j+HyJr3A4zZ642ewmdO4lDfsJ6foFqj90XX8hQOxFJw= -goa.design/goa/v3 v3.30.1-0.20260826205939-36e92a56a054/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826213606-c30c5e1423e7 h1:z/GUg4DrWWQsH/UqH7QUmqdiUWSX8VWBr61dOs4UtOc= +goa.design/goa/v3 v3.30.1-0.20260826213606-c30c5e1423e7/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= diff --git a/encodings/cbor/go.mod b/encodings/cbor/go.mod index 153d2de9e..592b9a5d9 100644 --- a/encodings/cbor/go.mod +++ b/encodings/cbor/go.mod @@ -5,7 +5,7 @@ go 1.26.0 require ( github.com/fxamacker/cbor/v2 v2.9.2 goa.design/clue v1.2.6 - goa.design/goa/v3 v3.30.1-0.20260826205939-36e92a56a054 + goa.design/goa/v3 v3.30.1-0.20260826213606-c30c5e1423e7 ) require ( diff --git a/encodings/cbor/go.sum b/encodings/cbor/go.sum index e0ad66ecf..7e47d39a9 100644 --- a/encodings/cbor/go.sum +++ b/encodings/cbor/go.sum @@ -59,8 +59,8 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/clue v1.2.6 h1:ensyUkwlvEbNy8FuTGMldKuvaNouh8YoDY9QaE+EtYg= goa.design/clue v1.2.6/go.mod h1:Y4RS5o2k6MZiGk2PT3XbKyntjR2xkr8dYOKQ591dIDM= -goa.design/goa/v3 v3.30.1-0.20260826205939-36e92a56a054 h1:j+HyJr3A4zZ642ewmdO4lDfsJ6foFqj90XX8hQOxFJw= -goa.design/goa/v3 v3.30.1-0.20260826205939-36e92a56a054/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826213606-c30c5e1423e7 h1:z/GUg4DrWWQsH/UqH7QUmqdiUWSX8VWBr61dOs4UtOc= +goa.design/goa/v3 v3.30.1-0.20260826213606-c30c5e1423e7/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/encodings/text/go.mod b/encodings/text/go.mod index 4faee90e8..306c4beeb 100644 --- a/encodings/text/go.mod +++ b/encodings/text/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( goa.design/clue v1.2.6 - goa.design/goa/v3 v3.30.1-0.20260826205939-36e92a56a054 + goa.design/goa/v3 v3.30.1-0.20260826213606-c30c5e1423e7 ) require ( diff --git a/encodings/text/go.sum b/encodings/text/go.sum index 3e1872de8..41ac077d3 100644 --- a/encodings/text/go.sum +++ b/encodings/text/go.sum @@ -55,8 +55,8 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/clue v1.2.6 h1:ensyUkwlvEbNy8FuTGMldKuvaNouh8YoDY9QaE+EtYg= goa.design/clue v1.2.6/go.mod h1:Y4RS5o2k6MZiGk2PT3XbKyntjR2xkr8dYOKQ591dIDM= -goa.design/goa/v3 v3.30.1-0.20260826205939-36e92a56a054 h1:j+HyJr3A4zZ642ewmdO4lDfsJ6foFqj90XX8hQOxFJw= -goa.design/goa/v3 v3.30.1-0.20260826205939-36e92a56a054/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826213606-c30c5e1423e7 h1:z/GUg4DrWWQsH/UqH7QUmqdiUWSX8VWBr61dOs4UtOc= +goa.design/goa/v3 v3.30.1-0.20260826213606-c30c5e1423e7/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/error/go.mod b/error/go.mod index 2a2fb3d87..0ca606833 100644 --- a/error/go.mod +++ b/error/go.mod @@ -3,7 +3,7 @@ module goa.design/examples/error go 1.26.0 require ( - goa.design/goa/v3 v3.30.1-0.20260826205939-36e92a56a054 + goa.design/goa/v3 v3.30.1-0.20260826213606-c30c5e1423e7 google.golang.org/genproto v0.0.0-20260810153831-ec0a7760b754 google.golang.org/grpc v1.83.1 google.golang.org/protobuf v1.36.12 diff --git a/error/go.sum b/error/go.sum index 0c7eb5e45..b0de660bb 100644 --- a/error/go.sum +++ b/error/go.sum @@ -49,8 +49,8 @@ go.opentelemetry.io/otel/trace v1.45.0 h1:l/mP6Uv7oNO7/TblbhpbgMidxhq1uO/rPsikOy go.opentelemetry.io/otel/trace v1.45.0/go.mod h1:qoJJA2xNMnxRrdISU/kLtfUH2wNeQbiv+jhs/CxI8bc= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260826205939-36e92a56a054 h1:j+HyJr3A4zZ642ewmdO4lDfsJ6foFqj90XX8hQOxFJw= -goa.design/goa/v3 v3.30.1-0.20260826205939-36e92a56a054/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826213606-c30c5e1423e7 h1:z/GUg4DrWWQsH/UqH7QUmqdiUWSX8VWBr61dOs4UtOc= +goa.design/goa/v3 v3.30.1-0.20260826213606-c30c5e1423e7/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/files/go.mod b/files/go.mod index 756ba3c25..c9f34caa6 100644 --- a/files/go.mod +++ b/files/go.mod @@ -2,7 +2,7 @@ module goa.design/examples/files go 1.26.0 -require goa.design/goa/v3 v3.30.1-0.20260826205939-36e92a56a054 +require goa.design/goa/v3 v3.30.1-0.20260826213606-c30c5e1423e7 require ( github.com/dimfeld/httppath v0.0.0-20170720192232-ee938bf73598 // indirect diff --git a/files/go.sum b/files/go.sum index b332e19e9..aea2d5af9 100644 --- a/files/go.sum +++ b/files/go.sum @@ -31,8 +31,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260826205939-36e92a56a054 h1:j+HyJr3A4zZ642ewmdO4lDfsJ6foFqj90XX8hQOxFJw= -goa.design/goa/v3 v3.30.1-0.20260826205939-36e92a56a054/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826213606-c30c5e1423e7 h1:z/GUg4DrWWQsH/UqH7QUmqdiUWSX8VWBr61dOs4UtOc= +goa.design/goa/v3 v3.30.1-0.20260826213606-c30c5e1423e7/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= diff --git a/httpstatus/go.mod b/httpstatus/go.mod index 62e04005a..fdc890349 100644 --- a/httpstatus/go.mod +++ b/httpstatus/go.mod @@ -2,7 +2,7 @@ module goa.design/examples/httpstatus go 1.26.0 -require goa.design/goa/v3 v3.30.1-0.20260826205939-36e92a56a054 +require goa.design/goa/v3 v3.30.1-0.20260826213606-c30c5e1423e7 require ( github.com/dimfeld/httppath v0.0.0-20170720192232-ee938bf73598 // indirect diff --git a/httpstatus/go.sum b/httpstatus/go.sum index b332e19e9..aea2d5af9 100644 --- a/httpstatus/go.sum +++ b/httpstatus/go.sum @@ -31,8 +31,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260826205939-36e92a56a054 h1:j+HyJr3A4zZ642ewmdO4lDfsJ6foFqj90XX8hQOxFJw= -goa.design/goa/v3 v3.30.1-0.20260826205939-36e92a56a054/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826213606-c30c5e1423e7 h1:z/GUg4DrWWQsH/UqH7QUmqdiUWSX8VWBr61dOs4UtOc= +goa.design/goa/v3 v3.30.1-0.20260826213606-c30c5e1423e7/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= diff --git a/interceptors/go.mod b/interceptors/go.mod index 057332543..781cebadb 100644 --- a/interceptors/go.mod +++ b/interceptors/go.mod @@ -6,7 +6,7 @@ require ( github.com/google/uuid v1.6.0 github.com/gorilla/websocket v1.5.3 goa.design/clue v1.2.6 - goa.design/goa/v3 v3.30.1-0.20260826205939-36e92a56a054 + goa.design/goa/v3 v3.30.1-0.20260826213606-c30c5e1423e7 google.golang.org/grpc v1.83.1 google.golang.org/protobuf v1.36.12 ) diff --git a/interceptors/go.sum b/interceptors/go.sum index 3e1872de8..41ac077d3 100644 --- a/interceptors/go.sum +++ b/interceptors/go.sum @@ -55,8 +55,8 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/clue v1.2.6 h1:ensyUkwlvEbNy8FuTGMldKuvaNouh8YoDY9QaE+EtYg= goa.design/clue v1.2.6/go.mod h1:Y4RS5o2k6MZiGk2PT3XbKyntjR2xkr8dYOKQ591dIDM= -goa.design/goa/v3 v3.30.1-0.20260826205939-36e92a56a054 h1:j+HyJr3A4zZ642ewmdO4lDfsJ6foFqj90XX8hQOxFJw= -goa.design/goa/v3 v3.30.1-0.20260826205939-36e92a56a054/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826213606-c30c5e1423e7 h1:z/GUg4DrWWQsH/UqH7QUmqdiUWSX8VWBr61dOs4UtOc= +goa.design/goa/v3 v3.30.1-0.20260826213606-c30c5e1423e7/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/multipart/go.mod b/multipart/go.mod index 81fcea4c4..cff5854c8 100644 --- a/multipart/go.mod +++ b/multipart/go.mod @@ -2,7 +2,7 @@ module goa.design/examples/multipart go 1.26.0 -require goa.design/goa/v3 v3.30.1-0.20260826205939-36e92a56a054 +require goa.design/goa/v3 v3.30.1-0.20260826213606-c30c5e1423e7 require ( github.com/dimfeld/httppath v0.0.0-20170720192232-ee938bf73598 // indirect diff --git a/multipart/go.sum b/multipart/go.sum index b332e19e9..aea2d5af9 100644 --- a/multipart/go.sum +++ b/multipart/go.sum @@ -31,8 +31,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260826205939-36e92a56a054 h1:j+HyJr3A4zZ642ewmdO4lDfsJ6foFqj90XX8hQOxFJw= -goa.design/goa/v3 v3.30.1-0.20260826205939-36e92a56a054/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826213606-c30c5e1423e7 h1:z/GUg4DrWWQsH/UqH7QUmqdiUWSX8VWBr61dOs4UtOc= +goa.design/goa/v3 v3.30.1-0.20260826213606-c30c5e1423e7/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= diff --git a/retry/go.mod b/retry/go.mod index 56592b702..17996bf34 100644 --- a/retry/go.mod +++ b/retry/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( goa.design/clue v1.2.6 - goa.design/goa/v3 v3.30.1-0.20260826205939-36e92a56a054 + goa.design/goa/v3 v3.30.1-0.20260826213606-c30c5e1423e7 google.golang.org/grpc v1.83.1 google.golang.org/protobuf v1.36.12 ) diff --git a/retry/go.sum b/retry/go.sum index 3e1872de8..41ac077d3 100644 --- a/retry/go.sum +++ b/retry/go.sum @@ -55,8 +55,8 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/clue v1.2.6 h1:ensyUkwlvEbNy8FuTGMldKuvaNouh8YoDY9QaE+EtYg= goa.design/clue v1.2.6/go.mod h1:Y4RS5o2k6MZiGk2PT3XbKyntjR2xkr8dYOKQ591dIDM= -goa.design/goa/v3 v3.30.1-0.20260826205939-36e92a56a054 h1:j+HyJr3A4zZ642ewmdO4lDfsJ6foFqj90XX8hQOxFJw= -goa.design/goa/v3 v3.30.1-0.20260826205939-36e92a56a054/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826213606-c30c5e1423e7 h1:z/GUg4DrWWQsH/UqH7QUmqdiUWSX8VWBr61dOs4UtOc= +goa.design/goa/v3 v3.30.1-0.20260826213606-c30c5e1423e7/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/security/hierarchy/go.mod b/security/hierarchy/go.mod index 930c71d64..1449df937 100644 --- a/security/hierarchy/go.mod +++ b/security/hierarchy/go.mod @@ -2,7 +2,7 @@ module goa.design/examples/security/hierarchy go 1.26.0 -require goa.design/goa/v3 v3.30.1-0.20260826205939-36e92a56a054 +require goa.design/goa/v3 v3.30.1-0.20260826213606-c30c5e1423e7 require ( github.com/dimfeld/httppath v0.0.0-20170720192232-ee938bf73598 // indirect diff --git a/security/hierarchy/go.sum b/security/hierarchy/go.sum index b332e19e9..aea2d5af9 100644 --- a/security/hierarchy/go.sum +++ b/security/hierarchy/go.sum @@ -31,8 +31,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260826205939-36e92a56a054 h1:j+HyJr3A4zZ642ewmdO4lDfsJ6foFqj90XX8hQOxFJw= -goa.design/goa/v3 v3.30.1-0.20260826205939-36e92a56a054/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826213606-c30c5e1423e7 h1:z/GUg4DrWWQsH/UqH7QUmqdiUWSX8VWBr61dOs4UtOc= +goa.design/goa/v3 v3.30.1-0.20260826213606-c30c5e1423e7/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= diff --git a/security/multiauth/go.mod b/security/multiauth/go.mod index 89247aead..676430c1a 100644 --- a/security/multiauth/go.mod +++ b/security/multiauth/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( github.com/golang-jwt/jwt/v4 v4.5.2 - goa.design/goa/v3 v3.30.1-0.20260826205939-36e92a56a054 + goa.design/goa/v3 v3.30.1-0.20260826213606-c30c5e1423e7 google.golang.org/grpc v1.83.1 google.golang.org/protobuf v1.36.12 ) diff --git a/security/multiauth/go.sum b/security/multiauth/go.sum index 55193089f..a37989fde 100644 --- a/security/multiauth/go.sum +++ b/security/multiauth/go.sum @@ -51,8 +51,8 @@ go.opentelemetry.io/otel/trace v1.45.0 h1:l/mP6Uv7oNO7/TblbhpbgMidxhq1uO/rPsikOy go.opentelemetry.io/otel/trace v1.45.0/go.mod h1:qoJJA2xNMnxRrdISU/kLtfUH2wNeQbiv+jhs/CxI8bc= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260826205939-36e92a56a054 h1:j+HyJr3A4zZ642ewmdO4lDfsJ6foFqj90XX8hQOxFJw= -goa.design/goa/v3 v3.30.1-0.20260826205939-36e92a56a054/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826213606-c30c5e1423e7 h1:z/GUg4DrWWQsH/UqH7QUmqdiUWSX8VWBr61dOs4UtOc= +goa.design/goa/v3 v3.30.1-0.20260826213606-c30c5e1423e7/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/sse/go.mod b/sse/go.mod index e10b1a6fc..fe17518f9 100644 --- a/sse/go.mod +++ b/sse/go.mod @@ -5,7 +5,7 @@ go 1.26.0 require ( github.com/shirou/gopsutil/v3 v3.24.5 goa.design/clue v1.2.6 - goa.design/goa/v3 v3.30.1-0.20260826205939-36e92a56a054 + goa.design/goa/v3 v3.30.1-0.20260826213606-c30c5e1423e7 ) require ( diff --git a/sse/go.sum b/sse/go.sum index 32bde76d6..3b6263d4f 100644 --- a/sse/go.sum +++ b/sse/go.sum @@ -74,8 +74,8 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/clue v1.2.6 h1:ensyUkwlvEbNy8FuTGMldKuvaNouh8YoDY9QaE+EtYg= goa.design/clue v1.2.6/go.mod h1:Y4RS5o2k6MZiGk2PT3XbKyntjR2xkr8dYOKQ591dIDM= -goa.design/goa/v3 v3.30.1-0.20260826205939-36e92a56a054 h1:j+HyJr3A4zZ642ewmdO4lDfsJ6foFqj90XX8hQOxFJw= -goa.design/goa/v3 v3.30.1-0.20260826205939-36e92a56a054/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826213606-c30c5e1423e7 h1:z/GUg4DrWWQsH/UqH7QUmqdiUWSX8VWBr61dOs4UtOc= +goa.design/goa/v3 v3.30.1-0.20260826213606-c30c5e1423e7/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/streaming/go.mod b/streaming/go.mod index ba7422629..756424bfd 100644 --- a/streaming/go.mod +++ b/streaming/go.mod @@ -5,7 +5,7 @@ go 1.26.0 require ( github.com/golang-jwt/jwt/v4 v4.5.2 github.com/gorilla/websocket v1.5.3 - goa.design/goa/v3 v3.30.1-0.20260826205939-36e92a56a054 + goa.design/goa/v3 v3.30.1-0.20260826213606-c30c5e1423e7 google.golang.org/grpc v1.83.1 google.golang.org/protobuf v1.36.12 ) diff --git a/streaming/go.sum b/streaming/go.sum index 55193089f..a37989fde 100644 --- a/streaming/go.sum +++ b/streaming/go.sum @@ -51,8 +51,8 @@ go.opentelemetry.io/otel/trace v1.45.0 h1:l/mP6Uv7oNO7/TblbhpbgMidxhq1uO/rPsikOy go.opentelemetry.io/otel/trace v1.45.0/go.mod h1:qoJJA2xNMnxRrdISU/kLtfUH2wNeQbiv+jhs/CxI8bc= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260826205939-36e92a56a054 h1:j+HyJr3A4zZ642ewmdO4lDfsJ6foFqj90XX8hQOxFJw= -goa.design/goa/v3 v3.30.1-0.20260826205939-36e92a56a054/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826213606-c30c5e1423e7 h1:z/GUg4DrWWQsH/UqH7QUmqdiUWSX8VWBr61dOs4UtOc= +goa.design/goa/v3 v3.30.1-0.20260826213606-c30c5e1423e7/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/tracing/go.mod b/tracing/go.mod index fe38ff4c5..b78eccbe6 100644 --- a/tracing/go.mod +++ b/tracing/go.mod @@ -5,7 +5,7 @@ go 1.26.0 require ( github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 goa.design/examples/basic v0.0.0-20260810182504-f834f43955c5 - goa.design/goa/v3 v3.30.1-0.20260826205939-36e92a56a054 + goa.design/goa/v3 v3.30.1-0.20260826213606-c30c5e1423e7 google.golang.org/grpc v1.83.1 ) diff --git a/tracing/go.sum b/tracing/go.sum index 635c3e0ba..b5c848150 100644 --- a/tracing/go.sum +++ b/tracing/go.sum @@ -81,8 +81,8 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/examples/basic v0.0.0-20260810182504-f834f43955c5 h1:SRSrUaLTTdA4bUXb8+zA5MDhMEx8YaP+Knd+pddBcrg= goa.design/examples/basic v0.0.0-20260810182504-f834f43955c5/go.mod h1:XRziIzNcLb9fk7ZrfiHx5FIeAj+orJ4fkzLG0nXpiAo= -goa.design/goa/v3 v3.30.1-0.20260826205939-36e92a56a054 h1:j+HyJr3A4zZ642ewmdO4lDfsJ6foFqj90XX8hQOxFJw= -goa.design/goa/v3 v3.30.1-0.20260826205939-36e92a56a054/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826213606-c30c5e1423e7 h1:z/GUg4DrWWQsH/UqH7QUmqdiUWSX8VWBr61dOs4UtOc= +goa.design/goa/v3 v3.30.1-0.20260826213606-c30c5e1423e7/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= diff --git a/tus/go.mod b/tus/go.mod index d2ab588a1..92d9aaf20 100644 --- a/tus/go.mod +++ b/tus/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( github.com/rs/xid v1.6.0 - goa.design/goa/v3 v3.30.1-0.20260826205939-36e92a56a054 + goa.design/goa/v3 v3.30.1-0.20260826213606-c30c5e1423e7 ) require ( diff --git a/tus/go.sum b/tus/go.sum index 84f3a96f7..5bced1127 100644 --- a/tus/go.sum +++ b/tus/go.sum @@ -33,8 +33,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260826205939-36e92a56a054 h1:j+HyJr3A4zZ642ewmdO4lDfsJ6foFqj90XX8hQOxFJw= -goa.design/goa/v3 v3.30.1-0.20260826205939-36e92a56a054/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826213606-c30c5e1423e7 h1:z/GUg4DrWWQsH/UqH7QUmqdiUWSX8VWBr61dOs4UtOc= +goa.design/goa/v3 v3.30.1-0.20260826213606-c30c5e1423e7/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= diff --git a/upload_download/go.mod b/upload_download/go.mod index 90d0165c3..aafc8ba73 100644 --- a/upload_download/go.mod +++ b/upload_download/go.mod @@ -2,7 +2,7 @@ module goa.design/examples/upload_download go 1.26.0 -require goa.design/goa/v3 v3.30.1-0.20260826205939-36e92a56a054 +require goa.design/goa/v3 v3.30.1-0.20260826213606-c30c5e1423e7 require ( github.com/dimfeld/httppath v0.0.0-20170720192232-ee938bf73598 // indirect diff --git a/upload_download/go.sum b/upload_download/go.sum index b332e19e9..aea2d5af9 100644 --- a/upload_download/go.sum +++ b/upload_download/go.sum @@ -31,8 +31,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260826205939-36e92a56a054 h1:j+HyJr3A4zZ642ewmdO4lDfsJ6foFqj90XX8hQOxFJw= -goa.design/goa/v3 v3.30.1-0.20260826205939-36e92a56a054/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.30.1-0.20260826213606-c30c5e1423e7 h1:z/GUg4DrWWQsH/UqH7QUmqdiUWSX8VWBr61dOs4UtOc= +goa.design/goa/v3 v3.30.1-0.20260826213606-c30c5e1423e7/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= From 87c329965d280588802511b35d28890c1c0643bc Mon Sep 17 00:00:00 2001 From: "Raphael (manual office deploy after cloud-state fix)" Date: Sun, 30 Aug 2026 10:00:56 -0700 Subject: [PATCH 23/28] Regenerate examples with Goa preview --- basic/gen/goa.json | 2 +- basic/gen/grpc/calc/client/client.go | 5 +- basic/go.mod | 2 +- basic/go.sum | 4 +- cellar/gen/goa.json | 2 +- cellar/gen/grpc/sommelier/client/client.go | 3 ++ cellar/gen/grpc/storage/client/client.go | 33 ++++++++++--- cellar/gen/sommelier/service.go | 12 ++--- cellar/go.mod | 2 +- cellar/go.sum | 4 +- concerts/gen/goa.json | 2 +- concerts/go.mod | 2 +- concerts/go.sum | 4 +- cookies/gen/goa.json | 2 +- cookies/go.mod | 2 +- cookies/go.sum | 4 +- encodings/cbor/gen/goa.json | 2 +- encodings/cbor/go.mod | 2 +- encodings/cbor/go.sum | 4 +- encodings/text/gen/goa.json | 2 +- encodings/text/go.mod | 2 +- encodings/text/go.sum | 4 +- error/gen/goa.json | 2 +- error/gen/grpc/calc/client/client.go | 3 ++ error/go.mod | 2 +- error/go.sum | 4 +- files/gen/goa.json | 2 +- files/go.mod | 2 +- files/go.sum | 4 +- httpstatus/gen/goa.json | 2 +- httpstatus/go.mod | 2 +- httpstatus/go.sum | 4 +- interceptors/gen/goa.json | 2 +- .../gen/grpc/interceptors/client/client.go | 3 ++ interceptors/go.mod | 2 +- interceptors/go.sum | 4 +- multipart/gen/goa.json | 2 +- multipart/go.mod | 2 +- multipart/go.sum | 4 +- retry/gen/goa.json | 2 +- retry/gen/grpc/retry/client/client.go | 3 ++ retry/go.mod | 2 +- retry/go.sum | 4 +- security/hierarchy/gen/goa.json | 2 +- security/hierarchy/go.mod | 2 +- security/hierarchy/go.sum | 4 +- security/multiauth/gen/goa.json | 2 +- .../gen/grpc/secured_service/client/client.go | 12 +++++ .../multiauth/gen/secured_service/service.go | 6 +-- security/multiauth/go.mod | 2 +- security/multiauth/go.sum | 4 +- sse/gen/goa.json | 2 +- sse/go.mod | 2 +- sse/go.sum | 4 +- streaming/gen/chatter/service.go | 4 +- streaming/gen/goa.json | 2 +- streaming/gen/grpc/chatter/client/client.go | 47 +++++++++++++++++++ .../gen/grpc/chatter/client/encode_decode.go | 5 ++ streaming/go.mod | 2 +- streaming/go.sum | 4 +- tracing/go.mod | 2 +- tracing/go.sum | 4 +- tus/gen/goa.json | 2 +- tus/go.mod | 2 +- tus/go.sum | 4 +- upload_download/gen/goa.json | 2 +- upload_download/go.mod | 2 +- upload_download/go.sum | 4 +- 68 files changed, 193 insertions(+), 93 deletions(-) diff --git a/basic/gen/goa.json b/basic/gen/goa.json index d279d6dad..924afff50 100644 --- a/basic/gen/goa.json +++ b/basic/gen/goa.json @@ -1,3 +1,3 @@ { - "goa_version": "v3.30.0" + "goa_version": "v3.31.0-preview.1" } \ No newline at end of file diff --git a/basic/gen/grpc/calc/client/client.go b/basic/gen/grpc/calc/client/client.go index c0924fdf2..415cf8ca1 100644 --- a/basic/gen/grpc/calc/client/client.go +++ b/basic/gen/grpc/calc/client/client.go @@ -40,11 +40,14 @@ func (c *Client) Multiply() goa.Endpoint { DecodeMultiplyResponse) res, err := inv.Invoke(ctx, v) if err != nil { - // Try to decode a Goa error response detail before falling back to Fault. + // Decode a Goa error detail before returning a matching context error or falling back to Fault. resp := goagrpc.DecodeError(err) if eresp, ok := resp.(*goapb.ErrorResponse); ok { return nil, goagrpc.NewServiceError(eresp) } + if ctxErr := goagrpc.ContextError(ctx, err); ctxErr != nil { + return nil, ctxErr + } return nil, goa.Fault("%s", err.Error()) } return res, nil diff --git a/basic/go.mod b/basic/go.mod index fb08c623d..7401e58e5 100644 --- a/basic/go.mod +++ b/basic/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( goa.design/clue v1.2.6 - goa.design/goa/v3 v3.30.1-0.20260826213606-c30c5e1423e7 + goa.design/goa/v3 v3.31.0-preview.1.0.20260830104908-eb6472c49e99 google.golang.org/grpc v1.83.1 google.golang.org/protobuf v1.36.12 ) diff --git a/basic/go.sum b/basic/go.sum index 41ac077d3..a029b1683 100644 --- a/basic/go.sum +++ b/basic/go.sum @@ -55,8 +55,8 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/clue v1.2.6 h1:ensyUkwlvEbNy8FuTGMldKuvaNouh8YoDY9QaE+EtYg= goa.design/clue v1.2.6/go.mod h1:Y4RS5o2k6MZiGk2PT3XbKyntjR2xkr8dYOKQ591dIDM= -goa.design/goa/v3 v3.30.1-0.20260826213606-c30c5e1423e7 h1:z/GUg4DrWWQsH/UqH7QUmqdiUWSX8VWBr61dOs4UtOc= -goa.design/goa/v3 v3.30.1-0.20260826213606-c30c5e1423e7/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.31.0-preview.1.0.20260830104908-eb6472c49e99 h1:R+nByHCAoWOMSqo3yJYs17RBTTgdwnf3aiszLqPmEzU= +goa.design/goa/v3 v3.31.0-preview.1.0.20260830104908-eb6472c49e99/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/cellar/gen/goa.json b/cellar/gen/goa.json index d279d6dad..924afff50 100644 --- a/cellar/gen/goa.json +++ b/cellar/gen/goa.json @@ -1,3 +1,3 @@ { - "goa_version": "v3.30.0" + "goa_version": "v3.31.0-preview.1" } \ No newline at end of file diff --git a/cellar/gen/grpc/sommelier/client/client.go b/cellar/gen/grpc/sommelier/client/client.go index c49e56fd5..d00eb3f7f 100644 --- a/cellar/gen/grpc/sommelier/client/client.go +++ b/cellar/gen/grpc/sommelier/client/client.go @@ -45,6 +45,9 @@ func (c *Client) Pick() goa.Endpoint { case *goapb.ErrorResponse: return nil, goagrpc.NewServiceError(message) default: + if ctxErr := goagrpc.ContextError(ctx, err); ctxErr != nil { + return nil, ctxErr + } return nil, goa.Fault("%s", err.Error()) } } diff --git a/cellar/gen/grpc/storage/client/client.go b/cellar/gen/grpc/storage/client/client.go index 4dfba05dc..08af22d94 100644 --- a/cellar/gen/grpc/storage/client/client.go +++ b/cellar/gen/grpc/storage/client/client.go @@ -40,11 +40,14 @@ func (c *Client) List() goa.Endpoint { DecodeListResponse) res, err := inv.Invoke(ctx, v) if err != nil { - // Try to decode a Goa error response detail before falling back to Fault. + // Decode a Goa error detail before returning a matching context error or falling back to Fault. resp := goagrpc.DecodeError(err) if eresp, ok := resp.(*goapb.ErrorResponse); ok { return nil, goagrpc.NewServiceError(eresp) } + if ctxErr := goagrpc.ContextError(ctx, err); ctxErr != nil { + return nil, ctxErr + } return nil, goa.Fault("%s", err.Error()) } return res, nil @@ -70,6 +73,9 @@ func (c *Client) Show() goa.Endpoint { case *goapb.ErrorResponse: return nil, goagrpc.NewServiceError(message) default: + if ctxErr := goagrpc.ContextError(ctx, err); ctxErr != nil { + return nil, ctxErr + } return nil, goa.Fault("%s", err.Error()) } } @@ -86,11 +92,14 @@ func (c *Client) Add() goa.Endpoint { DecodeAddResponse) res, err := inv.Invoke(ctx, v) if err != nil { - // Try to decode a Goa error response detail before falling back to Fault. + // Decode a Goa error detail before returning a matching context error or falling back to Fault. resp := goagrpc.DecodeError(err) if eresp, ok := resp.(*goapb.ErrorResponse); ok { return nil, goagrpc.NewServiceError(eresp) } + if ctxErr := goagrpc.ContextError(ctx, err); ctxErr != nil { + return nil, ctxErr + } return nil, goa.Fault("%s", err.Error()) } return res, nil @@ -106,11 +115,14 @@ func (c *Client) Remove() goa.Endpoint { nil) res, err := inv.Invoke(ctx, v) if err != nil { - // Try to decode a Goa error response detail before falling back to Fault. + // Decode a Goa error detail before returning a matching context error or falling back to Fault. resp := goagrpc.DecodeError(err) if eresp, ok := resp.(*goapb.ErrorResponse); ok { return nil, goagrpc.NewServiceError(eresp) } + if ctxErr := goagrpc.ContextError(ctx, err); ctxErr != nil { + return nil, ctxErr + } return nil, goa.Fault("%s", err.Error()) } return res, nil @@ -126,11 +138,14 @@ func (c *Client) Rate() goa.Endpoint { nil) res, err := inv.Invoke(ctx, v) if err != nil { - // Try to decode a Goa error response detail before falling back to Fault. + // Decode a Goa error detail before returning a matching context error or falling back to Fault. resp := goagrpc.DecodeError(err) if eresp, ok := resp.(*goapb.ErrorResponse); ok { return nil, goagrpc.NewServiceError(eresp) } + if ctxErr := goagrpc.ContextError(ctx, err); ctxErr != nil { + return nil, ctxErr + } return nil, goa.Fault("%s", err.Error()) } return res, nil @@ -146,11 +161,14 @@ func (c *Client) MultiAdd() goa.Endpoint { DecodeMultiAddResponse) res, err := inv.Invoke(ctx, v) if err != nil { - // Try to decode a Goa error response detail before falling back to Fault. + // Decode a Goa error detail before returning a matching context error or falling back to Fault. resp := goagrpc.DecodeError(err) if eresp, ok := resp.(*goapb.ErrorResponse); ok { return nil, goagrpc.NewServiceError(eresp) } + if ctxErr := goagrpc.ContextError(ctx, err); ctxErr != nil { + return nil, ctxErr + } return nil, goa.Fault("%s", err.Error()) } return res, nil @@ -167,11 +185,14 @@ func (c *Client) MultiUpdate() goa.Endpoint { nil) res, err := inv.Invoke(ctx, v) if err != nil { - // Try to decode a Goa error response detail before falling back to Fault. + // Decode a Goa error detail before returning a matching context error or falling back to Fault. resp := goagrpc.DecodeError(err) if eresp, ok := resp.(*goapb.ErrorResponse); ok { return nil, goagrpc.NewServiceError(eresp) } + if ctxErr := goagrpc.ContextError(ctx, err); ctxErr != nil { + return nil, ctxErr + } return nil, goa.Fault("%s", err.Error()) } return res, nil diff --git a/cellar/gen/sommelier/service.go b/cellar/gen/sommelier/service.go index 04657f7bc..415135af0 100644 --- a/cellar/gen/sommelier/service.go +++ b/cellar/gen/sommelier/service.go @@ -52,6 +52,12 @@ type Criteria struct { Winery *string } +// Missing criteria +type NoCriteria string + +// No bottle matched given criteria +type NoMatch string + // A StoredBottle describes a bottle retrieved by the storage service. type StoredBottle struct { // ID is the unique id of the bottle. @@ -85,12 +91,6 @@ type Winery struct { URL *string } -// Missing criteria -type NoCriteria string - -// No bottle matched given criteria -type NoMatch string - // Error returns an error description. func (e NoCriteria) Error() string { return "Missing criteria" diff --git a/cellar/go.mod b/cellar/go.mod index b5938c74e..ee8d1f060 100644 --- a/cellar/go.mod +++ b/cellar/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( github.com/boltdb/bolt v1.3.1 - goa.design/goa/v3 v3.30.1-0.20260826213606-c30c5e1423e7 + goa.design/goa/v3 v3.31.0-preview.1.0.20260830104908-eb6472c49e99 google.golang.org/grpc v1.83.1 google.golang.org/protobuf v1.36.12 ) diff --git a/cellar/go.sum b/cellar/go.sum index d93e16303..2594eb21e 100644 --- a/cellar/go.sum +++ b/cellar/go.sum @@ -51,8 +51,8 @@ go.opentelemetry.io/otel/trace v1.45.0 h1:l/mP6Uv7oNO7/TblbhpbgMidxhq1uO/rPsikOy go.opentelemetry.io/otel/trace v1.45.0/go.mod h1:qoJJA2xNMnxRrdISU/kLtfUH2wNeQbiv+jhs/CxI8bc= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260826213606-c30c5e1423e7 h1:z/GUg4DrWWQsH/UqH7QUmqdiUWSX8VWBr61dOs4UtOc= -goa.design/goa/v3 v3.30.1-0.20260826213606-c30c5e1423e7/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.31.0-preview.1.0.20260830104908-eb6472c49e99 h1:R+nByHCAoWOMSqo3yJYs17RBTTgdwnf3aiszLqPmEzU= +goa.design/goa/v3 v3.31.0-preview.1.0.20260830104908-eb6472c49e99/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/concerts/gen/goa.json b/concerts/gen/goa.json index d279d6dad..924afff50 100644 --- a/concerts/gen/goa.json +++ b/concerts/gen/goa.json @@ -1,3 +1,3 @@ { - "goa_version": "v3.30.0" + "goa_version": "v3.31.0-preview.1" } \ No newline at end of file diff --git a/concerts/go.mod b/concerts/go.mod index 1193a9794..460296da0 100644 --- a/concerts/go.mod +++ b/concerts/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( github.com/google/uuid v1.6.0 - goa.design/goa/v3 v3.30.1-0.20260826213606-c30c5e1423e7 + goa.design/goa/v3 v3.31.0-preview.1.0.20260830104908-eb6472c49e99 ) require ( diff --git a/concerts/go.sum b/concerts/go.sum index aea2d5af9..30b4bff4e 100644 --- a/concerts/go.sum +++ b/concerts/go.sum @@ -31,8 +31,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260826213606-c30c5e1423e7 h1:z/GUg4DrWWQsH/UqH7QUmqdiUWSX8VWBr61dOs4UtOc= -goa.design/goa/v3 v3.30.1-0.20260826213606-c30c5e1423e7/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.31.0-preview.1.0.20260830104908-eb6472c49e99 h1:R+nByHCAoWOMSqo3yJYs17RBTTgdwnf3aiszLqPmEzU= +goa.design/goa/v3 v3.31.0-preview.1.0.20260830104908-eb6472c49e99/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= diff --git a/cookies/gen/goa.json b/cookies/gen/goa.json index d279d6dad..924afff50 100644 --- a/cookies/gen/goa.json +++ b/cookies/gen/goa.json @@ -1,3 +1,3 @@ { - "goa_version": "v3.30.0" + "goa_version": "v3.31.0-preview.1" } \ No newline at end of file diff --git a/cookies/go.mod b/cookies/go.mod index 27cd34eba..cb4e1a369 100644 --- a/cookies/go.mod +++ b/cookies/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( github.com/rs/xid v1.6.0 - goa.design/goa/v3 v3.30.1-0.20260826213606-c30c5e1423e7 + goa.design/goa/v3 v3.31.0-preview.1.0.20260830104908-eb6472c49e99 ) require ( diff --git a/cookies/go.sum b/cookies/go.sum index 5bced1127..129cc7251 100644 --- a/cookies/go.sum +++ b/cookies/go.sum @@ -33,8 +33,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260826213606-c30c5e1423e7 h1:z/GUg4DrWWQsH/UqH7QUmqdiUWSX8VWBr61dOs4UtOc= -goa.design/goa/v3 v3.30.1-0.20260826213606-c30c5e1423e7/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.31.0-preview.1.0.20260830104908-eb6472c49e99 h1:R+nByHCAoWOMSqo3yJYs17RBTTgdwnf3aiszLqPmEzU= +goa.design/goa/v3 v3.31.0-preview.1.0.20260830104908-eb6472c49e99/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= diff --git a/encodings/cbor/gen/goa.json b/encodings/cbor/gen/goa.json index d279d6dad..924afff50 100644 --- a/encodings/cbor/gen/goa.json +++ b/encodings/cbor/gen/goa.json @@ -1,3 +1,3 @@ { - "goa_version": "v3.30.0" + "goa_version": "v3.31.0-preview.1" } \ No newline at end of file diff --git a/encodings/cbor/go.mod b/encodings/cbor/go.mod index 592b9a5d9..067ac7269 100644 --- a/encodings/cbor/go.mod +++ b/encodings/cbor/go.mod @@ -5,7 +5,7 @@ go 1.26.0 require ( github.com/fxamacker/cbor/v2 v2.9.2 goa.design/clue v1.2.6 - goa.design/goa/v3 v3.30.1-0.20260826213606-c30c5e1423e7 + goa.design/goa/v3 v3.31.0-preview.1.0.20260830104908-eb6472c49e99 ) require ( diff --git a/encodings/cbor/go.sum b/encodings/cbor/go.sum index 7e47d39a9..3bbaa9982 100644 --- a/encodings/cbor/go.sum +++ b/encodings/cbor/go.sum @@ -59,8 +59,8 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/clue v1.2.6 h1:ensyUkwlvEbNy8FuTGMldKuvaNouh8YoDY9QaE+EtYg= goa.design/clue v1.2.6/go.mod h1:Y4RS5o2k6MZiGk2PT3XbKyntjR2xkr8dYOKQ591dIDM= -goa.design/goa/v3 v3.30.1-0.20260826213606-c30c5e1423e7 h1:z/GUg4DrWWQsH/UqH7QUmqdiUWSX8VWBr61dOs4UtOc= -goa.design/goa/v3 v3.30.1-0.20260826213606-c30c5e1423e7/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.31.0-preview.1.0.20260830104908-eb6472c49e99 h1:R+nByHCAoWOMSqo3yJYs17RBTTgdwnf3aiszLqPmEzU= +goa.design/goa/v3 v3.31.0-preview.1.0.20260830104908-eb6472c49e99/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/encodings/text/gen/goa.json b/encodings/text/gen/goa.json index d279d6dad..924afff50 100644 --- a/encodings/text/gen/goa.json +++ b/encodings/text/gen/goa.json @@ -1,3 +1,3 @@ { - "goa_version": "v3.30.0" + "goa_version": "v3.31.0-preview.1" } \ No newline at end of file diff --git a/encodings/text/go.mod b/encodings/text/go.mod index 306c4beeb..5a4532c5e 100644 --- a/encodings/text/go.mod +++ b/encodings/text/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( goa.design/clue v1.2.6 - goa.design/goa/v3 v3.30.1-0.20260826213606-c30c5e1423e7 + goa.design/goa/v3 v3.31.0-preview.1.0.20260830104908-eb6472c49e99 ) require ( diff --git a/encodings/text/go.sum b/encodings/text/go.sum index 41ac077d3..a029b1683 100644 --- a/encodings/text/go.sum +++ b/encodings/text/go.sum @@ -55,8 +55,8 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/clue v1.2.6 h1:ensyUkwlvEbNy8FuTGMldKuvaNouh8YoDY9QaE+EtYg= goa.design/clue v1.2.6/go.mod h1:Y4RS5o2k6MZiGk2PT3XbKyntjR2xkr8dYOKQ591dIDM= -goa.design/goa/v3 v3.30.1-0.20260826213606-c30c5e1423e7 h1:z/GUg4DrWWQsH/UqH7QUmqdiUWSX8VWBr61dOs4UtOc= -goa.design/goa/v3 v3.30.1-0.20260826213606-c30c5e1423e7/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.31.0-preview.1.0.20260830104908-eb6472c49e99 h1:R+nByHCAoWOMSqo3yJYs17RBTTgdwnf3aiszLqPmEzU= +goa.design/goa/v3 v3.31.0-preview.1.0.20260830104908-eb6472c49e99/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/error/gen/goa.json b/error/gen/goa.json index d279d6dad..924afff50 100644 --- a/error/gen/goa.json +++ b/error/gen/goa.json @@ -1,3 +1,3 @@ { - "goa_version": "v3.30.0" + "goa_version": "v3.31.0-preview.1" } \ No newline at end of file diff --git a/error/gen/grpc/calc/client/client.go b/error/gen/grpc/calc/client/client.go index 97a3105c1..367b738f0 100644 --- a/error/gen/grpc/calc/client/client.go +++ b/error/gen/grpc/calc/client/client.go @@ -50,6 +50,9 @@ func (c *Client) Divide() goa.Endpoint { case *goapb.ErrorResponse: return nil, goagrpc.NewServiceError(message) default: + if ctxErr := goagrpc.ContextError(ctx, err); ctxErr != nil { + return nil, ctxErr + } return nil, goa.Fault("%s", err.Error()) } } diff --git a/error/go.mod b/error/go.mod index 0ca606833..772f525a3 100644 --- a/error/go.mod +++ b/error/go.mod @@ -3,7 +3,7 @@ module goa.design/examples/error go 1.26.0 require ( - goa.design/goa/v3 v3.30.1-0.20260826213606-c30c5e1423e7 + goa.design/goa/v3 v3.31.0-preview.1.0.20260830104908-eb6472c49e99 google.golang.org/genproto v0.0.0-20260810153831-ec0a7760b754 google.golang.org/grpc v1.83.1 google.golang.org/protobuf v1.36.12 diff --git a/error/go.sum b/error/go.sum index b0de660bb..9bd62a98e 100644 --- a/error/go.sum +++ b/error/go.sum @@ -49,8 +49,8 @@ go.opentelemetry.io/otel/trace v1.45.0 h1:l/mP6Uv7oNO7/TblbhpbgMidxhq1uO/rPsikOy go.opentelemetry.io/otel/trace v1.45.0/go.mod h1:qoJJA2xNMnxRrdISU/kLtfUH2wNeQbiv+jhs/CxI8bc= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260826213606-c30c5e1423e7 h1:z/GUg4DrWWQsH/UqH7QUmqdiUWSX8VWBr61dOs4UtOc= -goa.design/goa/v3 v3.30.1-0.20260826213606-c30c5e1423e7/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.31.0-preview.1.0.20260830104908-eb6472c49e99 h1:R+nByHCAoWOMSqo3yJYs17RBTTgdwnf3aiszLqPmEzU= +goa.design/goa/v3 v3.31.0-preview.1.0.20260830104908-eb6472c49e99/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/files/gen/goa.json b/files/gen/goa.json index d279d6dad..924afff50 100644 --- a/files/gen/goa.json +++ b/files/gen/goa.json @@ -1,3 +1,3 @@ { - "goa_version": "v3.30.0" + "goa_version": "v3.31.0-preview.1" } \ No newline at end of file diff --git a/files/go.mod b/files/go.mod index c9f34caa6..52bc0af9b 100644 --- a/files/go.mod +++ b/files/go.mod @@ -2,7 +2,7 @@ module goa.design/examples/files go 1.26.0 -require goa.design/goa/v3 v3.30.1-0.20260826213606-c30c5e1423e7 +require goa.design/goa/v3 v3.31.0-preview.1.0.20260830104908-eb6472c49e99 require ( github.com/dimfeld/httppath v0.0.0-20170720192232-ee938bf73598 // indirect diff --git a/files/go.sum b/files/go.sum index aea2d5af9..30b4bff4e 100644 --- a/files/go.sum +++ b/files/go.sum @@ -31,8 +31,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260826213606-c30c5e1423e7 h1:z/GUg4DrWWQsH/UqH7QUmqdiUWSX8VWBr61dOs4UtOc= -goa.design/goa/v3 v3.30.1-0.20260826213606-c30c5e1423e7/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.31.0-preview.1.0.20260830104908-eb6472c49e99 h1:R+nByHCAoWOMSqo3yJYs17RBTTgdwnf3aiszLqPmEzU= +goa.design/goa/v3 v3.31.0-preview.1.0.20260830104908-eb6472c49e99/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= diff --git a/httpstatus/gen/goa.json b/httpstatus/gen/goa.json index d279d6dad..924afff50 100644 --- a/httpstatus/gen/goa.json +++ b/httpstatus/gen/goa.json @@ -1,3 +1,3 @@ { - "goa_version": "v3.30.0" + "goa_version": "v3.31.0-preview.1" } \ No newline at end of file diff --git a/httpstatus/go.mod b/httpstatus/go.mod index fdc890349..b22e1c67a 100644 --- a/httpstatus/go.mod +++ b/httpstatus/go.mod @@ -2,7 +2,7 @@ module goa.design/examples/httpstatus go 1.26.0 -require goa.design/goa/v3 v3.30.1-0.20260826213606-c30c5e1423e7 +require goa.design/goa/v3 v3.31.0-preview.1.0.20260830104908-eb6472c49e99 require ( github.com/dimfeld/httppath v0.0.0-20170720192232-ee938bf73598 // indirect diff --git a/httpstatus/go.sum b/httpstatus/go.sum index aea2d5af9..30b4bff4e 100644 --- a/httpstatus/go.sum +++ b/httpstatus/go.sum @@ -31,8 +31,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260826213606-c30c5e1423e7 h1:z/GUg4DrWWQsH/UqH7QUmqdiUWSX8VWBr61dOs4UtOc= -goa.design/goa/v3 v3.30.1-0.20260826213606-c30c5e1423e7/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.31.0-preview.1.0.20260830104908-eb6472c49e99 h1:R+nByHCAoWOMSqo3yJYs17RBTTgdwnf3aiszLqPmEzU= +goa.design/goa/v3 v3.31.0-preview.1.0.20260830104908-eb6472c49e99/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= diff --git a/interceptors/gen/goa.json b/interceptors/gen/goa.json index d279d6dad..924afff50 100644 --- a/interceptors/gen/goa.json +++ b/interceptors/gen/goa.json @@ -1,3 +1,3 @@ { - "goa_version": "v3.30.0" + "goa_version": "v3.31.0-preview.1" } \ No newline at end of file diff --git a/interceptors/gen/grpc/interceptors/client/client.go b/interceptors/gen/grpc/interceptors/client/client.go index eb6a1f879..eca65231d 100644 --- a/interceptors/gen/grpc/interceptors/client/client.go +++ b/interceptors/gen/grpc/interceptors/client/client.go @@ -45,6 +45,9 @@ func (c *Client) Get() goa.Endpoint { case *goapb.ErrorResponse: return nil, goagrpc.NewServiceError(message) default: + if ctxErr := goagrpc.ContextError(ctx, err); ctxErr != nil { + return nil, ctxErr + } return nil, goa.Fault("%s", err.Error()) } } diff --git a/interceptors/go.mod b/interceptors/go.mod index 781cebadb..58ed9bf48 100644 --- a/interceptors/go.mod +++ b/interceptors/go.mod @@ -6,7 +6,7 @@ require ( github.com/google/uuid v1.6.0 github.com/gorilla/websocket v1.5.3 goa.design/clue v1.2.6 - goa.design/goa/v3 v3.30.1-0.20260826213606-c30c5e1423e7 + goa.design/goa/v3 v3.31.0-preview.1.0.20260830104908-eb6472c49e99 google.golang.org/grpc v1.83.1 google.golang.org/protobuf v1.36.12 ) diff --git a/interceptors/go.sum b/interceptors/go.sum index 41ac077d3..a029b1683 100644 --- a/interceptors/go.sum +++ b/interceptors/go.sum @@ -55,8 +55,8 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/clue v1.2.6 h1:ensyUkwlvEbNy8FuTGMldKuvaNouh8YoDY9QaE+EtYg= goa.design/clue v1.2.6/go.mod h1:Y4RS5o2k6MZiGk2PT3XbKyntjR2xkr8dYOKQ591dIDM= -goa.design/goa/v3 v3.30.1-0.20260826213606-c30c5e1423e7 h1:z/GUg4DrWWQsH/UqH7QUmqdiUWSX8VWBr61dOs4UtOc= -goa.design/goa/v3 v3.30.1-0.20260826213606-c30c5e1423e7/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.31.0-preview.1.0.20260830104908-eb6472c49e99 h1:R+nByHCAoWOMSqo3yJYs17RBTTgdwnf3aiszLqPmEzU= +goa.design/goa/v3 v3.31.0-preview.1.0.20260830104908-eb6472c49e99/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/multipart/gen/goa.json b/multipart/gen/goa.json index d279d6dad..924afff50 100644 --- a/multipart/gen/goa.json +++ b/multipart/gen/goa.json @@ -1,3 +1,3 @@ { - "goa_version": "v3.30.0" + "goa_version": "v3.31.0-preview.1" } \ No newline at end of file diff --git a/multipart/go.mod b/multipart/go.mod index cff5854c8..f453b3832 100644 --- a/multipart/go.mod +++ b/multipart/go.mod @@ -2,7 +2,7 @@ module goa.design/examples/multipart go 1.26.0 -require goa.design/goa/v3 v3.30.1-0.20260826213606-c30c5e1423e7 +require goa.design/goa/v3 v3.31.0-preview.1.0.20260830104908-eb6472c49e99 require ( github.com/dimfeld/httppath v0.0.0-20170720192232-ee938bf73598 // indirect diff --git a/multipart/go.sum b/multipart/go.sum index aea2d5af9..30b4bff4e 100644 --- a/multipart/go.sum +++ b/multipart/go.sum @@ -31,8 +31,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260826213606-c30c5e1423e7 h1:z/GUg4DrWWQsH/UqH7QUmqdiUWSX8VWBr61dOs4UtOc= -goa.design/goa/v3 v3.30.1-0.20260826213606-c30c5e1423e7/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.31.0-preview.1.0.20260830104908-eb6472c49e99 h1:R+nByHCAoWOMSqo3yJYs17RBTTgdwnf3aiszLqPmEzU= +goa.design/goa/v3 v3.31.0-preview.1.0.20260830104908-eb6472c49e99/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= diff --git a/retry/gen/goa.json b/retry/gen/goa.json index d279d6dad..924afff50 100644 --- a/retry/gen/goa.json +++ b/retry/gen/goa.json @@ -1,3 +1,3 @@ { - "goa_version": "v3.30.0" + "goa_version": "v3.31.0-preview.1" } \ No newline at end of file diff --git a/retry/gen/grpc/retry/client/client.go b/retry/gen/grpc/retry/client/client.go index 6856f8514..f51610308 100644 --- a/retry/gen/grpc/retry/client/client.go +++ b/retry/gen/grpc/retry/client/client.go @@ -45,6 +45,9 @@ func (c *Client) GetMessage() goa.Endpoint { case *goapb.ErrorResponse: return nil, goagrpc.NewServiceError(message) default: + if ctxErr := goagrpc.ContextError(ctx, err); ctxErr != nil { + return nil, ctxErr + } return nil, goagrpc.NewTransportError(err) } } diff --git a/retry/go.mod b/retry/go.mod index 17996bf34..cb7462138 100644 --- a/retry/go.mod +++ b/retry/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( goa.design/clue v1.2.6 - goa.design/goa/v3 v3.30.1-0.20260826213606-c30c5e1423e7 + goa.design/goa/v3 v3.31.0-preview.1.0.20260830104908-eb6472c49e99 google.golang.org/grpc v1.83.1 google.golang.org/protobuf v1.36.12 ) diff --git a/retry/go.sum b/retry/go.sum index 41ac077d3..a029b1683 100644 --- a/retry/go.sum +++ b/retry/go.sum @@ -55,8 +55,8 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/clue v1.2.6 h1:ensyUkwlvEbNy8FuTGMldKuvaNouh8YoDY9QaE+EtYg= goa.design/clue v1.2.6/go.mod h1:Y4RS5o2k6MZiGk2PT3XbKyntjR2xkr8dYOKQ591dIDM= -goa.design/goa/v3 v3.30.1-0.20260826213606-c30c5e1423e7 h1:z/GUg4DrWWQsH/UqH7QUmqdiUWSX8VWBr61dOs4UtOc= -goa.design/goa/v3 v3.30.1-0.20260826213606-c30c5e1423e7/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.31.0-preview.1.0.20260830104908-eb6472c49e99 h1:R+nByHCAoWOMSqo3yJYs17RBTTgdwnf3aiszLqPmEzU= +goa.design/goa/v3 v3.31.0-preview.1.0.20260830104908-eb6472c49e99/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/security/hierarchy/gen/goa.json b/security/hierarchy/gen/goa.json index d279d6dad..924afff50 100644 --- a/security/hierarchy/gen/goa.json +++ b/security/hierarchy/gen/goa.json @@ -1,3 +1,3 @@ { - "goa_version": "v3.30.0" + "goa_version": "v3.31.0-preview.1" } \ No newline at end of file diff --git a/security/hierarchy/go.mod b/security/hierarchy/go.mod index 1449df937..f5afd4fe3 100644 --- a/security/hierarchy/go.mod +++ b/security/hierarchy/go.mod @@ -2,7 +2,7 @@ module goa.design/examples/security/hierarchy go 1.26.0 -require goa.design/goa/v3 v3.30.1-0.20260826213606-c30c5e1423e7 +require goa.design/goa/v3 v3.31.0-preview.1.0.20260830104908-eb6472c49e99 require ( github.com/dimfeld/httppath v0.0.0-20170720192232-ee938bf73598 // indirect diff --git a/security/hierarchy/go.sum b/security/hierarchy/go.sum index aea2d5af9..30b4bff4e 100644 --- a/security/hierarchy/go.sum +++ b/security/hierarchy/go.sum @@ -31,8 +31,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260826213606-c30c5e1423e7 h1:z/GUg4DrWWQsH/UqH7QUmqdiUWSX8VWBr61dOs4UtOc= -goa.design/goa/v3 v3.30.1-0.20260826213606-c30c5e1423e7/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.31.0-preview.1.0.20260830104908-eb6472c49e99 h1:R+nByHCAoWOMSqo3yJYs17RBTTgdwnf3aiszLqPmEzU= +goa.design/goa/v3 v3.31.0-preview.1.0.20260830104908-eb6472c49e99/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= diff --git a/security/multiauth/gen/goa.json b/security/multiauth/gen/goa.json index d279d6dad..924afff50 100644 --- a/security/multiauth/gen/goa.json +++ b/security/multiauth/gen/goa.json @@ -1,3 +1,3 @@ { - "goa_version": "v3.30.0" + "goa_version": "v3.31.0-preview.1" } \ No newline at end of file diff --git a/security/multiauth/gen/grpc/secured_service/client/client.go b/security/multiauth/gen/grpc/secured_service/client/client.go index 14e79f2f4..e1214b7ed 100644 --- a/security/multiauth/gen/grpc/secured_service/client/client.go +++ b/security/multiauth/gen/grpc/secured_service/client/client.go @@ -47,6 +47,9 @@ func (c *Client) Signin() goa.Endpoint { case *goapb.ErrorResponse: return nil, goagrpc.NewServiceError(message) default: + if ctxErr := goagrpc.ContextError(ctx, err); ctxErr != nil { + return nil, ctxErr + } return nil, goa.Fault("%s", err.Error()) } } @@ -69,6 +72,9 @@ func (c *Client) Secure() goa.Endpoint { case *goapb.ErrorResponse: return nil, goagrpc.NewServiceError(message) default: + if ctxErr := goagrpc.ContextError(ctx, err); ctxErr != nil { + return nil, ctxErr + } return nil, goa.Fault("%s", err.Error()) } } @@ -91,6 +97,9 @@ func (c *Client) DoublySecure() goa.Endpoint { case *goapb.ErrorResponse: return nil, goagrpc.NewServiceError(message) default: + if ctxErr := goagrpc.ContextError(ctx, err); ctxErr != nil { + return nil, ctxErr + } return nil, goa.Fault("%s", err.Error()) } } @@ -113,6 +122,9 @@ func (c *Client) AlsoDoublySecure() goa.Endpoint { case *goapb.ErrorResponse: return nil, goagrpc.NewServiceError(message) default: + if ctxErr := goagrpc.ContextError(ctx, err); ctxErr != nil { + return nil, ctxErr + } return nil, goa.Fault("%s", err.Error()) } } diff --git a/security/multiauth/gen/secured_service/service.go b/security/multiauth/gen/secured_service/service.go index c4958f67f..6548714c7 100644 --- a/security/multiauth/gen/secured_service/service.go +++ b/security/multiauth/gen/secured_service/service.go @@ -89,6 +89,9 @@ type DoublySecurePayload struct { Token string } +// Token scopes are invalid +type InvalidScopes string + // SecurePayload is the payload type of the secured_service service secure // method. type SecurePayload struct { @@ -106,9 +109,6 @@ type SigninPayload struct { Password string } -// Token scopes are invalid -type InvalidScopes string - // Credentials are invalid type Unauthorized string diff --git a/security/multiauth/go.mod b/security/multiauth/go.mod index 676430c1a..0dc8b3663 100644 --- a/security/multiauth/go.mod +++ b/security/multiauth/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( github.com/golang-jwt/jwt/v4 v4.5.2 - goa.design/goa/v3 v3.30.1-0.20260826213606-c30c5e1423e7 + goa.design/goa/v3 v3.31.0-preview.1.0.20260830104908-eb6472c49e99 google.golang.org/grpc v1.83.1 google.golang.org/protobuf v1.36.12 ) diff --git a/security/multiauth/go.sum b/security/multiauth/go.sum index a37989fde..980c86349 100644 --- a/security/multiauth/go.sum +++ b/security/multiauth/go.sum @@ -51,8 +51,8 @@ go.opentelemetry.io/otel/trace v1.45.0 h1:l/mP6Uv7oNO7/TblbhpbgMidxhq1uO/rPsikOy go.opentelemetry.io/otel/trace v1.45.0/go.mod h1:qoJJA2xNMnxRrdISU/kLtfUH2wNeQbiv+jhs/CxI8bc= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260826213606-c30c5e1423e7 h1:z/GUg4DrWWQsH/UqH7QUmqdiUWSX8VWBr61dOs4UtOc= -goa.design/goa/v3 v3.30.1-0.20260826213606-c30c5e1423e7/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.31.0-preview.1.0.20260830104908-eb6472c49e99 h1:R+nByHCAoWOMSqo3yJYs17RBTTgdwnf3aiszLqPmEzU= +goa.design/goa/v3 v3.31.0-preview.1.0.20260830104908-eb6472c49e99/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/sse/gen/goa.json b/sse/gen/goa.json index d279d6dad..924afff50 100644 --- a/sse/gen/goa.json +++ b/sse/gen/goa.json @@ -1,3 +1,3 @@ { - "goa_version": "v3.30.0" + "goa_version": "v3.31.0-preview.1" } \ No newline at end of file diff --git a/sse/go.mod b/sse/go.mod index fe17518f9..2919bcbd0 100644 --- a/sse/go.mod +++ b/sse/go.mod @@ -5,7 +5,7 @@ go 1.26.0 require ( github.com/shirou/gopsutil/v3 v3.24.5 goa.design/clue v1.2.6 - goa.design/goa/v3 v3.30.1-0.20260826213606-c30c5e1423e7 + goa.design/goa/v3 v3.31.0-preview.1.0.20260830104908-eb6472c49e99 ) require ( diff --git a/sse/go.sum b/sse/go.sum index 3b6263d4f..cd6e730d4 100644 --- a/sse/go.sum +++ b/sse/go.sum @@ -74,8 +74,8 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/clue v1.2.6 h1:ensyUkwlvEbNy8FuTGMldKuvaNouh8YoDY9QaE+EtYg= goa.design/clue v1.2.6/go.mod h1:Y4RS5o2k6MZiGk2PT3XbKyntjR2xkr8dYOKQ591dIDM= -goa.design/goa/v3 v3.30.1-0.20260826213606-c30c5e1423e7 h1:z/GUg4DrWWQsH/UqH7QUmqdiUWSX8VWBr61dOs4UtOc= -goa.design/goa/v3 v3.30.1-0.20260826213606-c30c5e1423e7/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.31.0-preview.1.0.20260830104908-eb6472c49e99 h1:R+nByHCAoWOMSqo3yJYs17RBTTgdwnf3aiszLqPmEzU= +goa.design/goa/v3 v3.31.0-preview.1.0.20260830104908-eb6472c49e99/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/streaming/gen/chatter/service.go b/streaming/gen/chatter/service.go index bd885919e..0b609be58 100644 --- a/streaming/gen/chatter/service.go +++ b/streaming/gen/chatter/service.go @@ -210,6 +210,8 @@ type HistoryPayload struct { View *string } +type InvalidScopes string + // ListenerPayload is the payload type of the chatter service listener method. type ListenerPayload struct { // JWT used for authentication @@ -234,8 +236,6 @@ type SummaryPayload struct { Token string } -type InvalidScopes string - // Credentials are invalid type Unauthorized string diff --git a/streaming/gen/goa.json b/streaming/gen/goa.json index d279d6dad..924afff50 100644 --- a/streaming/gen/goa.json +++ b/streaming/gen/goa.json @@ -1,3 +1,3 @@ { - "goa_version": "v3.30.0" + "goa_version": "v3.31.0-preview.1" } \ No newline at end of file diff --git a/streaming/gen/grpc/chatter/client/client.go b/streaming/gen/grpc/chatter/client/client.go index 6b80f40e1..81649ff9c 100644 --- a/streaming/gen/grpc/chatter/client/client.go +++ b/streaming/gen/grpc/chatter/client/client.go @@ -28,26 +28,31 @@ type Client struct { // EchoerClientStream implements the chatter.EchoerClientStream interface. type EchoerClientStream struct { stream chatterpb.Chatter_EchoerClient + ctx context.Context } // ListenerClientStream implements the chatter.ListenerClientStream interface. type ListenerClientStream struct { stream chatterpb.Chatter_ListenerClient + ctx context.Context } // SummaryClientStream implements the chatter.SummaryClientStream interface. type SummaryClientStream struct { stream chatterpb.Chatter_SummaryClient + ctx context.Context } // SubscribeClientStream implements the chatter.SubscribeClientStream interface. type SubscribeClientStream struct { stream chatterpb.Chatter_SubscribeClient + ctx context.Context } // HistoryClientStream implements the chatter.HistoryClientStream interface. type HistoryClientStream struct { stream chatterpb.Chatter_HistoryClient + ctx context.Context view string viewSet bool } @@ -74,6 +79,9 @@ func (c *Client) Login() goa.Endpoint { case *goapb.ErrorResponse: return nil, goagrpc.NewServiceError(message) default: + if ctxErr := goagrpc.ContextError(ctx, err); ctxErr != nil { + return nil, ctxErr + } return nil, goa.Fault("%s", err.Error()) } } @@ -95,6 +103,9 @@ func (c *Client) Echoer() goa.Endpoint { case *goapb.ErrorResponse: return nil, goagrpc.NewServiceError(message) default: + if ctxErr := goagrpc.ContextError(ctx, err); ctxErr != nil { + return nil, ctxErr + } return nil, goa.Fault("%s", err.Error()) } } @@ -116,6 +127,9 @@ func (c *Client) Listener() goa.Endpoint { case *goapb.ErrorResponse: return nil, goagrpc.NewServiceError(message) default: + if ctxErr := goagrpc.ContextError(ctx, err); ctxErr != nil { + return nil, ctxErr + } return nil, goa.Fault("%s", err.Error()) } } @@ -137,6 +151,9 @@ func (c *Client) Summary() goa.Endpoint { case *goapb.ErrorResponse: return nil, goagrpc.NewServiceError(message) default: + if ctxErr := goagrpc.ContextError(ctx, err); ctxErr != nil { + return nil, ctxErr + } return nil, goa.Fault("%s", err.Error()) } } @@ -159,6 +176,9 @@ func (c *Client) Subscribe() goa.Endpoint { case *goapb.ErrorResponse: return nil, goagrpc.NewServiceError(message) default: + if ctxErr := goagrpc.ContextError(ctx, err); ctxErr != nil { + return nil, ctxErr + } return nil, goa.Fault("%s", err.Error()) } } @@ -180,6 +200,9 @@ func (c *Client) History() goa.Endpoint { case *goapb.ErrorResponse: return nil, goagrpc.NewServiceError(message) default: + if ctxErr := goagrpc.ContextError(ctx, err); ctxErr != nil { + return nil, ctxErr + } return nil, goa.Fault("%s", err.Error()) } } @@ -198,6 +221,9 @@ func (s *EchoerClientStream) Recv() (string, error) { case *goapb.ErrorResponse: return res, goagrpc.NewServiceError(message) default: + if ctxErr := goagrpc.ContextError(s.ctx, err); ctxErr != nil { + return res, ctxErr + } return res, err } } @@ -247,6 +273,18 @@ func (s *ListenerClientStream) SendWithContext(ctx context.Context, res string) func (s *ListenerClientStream) Close() error { // synchronize and report any server error _, err := s.stream.CloseAndRecv() + if err != nil { + resp := goagrpc.DecodeError(err) + switch message := resp.(type) { + case *goapb.ErrorResponse: + return goagrpc.NewServiceError(message) + default: + if ctxErr := goagrpc.ContextError(s.ctx, err); ctxErr != nil { + return ctxErr + } + return err + } + } return err } @@ -261,6 +299,9 @@ func (s *SummaryClientStream) CloseAndRecv() (chatter.ChatSummaryCollection, err case *goapb.ErrorResponse: return res, goagrpc.NewServiceError(message) default: + if ctxErr := goagrpc.ContextError(s.ctx, err); ctxErr != nil { + return res, ctxErr + } return res, err } } @@ -305,6 +346,9 @@ func (s *SubscribeClientStream) Recv() (*chatter.Event, error) { case *goapb.ErrorResponse: return res, goagrpc.NewServiceError(message) default: + if ctxErr := goagrpc.ContextError(s.ctx, err); ctxErr != nil { + return res, ctxErr + } return res, err } } @@ -331,6 +375,9 @@ func (s *HistoryClientStream) Recv() (*chatter.ChatSummary, error) { case *goapb.ErrorResponse: return res, goagrpc.NewServiceError(message) default: + if ctxErr := goagrpc.ContextError(s.ctx, err); ctxErr != nil { + return res, ctxErr + } return res, err } } diff --git a/streaming/gen/grpc/chatter/client/encode_decode.go b/streaming/gen/grpc/chatter/client/encode_decode.go index 5099aed31..35d71a61d 100644 --- a/streaming/gen/grpc/chatter/client/encode_decode.go +++ b/streaming/gen/grpc/chatter/client/encode_decode.go @@ -86,6 +86,7 @@ func EncodeEchoerRequest(ctx context.Context, v any, md *metadata.MD) (any, erro func DecodeEchoerResponse(ctx context.Context, v any, hdr, trlr metadata.MD) (any, error) { return &EchoerClientStream{ stream: v.(chatterpb.Chatter_EchoerClient), + ctx: ctx, }, nil } @@ -118,6 +119,7 @@ func EncodeListenerRequest(ctx context.Context, v any, md *metadata.MD) (any, er func DecodeListenerResponse(ctx context.Context, v any, hdr, trlr metadata.MD) (any, error) { return &ListenerClientStream{ stream: v.(chatterpb.Chatter_ListenerClient), + ctx: ctx, }, nil } @@ -150,6 +152,7 @@ func EncodeSummaryRequest(ctx context.Context, v any, md *metadata.MD) (any, err func DecodeSummaryResponse(ctx context.Context, v any, hdr, trlr metadata.MD) (any, error) { return &SummaryClientStream{ stream: v.(chatterpb.Chatter_SummaryClient), + ctx: ctx, }, nil } @@ -183,6 +186,7 @@ func EncodeSubscribeRequest(ctx context.Context, v any, md *metadata.MD) (any, e func DecodeSubscribeResponse(ctx context.Context, v any, hdr, trlr metadata.MD) (any, error) { return &SubscribeClientStream{ stream: v.(chatterpb.Chatter_SubscribeClient), + ctx: ctx, }, nil } @@ -219,5 +223,6 @@ func EncodeHistoryRequest(ctx context.Context, v any, md *metadata.MD) (any, err func DecodeHistoryResponse(ctx context.Context, v any, hdr, trlr metadata.MD) (any, error) { return &HistoryClientStream{ stream: v.(chatterpb.Chatter_HistoryClient), + ctx: ctx, }, nil } diff --git a/streaming/go.mod b/streaming/go.mod index 756424bfd..c192fb1a4 100644 --- a/streaming/go.mod +++ b/streaming/go.mod @@ -5,7 +5,7 @@ go 1.26.0 require ( github.com/golang-jwt/jwt/v4 v4.5.2 github.com/gorilla/websocket v1.5.3 - goa.design/goa/v3 v3.30.1-0.20260826213606-c30c5e1423e7 + goa.design/goa/v3 v3.31.0-preview.1.0.20260830104908-eb6472c49e99 google.golang.org/grpc v1.83.1 google.golang.org/protobuf v1.36.12 ) diff --git a/streaming/go.sum b/streaming/go.sum index a37989fde..980c86349 100644 --- a/streaming/go.sum +++ b/streaming/go.sum @@ -51,8 +51,8 @@ go.opentelemetry.io/otel/trace v1.45.0 h1:l/mP6Uv7oNO7/TblbhpbgMidxhq1uO/rPsikOy go.opentelemetry.io/otel/trace v1.45.0/go.mod h1:qoJJA2xNMnxRrdISU/kLtfUH2wNeQbiv+jhs/CxI8bc= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260826213606-c30c5e1423e7 h1:z/GUg4DrWWQsH/UqH7QUmqdiUWSX8VWBr61dOs4UtOc= -goa.design/goa/v3 v3.30.1-0.20260826213606-c30c5e1423e7/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.31.0-preview.1.0.20260830104908-eb6472c49e99 h1:R+nByHCAoWOMSqo3yJYs17RBTTgdwnf3aiszLqPmEzU= +goa.design/goa/v3 v3.31.0-preview.1.0.20260830104908-eb6472c49e99/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/tracing/go.mod b/tracing/go.mod index b78eccbe6..861c2e143 100644 --- a/tracing/go.mod +++ b/tracing/go.mod @@ -5,7 +5,7 @@ go 1.26.0 require ( github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 goa.design/examples/basic v0.0.0-20260810182504-f834f43955c5 - goa.design/goa/v3 v3.30.1-0.20260826213606-c30c5e1423e7 + goa.design/goa/v3 v3.31.0-preview.1.0.20260830104908-eb6472c49e99 google.golang.org/grpc v1.83.1 ) diff --git a/tracing/go.sum b/tracing/go.sum index b5c848150..29d5f4144 100644 --- a/tracing/go.sum +++ b/tracing/go.sum @@ -81,8 +81,8 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/examples/basic v0.0.0-20260810182504-f834f43955c5 h1:SRSrUaLTTdA4bUXb8+zA5MDhMEx8YaP+Knd+pddBcrg= goa.design/examples/basic v0.0.0-20260810182504-f834f43955c5/go.mod h1:XRziIzNcLb9fk7ZrfiHx5FIeAj+orJ4fkzLG0nXpiAo= -goa.design/goa/v3 v3.30.1-0.20260826213606-c30c5e1423e7 h1:z/GUg4DrWWQsH/UqH7QUmqdiUWSX8VWBr61dOs4UtOc= -goa.design/goa/v3 v3.30.1-0.20260826213606-c30c5e1423e7/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.31.0-preview.1.0.20260830104908-eb6472c49e99 h1:R+nByHCAoWOMSqo3yJYs17RBTTgdwnf3aiszLqPmEzU= +goa.design/goa/v3 v3.31.0-preview.1.0.20260830104908-eb6472c49e99/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= diff --git a/tus/gen/goa.json b/tus/gen/goa.json index d279d6dad..924afff50 100644 --- a/tus/gen/goa.json +++ b/tus/gen/goa.json @@ -1,3 +1,3 @@ { - "goa_version": "v3.30.0" + "goa_version": "v3.31.0-preview.1" } \ No newline at end of file diff --git a/tus/go.mod b/tus/go.mod index 92d9aaf20..4530dafd4 100644 --- a/tus/go.mod +++ b/tus/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( github.com/rs/xid v1.6.0 - goa.design/goa/v3 v3.30.1-0.20260826213606-c30c5e1423e7 + goa.design/goa/v3 v3.31.0-preview.1.0.20260830104908-eb6472c49e99 ) require ( diff --git a/tus/go.sum b/tus/go.sum index 5bced1127..129cc7251 100644 --- a/tus/go.sum +++ b/tus/go.sum @@ -33,8 +33,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260826213606-c30c5e1423e7 h1:z/GUg4DrWWQsH/UqH7QUmqdiUWSX8VWBr61dOs4UtOc= -goa.design/goa/v3 v3.30.1-0.20260826213606-c30c5e1423e7/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.31.0-preview.1.0.20260830104908-eb6472c49e99 h1:R+nByHCAoWOMSqo3yJYs17RBTTgdwnf3aiszLqPmEzU= +goa.design/goa/v3 v3.31.0-preview.1.0.20260830104908-eb6472c49e99/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= diff --git a/upload_download/gen/goa.json b/upload_download/gen/goa.json index d279d6dad..924afff50 100644 --- a/upload_download/gen/goa.json +++ b/upload_download/gen/goa.json @@ -1,3 +1,3 @@ { - "goa_version": "v3.30.0" + "goa_version": "v3.31.0-preview.1" } \ No newline at end of file diff --git a/upload_download/go.mod b/upload_download/go.mod index aafc8ba73..e159efeee 100644 --- a/upload_download/go.mod +++ b/upload_download/go.mod @@ -2,7 +2,7 @@ module goa.design/examples/upload_download go 1.26.0 -require goa.design/goa/v3 v3.30.1-0.20260826213606-c30c5e1423e7 +require goa.design/goa/v3 v3.31.0-preview.1.0.20260830104908-eb6472c49e99 require ( github.com/dimfeld/httppath v0.0.0-20170720192232-ee938bf73598 // indirect diff --git a/upload_download/go.sum b/upload_download/go.sum index aea2d5af9..30b4bff4e 100644 --- a/upload_download/go.sum +++ b/upload_download/go.sum @@ -31,8 +31,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.30.1-0.20260826213606-c30c5e1423e7 h1:z/GUg4DrWWQsH/UqH7QUmqdiUWSX8VWBr61dOs4UtOc= -goa.design/goa/v3 v3.30.1-0.20260826213606-c30c5e1423e7/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.31.0-preview.1.0.20260830104908-eb6472c49e99 h1:R+nByHCAoWOMSqo3yJYs17RBTTgdwnf3aiszLqPmEzU= +goa.design/goa/v3 v3.31.0-preview.1.0.20260830104908-eb6472c49e99/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= From ee342c45533fe3d70deaa0278b062446cce5afa8 Mon Sep 17 00:00:00 2001 From: "Raphael (manual office deploy after cloud-state fix)" Date: Sun, 30 Aug 2026 10:10:30 -0700 Subject: [PATCH 24/28] Restore custom validation error example --- error/README.md | 55 +++++++++++++++---------------- error/cmd/calc/http.go | 59 +++++++++++++++++++++++++++++----- error/cmd/calc/http_test.go | 64 +++++++++++++++++++++++++++++++++++++ 3 files changed, 143 insertions(+), 35 deletions(-) create mode 100644 error/cmd/calc/http_test.go diff --git a/error/README.md b/error/README.md index 817df6d45..f6613e10a 100644 --- a/error/README.md +++ b/error/README.md @@ -50,7 +50,7 @@ The `DivByZero` struct can be used to return division by zero errors: } ``` -### Overridding Default Validation Errors +### Overriding Default Validation Errors This example also illustrates how to override default validation error responses. In this case the response returned for missing required field @@ -58,46 +58,47 @@ errors. This is accomplished in the `main` package by providing a non-nil error formatter function to the HTTP server `New` function: ```go -calcServer = calcsvr.New(calcEndpoints, mux, dec, enc, eh, FormatError) +calcServer = gencalcsvr.New(calcEndpoints, mux, dec, enc, eh, formatError) ``` -The `FormatError` function is called by the generated code prior to writing +The `formatError` function is called by the generated code prior to writing the HTTP response. The function takes the error as argument and returns the -struct that should be serialized in the response body. The struct retuned by +value that should be serialized in the response body. The value returned by the error formatter must implement the [Statuser](https://pkg.go.dev/goa.design/goa/v3/http#Statuser) interface which defines a single method `StatusCode()` that returns the response status code. - The example uses a string to send the error back. The `FormatError` function - checks whether the error is an instance of `ServiceError` and if so whether - it corresponds to a missing field validation error. If that's the case it - returns the custom error type otherwise it returns the default Goa error - response by calling - [NewErrorResponse](https://pkg.go.dev/goa.design/goa/v3/http#NewErrorResponse). - +The example uses a string to send a missing-field error back. The formatter +also preserves the response body declared for division by zero. All other +errors use Goa's default response. + ```go // missingFieldError is the type used to serialize missing required field // errors. It overrides the default provided by Goa. type missingFieldError string -// StatusCode returns 400 (BadRequest). +// divByZeroError preserves the response declared for division by zero when the +// custom formatter handles all HTTP errors. +type divByZeroError struct { + Message string `form:"message" json:"message" xml:"message"` +} + func (missingFieldError) StatusCode() int { return http.StatusBadRequest } +func (*divByZeroError) StatusCode() int { return http.StatusBadRequest } + +func formatError(ctx context.Context, err error) goahttp.Statuser { + var serviceError *goa.ServiceError + if errors.As(err, &serviceError) && serviceError.Name == "missing_field" { + return missingFieldError(serviceError.Message) + } + + var divideError *gencalc.DivByZero + if errors.As(err, ÷Error) { + return &divByZeroError{Message: divideError.Message} + } -// FormatError is the error formatter used to format error responses returned by -// the calc server. -func FormatError(err error) goahttp.Statuser { - if serr, ok := err.(*goa.ServiceError); ok { - switch serr.Name { - case "missing_field": - return missingFieldError(serr.Message) - default: - // Use Goa default - return goahttp.NewErrorResponse(err) - } - } - // Use Goa default for all other error types - return goahttp.NewErrorResponse(err) + return goahttp.NewErrorResponse(ctx, err) } ``` @@ -191,4 +192,4 @@ response object. Consult the [error handling section](https://goa.design/implement/error_handling/) of -[goa.design](https://goa.design) to learn more about error handling in Goa. \ No newline at end of file +[goa.design](https://goa.design) to learn more about error handling in Goa. diff --git a/error/cmd/calc/http.go b/error/cmd/calc/http.go index d55e2c4e0..2d8e72882 100644 --- a/error/cmd/calc/http.go +++ b/error/cmd/calc/http.go @@ -1,7 +1,10 @@ +// This file configures the calc HTTP server, including the response body used +// when a request is missing a required field. package main import ( "context" + "errors" "log" "net/http" "net/url" @@ -9,16 +12,39 @@ import ( "sync" "time" - calc "goa.design/examples/error/gen/calc" - calcsvr "goa.design/examples/error/gen/http/calc/server" + gencalc "goa.design/examples/error/gen/calc" + gencalcsvr "goa.design/examples/error/gen/http/calc/server" goahttp "goa.design/goa/v3/http" httpmdlwr "goa.design/goa/v3/http/middleware" "goa.design/goa/v3/middleware" + goa "goa.design/goa/v3/pkg" ) -// handleHTTPServer starts configures and starts a HTTP server on the given -// URL. It shuts down the server if any error is received in the error channel. -func handleHTTPServer(ctx context.Context, u *url.URL, calcEndpoints *calc.Endpoints, wg *sync.WaitGroup, errc chan error, logger *log.Logger, debug bool) { +type ( + // missingFieldError is written as a JSON string when a request omits a + // required field. + missingFieldError string + + // divByZeroError preserves the response declared for division by zero when + // the custom formatter handles all HTTP errors. + divByZeroError struct { + Message string `form:"message" json:"message" xml:"message"` + } +) + +// StatusCode reports that a missing required field makes the request invalid. +func (missingFieldError) StatusCode() int { + return http.StatusBadRequest +} + +// StatusCode reports that division by zero makes the request invalid. +func (*divByZeroError) StatusCode() int { + return http.StatusBadRequest +} + +// handleHTTPServer starts an HTTP server on the given URL. It shuts down the +// server when the error channel receives a value. +func handleHTTPServer(ctx context.Context, u *url.URL, calcEndpoints *gencalc.Endpoints, wg *sync.WaitGroup, errc chan error, logger *log.Logger, debug bool) { // Setup goa log adapter. var ( @@ -49,11 +75,11 @@ func handleHTTPServer(ctx context.Context, u *url.URL, calcEndpoints *calc.Endpo // the service input and output data structures to HTTP requests and // responses. var ( - calcServer *calcsvr.Server + calcServer *gencalcsvr.Server ) { eh := errorHandler(logger) - calcServer = calcsvr.New(calcEndpoints, mux, dec, enc, eh, nil) + calcServer = gencalcsvr.New(calcEndpoints, mux, dec, enc, eh, formatError) if debug { servers := goahttp.Servers{ calcServer, @@ -62,7 +88,7 @@ func handleHTTPServer(ctx context.Context, u *url.URL, calcEndpoints *calc.Endpo } } // Configure the mux. - calcsvr.Mount(mux, calcServer) + gencalcsvr.Mount(mux, calcServer) // Wrap the multiplexer with additional middlewares. Middlewares mounted // here apply to all the service endpoints. @@ -103,6 +129,23 @@ func handleHTTPServer(ctx context.Context, u *url.URL, calcEndpoints *calc.Endpo }() } +// formatError writes missing-field validation errors as JSON strings and +// preserves the response declared for division by zero. Every other error uses +// Goa's standard HTTP error response. +func formatError(ctx context.Context, err error) goahttp.Statuser { + var serviceError *goa.ServiceError + if errors.As(err, &serviceError) && serviceError.Name == "missing_field" { + return missingFieldError(serviceError.Message) + } + + var divideError *gencalc.DivByZero + if errors.As(err, ÷Error) { + return &divByZeroError{Message: divideError.Message} + } + + return goahttp.NewErrorResponse(ctx, err) +} + // errorHandler returns a function that writes and logs the given error. // The function also writes and logs the error unique ID so that it's possible // to correlate. diff --git a/error/cmd/calc/http_test.go b/error/cmd/calc/http_test.go new file mode 100644 index 000000000..4183b9941 --- /dev/null +++ b/error/cmd/calc/http_test.go @@ -0,0 +1,64 @@ +// This file verifies that the custom HTTP error formatter changes missing-field +// errors without changing the response declared for division by zero. +package main + +import ( + "io" + "log" + "net/http" + "net/http/httptest" + "strings" + "testing" + + calcapi "goa.design/examples/error" + gencalc "goa.design/examples/error/gen/calc" + gencalcsvr "goa.design/examples/error/gen/http/calc/server" + goahttp "goa.design/goa/v3/http" +) + +func TestErrorResponses(t *testing.T) { + service := calcapi.NewCalc(log.New(io.Discard, "", 0)) + endpoints := gencalc.NewEndpoints(service) + mux := goahttp.NewMuxer() + server := gencalcsvr.New( + endpoints, + mux, + goahttp.RequestDecoder, + goahttp.ResponseEncoder, + nil, + formatError, + ) + gencalcsvr.Mount(mux, server) + + tests := []struct { + name string + body string + want string + }{ + { + name: "missing divisor", + body: `{"dividend":42}`, + want: `"\"divisor\" is missing from body"` + "\n", + }, + { + name: "division by zero", + body: `{"dividend":1,"divisor":0}`, + want: `{"message":"divide by zero"}` + "\n", + }, + } + for _, test := range tests { + t.Run(test.name, func(t *testing.T) { + request := httptest.NewRequest(http.MethodPost, "/", strings.NewReader(test.body)) + request.Header.Set("Content-Type", "application/json") + response := httptest.NewRecorder() + mux.ServeHTTP(response, request) + + if response.Code != http.StatusBadRequest { + t.Errorf("status code = %d, want %d", response.Code, http.StatusBadRequest) + } + if body := response.Body.String(); body != test.want { + t.Errorf("response body = %q, want %q", body, test.want) + } + }) + } +} From 6590647643402611efe443e16b7903057db11565 Mon Sep 17 00:00:00 2001 From: "Raphael (manual office deploy after cloud-state fix)" Date: Sun, 30 Aug 2026 11:13:47 -0700 Subject: [PATCH 25/28] Pin examples to final Goa preview --- basic/go.mod | 2 +- basic/go.sum | 4 +- cellar/go.mod | 2 +- cellar/go.sum | 4 +- concerts/go.mod | 2 +- concerts/go.sum | 4 +- cookies/go.mod | 2 +- cookies/go.sum | 4 +- encodings/cbor/go.mod | 2 +- encodings/cbor/go.sum | 4 +- encodings/text/go.mod | 2 +- encodings/text/go.sum | 4 +- error/go.mod | 2 +- error/go.sum | 4 +- files/cmd/openapi-cli/http.go | 39 ---------- files/cmd/openapi-cli/main.go | 120 ------------------------------ files/gen/http/cli/openapi/cli.go | 100 ------------------------- files/go.mod | 2 +- files/go.sum | 4 +- httpstatus/go.mod | 3 +- httpstatus/go.sum | 6 +- interceptors/go.mod | 2 +- interceptors/go.sum | 4 +- multipart/go.mod | 2 +- multipart/go.sum | 4 +- retry/go.mod | 2 +- retry/go.sum | 4 +- security/hierarchy/go.mod | 2 +- security/hierarchy/go.sum | 4 +- security/multiauth/go.mod | 2 +- security/multiauth/go.sum | 4 +- sse/go.mod | 2 +- sse/go.sum | 4 +- streaming/go.mod | 2 +- streaming/go.sum | 4 +- tracing/go.mod | 2 +- tracing/go.sum | 4 +- tus/go.mod | 2 +- tus/go.sum | 4 +- upload_download/go.mod | 2 +- upload_download/go.sum | 4 +- 41 files changed, 57 insertions(+), 319 deletions(-) delete mode 100644 files/cmd/openapi-cli/http.go delete mode 100644 files/cmd/openapi-cli/main.go delete mode 100644 files/gen/http/cli/openapi/cli.go diff --git a/basic/go.mod b/basic/go.mod index 7401e58e5..6d7217ddd 100644 --- a/basic/go.mod +++ b/basic/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( goa.design/clue v1.2.6 - goa.design/goa/v3 v3.31.0-preview.1.0.20260830104908-eb6472c49e99 + goa.design/goa/v3 v3.31.0-preview.1.0.20260830175414-d176af092260 google.golang.org/grpc v1.83.1 google.golang.org/protobuf v1.36.12 ) diff --git a/basic/go.sum b/basic/go.sum index a029b1683..f4289daad 100644 --- a/basic/go.sum +++ b/basic/go.sum @@ -55,8 +55,8 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/clue v1.2.6 h1:ensyUkwlvEbNy8FuTGMldKuvaNouh8YoDY9QaE+EtYg= goa.design/clue v1.2.6/go.mod h1:Y4RS5o2k6MZiGk2PT3XbKyntjR2xkr8dYOKQ591dIDM= -goa.design/goa/v3 v3.31.0-preview.1.0.20260830104908-eb6472c49e99 h1:R+nByHCAoWOMSqo3yJYs17RBTTgdwnf3aiszLqPmEzU= -goa.design/goa/v3 v3.31.0-preview.1.0.20260830104908-eb6472c49e99/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.31.0-preview.1.0.20260830175414-d176af092260 h1:/xDlBPLY77lF13h194zLA3/5q8NU3y9UmF7VJCJbPB4= +goa.design/goa/v3 v3.31.0-preview.1.0.20260830175414-d176af092260/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/cellar/go.mod b/cellar/go.mod index ee8d1f060..8542de424 100644 --- a/cellar/go.mod +++ b/cellar/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( github.com/boltdb/bolt v1.3.1 - goa.design/goa/v3 v3.31.0-preview.1.0.20260830104908-eb6472c49e99 + goa.design/goa/v3 v3.31.0-preview.1.0.20260830175414-d176af092260 google.golang.org/grpc v1.83.1 google.golang.org/protobuf v1.36.12 ) diff --git a/cellar/go.sum b/cellar/go.sum index 2594eb21e..2f571605f 100644 --- a/cellar/go.sum +++ b/cellar/go.sum @@ -51,8 +51,8 @@ go.opentelemetry.io/otel/trace v1.45.0 h1:l/mP6Uv7oNO7/TblbhpbgMidxhq1uO/rPsikOy go.opentelemetry.io/otel/trace v1.45.0/go.mod h1:qoJJA2xNMnxRrdISU/kLtfUH2wNeQbiv+jhs/CxI8bc= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.31.0-preview.1.0.20260830104908-eb6472c49e99 h1:R+nByHCAoWOMSqo3yJYs17RBTTgdwnf3aiszLqPmEzU= -goa.design/goa/v3 v3.31.0-preview.1.0.20260830104908-eb6472c49e99/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.31.0-preview.1.0.20260830175414-d176af092260 h1:/xDlBPLY77lF13h194zLA3/5q8NU3y9UmF7VJCJbPB4= +goa.design/goa/v3 v3.31.0-preview.1.0.20260830175414-d176af092260/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/concerts/go.mod b/concerts/go.mod index 460296da0..60c2fa899 100644 --- a/concerts/go.mod +++ b/concerts/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( github.com/google/uuid v1.6.0 - goa.design/goa/v3 v3.31.0-preview.1.0.20260830104908-eb6472c49e99 + goa.design/goa/v3 v3.31.0-preview.1.0.20260830175414-d176af092260 ) require ( diff --git a/concerts/go.sum b/concerts/go.sum index 30b4bff4e..0cac185a8 100644 --- a/concerts/go.sum +++ b/concerts/go.sum @@ -31,8 +31,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.31.0-preview.1.0.20260830104908-eb6472c49e99 h1:R+nByHCAoWOMSqo3yJYs17RBTTgdwnf3aiszLqPmEzU= -goa.design/goa/v3 v3.31.0-preview.1.0.20260830104908-eb6472c49e99/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.31.0-preview.1.0.20260830175414-d176af092260 h1:/xDlBPLY77lF13h194zLA3/5q8NU3y9UmF7VJCJbPB4= +goa.design/goa/v3 v3.31.0-preview.1.0.20260830175414-d176af092260/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= diff --git a/cookies/go.mod b/cookies/go.mod index cb4e1a369..92965b390 100644 --- a/cookies/go.mod +++ b/cookies/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( github.com/rs/xid v1.6.0 - goa.design/goa/v3 v3.31.0-preview.1.0.20260830104908-eb6472c49e99 + goa.design/goa/v3 v3.31.0-preview.1.0.20260830175414-d176af092260 ) require ( diff --git a/cookies/go.sum b/cookies/go.sum index 129cc7251..1ecb3bf8d 100644 --- a/cookies/go.sum +++ b/cookies/go.sum @@ -33,8 +33,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.31.0-preview.1.0.20260830104908-eb6472c49e99 h1:R+nByHCAoWOMSqo3yJYs17RBTTgdwnf3aiszLqPmEzU= -goa.design/goa/v3 v3.31.0-preview.1.0.20260830104908-eb6472c49e99/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.31.0-preview.1.0.20260830175414-d176af092260 h1:/xDlBPLY77lF13h194zLA3/5q8NU3y9UmF7VJCJbPB4= +goa.design/goa/v3 v3.31.0-preview.1.0.20260830175414-d176af092260/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= diff --git a/encodings/cbor/go.mod b/encodings/cbor/go.mod index 067ac7269..d8d8132f4 100644 --- a/encodings/cbor/go.mod +++ b/encodings/cbor/go.mod @@ -5,7 +5,7 @@ go 1.26.0 require ( github.com/fxamacker/cbor/v2 v2.9.2 goa.design/clue v1.2.6 - goa.design/goa/v3 v3.31.0-preview.1.0.20260830104908-eb6472c49e99 + goa.design/goa/v3 v3.31.0-preview.1.0.20260830175414-d176af092260 ) require ( diff --git a/encodings/cbor/go.sum b/encodings/cbor/go.sum index 3bbaa9982..dabd8c0c7 100644 --- a/encodings/cbor/go.sum +++ b/encodings/cbor/go.sum @@ -59,8 +59,8 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/clue v1.2.6 h1:ensyUkwlvEbNy8FuTGMldKuvaNouh8YoDY9QaE+EtYg= goa.design/clue v1.2.6/go.mod h1:Y4RS5o2k6MZiGk2PT3XbKyntjR2xkr8dYOKQ591dIDM= -goa.design/goa/v3 v3.31.0-preview.1.0.20260830104908-eb6472c49e99 h1:R+nByHCAoWOMSqo3yJYs17RBTTgdwnf3aiszLqPmEzU= -goa.design/goa/v3 v3.31.0-preview.1.0.20260830104908-eb6472c49e99/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.31.0-preview.1.0.20260830175414-d176af092260 h1:/xDlBPLY77lF13h194zLA3/5q8NU3y9UmF7VJCJbPB4= +goa.design/goa/v3 v3.31.0-preview.1.0.20260830175414-d176af092260/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/encodings/text/go.mod b/encodings/text/go.mod index 5a4532c5e..04584b18c 100644 --- a/encodings/text/go.mod +++ b/encodings/text/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( goa.design/clue v1.2.6 - goa.design/goa/v3 v3.31.0-preview.1.0.20260830104908-eb6472c49e99 + goa.design/goa/v3 v3.31.0-preview.1.0.20260830175414-d176af092260 ) require ( diff --git a/encodings/text/go.sum b/encodings/text/go.sum index a029b1683..f4289daad 100644 --- a/encodings/text/go.sum +++ b/encodings/text/go.sum @@ -55,8 +55,8 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/clue v1.2.6 h1:ensyUkwlvEbNy8FuTGMldKuvaNouh8YoDY9QaE+EtYg= goa.design/clue v1.2.6/go.mod h1:Y4RS5o2k6MZiGk2PT3XbKyntjR2xkr8dYOKQ591dIDM= -goa.design/goa/v3 v3.31.0-preview.1.0.20260830104908-eb6472c49e99 h1:R+nByHCAoWOMSqo3yJYs17RBTTgdwnf3aiszLqPmEzU= -goa.design/goa/v3 v3.31.0-preview.1.0.20260830104908-eb6472c49e99/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.31.0-preview.1.0.20260830175414-d176af092260 h1:/xDlBPLY77lF13h194zLA3/5q8NU3y9UmF7VJCJbPB4= +goa.design/goa/v3 v3.31.0-preview.1.0.20260830175414-d176af092260/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/error/go.mod b/error/go.mod index 772f525a3..17797446e 100644 --- a/error/go.mod +++ b/error/go.mod @@ -3,7 +3,7 @@ module goa.design/examples/error go 1.26.0 require ( - goa.design/goa/v3 v3.31.0-preview.1.0.20260830104908-eb6472c49e99 + goa.design/goa/v3 v3.31.0-preview.1.0.20260830175414-d176af092260 google.golang.org/genproto v0.0.0-20260810153831-ec0a7760b754 google.golang.org/grpc v1.83.1 google.golang.org/protobuf v1.36.12 diff --git a/error/go.sum b/error/go.sum index 9bd62a98e..23b103d47 100644 --- a/error/go.sum +++ b/error/go.sum @@ -49,8 +49,8 @@ go.opentelemetry.io/otel/trace v1.45.0 h1:l/mP6Uv7oNO7/TblbhpbgMidxhq1uO/rPsikOy go.opentelemetry.io/otel/trace v1.45.0/go.mod h1:qoJJA2xNMnxRrdISU/kLtfUH2wNeQbiv+jhs/CxI8bc= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.31.0-preview.1.0.20260830104908-eb6472c49e99 h1:R+nByHCAoWOMSqo3yJYs17RBTTgdwnf3aiszLqPmEzU= -goa.design/goa/v3 v3.31.0-preview.1.0.20260830104908-eb6472c49e99/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.31.0-preview.1.0.20260830175414-d176af092260 h1:/xDlBPLY77lF13h194zLA3/5q8NU3y9UmF7VJCJbPB4= +goa.design/goa/v3 v3.31.0-preview.1.0.20260830175414-d176af092260/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/files/cmd/openapi-cli/http.go b/files/cmd/openapi-cli/http.go deleted file mode 100644 index 2e530a619..000000000 --- a/files/cmd/openapi-cli/http.go +++ /dev/null @@ -1,39 +0,0 @@ -package main - -import ( - "net/http" - "time" - - cli "goa.design/examples/files/gen/http/cli/openapi" - goahttp "goa.design/goa/v3/http" - goa "goa.design/goa/v3/pkg" -) - -func doHTTP(scheme, host string, timeout int, debug bool) (goa.Endpoint, any, error) { - var ( - doer goahttp.Doer - ) - { - doer = &http.Client{Timeout: time.Duration(timeout) * time.Second} - if debug { - doer = goahttp.NewDebugDoer(doer) - } - } - - return cli.ParseEndpoint( - scheme, - host, - doer, - goahttp.RequestEncoder, - goahttp.ResponseDecoder, - debug, - ) -} - -func httpUsageCommands() []string { - return cli.UsageCommands() -} - -func httpUsageExamples() string { - return cli.UsageExamples() -} diff --git a/files/cmd/openapi-cli/main.go b/files/cmd/openapi-cli/main.go deleted file mode 100644 index aea8c6df1..000000000 --- a/files/cmd/openapi-cli/main.go +++ /dev/null @@ -1,120 +0,0 @@ -package main - -import ( - "context" - "encoding/json" - "flag" - "fmt" - "net/url" - "os" - "strings" - - goa "goa.design/goa/v3/pkg" -) - -func main() { - var ( - hostF = flag.String("host", "localhost", "Server host (valid values: localhost)") - addrF = flag.String("url", "", "URL to service host") - - verboseF = flag.Bool("verbose", false, "Print request and response details") - vF = flag.Bool("v", false, "Print request and response details") - timeoutF = flag.Int("timeout", 30, "Maximum number of seconds to wait for response") - ) - flag.Usage = usage - flag.Parse() - var ( - addr string - timeout int - debug bool - ) - { - addr = *addrF - if addr == "" { - switch *hostF { - case "localhost": - addr = "http://localhost:80" - default: - fmt.Fprintf(os.Stderr, "invalid host argument: %q (valid hosts: localhost)\n", *hostF) - os.Exit(1) - } - } - timeout = *timeoutF - debug = *verboseF || *vF - } - - var ( - scheme string - host string - ) - { - u, err := url.Parse(addr) - if err != nil { - fmt.Fprintf(os.Stderr, "invalid URL %#v: %s\n", addr, err) - os.Exit(1) - } - scheme = u.Scheme - host = u.Host - } - var ( - endpoint goa.Endpoint - payload any - err error - ) - { - switch scheme { - case "http", "https": - endpoint, payload, err = doHTTP(scheme, host, timeout, debug) - default: - fmt.Fprintf(os.Stderr, "invalid scheme: %q (valid schemes: grpc|http)\n", scheme) - os.Exit(1) - } - } - if err != nil { - if err == flag.ErrHelp { - os.Exit(0) - } - fmt.Fprintln(os.Stderr, err.Error()) - fmt.Fprintln(os.Stderr, "run '"+os.Args[0]+" --help' for detailed usage.") - os.Exit(1) - } - - data, err := endpoint(context.Background(), payload) - if err != nil { - fmt.Fprintln(os.Stderr, err.Error()) - os.Exit(1) - } - - if data != nil { - m, _ := json.MarshalIndent(data, "", " ") - fmt.Println(string(m)) - } -} - -func usage() { - fmt.Fprintf(os.Stderr, `%s is a command line client for the openapi API. - -Usage: - %s [-host HOST][-url URL][-timeout SECONDS][-verbose|-v] SERVICE ENDPOINT [flags] - - -host HOST: server host (localhost). valid values: localhost - -url URL: specify service URL overriding host URL (http://localhost:8080) - -timeout: maximum number of seconds to wait for response (30) - -verbose|-v: print request and response details (false) - -Commands: -%s -Additional help: - %s SERVICE [ENDPOINT] --help - -Example: -%s -`, os.Args[0], os.Args[0], indent(strings.Join(httpUsageCommands(), "\n")), os.Args[0], indent(httpUsageExamples())) -} - -func indent(s string) string { - if s == "" { - return "" - } - return " " + strings.Replace(s, "\n", "\n ", -1) -} diff --git a/files/gen/http/cli/openapi/cli.go b/files/gen/http/cli/openapi/cli.go deleted file mode 100644 index b92c397f3..000000000 --- a/files/gen/http/cli/openapi/cli.go +++ /dev/null @@ -1,100 +0,0 @@ -// Code generated by goa, DO NOT EDIT. -// -// openapi HTTP client CLI support package -// -// Command: -// $ goa gen goa.design/examples/files/design - -package cli - -import ( - "flag" - "fmt" - "net/http" - "os" - - goahttp "goa.design/goa/v3/http" - goa "goa.design/goa/v3/pkg" -) - -// UsageCommands returns the set of commands and sub-commands using the format -// -// command (subcommand1|subcommand2|...) -func UsageCommands() []string { - return []string{} -} - -// UsageExamples produces an example of a valid invocation of the CLI tool. -func UsageExamples() string { - return "" -} - -// ParseEndpoint returns the endpoint and payload as specified on the command -// line. -func ParseEndpoint( - scheme, host string, - doer goahttp.Doer, - enc func(*http.Request) goahttp.Encoder, - dec func(*http.Response) goahttp.Decoder, - restore bool, -) (goa.Endpoint, any, error) { - var () - - if err := flag.CommandLine.Parse(os.Args[1:]); err != nil { - return nil, nil, err - } - - if flag.NArg() < 2 { // two non flag args are required: SERVICE and ENDPOINT (aka COMMAND) - return nil, nil, fmt.Errorf("not enough arguments") - } - - var ( - svcn string - svcf *flag.FlagSet - ) - { - svcn = flag.Arg(0) - switch svcn { - default: - return nil, nil, fmt.Errorf("unknown service %q", svcn) - } - } - if err := svcf.Parse(flag.Args()[1:]); err != nil { - return nil, nil, err - } - - var ( - epn string - epf *flag.FlagSet - ) - { - epn = svcf.Arg(0) - switch svcn { - } - } - if epf == nil { - return nil, nil, fmt.Errorf("unknown %q endpoint %q", svcn, epn) - } - - // Parse endpoint flags if any - if svcf.NArg() > 1 { - if err := epf.Parse(svcf.Args()[1:]); err != nil { - return nil, nil, err - } - } - - var ( - data any - endpoint goa.Endpoint - err error - ) - { - switch svcn { - } - } - if err != nil { - return nil, nil, err - } - - return endpoint, data, nil -} diff --git a/files/go.mod b/files/go.mod index 52bc0af9b..13632295c 100644 --- a/files/go.mod +++ b/files/go.mod @@ -2,7 +2,7 @@ module goa.design/examples/files go 1.26.0 -require goa.design/goa/v3 v3.31.0-preview.1.0.20260830104908-eb6472c49e99 +require goa.design/goa/v3 v3.31.0-preview.1.0.20260830175414-d176af092260 require ( github.com/dimfeld/httppath v0.0.0-20170720192232-ee938bf73598 // indirect diff --git a/files/go.sum b/files/go.sum index 30b4bff4e..0cac185a8 100644 --- a/files/go.sum +++ b/files/go.sum @@ -31,8 +31,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.31.0-preview.1.0.20260830104908-eb6472c49e99 h1:R+nByHCAoWOMSqo3yJYs17RBTTgdwnf3aiszLqPmEzU= -goa.design/goa/v3 v3.31.0-preview.1.0.20260830104908-eb6472c49e99/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.31.0-preview.1.0.20260830175414-d176af092260 h1:/xDlBPLY77lF13h194zLA3/5q8NU3y9UmF7VJCJbPB4= +goa.design/goa/v3 v3.31.0-preview.1.0.20260830175414-d176af092260/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= diff --git a/httpstatus/go.mod b/httpstatus/go.mod index b22e1c67a..037d779b6 100644 --- a/httpstatus/go.mod +++ b/httpstatus/go.mod @@ -2,7 +2,7 @@ module goa.design/examples/httpstatus go 1.26.0 -require goa.design/goa/v3 v3.31.0-preview.1.0.20260830104908-eb6472c49e99 +require goa.design/goa/v3 v3.31.0-preview.1.0.20260830175414-d176af092260 require ( github.com/dimfeld/httppath v0.0.0-20170720192232-ee938bf73598 // indirect @@ -19,7 +19,6 @@ require ( golang.org/x/sync v0.22.0 // indirect golang.org/x/text v0.41.0 // indirect golang.org/x/tools v0.49.0 // indirect - google.golang.org/protobuf v1.36.12 // indirect gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/httpstatus/go.sum b/httpstatus/go.sum index 30b4bff4e..7ee503697 100644 --- a/httpstatus/go.sum +++ b/httpstatus/go.sum @@ -31,8 +31,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.31.0-preview.1.0.20260830104908-eb6472c49e99 h1:R+nByHCAoWOMSqo3yJYs17RBTTgdwnf3aiszLqPmEzU= -goa.design/goa/v3 v3.31.0-preview.1.0.20260830104908-eb6472c49e99/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.31.0-preview.1.0.20260830175414-d176af092260 h1:/xDlBPLY77lF13h194zLA3/5q8NU3y9UmF7VJCJbPB4= +goa.design/goa/v3 v3.31.0-preview.1.0.20260830175414-d176af092260/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= @@ -41,8 +41,6 @@ golang.org/x/text v0.41.0 h1:vz/seA0lnX87Othu2f/0L24RcgrXD9/YFTSuGjj3rH8= golang.org/x/text v0.41.0/go.mod h1:jvf1O8ajNzZqhSrQBPbutR/EB83Cc0CFrezNQIwbb5M= golang.org/x/tools v0.49.0 h1:3NI7VXzL9+1WZD52Dx2ttoPwD5DWrFGpl9mFZDlmisI= golang.org/x/tools v0.49.0/go.mod h1:SJNXV9DBKT0UbdttsQjbfJlAE/q+y36++zo3uL3N0Oo= -google.golang.org/protobuf v1.36.12 h1:pJOKDDOyeXErUroCihFAd5LQuwXBSpVnKGrj5o/fwxc= -google.golang.org/protobuf v1.36.12/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= diff --git a/interceptors/go.mod b/interceptors/go.mod index 58ed9bf48..8c8724046 100644 --- a/interceptors/go.mod +++ b/interceptors/go.mod @@ -6,7 +6,7 @@ require ( github.com/google/uuid v1.6.0 github.com/gorilla/websocket v1.5.3 goa.design/clue v1.2.6 - goa.design/goa/v3 v3.31.0-preview.1.0.20260830104908-eb6472c49e99 + goa.design/goa/v3 v3.31.0-preview.1.0.20260830175414-d176af092260 google.golang.org/grpc v1.83.1 google.golang.org/protobuf v1.36.12 ) diff --git a/interceptors/go.sum b/interceptors/go.sum index a029b1683..f4289daad 100644 --- a/interceptors/go.sum +++ b/interceptors/go.sum @@ -55,8 +55,8 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/clue v1.2.6 h1:ensyUkwlvEbNy8FuTGMldKuvaNouh8YoDY9QaE+EtYg= goa.design/clue v1.2.6/go.mod h1:Y4RS5o2k6MZiGk2PT3XbKyntjR2xkr8dYOKQ591dIDM= -goa.design/goa/v3 v3.31.0-preview.1.0.20260830104908-eb6472c49e99 h1:R+nByHCAoWOMSqo3yJYs17RBTTgdwnf3aiszLqPmEzU= -goa.design/goa/v3 v3.31.0-preview.1.0.20260830104908-eb6472c49e99/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.31.0-preview.1.0.20260830175414-d176af092260 h1:/xDlBPLY77lF13h194zLA3/5q8NU3y9UmF7VJCJbPB4= +goa.design/goa/v3 v3.31.0-preview.1.0.20260830175414-d176af092260/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/multipart/go.mod b/multipart/go.mod index f453b3832..7c51aca5e 100644 --- a/multipart/go.mod +++ b/multipart/go.mod @@ -2,7 +2,7 @@ module goa.design/examples/multipart go 1.26.0 -require goa.design/goa/v3 v3.31.0-preview.1.0.20260830104908-eb6472c49e99 +require goa.design/goa/v3 v3.31.0-preview.1.0.20260830175414-d176af092260 require ( github.com/dimfeld/httppath v0.0.0-20170720192232-ee938bf73598 // indirect diff --git a/multipart/go.sum b/multipart/go.sum index 30b4bff4e..0cac185a8 100644 --- a/multipart/go.sum +++ b/multipart/go.sum @@ -31,8 +31,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.31.0-preview.1.0.20260830104908-eb6472c49e99 h1:R+nByHCAoWOMSqo3yJYs17RBTTgdwnf3aiszLqPmEzU= -goa.design/goa/v3 v3.31.0-preview.1.0.20260830104908-eb6472c49e99/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.31.0-preview.1.0.20260830175414-d176af092260 h1:/xDlBPLY77lF13h194zLA3/5q8NU3y9UmF7VJCJbPB4= +goa.design/goa/v3 v3.31.0-preview.1.0.20260830175414-d176af092260/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= diff --git a/retry/go.mod b/retry/go.mod index cb7462138..9678501a1 100644 --- a/retry/go.mod +++ b/retry/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( goa.design/clue v1.2.6 - goa.design/goa/v3 v3.31.0-preview.1.0.20260830104908-eb6472c49e99 + goa.design/goa/v3 v3.31.0-preview.1.0.20260830175414-d176af092260 google.golang.org/grpc v1.83.1 google.golang.org/protobuf v1.36.12 ) diff --git a/retry/go.sum b/retry/go.sum index a029b1683..f4289daad 100644 --- a/retry/go.sum +++ b/retry/go.sum @@ -55,8 +55,8 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/clue v1.2.6 h1:ensyUkwlvEbNy8FuTGMldKuvaNouh8YoDY9QaE+EtYg= goa.design/clue v1.2.6/go.mod h1:Y4RS5o2k6MZiGk2PT3XbKyntjR2xkr8dYOKQ591dIDM= -goa.design/goa/v3 v3.31.0-preview.1.0.20260830104908-eb6472c49e99 h1:R+nByHCAoWOMSqo3yJYs17RBTTgdwnf3aiszLqPmEzU= -goa.design/goa/v3 v3.31.0-preview.1.0.20260830104908-eb6472c49e99/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.31.0-preview.1.0.20260830175414-d176af092260 h1:/xDlBPLY77lF13h194zLA3/5q8NU3y9UmF7VJCJbPB4= +goa.design/goa/v3 v3.31.0-preview.1.0.20260830175414-d176af092260/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/security/hierarchy/go.mod b/security/hierarchy/go.mod index f5afd4fe3..fa8ccde51 100644 --- a/security/hierarchy/go.mod +++ b/security/hierarchy/go.mod @@ -2,7 +2,7 @@ module goa.design/examples/security/hierarchy go 1.26.0 -require goa.design/goa/v3 v3.31.0-preview.1.0.20260830104908-eb6472c49e99 +require goa.design/goa/v3 v3.31.0-preview.1.0.20260830175414-d176af092260 require ( github.com/dimfeld/httppath v0.0.0-20170720192232-ee938bf73598 // indirect diff --git a/security/hierarchy/go.sum b/security/hierarchy/go.sum index 30b4bff4e..0cac185a8 100644 --- a/security/hierarchy/go.sum +++ b/security/hierarchy/go.sum @@ -31,8 +31,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.31.0-preview.1.0.20260830104908-eb6472c49e99 h1:R+nByHCAoWOMSqo3yJYs17RBTTgdwnf3aiszLqPmEzU= -goa.design/goa/v3 v3.31.0-preview.1.0.20260830104908-eb6472c49e99/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.31.0-preview.1.0.20260830175414-d176af092260 h1:/xDlBPLY77lF13h194zLA3/5q8NU3y9UmF7VJCJbPB4= +goa.design/goa/v3 v3.31.0-preview.1.0.20260830175414-d176af092260/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= diff --git a/security/multiauth/go.mod b/security/multiauth/go.mod index 0dc8b3663..d1ce5b7c6 100644 --- a/security/multiauth/go.mod +++ b/security/multiauth/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( github.com/golang-jwt/jwt/v4 v4.5.2 - goa.design/goa/v3 v3.31.0-preview.1.0.20260830104908-eb6472c49e99 + goa.design/goa/v3 v3.31.0-preview.1.0.20260830175414-d176af092260 google.golang.org/grpc v1.83.1 google.golang.org/protobuf v1.36.12 ) diff --git a/security/multiauth/go.sum b/security/multiauth/go.sum index 980c86349..3771fe301 100644 --- a/security/multiauth/go.sum +++ b/security/multiauth/go.sum @@ -51,8 +51,8 @@ go.opentelemetry.io/otel/trace v1.45.0 h1:l/mP6Uv7oNO7/TblbhpbgMidxhq1uO/rPsikOy go.opentelemetry.io/otel/trace v1.45.0/go.mod h1:qoJJA2xNMnxRrdISU/kLtfUH2wNeQbiv+jhs/CxI8bc= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.31.0-preview.1.0.20260830104908-eb6472c49e99 h1:R+nByHCAoWOMSqo3yJYs17RBTTgdwnf3aiszLqPmEzU= -goa.design/goa/v3 v3.31.0-preview.1.0.20260830104908-eb6472c49e99/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.31.0-preview.1.0.20260830175414-d176af092260 h1:/xDlBPLY77lF13h194zLA3/5q8NU3y9UmF7VJCJbPB4= +goa.design/goa/v3 v3.31.0-preview.1.0.20260830175414-d176af092260/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/sse/go.mod b/sse/go.mod index 2919bcbd0..6b85b2a3e 100644 --- a/sse/go.mod +++ b/sse/go.mod @@ -5,7 +5,7 @@ go 1.26.0 require ( github.com/shirou/gopsutil/v3 v3.24.5 goa.design/clue v1.2.6 - goa.design/goa/v3 v3.31.0-preview.1.0.20260830104908-eb6472c49e99 + goa.design/goa/v3 v3.31.0-preview.1.0.20260830175414-d176af092260 ) require ( diff --git a/sse/go.sum b/sse/go.sum index cd6e730d4..32b79f40b 100644 --- a/sse/go.sum +++ b/sse/go.sum @@ -74,8 +74,8 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/clue v1.2.6 h1:ensyUkwlvEbNy8FuTGMldKuvaNouh8YoDY9QaE+EtYg= goa.design/clue v1.2.6/go.mod h1:Y4RS5o2k6MZiGk2PT3XbKyntjR2xkr8dYOKQ591dIDM= -goa.design/goa/v3 v3.31.0-preview.1.0.20260830104908-eb6472c49e99 h1:R+nByHCAoWOMSqo3yJYs17RBTTgdwnf3aiszLqPmEzU= -goa.design/goa/v3 v3.31.0-preview.1.0.20260830104908-eb6472c49e99/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.31.0-preview.1.0.20260830175414-d176af092260 h1:/xDlBPLY77lF13h194zLA3/5q8NU3y9UmF7VJCJbPB4= +goa.design/goa/v3 v3.31.0-preview.1.0.20260830175414-d176af092260/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/streaming/go.mod b/streaming/go.mod index c192fb1a4..7446f18c5 100644 --- a/streaming/go.mod +++ b/streaming/go.mod @@ -5,7 +5,7 @@ go 1.26.0 require ( github.com/golang-jwt/jwt/v4 v4.5.2 github.com/gorilla/websocket v1.5.3 - goa.design/goa/v3 v3.31.0-preview.1.0.20260830104908-eb6472c49e99 + goa.design/goa/v3 v3.31.0-preview.1.0.20260830175414-d176af092260 google.golang.org/grpc v1.83.1 google.golang.org/protobuf v1.36.12 ) diff --git a/streaming/go.sum b/streaming/go.sum index 980c86349..3771fe301 100644 --- a/streaming/go.sum +++ b/streaming/go.sum @@ -51,8 +51,8 @@ go.opentelemetry.io/otel/trace v1.45.0 h1:l/mP6Uv7oNO7/TblbhpbgMidxhq1uO/rPsikOy go.opentelemetry.io/otel/trace v1.45.0/go.mod h1:qoJJA2xNMnxRrdISU/kLtfUH2wNeQbiv+jhs/CxI8bc= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.31.0-preview.1.0.20260830104908-eb6472c49e99 h1:R+nByHCAoWOMSqo3yJYs17RBTTgdwnf3aiszLqPmEzU= -goa.design/goa/v3 v3.31.0-preview.1.0.20260830104908-eb6472c49e99/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.31.0-preview.1.0.20260830175414-d176af092260 h1:/xDlBPLY77lF13h194zLA3/5q8NU3y9UmF7VJCJbPB4= +goa.design/goa/v3 v3.31.0-preview.1.0.20260830175414-d176af092260/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/tracing/go.mod b/tracing/go.mod index 861c2e143..df51edf9f 100644 --- a/tracing/go.mod +++ b/tracing/go.mod @@ -5,7 +5,7 @@ go 1.26.0 require ( github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 goa.design/examples/basic v0.0.0-20260810182504-f834f43955c5 - goa.design/goa/v3 v3.31.0-preview.1.0.20260830104908-eb6472c49e99 + goa.design/goa/v3 v3.31.0-preview.1.0.20260830175414-d176af092260 google.golang.org/grpc v1.83.1 ) diff --git a/tracing/go.sum b/tracing/go.sum index 29d5f4144..62bda4398 100644 --- a/tracing/go.sum +++ b/tracing/go.sum @@ -81,8 +81,8 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/examples/basic v0.0.0-20260810182504-f834f43955c5 h1:SRSrUaLTTdA4bUXb8+zA5MDhMEx8YaP+Knd+pddBcrg= goa.design/examples/basic v0.0.0-20260810182504-f834f43955c5/go.mod h1:XRziIzNcLb9fk7ZrfiHx5FIeAj+orJ4fkzLG0nXpiAo= -goa.design/goa/v3 v3.31.0-preview.1.0.20260830104908-eb6472c49e99 h1:R+nByHCAoWOMSqo3yJYs17RBTTgdwnf3aiszLqPmEzU= -goa.design/goa/v3 v3.31.0-preview.1.0.20260830104908-eb6472c49e99/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.31.0-preview.1.0.20260830175414-d176af092260 h1:/xDlBPLY77lF13h194zLA3/5q8NU3y9UmF7VJCJbPB4= +goa.design/goa/v3 v3.31.0-preview.1.0.20260830175414-d176af092260/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= diff --git a/tus/go.mod b/tus/go.mod index 4530dafd4..a6f7cf1e9 100644 --- a/tus/go.mod +++ b/tus/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( github.com/rs/xid v1.6.0 - goa.design/goa/v3 v3.31.0-preview.1.0.20260830104908-eb6472c49e99 + goa.design/goa/v3 v3.31.0-preview.1.0.20260830175414-d176af092260 ) require ( diff --git a/tus/go.sum b/tus/go.sum index 129cc7251..1ecb3bf8d 100644 --- a/tus/go.sum +++ b/tus/go.sum @@ -33,8 +33,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.31.0-preview.1.0.20260830104908-eb6472c49e99 h1:R+nByHCAoWOMSqo3yJYs17RBTTgdwnf3aiszLqPmEzU= -goa.design/goa/v3 v3.31.0-preview.1.0.20260830104908-eb6472c49e99/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.31.0-preview.1.0.20260830175414-d176af092260 h1:/xDlBPLY77lF13h194zLA3/5q8NU3y9UmF7VJCJbPB4= +goa.design/goa/v3 v3.31.0-preview.1.0.20260830175414-d176af092260/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= diff --git a/upload_download/go.mod b/upload_download/go.mod index e159efeee..e8c565c10 100644 --- a/upload_download/go.mod +++ b/upload_download/go.mod @@ -2,7 +2,7 @@ module goa.design/examples/upload_download go 1.26.0 -require goa.design/goa/v3 v3.31.0-preview.1.0.20260830104908-eb6472c49e99 +require goa.design/goa/v3 v3.31.0-preview.1.0.20260830175414-d176af092260 require ( github.com/dimfeld/httppath v0.0.0-20170720192232-ee938bf73598 // indirect diff --git a/upload_download/go.sum b/upload_download/go.sum index 30b4bff4e..0cac185a8 100644 --- a/upload_download/go.sum +++ b/upload_download/go.sum @@ -31,8 +31,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.31.0-preview.1.0.20260830104908-eb6472c49e99 h1:R+nByHCAoWOMSqo3yJYs17RBTTgdwnf3aiszLqPmEzU= -goa.design/goa/v3 v3.31.0-preview.1.0.20260830104908-eb6472c49e99/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.31.0-preview.1.0.20260830175414-d176af092260 h1:/xDlBPLY77lF13h194zLA3/5q8NU3y9UmF7VJCJbPB4= +goa.design/goa/v3 v3.31.0-preview.1.0.20260830175414-d176af092260/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= From 88b2d7d7ee5b529d60b31ce1ff09578549018df7 Mon Sep 17 00:00:00 2001 From: "Raphael (manual office deploy after cloud-state fix)" Date: Sun, 30 Aug 2026 12:34:16 -0700 Subject: [PATCH 26/28] chore: pin examples to final Goa preview --- basic/go.mod | 2 +- basic/go.sum | 4 ++-- cellar/go.mod | 2 +- cellar/go.sum | 4 ++-- concerts/go.mod | 2 +- concerts/go.sum | 4 ++-- cookies/go.mod | 2 +- cookies/go.sum | 4 ++-- encodings/cbor/go.mod | 2 +- encodings/cbor/go.sum | 4 ++-- encodings/text/go.mod | 2 +- encodings/text/go.sum | 4 ++-- error/go.mod | 2 +- error/go.sum | 4 ++-- files/go.mod | 2 +- files/go.sum | 4 ++-- httpstatus/go.mod | 3 ++- httpstatus/go.sum | 6 ++++-- interceptors/go.mod | 2 +- interceptors/go.sum | 4 ++-- multipart/go.mod | 2 +- multipart/go.sum | 4 ++-- retry/go.mod | 2 +- retry/go.sum | 4 ++-- security/hierarchy/go.mod | 2 +- security/hierarchy/go.sum | 4 ++-- security/multiauth/go.mod | 2 +- security/multiauth/go.sum | 4 ++-- sse/go.mod | 2 +- sse/go.sum | 4 ++-- streaming/go.mod | 2 +- streaming/go.sum | 4 ++-- tracing/go.mod | 2 +- tracing/go.sum | 4 ++-- tus/go.mod | 2 +- tus/go.sum | 4 ++-- upload_download/go.mod | 2 +- upload_download/go.sum | 4 ++-- 38 files changed, 60 insertions(+), 57 deletions(-) diff --git a/basic/go.mod b/basic/go.mod index 6d7217ddd..f145b379f 100644 --- a/basic/go.mod +++ b/basic/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( goa.design/clue v1.2.6 - goa.design/goa/v3 v3.31.0-preview.1.0.20260830175414-d176af092260 + goa.design/goa/v3 v3.31.0-preview.1.0.20260830192305-318c40614944 google.golang.org/grpc v1.83.1 google.golang.org/protobuf v1.36.12 ) diff --git a/basic/go.sum b/basic/go.sum index f4289daad..860a3d4d2 100644 --- a/basic/go.sum +++ b/basic/go.sum @@ -55,8 +55,8 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/clue v1.2.6 h1:ensyUkwlvEbNy8FuTGMldKuvaNouh8YoDY9QaE+EtYg= goa.design/clue v1.2.6/go.mod h1:Y4RS5o2k6MZiGk2PT3XbKyntjR2xkr8dYOKQ591dIDM= -goa.design/goa/v3 v3.31.0-preview.1.0.20260830175414-d176af092260 h1:/xDlBPLY77lF13h194zLA3/5q8NU3y9UmF7VJCJbPB4= -goa.design/goa/v3 v3.31.0-preview.1.0.20260830175414-d176af092260/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.31.0-preview.1.0.20260830192305-318c40614944 h1:1Ui2hEokREN21MBzSfcCsccb7Yq9z9IUFelMG3weKRQ= +goa.design/goa/v3 v3.31.0-preview.1.0.20260830192305-318c40614944/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/cellar/go.mod b/cellar/go.mod index 8542de424..d77b547a3 100644 --- a/cellar/go.mod +++ b/cellar/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( github.com/boltdb/bolt v1.3.1 - goa.design/goa/v3 v3.31.0-preview.1.0.20260830175414-d176af092260 + goa.design/goa/v3 v3.31.0-preview.1.0.20260830192305-318c40614944 google.golang.org/grpc v1.83.1 google.golang.org/protobuf v1.36.12 ) diff --git a/cellar/go.sum b/cellar/go.sum index 2f571605f..6a0a67303 100644 --- a/cellar/go.sum +++ b/cellar/go.sum @@ -51,8 +51,8 @@ go.opentelemetry.io/otel/trace v1.45.0 h1:l/mP6Uv7oNO7/TblbhpbgMidxhq1uO/rPsikOy go.opentelemetry.io/otel/trace v1.45.0/go.mod h1:qoJJA2xNMnxRrdISU/kLtfUH2wNeQbiv+jhs/CxI8bc= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.31.0-preview.1.0.20260830175414-d176af092260 h1:/xDlBPLY77lF13h194zLA3/5q8NU3y9UmF7VJCJbPB4= -goa.design/goa/v3 v3.31.0-preview.1.0.20260830175414-d176af092260/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.31.0-preview.1.0.20260830192305-318c40614944 h1:1Ui2hEokREN21MBzSfcCsccb7Yq9z9IUFelMG3weKRQ= +goa.design/goa/v3 v3.31.0-preview.1.0.20260830192305-318c40614944/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/concerts/go.mod b/concerts/go.mod index 60c2fa899..c8e249cfe 100644 --- a/concerts/go.mod +++ b/concerts/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( github.com/google/uuid v1.6.0 - goa.design/goa/v3 v3.31.0-preview.1.0.20260830175414-d176af092260 + goa.design/goa/v3 v3.31.0-preview.1.0.20260830192305-318c40614944 ) require ( diff --git a/concerts/go.sum b/concerts/go.sum index 0cac185a8..e95376934 100644 --- a/concerts/go.sum +++ b/concerts/go.sum @@ -31,8 +31,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.31.0-preview.1.0.20260830175414-d176af092260 h1:/xDlBPLY77lF13h194zLA3/5q8NU3y9UmF7VJCJbPB4= -goa.design/goa/v3 v3.31.0-preview.1.0.20260830175414-d176af092260/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.31.0-preview.1.0.20260830192305-318c40614944 h1:1Ui2hEokREN21MBzSfcCsccb7Yq9z9IUFelMG3weKRQ= +goa.design/goa/v3 v3.31.0-preview.1.0.20260830192305-318c40614944/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= diff --git a/cookies/go.mod b/cookies/go.mod index 92965b390..c2dcc9fbd 100644 --- a/cookies/go.mod +++ b/cookies/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( github.com/rs/xid v1.6.0 - goa.design/goa/v3 v3.31.0-preview.1.0.20260830175414-d176af092260 + goa.design/goa/v3 v3.31.0-preview.1.0.20260830192305-318c40614944 ) require ( diff --git a/cookies/go.sum b/cookies/go.sum index 1ecb3bf8d..025827e99 100644 --- a/cookies/go.sum +++ b/cookies/go.sum @@ -33,8 +33,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.31.0-preview.1.0.20260830175414-d176af092260 h1:/xDlBPLY77lF13h194zLA3/5q8NU3y9UmF7VJCJbPB4= -goa.design/goa/v3 v3.31.0-preview.1.0.20260830175414-d176af092260/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.31.0-preview.1.0.20260830192305-318c40614944 h1:1Ui2hEokREN21MBzSfcCsccb7Yq9z9IUFelMG3weKRQ= +goa.design/goa/v3 v3.31.0-preview.1.0.20260830192305-318c40614944/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= diff --git a/encodings/cbor/go.mod b/encodings/cbor/go.mod index d8d8132f4..bfe11c04f 100644 --- a/encodings/cbor/go.mod +++ b/encodings/cbor/go.mod @@ -5,7 +5,7 @@ go 1.26.0 require ( github.com/fxamacker/cbor/v2 v2.9.2 goa.design/clue v1.2.6 - goa.design/goa/v3 v3.31.0-preview.1.0.20260830175414-d176af092260 + goa.design/goa/v3 v3.31.0-preview.1.0.20260830192305-318c40614944 ) require ( diff --git a/encodings/cbor/go.sum b/encodings/cbor/go.sum index dabd8c0c7..e166b2e64 100644 --- a/encodings/cbor/go.sum +++ b/encodings/cbor/go.sum @@ -59,8 +59,8 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/clue v1.2.6 h1:ensyUkwlvEbNy8FuTGMldKuvaNouh8YoDY9QaE+EtYg= goa.design/clue v1.2.6/go.mod h1:Y4RS5o2k6MZiGk2PT3XbKyntjR2xkr8dYOKQ591dIDM= -goa.design/goa/v3 v3.31.0-preview.1.0.20260830175414-d176af092260 h1:/xDlBPLY77lF13h194zLA3/5q8NU3y9UmF7VJCJbPB4= -goa.design/goa/v3 v3.31.0-preview.1.0.20260830175414-d176af092260/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.31.0-preview.1.0.20260830192305-318c40614944 h1:1Ui2hEokREN21MBzSfcCsccb7Yq9z9IUFelMG3weKRQ= +goa.design/goa/v3 v3.31.0-preview.1.0.20260830192305-318c40614944/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/encodings/text/go.mod b/encodings/text/go.mod index 04584b18c..059cf8414 100644 --- a/encodings/text/go.mod +++ b/encodings/text/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( goa.design/clue v1.2.6 - goa.design/goa/v3 v3.31.0-preview.1.0.20260830175414-d176af092260 + goa.design/goa/v3 v3.31.0-preview.1.0.20260830192305-318c40614944 ) require ( diff --git a/encodings/text/go.sum b/encodings/text/go.sum index f4289daad..860a3d4d2 100644 --- a/encodings/text/go.sum +++ b/encodings/text/go.sum @@ -55,8 +55,8 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/clue v1.2.6 h1:ensyUkwlvEbNy8FuTGMldKuvaNouh8YoDY9QaE+EtYg= goa.design/clue v1.2.6/go.mod h1:Y4RS5o2k6MZiGk2PT3XbKyntjR2xkr8dYOKQ591dIDM= -goa.design/goa/v3 v3.31.0-preview.1.0.20260830175414-d176af092260 h1:/xDlBPLY77lF13h194zLA3/5q8NU3y9UmF7VJCJbPB4= -goa.design/goa/v3 v3.31.0-preview.1.0.20260830175414-d176af092260/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.31.0-preview.1.0.20260830192305-318c40614944 h1:1Ui2hEokREN21MBzSfcCsccb7Yq9z9IUFelMG3weKRQ= +goa.design/goa/v3 v3.31.0-preview.1.0.20260830192305-318c40614944/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/error/go.mod b/error/go.mod index 17797446e..fd6efe8b1 100644 --- a/error/go.mod +++ b/error/go.mod @@ -3,7 +3,7 @@ module goa.design/examples/error go 1.26.0 require ( - goa.design/goa/v3 v3.31.0-preview.1.0.20260830175414-d176af092260 + goa.design/goa/v3 v3.31.0-preview.1.0.20260830192305-318c40614944 google.golang.org/genproto v0.0.0-20260810153831-ec0a7760b754 google.golang.org/grpc v1.83.1 google.golang.org/protobuf v1.36.12 diff --git a/error/go.sum b/error/go.sum index 23b103d47..a10a14f89 100644 --- a/error/go.sum +++ b/error/go.sum @@ -49,8 +49,8 @@ go.opentelemetry.io/otel/trace v1.45.0 h1:l/mP6Uv7oNO7/TblbhpbgMidxhq1uO/rPsikOy go.opentelemetry.io/otel/trace v1.45.0/go.mod h1:qoJJA2xNMnxRrdISU/kLtfUH2wNeQbiv+jhs/CxI8bc= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.31.0-preview.1.0.20260830175414-d176af092260 h1:/xDlBPLY77lF13h194zLA3/5q8NU3y9UmF7VJCJbPB4= -goa.design/goa/v3 v3.31.0-preview.1.0.20260830175414-d176af092260/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.31.0-preview.1.0.20260830192305-318c40614944 h1:1Ui2hEokREN21MBzSfcCsccb7Yq9z9IUFelMG3weKRQ= +goa.design/goa/v3 v3.31.0-preview.1.0.20260830192305-318c40614944/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/files/go.mod b/files/go.mod index 13632295c..4c51d9848 100644 --- a/files/go.mod +++ b/files/go.mod @@ -2,7 +2,7 @@ module goa.design/examples/files go 1.26.0 -require goa.design/goa/v3 v3.31.0-preview.1.0.20260830175414-d176af092260 +require goa.design/goa/v3 v3.31.0-preview.1.0.20260830192305-318c40614944 require ( github.com/dimfeld/httppath v0.0.0-20170720192232-ee938bf73598 // indirect diff --git a/files/go.sum b/files/go.sum index 0cac185a8..e95376934 100644 --- a/files/go.sum +++ b/files/go.sum @@ -31,8 +31,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.31.0-preview.1.0.20260830175414-d176af092260 h1:/xDlBPLY77lF13h194zLA3/5q8NU3y9UmF7VJCJbPB4= -goa.design/goa/v3 v3.31.0-preview.1.0.20260830175414-d176af092260/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.31.0-preview.1.0.20260830192305-318c40614944 h1:1Ui2hEokREN21MBzSfcCsccb7Yq9z9IUFelMG3weKRQ= +goa.design/goa/v3 v3.31.0-preview.1.0.20260830192305-318c40614944/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= diff --git a/httpstatus/go.mod b/httpstatus/go.mod index 037d779b6..e6771d739 100644 --- a/httpstatus/go.mod +++ b/httpstatus/go.mod @@ -2,7 +2,7 @@ module goa.design/examples/httpstatus go 1.26.0 -require goa.design/goa/v3 v3.31.0-preview.1.0.20260830175414-d176af092260 +require goa.design/goa/v3 v3.31.0-preview.1.0.20260830192305-318c40614944 require ( github.com/dimfeld/httppath v0.0.0-20170720192232-ee938bf73598 // indirect @@ -19,6 +19,7 @@ require ( golang.org/x/sync v0.22.0 // indirect golang.org/x/text v0.41.0 // indirect golang.org/x/tools v0.49.0 // indirect + google.golang.org/protobuf v1.36.12 // indirect gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/httpstatus/go.sum b/httpstatus/go.sum index 7ee503697..e95376934 100644 --- a/httpstatus/go.sum +++ b/httpstatus/go.sum @@ -31,8 +31,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.31.0-preview.1.0.20260830175414-d176af092260 h1:/xDlBPLY77lF13h194zLA3/5q8NU3y9UmF7VJCJbPB4= -goa.design/goa/v3 v3.31.0-preview.1.0.20260830175414-d176af092260/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.31.0-preview.1.0.20260830192305-318c40614944 h1:1Ui2hEokREN21MBzSfcCsccb7Yq9z9IUFelMG3weKRQ= +goa.design/goa/v3 v3.31.0-preview.1.0.20260830192305-318c40614944/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= @@ -41,6 +41,8 @@ golang.org/x/text v0.41.0 h1:vz/seA0lnX87Othu2f/0L24RcgrXD9/YFTSuGjj3rH8= golang.org/x/text v0.41.0/go.mod h1:jvf1O8ajNzZqhSrQBPbutR/EB83Cc0CFrezNQIwbb5M= golang.org/x/tools v0.49.0 h1:3NI7VXzL9+1WZD52Dx2ttoPwD5DWrFGpl9mFZDlmisI= golang.org/x/tools v0.49.0/go.mod h1:SJNXV9DBKT0UbdttsQjbfJlAE/q+y36++zo3uL3N0Oo= +google.golang.org/protobuf v1.36.12 h1:pJOKDDOyeXErUroCihFAd5LQuwXBSpVnKGrj5o/fwxc= +google.golang.org/protobuf v1.36.12/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= diff --git a/interceptors/go.mod b/interceptors/go.mod index 8c8724046..35325e797 100644 --- a/interceptors/go.mod +++ b/interceptors/go.mod @@ -6,7 +6,7 @@ require ( github.com/google/uuid v1.6.0 github.com/gorilla/websocket v1.5.3 goa.design/clue v1.2.6 - goa.design/goa/v3 v3.31.0-preview.1.0.20260830175414-d176af092260 + goa.design/goa/v3 v3.31.0-preview.1.0.20260830192305-318c40614944 google.golang.org/grpc v1.83.1 google.golang.org/protobuf v1.36.12 ) diff --git a/interceptors/go.sum b/interceptors/go.sum index f4289daad..860a3d4d2 100644 --- a/interceptors/go.sum +++ b/interceptors/go.sum @@ -55,8 +55,8 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/clue v1.2.6 h1:ensyUkwlvEbNy8FuTGMldKuvaNouh8YoDY9QaE+EtYg= goa.design/clue v1.2.6/go.mod h1:Y4RS5o2k6MZiGk2PT3XbKyntjR2xkr8dYOKQ591dIDM= -goa.design/goa/v3 v3.31.0-preview.1.0.20260830175414-d176af092260 h1:/xDlBPLY77lF13h194zLA3/5q8NU3y9UmF7VJCJbPB4= -goa.design/goa/v3 v3.31.0-preview.1.0.20260830175414-d176af092260/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.31.0-preview.1.0.20260830192305-318c40614944 h1:1Ui2hEokREN21MBzSfcCsccb7Yq9z9IUFelMG3weKRQ= +goa.design/goa/v3 v3.31.0-preview.1.0.20260830192305-318c40614944/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/multipart/go.mod b/multipart/go.mod index 7c51aca5e..3108a8354 100644 --- a/multipart/go.mod +++ b/multipart/go.mod @@ -2,7 +2,7 @@ module goa.design/examples/multipart go 1.26.0 -require goa.design/goa/v3 v3.31.0-preview.1.0.20260830175414-d176af092260 +require goa.design/goa/v3 v3.31.0-preview.1.0.20260830192305-318c40614944 require ( github.com/dimfeld/httppath v0.0.0-20170720192232-ee938bf73598 // indirect diff --git a/multipart/go.sum b/multipart/go.sum index 0cac185a8..e95376934 100644 --- a/multipart/go.sum +++ b/multipart/go.sum @@ -31,8 +31,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.31.0-preview.1.0.20260830175414-d176af092260 h1:/xDlBPLY77lF13h194zLA3/5q8NU3y9UmF7VJCJbPB4= -goa.design/goa/v3 v3.31.0-preview.1.0.20260830175414-d176af092260/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.31.0-preview.1.0.20260830192305-318c40614944 h1:1Ui2hEokREN21MBzSfcCsccb7Yq9z9IUFelMG3weKRQ= +goa.design/goa/v3 v3.31.0-preview.1.0.20260830192305-318c40614944/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= diff --git a/retry/go.mod b/retry/go.mod index 9678501a1..30ab47035 100644 --- a/retry/go.mod +++ b/retry/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( goa.design/clue v1.2.6 - goa.design/goa/v3 v3.31.0-preview.1.0.20260830175414-d176af092260 + goa.design/goa/v3 v3.31.0-preview.1.0.20260830192305-318c40614944 google.golang.org/grpc v1.83.1 google.golang.org/protobuf v1.36.12 ) diff --git a/retry/go.sum b/retry/go.sum index f4289daad..860a3d4d2 100644 --- a/retry/go.sum +++ b/retry/go.sum @@ -55,8 +55,8 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/clue v1.2.6 h1:ensyUkwlvEbNy8FuTGMldKuvaNouh8YoDY9QaE+EtYg= goa.design/clue v1.2.6/go.mod h1:Y4RS5o2k6MZiGk2PT3XbKyntjR2xkr8dYOKQ591dIDM= -goa.design/goa/v3 v3.31.0-preview.1.0.20260830175414-d176af092260 h1:/xDlBPLY77lF13h194zLA3/5q8NU3y9UmF7VJCJbPB4= -goa.design/goa/v3 v3.31.0-preview.1.0.20260830175414-d176af092260/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.31.0-preview.1.0.20260830192305-318c40614944 h1:1Ui2hEokREN21MBzSfcCsccb7Yq9z9IUFelMG3weKRQ= +goa.design/goa/v3 v3.31.0-preview.1.0.20260830192305-318c40614944/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/security/hierarchy/go.mod b/security/hierarchy/go.mod index fa8ccde51..c1bdf8ba7 100644 --- a/security/hierarchy/go.mod +++ b/security/hierarchy/go.mod @@ -2,7 +2,7 @@ module goa.design/examples/security/hierarchy go 1.26.0 -require goa.design/goa/v3 v3.31.0-preview.1.0.20260830175414-d176af092260 +require goa.design/goa/v3 v3.31.0-preview.1.0.20260830192305-318c40614944 require ( github.com/dimfeld/httppath v0.0.0-20170720192232-ee938bf73598 // indirect diff --git a/security/hierarchy/go.sum b/security/hierarchy/go.sum index 0cac185a8..e95376934 100644 --- a/security/hierarchy/go.sum +++ b/security/hierarchy/go.sum @@ -31,8 +31,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.31.0-preview.1.0.20260830175414-d176af092260 h1:/xDlBPLY77lF13h194zLA3/5q8NU3y9UmF7VJCJbPB4= -goa.design/goa/v3 v3.31.0-preview.1.0.20260830175414-d176af092260/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.31.0-preview.1.0.20260830192305-318c40614944 h1:1Ui2hEokREN21MBzSfcCsccb7Yq9z9IUFelMG3weKRQ= +goa.design/goa/v3 v3.31.0-preview.1.0.20260830192305-318c40614944/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= diff --git a/security/multiauth/go.mod b/security/multiauth/go.mod index d1ce5b7c6..db7d4353f 100644 --- a/security/multiauth/go.mod +++ b/security/multiauth/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( github.com/golang-jwt/jwt/v4 v4.5.2 - goa.design/goa/v3 v3.31.0-preview.1.0.20260830175414-d176af092260 + goa.design/goa/v3 v3.31.0-preview.1.0.20260830192305-318c40614944 google.golang.org/grpc v1.83.1 google.golang.org/protobuf v1.36.12 ) diff --git a/security/multiauth/go.sum b/security/multiauth/go.sum index 3771fe301..cc8f08e34 100644 --- a/security/multiauth/go.sum +++ b/security/multiauth/go.sum @@ -51,8 +51,8 @@ go.opentelemetry.io/otel/trace v1.45.0 h1:l/mP6Uv7oNO7/TblbhpbgMidxhq1uO/rPsikOy go.opentelemetry.io/otel/trace v1.45.0/go.mod h1:qoJJA2xNMnxRrdISU/kLtfUH2wNeQbiv+jhs/CxI8bc= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.31.0-preview.1.0.20260830175414-d176af092260 h1:/xDlBPLY77lF13h194zLA3/5q8NU3y9UmF7VJCJbPB4= -goa.design/goa/v3 v3.31.0-preview.1.0.20260830175414-d176af092260/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.31.0-preview.1.0.20260830192305-318c40614944 h1:1Ui2hEokREN21MBzSfcCsccb7Yq9z9IUFelMG3weKRQ= +goa.design/goa/v3 v3.31.0-preview.1.0.20260830192305-318c40614944/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/sse/go.mod b/sse/go.mod index 6b85b2a3e..dc67fb92e 100644 --- a/sse/go.mod +++ b/sse/go.mod @@ -5,7 +5,7 @@ go 1.26.0 require ( github.com/shirou/gopsutil/v3 v3.24.5 goa.design/clue v1.2.6 - goa.design/goa/v3 v3.31.0-preview.1.0.20260830175414-d176af092260 + goa.design/goa/v3 v3.31.0-preview.1.0.20260830192305-318c40614944 ) require ( diff --git a/sse/go.sum b/sse/go.sum index 32b79f40b..d3dcb96b7 100644 --- a/sse/go.sum +++ b/sse/go.sum @@ -74,8 +74,8 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/clue v1.2.6 h1:ensyUkwlvEbNy8FuTGMldKuvaNouh8YoDY9QaE+EtYg= goa.design/clue v1.2.6/go.mod h1:Y4RS5o2k6MZiGk2PT3XbKyntjR2xkr8dYOKQ591dIDM= -goa.design/goa/v3 v3.31.0-preview.1.0.20260830175414-d176af092260 h1:/xDlBPLY77lF13h194zLA3/5q8NU3y9UmF7VJCJbPB4= -goa.design/goa/v3 v3.31.0-preview.1.0.20260830175414-d176af092260/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.31.0-preview.1.0.20260830192305-318c40614944 h1:1Ui2hEokREN21MBzSfcCsccb7Yq9z9IUFelMG3weKRQ= +goa.design/goa/v3 v3.31.0-preview.1.0.20260830192305-318c40614944/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/streaming/go.mod b/streaming/go.mod index 7446f18c5..830440e28 100644 --- a/streaming/go.mod +++ b/streaming/go.mod @@ -5,7 +5,7 @@ go 1.26.0 require ( github.com/golang-jwt/jwt/v4 v4.5.2 github.com/gorilla/websocket v1.5.3 - goa.design/goa/v3 v3.31.0-preview.1.0.20260830175414-d176af092260 + goa.design/goa/v3 v3.31.0-preview.1.0.20260830192305-318c40614944 google.golang.org/grpc v1.83.1 google.golang.org/protobuf v1.36.12 ) diff --git a/streaming/go.sum b/streaming/go.sum index 3771fe301..cc8f08e34 100644 --- a/streaming/go.sum +++ b/streaming/go.sum @@ -51,8 +51,8 @@ go.opentelemetry.io/otel/trace v1.45.0 h1:l/mP6Uv7oNO7/TblbhpbgMidxhq1uO/rPsikOy go.opentelemetry.io/otel/trace v1.45.0/go.mod h1:qoJJA2xNMnxRrdISU/kLtfUH2wNeQbiv+jhs/CxI8bc= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.31.0-preview.1.0.20260830175414-d176af092260 h1:/xDlBPLY77lF13h194zLA3/5q8NU3y9UmF7VJCJbPB4= -goa.design/goa/v3 v3.31.0-preview.1.0.20260830175414-d176af092260/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.31.0-preview.1.0.20260830192305-318c40614944 h1:1Ui2hEokREN21MBzSfcCsccb7Yq9z9IUFelMG3weKRQ= +goa.design/goa/v3 v3.31.0-preview.1.0.20260830192305-318c40614944/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/tracing/go.mod b/tracing/go.mod index df51edf9f..d0c6b6e07 100644 --- a/tracing/go.mod +++ b/tracing/go.mod @@ -5,7 +5,7 @@ go 1.26.0 require ( github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 goa.design/examples/basic v0.0.0-20260810182504-f834f43955c5 - goa.design/goa/v3 v3.31.0-preview.1.0.20260830175414-d176af092260 + goa.design/goa/v3 v3.31.0-preview.1.0.20260830192305-318c40614944 google.golang.org/grpc v1.83.1 ) diff --git a/tracing/go.sum b/tracing/go.sum index 62bda4398..11fc794cc 100644 --- a/tracing/go.sum +++ b/tracing/go.sum @@ -81,8 +81,8 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/examples/basic v0.0.0-20260810182504-f834f43955c5 h1:SRSrUaLTTdA4bUXb8+zA5MDhMEx8YaP+Knd+pddBcrg= goa.design/examples/basic v0.0.0-20260810182504-f834f43955c5/go.mod h1:XRziIzNcLb9fk7ZrfiHx5FIeAj+orJ4fkzLG0nXpiAo= -goa.design/goa/v3 v3.31.0-preview.1.0.20260830175414-d176af092260 h1:/xDlBPLY77lF13h194zLA3/5q8NU3y9UmF7VJCJbPB4= -goa.design/goa/v3 v3.31.0-preview.1.0.20260830175414-d176af092260/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.31.0-preview.1.0.20260830192305-318c40614944 h1:1Ui2hEokREN21MBzSfcCsccb7Yq9z9IUFelMG3weKRQ= +goa.design/goa/v3 v3.31.0-preview.1.0.20260830192305-318c40614944/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= diff --git a/tus/go.mod b/tus/go.mod index a6f7cf1e9..c2aceb1b3 100644 --- a/tus/go.mod +++ b/tus/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( github.com/rs/xid v1.6.0 - goa.design/goa/v3 v3.31.0-preview.1.0.20260830175414-d176af092260 + goa.design/goa/v3 v3.31.0-preview.1.0.20260830192305-318c40614944 ) require ( diff --git a/tus/go.sum b/tus/go.sum index 1ecb3bf8d..025827e99 100644 --- a/tus/go.sum +++ b/tus/go.sum @@ -33,8 +33,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.31.0-preview.1.0.20260830175414-d176af092260 h1:/xDlBPLY77lF13h194zLA3/5q8NU3y9UmF7VJCJbPB4= -goa.design/goa/v3 v3.31.0-preview.1.0.20260830175414-d176af092260/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.31.0-preview.1.0.20260830192305-318c40614944 h1:1Ui2hEokREN21MBzSfcCsccb7Yq9z9IUFelMG3weKRQ= +goa.design/goa/v3 v3.31.0-preview.1.0.20260830192305-318c40614944/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= diff --git a/upload_download/go.mod b/upload_download/go.mod index e8c565c10..f3fa03ee4 100644 --- a/upload_download/go.mod +++ b/upload_download/go.mod @@ -2,7 +2,7 @@ module goa.design/examples/upload_download go 1.26.0 -require goa.design/goa/v3 v3.31.0-preview.1.0.20260830175414-d176af092260 +require goa.design/goa/v3 v3.31.0-preview.1.0.20260830192305-318c40614944 require ( github.com/dimfeld/httppath v0.0.0-20170720192232-ee938bf73598 // indirect diff --git a/upload_download/go.sum b/upload_download/go.sum index 0cac185a8..e95376934 100644 --- a/upload_download/go.sum +++ b/upload_download/go.sum @@ -31,8 +31,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.31.0-preview.1.0.20260830175414-d176af092260 h1:/xDlBPLY77lF13h194zLA3/5q8NU3y9UmF7VJCJbPB4= -goa.design/goa/v3 v3.31.0-preview.1.0.20260830175414-d176af092260/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.31.0-preview.1.0.20260830192305-318c40614944 h1:1Ui2hEokREN21MBzSfcCsccb7Yq9z9IUFelMG3weKRQ= +goa.design/goa/v3 v3.31.0-preview.1.0.20260830192305-318c40614944/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= From 9733bcdbc0c67114b1f0af2753ebb5b3bd7ba7f6 Mon Sep 17 00:00:00 2001 From: Raphael Simon Date: Sun, 30 Aug 2026 22:52:06 -0700 Subject: [PATCH 27/28] Pin Goa v3.31.0-preview.3 --- basic/gen/goa.json | 2 +- basic/go.mod | 2 +- basic/go.sum | 4 +- cellar/gen/goa.json | 2 +- .../gen/http/storage/client/encode_decode.go | 86 ++++++----- cellar/gen/http/storage/client/types.go | 137 ++++++++---------- cellar/go.mod | 2 +- cellar/go.sum | 4 +- concerts/gen/goa.json | 2 +- concerts/go.mod | 2 +- concerts/go.sum | 4 +- cookies/gen/goa.json | 2 +- cookies/go.mod | 2 +- cookies/go.sum | 4 +- encodings/cbor/gen/goa.json | 2 +- encodings/cbor/go.mod | 2 +- encodings/cbor/go.sum | 4 +- encodings/text/gen/goa.json | 2 +- encodings/text/go.mod | 2 +- encodings/text/go.sum | 4 +- error/gen/goa.json | 2 +- error/go.mod | 2 +- error/go.sum | 4 +- files/gen/goa.json | 2 +- files/go.mod | 2 +- files/go.sum | 4 +- httpstatus/gen/goa.json | 2 +- httpstatus/go.mod | 2 +- httpstatus/go.sum | 4 +- interceptors/gen/goa.json | 2 +- interceptors/go.mod | 2 +- interceptors/go.sum | 4 +- multipart/gen/goa.json | 2 +- multipart/go.mod | 2 +- multipart/go.sum | 4 +- retry/gen/goa.json | 2 +- retry/go.mod | 2 +- retry/go.sum | 4 +- security/hierarchy/gen/goa.json | 2 +- security/hierarchy/go.mod | 2 +- security/hierarchy/go.sum | 4 +- security/multiauth/gen/goa.json | 2 +- security/multiauth/go.mod | 2 +- security/multiauth/go.sum | 4 +- sse/gen/goa.json | 2 +- sse/go.mod | 2 +- sse/go.sum | 4 +- streaming/gen/goa.json | 2 +- .../gen/http/chatter/client/encode_decode.go | 21 +-- streaming/gen/http/chatter/client/types.go | 30 +++- .../gen/http/chatter/client/websocket.go | 74 +++++++--- streaming/go.mod | 2 +- streaming/go.sum | 4 +- tracing/go.mod | 2 +- tracing/go.sum | 4 +- tus/gen/goa.json | 2 +- tus/go.mod | 2 +- tus/go.sum | 4 +- upload_download/gen/goa.json | 2 +- upload_download/go.mod | 2 +- upload_download/go.sum | 4 +- 61 files changed, 274 insertions(+), 224 deletions(-) diff --git a/basic/gen/goa.json b/basic/gen/goa.json index 924afff50..f3581f210 100644 --- a/basic/gen/goa.json +++ b/basic/gen/goa.json @@ -1,3 +1,3 @@ { - "goa_version": "v3.31.0-preview.1" + "goa_version": "v3.31.0-preview.3" } \ No newline at end of file diff --git a/basic/go.mod b/basic/go.mod index f145b379f..a8c689cc7 100644 --- a/basic/go.mod +++ b/basic/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( goa.design/clue v1.2.6 - goa.design/goa/v3 v3.31.0-preview.1.0.20260830192305-318c40614944 + goa.design/goa/v3 v3.31.0-preview.3 google.golang.org/grpc v1.83.1 google.golang.org/protobuf v1.36.12 ) diff --git a/basic/go.sum b/basic/go.sum index 860a3d4d2..8cb2179ab 100644 --- a/basic/go.sum +++ b/basic/go.sum @@ -55,8 +55,8 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/clue v1.2.6 h1:ensyUkwlvEbNy8FuTGMldKuvaNouh8YoDY9QaE+EtYg= goa.design/clue v1.2.6/go.mod h1:Y4RS5o2k6MZiGk2PT3XbKyntjR2xkr8dYOKQ591dIDM= -goa.design/goa/v3 v3.31.0-preview.1.0.20260830192305-318c40614944 h1:1Ui2hEokREN21MBzSfcCsccb7Yq9z9IUFelMG3weKRQ= -goa.design/goa/v3 v3.31.0-preview.1.0.20260830192305-318c40614944/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.31.0-preview.3 h1:E0vYOE/KbU7eogc+RJ7WXIDZGIbUkueC/i5KAzuhI/k= +goa.design/goa/v3 v3.31.0-preview.3/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/cellar/gen/goa.json b/cellar/gen/goa.json index 924afff50..f3581f210 100644 --- a/cellar/gen/goa.json +++ b/cellar/gen/goa.json @@ -1,3 +1,3 @@ { - "goa_version": "v3.31.0-preview.1" + "goa_version": "v3.31.0-preview.3" } \ No newline at end of file diff --git a/cellar/gen/http/storage/client/encode_decode.go b/cellar/gen/http/storage/client/encode_decode.go index 1fd6c0adb..fc91437f2 100644 --- a/cellar/gen/http/storage/client/encode_decode.go +++ b/cellar/gen/http/storage/client/encode_decode.go @@ -20,6 +20,7 @@ import ( storage "goa.design/examples/cellar/gen/storage" storageviews "goa.design/examples/cellar/gen/storage/views" goahttp "goa.design/goa/v3/http" + goa "goa.design/goa/v3/pkg" ) // BuildListRequest instantiates a HTTP request object with method and path set @@ -162,26 +163,54 @@ func DecodeShowResponse(decoder func(*http.Response) goahttp.Decoder, restoreBod } switch resp.StatusCode { case http.StatusOK: - var ( - body ShowResponseBody - err error - ) - err = decoder(resp).Decode(&body) - if err != nil { - return nil, goahttp.ErrDecodingError("storage", "show", err) - } - err = ValidateShowResponseBody(&body) - if err != nil { - return nil, goahttp.ErrValidationError("storage", "show", err) - } - p := NewShowStoredBottleOK(&body) view := resp.Header.Get("goa-view") - vres := &storageviews.StoredBottle{Projected: p, View: view} - if err = storageviews.ValidateStoredBottle(vres); err != nil { - return nil, goahttp.ErrValidationError("storage", "show", err) + if view == "" { + view = "default" + } + switch view { + case "default": + var ( + body ShowResponseBody + err error + ) + err = decoder(resp).Decode(&body) + if err != nil { + return nil, goahttp.ErrDecodingError("storage", "show", err) + } + err = ValidateShowResponseBody(&body) + if err != nil { + return nil, goahttp.ErrValidationError("storage", "show", err) + } + p := NewShowResultDefaultOK(&body) + vres := &storageviews.StoredBottle{Projected: p, View: view} + if err = storageviews.ValidateStoredBottle(vres); err != nil { + return nil, goahttp.ErrValidationError("storage", "show", err) + } + res := storage.NewStoredBottle(vres) + return res, nil + case "tiny": + var ( + body ShowResponseBodyTiny + err error + ) + err = decoder(resp).Decode(&body) + if err != nil { + return nil, goahttp.ErrDecodingError("storage", "show", err) + } + err = ValidateShowResponseBodyTiny(&body) + if err != nil { + return nil, goahttp.ErrValidationError("storage", "show", err) + } + p := NewShowResultTinyOK(&body) + vres := &storageviews.StoredBottle{Projected: p, View: view} + if err = storageviews.ValidateStoredBottle(vres); err != nil { + return nil, goahttp.ErrValidationError("storage", "show", err) + } + res := storage.NewStoredBottle(vres) + return res, nil + default: + return nil, goahttp.ErrValidationError("storage", "show", goa.InvalidEnumValueError("view", view, []any{"default", "tiny"})) } - res := storage.NewStoredBottle(vres) - return res, nil case http.StatusNotFound: var ( body ShowNotFoundResponseBody @@ -603,14 +632,14 @@ func unmarshalStoredBottleResponseTinyToStorageviewsStoredBottleView(v *StoredBo ID: v.ID, Name: v.Name, } - res.Winery = unmarshalWineryResponseTinyToStorageviewsWineryView(v.Winery) + res.Winery = unmarshalWineryTinyToStorageviewsWineryView(v.Winery) return res } -// unmarshalWineryResponseTinyToStorageviewsWineryView builds a value of type -// *storageviews.WineryView from a value of type *WineryResponseTiny. -func unmarshalWineryResponseTinyToStorageviewsWineryView(v *WineryResponseTiny) *storageviews.WineryView { +// unmarshalWineryTinyToStorageviewsWineryView builds a value of type +// *storageviews.WineryView from a value of type *WineryTiny. +func unmarshalWineryTinyToStorageviewsWineryView(v *WineryTiny) *storageviews.WineryView { res := &storageviews.WineryView{ Name: v.Name, } @@ -618,19 +647,6 @@ func unmarshalWineryResponseTinyToStorageviewsWineryView(v *WineryResponseTiny) return res } -// unmarshalWineryResponseBodyToStorageviewsWineryView builds a value of type -// *storageviews.WineryView from a value of type *WineryResponseBody. -func unmarshalWineryResponseBodyToStorageviewsWineryView(v *WineryResponseBody) *storageviews.WineryView { - res := &storageviews.WineryView{ - Name: v.Name, - Region: v.Region, - Country: v.Country, - URL: v.URL, - } - - return res -} - // unmarshalComponentResponseBodyToStorageviewsComponentView builds a value of // type *storageviews.ComponentView from a value of type *ComponentResponseBody. func unmarshalComponentResponseBodyToStorageviewsComponentView(v *ComponentResponseBody) *storageviews.ComponentView { diff --git a/cellar/gen/http/storage/client/types.go b/cellar/gen/http/storage/client/types.go index 2cf75d826..c06023cbe 100644 --- a/cellar/gen/http/storage/client/types.go +++ b/cellar/gen/http/storage/client/types.go @@ -51,7 +51,7 @@ type ShowResponseBody struct { // Name of bottle Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"` // Winery that produces wine - Winery *WineryResponseBody `form:"winery,omitempty" json:"winery,omitempty" xml:"winery,omitempty"` + Winery *WineryTiny `form:"winery,omitempty" json:"winery,omitempty" xml:"winery,omitempty"` // Vintage of bottle Vintage *uint32 `form:"vintage,omitempty" json:"vintage,omitempty" xml:"vintage,omitempty"` // Composition is the list of grape varietals and associated percentage. @@ -62,6 +62,17 @@ type ShowResponseBody struct { Rating *uint32 `form:"rating,omitempty" json:"rating,omitempty" xml:"rating,omitempty"` } +// ShowResponseBodyTiny is the type of the "storage" service "show" endpoint +// HTTP response body. +type ShowResponseBodyTiny struct { + // ID is the unique id of the bottle. + ID *string `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"` + // Name of bottle + Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"` + // Winery that produces wine + Winery *WineryTiny `form:"winery,omitempty" json:"winery,omitempty" xml:"winery,omitempty"` +} + // ShowNotFoundResponseBody is the type of the "storage" service "show" // endpoint HTTP response body for the "not_found" error. type ShowNotFoundResponseBody struct { @@ -78,25 +89,13 @@ type StoredBottleResponseTiny struct { // Name of bottle Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"` // Winery that produces wine - Winery *WineryResponseTiny `form:"winery,omitempty" json:"winery,omitempty" xml:"winery,omitempty"` -} - -// WineryResponseTiny is used to define fields on response body types. -type WineryResponseTiny struct { - // Name of winery - Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"` + Winery *WineryTiny `form:"winery,omitempty" json:"winery,omitempty" xml:"winery,omitempty"` } -// WineryResponseBody is used to define fields on response body types. -type WineryResponseBody struct { +// WineryTiny is used to define fields on response body types. +type WineryTiny struct { // Name of winery Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"` - // Region of winery - Region *string `form:"region,omitempty" json:"region,omitempty" xml:"region,omitempty"` - // Country of winery - Country *string `form:"country,omitempty" json:"country,omitempty" xml:"country,omitempty"` - // Winery website URL - URL *string `form:"url,omitempty" json:"url,omitempty" xml:"url,omitempty"` } // ComponentResponseBody is used to define fields on response body types. @@ -216,9 +215,9 @@ func NewListStoredBottleCollectionOK(body StoredBottleResponseTinyCollection) st return v } -// NewShowStoredBottleOK builds a "storage" service "show" endpoint result from -// a HTTP "OK" response. -func NewShowStoredBottleOK(body *ShowResponseBody) *storageviews.StoredBottleView { +// NewShowResultDefaultOK builds a "storage" service "show" endpoint result +// from a HTTP "OK" response. +func NewShowResultDefaultOK(body *ShowResponseBody) *storageviews.StoredBottleView { v := &storageviews.StoredBottleView{ ID: body.ID, Name: body.Name, @@ -226,7 +225,7 @@ func NewShowStoredBottleOK(body *ShowResponseBody) *storageviews.StoredBottleVie Description: body.Description, Rating: body.Rating, } - v.Winery = unmarshalWineryResponseBodyToStorageviewsWineryView(body.Winery) + v.Winery = unmarshalWineryTinyToStorageviewsWineryView(body.Winery) if body.Composition != nil { v.Composition = make([]*storageviews.ComponentView, len(body.Composition)) for i, val := range body.Composition { @@ -241,6 +240,18 @@ func NewShowStoredBottleOK(body *ShowResponseBody) *storageviews.StoredBottleVie return v } +// NewShowResultTinyOK builds a "storage" service "show" endpoint result from a +// HTTP "OK" response. +func NewShowResultTinyOK(body *ShowResponseBodyTiny) *storageviews.StoredBottleView { + v := &storageviews.StoredBottleView{ + ID: body.ID, + Name: body.Name, + } + v.Winery = unmarshalWineryTinyToStorageviewsWineryView(body.Winery) + + return v +} + // NewShowNotFound builds a storage service show endpoint not_found error. func NewShowNotFound(body *ShowNotFoundResponseBody) *storage.NotFound { v := &storage.NotFound{ @@ -284,7 +295,7 @@ func ValidateShowResponseBody(body *ShowResponseBody) (err error) { } } if body.Winery != nil { - if err2 := validateWineryResponseBody(body.Winery, "body.winery"); err2 != nil { + if err2 := validateWineryTiny(body.Winery, "body.winery"); err2 != nil { err = goa.MergeErrors(err, err2) } } @@ -319,6 +330,31 @@ func ValidateShowResponseBody(body *ShowResponseBody) (err error) { return } +// ValidateShowResponseBodyTiny runs the validations defined on +// ShowResponseBodyTiny +func ValidateShowResponseBodyTiny(body *ShowResponseBodyTiny) (err error) { + if body.ID == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("id", "body")) + } + if body.Name == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("name", "body")) + } + if body.Winery == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("winery", "body")) + } + if body.Name != nil { + if utf8.RuneCountInString(*body.Name) > 100 { + err = goa.MergeErrors(err, goa.InvalidLengthError("body.name", *body.Name, utf8.RuneCountInString(*body.Name), 100, false)) + } + } + if body.Winery != nil { + if err2 := validateWineryTiny(body.Winery, "body.winery"); err2 != nil { + err = goa.MergeErrors(err, err2) + } + } + return +} + // ValidateShowNotFoundResponseBody runs the validations defined on // ShowNotFoundResponseBody func ValidateShowNotFoundResponseBody(body *ShowNotFoundResponseBody) (err error) { @@ -349,7 +385,7 @@ func ValidateStoredBottleResponseTiny(body *StoredBottleResponseTiny) (err error } } if body.Winery != nil { - if err2 := validateWineryResponseTiny(body.Winery, "body.winery"); err2 != nil { + if err2 := validateWineryTiny(body.Winery, "body.winery"); err2 != nil { err = goa.MergeErrors(err, err2) } } @@ -374,74 +410,27 @@ func validateStoredBottleResponseTiny(body *StoredBottleResponseTiny, path strin } } if body.Winery != nil { - if err2 := validateWineryResponseTiny(body.Winery, path+".winery"); err2 != nil { + if err2 := validateWineryTiny(body.Winery, path+".winery"); err2 != nil { err = goa.MergeErrors(err, err2) } } return } -// ValidateWineryResponseTiny runs the validations defined on WineryTiny -func ValidateWineryResponseTiny(body *WineryResponseTiny) (err error) { - if body.Name == nil { - err = goa.MergeErrors(err, goa.MissingFieldError("name", "body")) - } - return -} - -// validateWineryResponseTiny checks WineryTiny and reports errors using the -// path supplied by its caller -func validateWineryResponseTiny(body *WineryResponseTiny, path string) (err error) { - if body.Name == nil { - err = goa.MergeErrors(err, goa.MissingFieldError("name", path)) - } - return -} - -// ValidateWineryResponseBody runs the validations defined on Winery -func ValidateWineryResponseBody(body *WineryResponseBody) (err error) { +// ValidateWineryTiny runs the validations defined on WineryTiny +func ValidateWineryTiny(body *WineryTiny) (err error) { if body.Name == nil { err = goa.MergeErrors(err, goa.MissingFieldError("name", "body")) } - if body.Region == nil { - err = goa.MergeErrors(err, goa.MissingFieldError("region", "body")) - } - if body.Country == nil { - err = goa.MergeErrors(err, goa.MissingFieldError("country", "body")) - } - if body.Region != nil { - err = goa.MergeErrors(err, goa.ValidatePattern("body.region", *body.Region, "[a-zA-Z '\\.]+")) - } - if body.Country != nil { - err = goa.MergeErrors(err, goa.ValidatePattern("body.country", *body.Country, "[a-zA-Z '\\.]+")) - } - if body.URL != nil { - err = goa.MergeErrors(err, goa.ValidatePattern("body.url", *body.URL, "^(https?|ftp)://[^\\s/$.?#].[^\\s]*$")) - } return } -// validateWineryResponseBody checks Winery and reports errors using the path +// validateWineryTiny checks WineryTiny and reports errors using the path // supplied by its caller -func validateWineryResponseBody(body *WineryResponseBody, path string) (err error) { +func validateWineryTiny(body *WineryTiny, path string) (err error) { if body.Name == nil { err = goa.MergeErrors(err, goa.MissingFieldError("name", path)) } - if body.Region == nil { - err = goa.MergeErrors(err, goa.MissingFieldError("region", path)) - } - if body.Country == nil { - err = goa.MergeErrors(err, goa.MissingFieldError("country", path)) - } - if body.Region != nil { - err = goa.MergeErrors(err, goa.ValidatePattern(path+".region", *body.Region, "[a-zA-Z '\\.]+")) - } - if body.Country != nil { - err = goa.MergeErrors(err, goa.ValidatePattern(path+".country", *body.Country, "[a-zA-Z '\\.]+")) - } - if body.URL != nil { - err = goa.MergeErrors(err, goa.ValidatePattern(path+".url", *body.URL, "^(https?|ftp)://[^\\s/$.?#].[^\\s]*$")) - } return } diff --git a/cellar/go.mod b/cellar/go.mod index d77b547a3..0df9e387a 100644 --- a/cellar/go.mod +++ b/cellar/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( github.com/boltdb/bolt v1.3.1 - goa.design/goa/v3 v3.31.0-preview.1.0.20260830192305-318c40614944 + goa.design/goa/v3 v3.31.0-preview.3 google.golang.org/grpc v1.83.1 google.golang.org/protobuf v1.36.12 ) diff --git a/cellar/go.sum b/cellar/go.sum index 6a0a67303..405e5c2b0 100644 --- a/cellar/go.sum +++ b/cellar/go.sum @@ -51,8 +51,8 @@ go.opentelemetry.io/otel/trace v1.45.0 h1:l/mP6Uv7oNO7/TblbhpbgMidxhq1uO/rPsikOy go.opentelemetry.io/otel/trace v1.45.0/go.mod h1:qoJJA2xNMnxRrdISU/kLtfUH2wNeQbiv+jhs/CxI8bc= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.31.0-preview.1.0.20260830192305-318c40614944 h1:1Ui2hEokREN21MBzSfcCsccb7Yq9z9IUFelMG3weKRQ= -goa.design/goa/v3 v3.31.0-preview.1.0.20260830192305-318c40614944/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.31.0-preview.3 h1:E0vYOE/KbU7eogc+RJ7WXIDZGIbUkueC/i5KAzuhI/k= +goa.design/goa/v3 v3.31.0-preview.3/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/concerts/gen/goa.json b/concerts/gen/goa.json index 924afff50..f3581f210 100644 --- a/concerts/gen/goa.json +++ b/concerts/gen/goa.json @@ -1,3 +1,3 @@ { - "goa_version": "v3.31.0-preview.1" + "goa_version": "v3.31.0-preview.3" } \ No newline at end of file diff --git a/concerts/go.mod b/concerts/go.mod index c8e249cfe..a76b5e9a6 100644 --- a/concerts/go.mod +++ b/concerts/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( github.com/google/uuid v1.6.0 - goa.design/goa/v3 v3.31.0-preview.1.0.20260830192305-318c40614944 + goa.design/goa/v3 v3.31.0-preview.3 ) require ( diff --git a/concerts/go.sum b/concerts/go.sum index e95376934..a12325815 100644 --- a/concerts/go.sum +++ b/concerts/go.sum @@ -31,8 +31,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.31.0-preview.1.0.20260830192305-318c40614944 h1:1Ui2hEokREN21MBzSfcCsccb7Yq9z9IUFelMG3weKRQ= -goa.design/goa/v3 v3.31.0-preview.1.0.20260830192305-318c40614944/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.31.0-preview.3 h1:E0vYOE/KbU7eogc+RJ7WXIDZGIbUkueC/i5KAzuhI/k= +goa.design/goa/v3 v3.31.0-preview.3/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= diff --git a/cookies/gen/goa.json b/cookies/gen/goa.json index 924afff50..f3581f210 100644 --- a/cookies/gen/goa.json +++ b/cookies/gen/goa.json @@ -1,3 +1,3 @@ { - "goa_version": "v3.31.0-preview.1" + "goa_version": "v3.31.0-preview.3" } \ No newline at end of file diff --git a/cookies/go.mod b/cookies/go.mod index c2dcc9fbd..49b765dd3 100644 --- a/cookies/go.mod +++ b/cookies/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( github.com/rs/xid v1.6.0 - goa.design/goa/v3 v3.31.0-preview.1.0.20260830192305-318c40614944 + goa.design/goa/v3 v3.31.0-preview.3 ) require ( diff --git a/cookies/go.sum b/cookies/go.sum index 025827e99..a31fd1994 100644 --- a/cookies/go.sum +++ b/cookies/go.sum @@ -33,8 +33,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.31.0-preview.1.0.20260830192305-318c40614944 h1:1Ui2hEokREN21MBzSfcCsccb7Yq9z9IUFelMG3weKRQ= -goa.design/goa/v3 v3.31.0-preview.1.0.20260830192305-318c40614944/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.31.0-preview.3 h1:E0vYOE/KbU7eogc+RJ7WXIDZGIbUkueC/i5KAzuhI/k= +goa.design/goa/v3 v3.31.0-preview.3/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= diff --git a/encodings/cbor/gen/goa.json b/encodings/cbor/gen/goa.json index 924afff50..f3581f210 100644 --- a/encodings/cbor/gen/goa.json +++ b/encodings/cbor/gen/goa.json @@ -1,3 +1,3 @@ { - "goa_version": "v3.31.0-preview.1" + "goa_version": "v3.31.0-preview.3" } \ No newline at end of file diff --git a/encodings/cbor/go.mod b/encodings/cbor/go.mod index bfe11c04f..379a8e88f 100644 --- a/encodings/cbor/go.mod +++ b/encodings/cbor/go.mod @@ -5,7 +5,7 @@ go 1.26.0 require ( github.com/fxamacker/cbor/v2 v2.9.2 goa.design/clue v1.2.6 - goa.design/goa/v3 v3.31.0-preview.1.0.20260830192305-318c40614944 + goa.design/goa/v3 v3.31.0-preview.3 ) require ( diff --git a/encodings/cbor/go.sum b/encodings/cbor/go.sum index e166b2e64..1b01a6d0c 100644 --- a/encodings/cbor/go.sum +++ b/encodings/cbor/go.sum @@ -59,8 +59,8 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/clue v1.2.6 h1:ensyUkwlvEbNy8FuTGMldKuvaNouh8YoDY9QaE+EtYg= goa.design/clue v1.2.6/go.mod h1:Y4RS5o2k6MZiGk2PT3XbKyntjR2xkr8dYOKQ591dIDM= -goa.design/goa/v3 v3.31.0-preview.1.0.20260830192305-318c40614944 h1:1Ui2hEokREN21MBzSfcCsccb7Yq9z9IUFelMG3weKRQ= -goa.design/goa/v3 v3.31.0-preview.1.0.20260830192305-318c40614944/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.31.0-preview.3 h1:E0vYOE/KbU7eogc+RJ7WXIDZGIbUkueC/i5KAzuhI/k= +goa.design/goa/v3 v3.31.0-preview.3/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/encodings/text/gen/goa.json b/encodings/text/gen/goa.json index 924afff50..f3581f210 100644 --- a/encodings/text/gen/goa.json +++ b/encodings/text/gen/goa.json @@ -1,3 +1,3 @@ { - "goa_version": "v3.31.0-preview.1" + "goa_version": "v3.31.0-preview.3" } \ No newline at end of file diff --git a/encodings/text/go.mod b/encodings/text/go.mod index 059cf8414..10b6fd72d 100644 --- a/encodings/text/go.mod +++ b/encodings/text/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( goa.design/clue v1.2.6 - goa.design/goa/v3 v3.31.0-preview.1.0.20260830192305-318c40614944 + goa.design/goa/v3 v3.31.0-preview.3 ) require ( diff --git a/encodings/text/go.sum b/encodings/text/go.sum index 860a3d4d2..8cb2179ab 100644 --- a/encodings/text/go.sum +++ b/encodings/text/go.sum @@ -55,8 +55,8 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/clue v1.2.6 h1:ensyUkwlvEbNy8FuTGMldKuvaNouh8YoDY9QaE+EtYg= goa.design/clue v1.2.6/go.mod h1:Y4RS5o2k6MZiGk2PT3XbKyntjR2xkr8dYOKQ591dIDM= -goa.design/goa/v3 v3.31.0-preview.1.0.20260830192305-318c40614944 h1:1Ui2hEokREN21MBzSfcCsccb7Yq9z9IUFelMG3weKRQ= -goa.design/goa/v3 v3.31.0-preview.1.0.20260830192305-318c40614944/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.31.0-preview.3 h1:E0vYOE/KbU7eogc+RJ7WXIDZGIbUkueC/i5KAzuhI/k= +goa.design/goa/v3 v3.31.0-preview.3/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/error/gen/goa.json b/error/gen/goa.json index 924afff50..f3581f210 100644 --- a/error/gen/goa.json +++ b/error/gen/goa.json @@ -1,3 +1,3 @@ { - "goa_version": "v3.31.0-preview.1" + "goa_version": "v3.31.0-preview.3" } \ No newline at end of file diff --git a/error/go.mod b/error/go.mod index fd6efe8b1..ac1f7cfc8 100644 --- a/error/go.mod +++ b/error/go.mod @@ -3,7 +3,7 @@ module goa.design/examples/error go 1.26.0 require ( - goa.design/goa/v3 v3.31.0-preview.1.0.20260830192305-318c40614944 + goa.design/goa/v3 v3.31.0-preview.3 google.golang.org/genproto v0.0.0-20260810153831-ec0a7760b754 google.golang.org/grpc v1.83.1 google.golang.org/protobuf v1.36.12 diff --git a/error/go.sum b/error/go.sum index a10a14f89..9347026f4 100644 --- a/error/go.sum +++ b/error/go.sum @@ -49,8 +49,8 @@ go.opentelemetry.io/otel/trace v1.45.0 h1:l/mP6Uv7oNO7/TblbhpbgMidxhq1uO/rPsikOy go.opentelemetry.io/otel/trace v1.45.0/go.mod h1:qoJJA2xNMnxRrdISU/kLtfUH2wNeQbiv+jhs/CxI8bc= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.31.0-preview.1.0.20260830192305-318c40614944 h1:1Ui2hEokREN21MBzSfcCsccb7Yq9z9IUFelMG3weKRQ= -goa.design/goa/v3 v3.31.0-preview.1.0.20260830192305-318c40614944/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.31.0-preview.3 h1:E0vYOE/KbU7eogc+RJ7WXIDZGIbUkueC/i5KAzuhI/k= +goa.design/goa/v3 v3.31.0-preview.3/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/files/gen/goa.json b/files/gen/goa.json index 924afff50..f3581f210 100644 --- a/files/gen/goa.json +++ b/files/gen/goa.json @@ -1,3 +1,3 @@ { - "goa_version": "v3.31.0-preview.1" + "goa_version": "v3.31.0-preview.3" } \ No newline at end of file diff --git a/files/go.mod b/files/go.mod index 4c51d9848..1257c0534 100644 --- a/files/go.mod +++ b/files/go.mod @@ -2,7 +2,7 @@ module goa.design/examples/files go 1.26.0 -require goa.design/goa/v3 v3.31.0-preview.1.0.20260830192305-318c40614944 +require goa.design/goa/v3 v3.31.0-preview.3 require ( github.com/dimfeld/httppath v0.0.0-20170720192232-ee938bf73598 // indirect diff --git a/files/go.sum b/files/go.sum index e95376934..a12325815 100644 --- a/files/go.sum +++ b/files/go.sum @@ -31,8 +31,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.31.0-preview.1.0.20260830192305-318c40614944 h1:1Ui2hEokREN21MBzSfcCsccb7Yq9z9IUFelMG3weKRQ= -goa.design/goa/v3 v3.31.0-preview.1.0.20260830192305-318c40614944/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.31.0-preview.3 h1:E0vYOE/KbU7eogc+RJ7WXIDZGIbUkueC/i5KAzuhI/k= +goa.design/goa/v3 v3.31.0-preview.3/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= diff --git a/httpstatus/gen/goa.json b/httpstatus/gen/goa.json index 924afff50..f3581f210 100644 --- a/httpstatus/gen/goa.json +++ b/httpstatus/gen/goa.json @@ -1,3 +1,3 @@ { - "goa_version": "v3.31.0-preview.1" + "goa_version": "v3.31.0-preview.3" } \ No newline at end of file diff --git a/httpstatus/go.mod b/httpstatus/go.mod index e6771d739..d623c27fb 100644 --- a/httpstatus/go.mod +++ b/httpstatus/go.mod @@ -2,7 +2,7 @@ module goa.design/examples/httpstatus go 1.26.0 -require goa.design/goa/v3 v3.31.0-preview.1.0.20260830192305-318c40614944 +require goa.design/goa/v3 v3.31.0-preview.3 require ( github.com/dimfeld/httppath v0.0.0-20170720192232-ee938bf73598 // indirect diff --git a/httpstatus/go.sum b/httpstatus/go.sum index e95376934..a12325815 100644 --- a/httpstatus/go.sum +++ b/httpstatus/go.sum @@ -31,8 +31,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.31.0-preview.1.0.20260830192305-318c40614944 h1:1Ui2hEokREN21MBzSfcCsccb7Yq9z9IUFelMG3weKRQ= -goa.design/goa/v3 v3.31.0-preview.1.0.20260830192305-318c40614944/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.31.0-preview.3 h1:E0vYOE/KbU7eogc+RJ7WXIDZGIbUkueC/i5KAzuhI/k= +goa.design/goa/v3 v3.31.0-preview.3/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= diff --git a/interceptors/gen/goa.json b/interceptors/gen/goa.json index 924afff50..f3581f210 100644 --- a/interceptors/gen/goa.json +++ b/interceptors/gen/goa.json @@ -1,3 +1,3 @@ { - "goa_version": "v3.31.0-preview.1" + "goa_version": "v3.31.0-preview.3" } \ No newline at end of file diff --git a/interceptors/go.mod b/interceptors/go.mod index 35325e797..d89a7ee0f 100644 --- a/interceptors/go.mod +++ b/interceptors/go.mod @@ -6,7 +6,7 @@ require ( github.com/google/uuid v1.6.0 github.com/gorilla/websocket v1.5.3 goa.design/clue v1.2.6 - goa.design/goa/v3 v3.31.0-preview.1.0.20260830192305-318c40614944 + goa.design/goa/v3 v3.31.0-preview.3 google.golang.org/grpc v1.83.1 google.golang.org/protobuf v1.36.12 ) diff --git a/interceptors/go.sum b/interceptors/go.sum index 860a3d4d2..8cb2179ab 100644 --- a/interceptors/go.sum +++ b/interceptors/go.sum @@ -55,8 +55,8 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/clue v1.2.6 h1:ensyUkwlvEbNy8FuTGMldKuvaNouh8YoDY9QaE+EtYg= goa.design/clue v1.2.6/go.mod h1:Y4RS5o2k6MZiGk2PT3XbKyntjR2xkr8dYOKQ591dIDM= -goa.design/goa/v3 v3.31.0-preview.1.0.20260830192305-318c40614944 h1:1Ui2hEokREN21MBzSfcCsccb7Yq9z9IUFelMG3weKRQ= -goa.design/goa/v3 v3.31.0-preview.1.0.20260830192305-318c40614944/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.31.0-preview.3 h1:E0vYOE/KbU7eogc+RJ7WXIDZGIbUkueC/i5KAzuhI/k= +goa.design/goa/v3 v3.31.0-preview.3/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/multipart/gen/goa.json b/multipart/gen/goa.json index 924afff50..f3581f210 100644 --- a/multipart/gen/goa.json +++ b/multipart/gen/goa.json @@ -1,3 +1,3 @@ { - "goa_version": "v3.31.0-preview.1" + "goa_version": "v3.31.0-preview.3" } \ No newline at end of file diff --git a/multipart/go.mod b/multipart/go.mod index 3108a8354..051b43630 100644 --- a/multipart/go.mod +++ b/multipart/go.mod @@ -2,7 +2,7 @@ module goa.design/examples/multipart go 1.26.0 -require goa.design/goa/v3 v3.31.0-preview.1.0.20260830192305-318c40614944 +require goa.design/goa/v3 v3.31.0-preview.3 require ( github.com/dimfeld/httppath v0.0.0-20170720192232-ee938bf73598 // indirect diff --git a/multipart/go.sum b/multipart/go.sum index e95376934..a12325815 100644 --- a/multipart/go.sum +++ b/multipart/go.sum @@ -31,8 +31,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.31.0-preview.1.0.20260830192305-318c40614944 h1:1Ui2hEokREN21MBzSfcCsccb7Yq9z9IUFelMG3weKRQ= -goa.design/goa/v3 v3.31.0-preview.1.0.20260830192305-318c40614944/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.31.0-preview.3 h1:E0vYOE/KbU7eogc+RJ7WXIDZGIbUkueC/i5KAzuhI/k= +goa.design/goa/v3 v3.31.0-preview.3/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= diff --git a/retry/gen/goa.json b/retry/gen/goa.json index 924afff50..f3581f210 100644 --- a/retry/gen/goa.json +++ b/retry/gen/goa.json @@ -1,3 +1,3 @@ { - "goa_version": "v3.31.0-preview.1" + "goa_version": "v3.31.0-preview.3" } \ No newline at end of file diff --git a/retry/go.mod b/retry/go.mod index 30ab47035..53e460078 100644 --- a/retry/go.mod +++ b/retry/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( goa.design/clue v1.2.6 - goa.design/goa/v3 v3.31.0-preview.1.0.20260830192305-318c40614944 + goa.design/goa/v3 v3.31.0-preview.3 google.golang.org/grpc v1.83.1 google.golang.org/protobuf v1.36.12 ) diff --git a/retry/go.sum b/retry/go.sum index 860a3d4d2..8cb2179ab 100644 --- a/retry/go.sum +++ b/retry/go.sum @@ -55,8 +55,8 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/clue v1.2.6 h1:ensyUkwlvEbNy8FuTGMldKuvaNouh8YoDY9QaE+EtYg= goa.design/clue v1.2.6/go.mod h1:Y4RS5o2k6MZiGk2PT3XbKyntjR2xkr8dYOKQ591dIDM= -goa.design/goa/v3 v3.31.0-preview.1.0.20260830192305-318c40614944 h1:1Ui2hEokREN21MBzSfcCsccb7Yq9z9IUFelMG3weKRQ= -goa.design/goa/v3 v3.31.0-preview.1.0.20260830192305-318c40614944/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.31.0-preview.3 h1:E0vYOE/KbU7eogc+RJ7WXIDZGIbUkueC/i5KAzuhI/k= +goa.design/goa/v3 v3.31.0-preview.3/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/security/hierarchy/gen/goa.json b/security/hierarchy/gen/goa.json index 924afff50..f3581f210 100644 --- a/security/hierarchy/gen/goa.json +++ b/security/hierarchy/gen/goa.json @@ -1,3 +1,3 @@ { - "goa_version": "v3.31.0-preview.1" + "goa_version": "v3.31.0-preview.3" } \ No newline at end of file diff --git a/security/hierarchy/go.mod b/security/hierarchy/go.mod index c1bdf8ba7..65ec73abc 100644 --- a/security/hierarchy/go.mod +++ b/security/hierarchy/go.mod @@ -2,7 +2,7 @@ module goa.design/examples/security/hierarchy go 1.26.0 -require goa.design/goa/v3 v3.31.0-preview.1.0.20260830192305-318c40614944 +require goa.design/goa/v3 v3.31.0-preview.3 require ( github.com/dimfeld/httppath v0.0.0-20170720192232-ee938bf73598 // indirect diff --git a/security/hierarchy/go.sum b/security/hierarchy/go.sum index e95376934..a12325815 100644 --- a/security/hierarchy/go.sum +++ b/security/hierarchy/go.sum @@ -31,8 +31,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.31.0-preview.1.0.20260830192305-318c40614944 h1:1Ui2hEokREN21MBzSfcCsccb7Yq9z9IUFelMG3weKRQ= -goa.design/goa/v3 v3.31.0-preview.1.0.20260830192305-318c40614944/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.31.0-preview.3 h1:E0vYOE/KbU7eogc+RJ7WXIDZGIbUkueC/i5KAzuhI/k= +goa.design/goa/v3 v3.31.0-preview.3/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= diff --git a/security/multiauth/gen/goa.json b/security/multiauth/gen/goa.json index 924afff50..f3581f210 100644 --- a/security/multiauth/gen/goa.json +++ b/security/multiauth/gen/goa.json @@ -1,3 +1,3 @@ { - "goa_version": "v3.31.0-preview.1" + "goa_version": "v3.31.0-preview.3" } \ No newline at end of file diff --git a/security/multiauth/go.mod b/security/multiauth/go.mod index db7d4353f..9befc5652 100644 --- a/security/multiauth/go.mod +++ b/security/multiauth/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( github.com/golang-jwt/jwt/v4 v4.5.2 - goa.design/goa/v3 v3.31.0-preview.1.0.20260830192305-318c40614944 + goa.design/goa/v3 v3.31.0-preview.3 google.golang.org/grpc v1.83.1 google.golang.org/protobuf v1.36.12 ) diff --git a/security/multiauth/go.sum b/security/multiauth/go.sum index cc8f08e34..9d8bcf35d 100644 --- a/security/multiauth/go.sum +++ b/security/multiauth/go.sum @@ -51,8 +51,8 @@ go.opentelemetry.io/otel/trace v1.45.0 h1:l/mP6Uv7oNO7/TblbhpbgMidxhq1uO/rPsikOy go.opentelemetry.io/otel/trace v1.45.0/go.mod h1:qoJJA2xNMnxRrdISU/kLtfUH2wNeQbiv+jhs/CxI8bc= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.31.0-preview.1.0.20260830192305-318c40614944 h1:1Ui2hEokREN21MBzSfcCsccb7Yq9z9IUFelMG3weKRQ= -goa.design/goa/v3 v3.31.0-preview.1.0.20260830192305-318c40614944/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.31.0-preview.3 h1:E0vYOE/KbU7eogc+RJ7WXIDZGIbUkueC/i5KAzuhI/k= +goa.design/goa/v3 v3.31.0-preview.3/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/sse/gen/goa.json b/sse/gen/goa.json index 924afff50..f3581f210 100644 --- a/sse/gen/goa.json +++ b/sse/gen/goa.json @@ -1,3 +1,3 @@ { - "goa_version": "v3.31.0-preview.1" + "goa_version": "v3.31.0-preview.3" } \ No newline at end of file diff --git a/sse/go.mod b/sse/go.mod index dc67fb92e..a46e02989 100644 --- a/sse/go.mod +++ b/sse/go.mod @@ -5,7 +5,7 @@ go 1.26.0 require ( github.com/shirou/gopsutil/v3 v3.24.5 goa.design/clue v1.2.6 - goa.design/goa/v3 v3.31.0-preview.1.0.20260830192305-318c40614944 + goa.design/goa/v3 v3.31.0-preview.3 ) require ( diff --git a/sse/go.sum b/sse/go.sum index d3dcb96b7..b54a89557 100644 --- a/sse/go.sum +++ b/sse/go.sum @@ -74,8 +74,8 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/clue v1.2.6 h1:ensyUkwlvEbNy8FuTGMldKuvaNouh8YoDY9QaE+EtYg= goa.design/clue v1.2.6/go.mod h1:Y4RS5o2k6MZiGk2PT3XbKyntjR2xkr8dYOKQ591dIDM= -goa.design/goa/v3 v3.31.0-preview.1.0.20260830192305-318c40614944 h1:1Ui2hEokREN21MBzSfcCsccb7Yq9z9IUFelMG3weKRQ= -goa.design/goa/v3 v3.31.0-preview.1.0.20260830192305-318c40614944/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.31.0-preview.3 h1:E0vYOE/KbU7eogc+RJ7WXIDZGIbUkueC/i5KAzuhI/k= +goa.design/goa/v3 v3.31.0-preview.3/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/streaming/gen/goa.json b/streaming/gen/goa.json index 924afff50..f3581f210 100644 --- a/streaming/gen/goa.json +++ b/streaming/gen/goa.json @@ -1,3 +1,3 @@ { - "goa_version": "v3.31.0-preview.1" + "goa_version": "v3.31.0-preview.3" } \ No newline at end of file diff --git a/streaming/gen/http/chatter/client/encode_decode.go b/streaming/gen/http/chatter/client/encode_decode.go index 0891c01e7..05f187c72 100644 --- a/streaming/gen/http/chatter/client/encode_decode.go +++ b/streaming/gen/http/chatter/client/encode_decode.go @@ -630,26 +630,7 @@ func DecodeHistoryResponse(decoder func(*http.Response) goahttp.Decoder, restore } switch resp.StatusCode { case http.StatusOK: - var ( - body HistoryResponseBody - err error - ) - err = decoder(resp).Decode(&body) - if err != nil { - return nil, goahttp.ErrDecodingError("chatter", "history", err) - } - err = ValidateHistoryResponseBody(&body) - if err != nil { - return nil, goahttp.ErrValidationError("chatter", "history", err) - } - p := NewHistoryChatSummaryOK(&body) - view := resp.Header.Get("goa-view") - vres := &chatterviews.ChatSummary{Projected: p, View: view} - if err = chatterviews.ValidateChatSummary(vres); err != nil { - return nil, goahttp.ErrValidationError("chatter", "history", err) - } - res := chatter.NewChatSummary(vres) - return res, nil + return nil, nil case http.StatusForbidden: var ( body string diff --git a/streaming/gen/http/chatter/client/types.go b/streaming/gen/http/chatter/client/types.go index 91f002faa..1cdfe5357 100644 --- a/streaming/gen/http/chatter/client/types.go +++ b/streaming/gen/http/chatter/client/types.go @@ -27,6 +27,13 @@ type SubscribeResponseBody struct { AddedAt *string `form:"added_at,omitempty" json:"added_at,omitempty" xml:"added_at,omitempty"` } +// HistoryResponseBodyTiny is the type of the "chatter" service "history" +// endpoint HTTP response body. +type HistoryResponseBodyTiny struct { + // Message sent to the server + Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"` +} + // HistoryResponseBody is the type of the "chatter" service "history" endpoint // HTTP response body. type HistoryResponseBody struct { @@ -147,9 +154,19 @@ func NewSubscribeUnauthorized(body string) chatter.Unauthorized { return v } -// NewHistoryChatSummaryOK builds a "chatter" service "history" endpoint result +// NewHistoryResultTinyOK builds a "chatter" service "history" endpoint result // from a HTTP "OK" response. -func NewHistoryChatSummaryOK(body *HistoryResponseBody) *chatterviews.ChatSummaryView { +func NewHistoryResultTinyOK(body *HistoryResponseBodyTiny) *chatterviews.ChatSummaryView { + v := &chatterviews.ChatSummaryView{ + Message: body.Message, + } + + return v +} + +// NewHistoryResultDefaultOK builds a "chatter" service "history" endpoint +// result from a HTTP "OK" response. +func NewHistoryResultDefaultOK(body *HistoryResponseBody) *chatterviews.ChatSummaryView { v := &chatterviews.ChatSummaryView{ Message: body.Message, Length: body.Length, @@ -211,6 +228,15 @@ func ValidateSubscribeResponseBody(body *SubscribeResponseBody) (err error) { return } +// ValidateHistoryResponseBodyTiny runs the validations defined on +// HistoryResponseBodyTiny +func ValidateHistoryResponseBodyTiny(body *HistoryResponseBodyTiny) (err error) { + if body.Message == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("message", "body")) + } + return +} + // ValidateHistoryResponseBody runs the validations defined on // HistoryResponseBody func ValidateHistoryResponseBody(body *HistoryResponseBody) (err error) { diff --git a/streaming/gen/http/chatter/client/websocket.go b/streaming/gen/http/chatter/client/websocket.go index 356b52a37..439147820 100644 --- a/streaming/gen/http/chatter/client/websocket.go +++ b/streaming/gen/http/chatter/client/websocket.go @@ -15,6 +15,7 @@ import ( chatter "goa.design/examples/streaming/gen/chatter" chatterviews "goa.design/examples/streaming/gen/chatter/views" goahttp "goa.design/goa/v3/http" + goa "goa.design/goa/v3/pkg" ) // ConnConfigurer holds the websocket connection configurer functions for the @@ -55,7 +56,7 @@ type SubscribeClientStream struct { type HistoryClientStream struct { // conn is the underlying websocket connection. conn *websocket.Conn - // view is the view to render result type before sending to the websocket + // view is the result view used to decode values received from the websocket // connection. view string } @@ -162,6 +163,10 @@ func (s *SummaryClientStream) CloseAndRecv() (chatter.ChatSummaryCollection, err if err != nil { return rv, err } + err = ValidateChatSummaryResponseCollection(body) + if err != nil { + return rv, err + } res := NewSummaryChatSummaryCollectionOK(body) vres := chatterviews.ChatSummaryCollection{Projected: res, View: "default"} if err := chatterviews.ValidateChatSummaryCollection(vres); err != nil { @@ -223,24 +228,57 @@ func (s *SubscribeClientStream) RecvWithContext(ctx context.Context) (*chatter.E // websocket connection. func (s *HistoryClientStream) Recv() (*chatter.ChatSummary, error) { var ( - rv *chatter.ChatSummary - body HistoryResponseBody - err error + rv *chatter.ChatSummary + err error ) - err = s.conn.ReadJSON(&body) - if websocket.IsCloseError(err, websocket.CloseNormalClosure) { - s.conn.Close() - return rv, io.EOF - } - if err != nil { - return rv, err + view := s.view + if view == "" { + view = "default" } - res := NewHistoryChatSummaryOK(&body) - vres := &chatterviews.ChatSummary{Projected: res, View: s.view} - if err := chatterviews.ValidateChatSummary(vres); err != nil { - return rv, goahttp.ErrValidationError("chatter", "history", err) + switch view { + case "tiny": + var body HistoryResponseBodyTiny + err = s.conn.ReadJSON(&body) + if websocket.IsCloseError(err, websocket.CloseNormalClosure) { + s.conn.Close() + return rv, io.EOF + } + if err != nil { + return rv, err + } + err = ValidateHistoryResponseBodyTiny(&body) + if err != nil { + return rv, err + } + res := NewHistoryResultTinyOK(&body) + vres := &chatterviews.ChatSummary{Projected: res, View: view} + if err := chatterviews.ValidateChatSummary(vres); err != nil { + return rv, goahttp.ErrValidationError("chatter", "history", err) + } + return chatter.NewChatSummary(vres), nil + case "default": + var body HistoryResponseBody + err = s.conn.ReadJSON(&body) + if websocket.IsCloseError(err, websocket.CloseNormalClosure) { + s.conn.Close() + return rv, io.EOF + } + if err != nil { + return rv, err + } + err = ValidateHistoryResponseBody(&body) + if err != nil { + return rv, err + } + res := NewHistoryResultDefaultOK(&body) + vres := &chatterviews.ChatSummary{Projected: res, View: view} + if err := chatterviews.ValidateChatSummary(vres); err != nil { + return rv, goahttp.ErrValidationError("chatter", "history", err) + } + return chatter.NewChatSummary(vres), nil + default: + return rv, goahttp.ErrValidationError("chatter", "history", goa.InvalidEnumValueError("view", view, []any{"tiny", "default"})) } - return chatter.NewChatSummary(vres), nil } // RecvWithContext reads instances of "chatter.ChatSummary" from the "history" @@ -249,8 +287,8 @@ func (s *HistoryClientStream) RecvWithContext(ctx context.Context) (*chatter.Cha return s.Recv() } -// SetView sets the view to render the type before sending to the "history" -// endpoint websocket connection. +// SetView sets the result view used to decode values received from the +// "history" endpoint websocket connection. func (s *HistoryClientStream) SetView(view string) { s.view = view } diff --git a/streaming/go.mod b/streaming/go.mod index 830440e28..f7815271a 100644 --- a/streaming/go.mod +++ b/streaming/go.mod @@ -5,7 +5,7 @@ go 1.26.0 require ( github.com/golang-jwt/jwt/v4 v4.5.2 github.com/gorilla/websocket v1.5.3 - goa.design/goa/v3 v3.31.0-preview.1.0.20260830192305-318c40614944 + goa.design/goa/v3 v3.31.0-preview.3 google.golang.org/grpc v1.83.1 google.golang.org/protobuf v1.36.12 ) diff --git a/streaming/go.sum b/streaming/go.sum index cc8f08e34..9d8bcf35d 100644 --- a/streaming/go.sum +++ b/streaming/go.sum @@ -51,8 +51,8 @@ go.opentelemetry.io/otel/trace v1.45.0 h1:l/mP6Uv7oNO7/TblbhpbgMidxhq1uO/rPsikOy go.opentelemetry.io/otel/trace v1.45.0/go.mod h1:qoJJA2xNMnxRrdISU/kLtfUH2wNeQbiv+jhs/CxI8bc= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.31.0-preview.1.0.20260830192305-318c40614944 h1:1Ui2hEokREN21MBzSfcCsccb7Yq9z9IUFelMG3weKRQ= -goa.design/goa/v3 v3.31.0-preview.1.0.20260830192305-318c40614944/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.31.0-preview.3 h1:E0vYOE/KbU7eogc+RJ7WXIDZGIbUkueC/i5KAzuhI/k= +goa.design/goa/v3 v3.31.0-preview.3/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/tracing/go.mod b/tracing/go.mod index d0c6b6e07..f19e8f2dd 100644 --- a/tracing/go.mod +++ b/tracing/go.mod @@ -5,7 +5,7 @@ go 1.26.0 require ( github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 goa.design/examples/basic v0.0.0-20260810182504-f834f43955c5 - goa.design/goa/v3 v3.31.0-preview.1.0.20260830192305-318c40614944 + goa.design/goa/v3 v3.31.0-preview.3 google.golang.org/grpc v1.83.1 ) diff --git a/tracing/go.sum b/tracing/go.sum index 11fc794cc..2a696392d 100644 --- a/tracing/go.sum +++ b/tracing/go.sum @@ -81,8 +81,8 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/examples/basic v0.0.0-20260810182504-f834f43955c5 h1:SRSrUaLTTdA4bUXb8+zA5MDhMEx8YaP+Knd+pddBcrg= goa.design/examples/basic v0.0.0-20260810182504-f834f43955c5/go.mod h1:XRziIzNcLb9fk7ZrfiHx5FIeAj+orJ4fkzLG0nXpiAo= -goa.design/goa/v3 v3.31.0-preview.1.0.20260830192305-318c40614944 h1:1Ui2hEokREN21MBzSfcCsccb7Yq9z9IUFelMG3weKRQ= -goa.design/goa/v3 v3.31.0-preview.1.0.20260830192305-318c40614944/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.31.0-preview.3 h1:E0vYOE/KbU7eogc+RJ7WXIDZGIbUkueC/i5KAzuhI/k= +goa.design/goa/v3 v3.31.0-preview.3/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= diff --git a/tus/gen/goa.json b/tus/gen/goa.json index 924afff50..f3581f210 100644 --- a/tus/gen/goa.json +++ b/tus/gen/goa.json @@ -1,3 +1,3 @@ { - "goa_version": "v3.31.0-preview.1" + "goa_version": "v3.31.0-preview.3" } \ No newline at end of file diff --git a/tus/go.mod b/tus/go.mod index c2aceb1b3..07630c2bb 100644 --- a/tus/go.mod +++ b/tus/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( github.com/rs/xid v1.6.0 - goa.design/goa/v3 v3.31.0-preview.1.0.20260830192305-318c40614944 + goa.design/goa/v3 v3.31.0-preview.3 ) require ( diff --git a/tus/go.sum b/tus/go.sum index 025827e99..a31fd1994 100644 --- a/tus/go.sum +++ b/tus/go.sum @@ -33,8 +33,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.31.0-preview.1.0.20260830192305-318c40614944 h1:1Ui2hEokREN21MBzSfcCsccb7Yq9z9IUFelMG3weKRQ= -goa.design/goa/v3 v3.31.0-preview.1.0.20260830192305-318c40614944/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.31.0-preview.3 h1:E0vYOE/KbU7eogc+RJ7WXIDZGIbUkueC/i5KAzuhI/k= +goa.design/goa/v3 v3.31.0-preview.3/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= diff --git a/upload_download/gen/goa.json b/upload_download/gen/goa.json index 924afff50..f3581f210 100644 --- a/upload_download/gen/goa.json +++ b/upload_download/gen/goa.json @@ -1,3 +1,3 @@ { - "goa_version": "v3.31.0-preview.1" + "goa_version": "v3.31.0-preview.3" } \ No newline at end of file diff --git a/upload_download/go.mod b/upload_download/go.mod index f3fa03ee4..cb0a0b5f5 100644 --- a/upload_download/go.mod +++ b/upload_download/go.mod @@ -2,7 +2,7 @@ module goa.design/examples/upload_download go 1.26.0 -require goa.design/goa/v3 v3.31.0-preview.1.0.20260830192305-318c40614944 +require goa.design/goa/v3 v3.31.0-preview.3 require ( github.com/dimfeld/httppath v0.0.0-20170720192232-ee938bf73598 // indirect diff --git a/upload_download/go.sum b/upload_download/go.sum index e95376934..a12325815 100644 --- a/upload_download/go.sum +++ b/upload_download/go.sum @@ -31,8 +31,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.31.0-preview.1.0.20260830192305-318c40614944 h1:1Ui2hEokREN21MBzSfcCsccb7Yq9z9IUFelMG3weKRQ= -goa.design/goa/v3 v3.31.0-preview.1.0.20260830192305-318c40614944/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.31.0-preview.3 h1:E0vYOE/KbU7eogc+RJ7WXIDZGIbUkueC/i5KAzuhI/k= +goa.design/goa/v3 v3.31.0-preview.3/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= From adcc1bcc3e8b72116e4b44fc24d40eb007683818 Mon Sep 17 00:00:00 2001 From: Raphael Simon Date: Wed, 16 Sep 2026 00:14:57 -0700 Subject: [PATCH 28/28] Sync examples with the stable Goa generation candidate --- README.md | 12 ++++++-- basic/gen/goa.json | 2 +- basic/go.mod | 2 +- basic/go.sum | 4 +-- cellar/gen/goa.json | 2 +- cellar/gen/grpc/storage/client/types.go | 6 ---- cellar/gen/grpc/storage/server/types.go | 6 ---- cellar/go.mod | 2 +- cellar/go.sum | 4 +-- concerts/gen/goa.json | 2 +- concerts/go.mod | 3 +- concerts/go.sum | 6 ++-- cookies/gen/goa.json | 2 +- cookies/go.mod | 3 +- cookies/go.sum | 6 ++-- encodings/cbor/gen/goa.json | 2 +- encodings/cbor/go.mod | 2 +- encodings/cbor/go.sum | 4 +-- encodings/text/gen/goa.json | 2 +- encodings/text/go.mod | 2 +- encodings/text/go.sum | 4 +-- error/gen/goa.json | 2 +- error/go.mod | 2 +- error/go.sum | 4 +-- files/gen/goa.json | 2 +- files/go.mod | 3 +- files/go.sum | 6 ++-- httpstatus/gen/goa.json | 2 +- httpstatus/go.mod | 3 +- httpstatus/go.sum | 6 ++-- interceptors/gen/goa.json | 2 +- interceptors/go.mod | 2 +- interceptors/go.sum | 4 +-- multipart/gen/goa.json | 2 +- multipart/go.mod | 3 +- multipart/go.sum | 6 ++-- retry/gen/goa.json | 2 +- retry/go.mod | 2 +- retry/go.sum | 4 +-- .../gen/api_key_service/endpoints.go | 4 +-- .../gen/default_service/endpoints.go | 2 +- security/hierarchy/gen/goa.json | 2 +- .../api_key_service/server/encode_decode.go | 10 +++---- .../default_service/client/encode_decode.go | 2 +- .../default_service/server/encode_decode.go | 4 +-- .../gen/http/default_service/server/types.go | 4 ++- security/hierarchy/go.mod | 3 +- security/hierarchy/go.sum | 6 ++-- security/multiauth/gen/goa.json | 2 +- .../secured_service/server/encode_decode.go | 20 ++++++------- .../secured_service/client/encode_decode.go | 14 ++++++--- .../secured_service/server/encode_decode.go | 30 +++++++++---------- .../gen/http/secured_service/server/types.go | 8 +++-- .../gen/secured_service/endpoints.go | 18 +++++------ security/multiauth/go.mod | 2 +- security/multiauth/go.sum | 4 +-- sse/gen/goa.json | 2 +- sse/go.mod | 2 +- sse/go.sum | 4 +-- streaming/gen/chatter/endpoints.go | 12 ++++---- streaming/gen/goa.json | 2 +- .../gen/grpc/chatter/server/encode_decode.go | 25 +++++++--------- .../gen/http/chatter/client/encode_decode.go | 2 +- .../gen/http/chatter/server/encode_decode.go | 29 +++++++----------- streaming/gen/http/chatter/server/types.go | 4 ++- streaming/go.mod | 2 +- streaming/go.sum | 4 +-- tracing/go.mod | 2 +- tracing/go.sum | 4 +-- tus/gen/goa.json | 2 +- tus/go.mod | 3 +- tus/go.sum | 6 ++-- upload_download/gen/goa.json | 2 +- upload_download/go.mod | 3 +- upload_download/go.sum | 6 ++-- 75 files changed, 202 insertions(+), 184 deletions(-) diff --git a/README.md b/README.md index 0180fe1e8..60714ff9a 100644 --- a/README.md +++ b/README.md @@ -4,11 +4,19 @@ This repository contains examples of microservices implemented using [Goa](https://github.com/goadesign/goa). Each example focuses on a specific topic as indicated by -the directory name. The [cellar](https://github.com/goadesign/examples/tree/master/cellar) example +the directory name. The [cellar](https://github.com/goadesign/examples/tree/main/cellar) example provides a complete implementation of a simple microservice. -The [retry](https://github.com/goadesign/examples/tree/master/retry) example shows how generated +The [retry](https://github.com/goadesign/examples/tree/main/retry) example shows how generated HTTP and gRPC clients safely retry temporary failures. +The v3.31.0 examples accompany Goa v3.31.0 and require Go 1.26 or later. +This Goa release includes intentional generated-source and transport changes. +When adapting an existing application, read the +[upgrade guide](https://github.com/goadesign/goa/blob/v3.31.0/UPGRADING.md) +and use matching Goa and examples versions. Regenerate the complete `gen` +directory and update handwritten interceptors, multipart decoders, and command +starters as described there. + The samples in each directory serve as templates, and you can clone them using the `gonew` command, as explained in [this blog post](https://go.dev/blog/gonew). ```shell diff --git a/basic/gen/goa.json b/basic/gen/goa.json index f3581f210..8358dc795 100644 --- a/basic/gen/goa.json +++ b/basic/gen/goa.json @@ -1,3 +1,3 @@ { - "goa_version": "v3.31.0-preview.3" + "goa_version": "v3.31.0-preview.5" } \ No newline at end of file diff --git a/basic/go.mod b/basic/go.mod index 093394913..7d5866564 100644 --- a/basic/go.mod +++ b/basic/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( goa.design/clue v1.2.6 - goa.design/goa/v3 v3.31.0-preview.3 + goa.design/goa/v3 v3.31.0-preview.5.0.20260916070337-f03a5d261cc4 google.golang.org/grpc v1.83.2 google.golang.org/protobuf v1.36.12 ) diff --git a/basic/go.sum b/basic/go.sum index 6eb9f9fab..1a96906e8 100644 --- a/basic/go.sum +++ b/basic/go.sum @@ -55,8 +55,8 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/clue v1.2.6 h1:ensyUkwlvEbNy8FuTGMldKuvaNouh8YoDY9QaE+EtYg= goa.design/clue v1.2.6/go.mod h1:Y4RS5o2k6MZiGk2PT3XbKyntjR2xkr8dYOKQ591dIDM= -goa.design/goa/v3 v3.31.0-preview.3 h1:E0vYOE/KbU7eogc+RJ7WXIDZGIbUkueC/i5KAzuhI/k= -goa.design/goa/v3 v3.31.0-preview.3/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.31.0-preview.5.0.20260916070337-f03a5d261cc4 h1:cPGzdpnxPKn1Xj46xCwJ6YOJkMmQ85a9bh2dS9NpC0g= +goa.design/goa/v3 v3.31.0-preview.5.0.20260916070337-f03a5d261cc4/go.mod h1:d0bJ2ryjJh9pe3wWp6MD8szkKA48RspjKFPj0tDWpCs= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/cellar/gen/goa.json b/cellar/gen/goa.json index f3581f210..8358dc795 100644 --- a/cellar/gen/goa.json +++ b/cellar/gen/goa.json @@ -1,3 +1,3 @@ { - "goa_version": "v3.31.0-preview.3" + "goa_version": "v3.31.0-preview.5" } \ No newline at end of file diff --git a/cellar/gen/grpc/storage/client/types.go b/cellar/gen/grpc/storage/client/types.go index d0aab2360..58ec4e946 100644 --- a/cellar/gen/grpc/storage/client/types.go +++ b/cellar/gen/grpc/storage/client/types.go @@ -548,12 +548,6 @@ func validatecellar_storage_Bottle_At_elem(elem *storagepb.Bottle) (err error) { // ValidateMultiUpdateRequest runs the validations defined on // MultiUpdateRequest. func ValidateMultiUpdateRequest(message *storagepb.MultiUpdateRequest) (err error) { - if message.Ids == nil { - err = goa.MergeErrors(err, goa.MissingFieldError("ids", "message")) - } - if message.Bottles == nil { - err = goa.MergeErrors(err, goa.MissingFieldError("bottles", "message")) - } for _, e := range message.Bottles { if e != nil { if err2 := validatecellar_storage_Bottle_At_elem(e); err2 != nil { diff --git a/cellar/gen/grpc/storage/server/types.go b/cellar/gen/grpc/storage/server/types.go index af6d0bf9f..661ceb5bc 100644 --- a/cellar/gen/grpc/storage/server/types.go +++ b/cellar/gen/grpc/storage/server/types.go @@ -423,12 +423,6 @@ func validatecellar_storage_Bottle_At_elem(elem *storagepb.Bottle) (err error) { // ValidateMultiUpdateRequest runs the validations defined on // MultiUpdateRequest. func ValidateMultiUpdateRequest(message *storagepb.MultiUpdateRequest) (err error) { - if message.Ids == nil { - err = goa.MergeErrors(err, goa.MissingFieldError("ids", "message")) - } - if message.Bottles == nil { - err = goa.MergeErrors(err, goa.MissingFieldError("bottles", "message")) - } for _, e := range message.Bottles { if e != nil { if err2 := validatecellar_storage_Bottle_At_elem(e); err2 != nil { diff --git a/cellar/go.mod b/cellar/go.mod index 8b4d0185d..8909c2562 100644 --- a/cellar/go.mod +++ b/cellar/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( github.com/boltdb/bolt v1.3.1 - goa.design/goa/v3 v3.31.0-preview.3 + goa.design/goa/v3 v3.31.0-preview.5.0.20260916070337-f03a5d261cc4 google.golang.org/grpc v1.83.2 google.golang.org/protobuf v1.36.12 ) diff --git a/cellar/go.sum b/cellar/go.sum index f7be06937..b212f6609 100644 --- a/cellar/go.sum +++ b/cellar/go.sum @@ -51,8 +51,8 @@ go.opentelemetry.io/otel/trace v1.45.0 h1:l/mP6Uv7oNO7/TblbhpbgMidxhq1uO/rPsikOy go.opentelemetry.io/otel/trace v1.45.0/go.mod h1:qoJJA2xNMnxRrdISU/kLtfUH2wNeQbiv+jhs/CxI8bc= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.31.0-preview.3 h1:E0vYOE/KbU7eogc+RJ7WXIDZGIbUkueC/i5KAzuhI/k= -goa.design/goa/v3 v3.31.0-preview.3/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.31.0-preview.5.0.20260916070337-f03a5d261cc4 h1:cPGzdpnxPKn1Xj46xCwJ6YOJkMmQ85a9bh2dS9NpC0g= +goa.design/goa/v3 v3.31.0-preview.5.0.20260916070337-f03a5d261cc4/go.mod h1:d0bJ2ryjJh9pe3wWp6MD8szkKA48RspjKFPj0tDWpCs= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/concerts/gen/goa.json b/concerts/gen/goa.json index f3581f210..8358dc795 100644 --- a/concerts/gen/goa.json +++ b/concerts/gen/goa.json @@ -1,3 +1,3 @@ { - "goa_version": "v3.31.0-preview.3" + "goa_version": "v3.31.0-preview.5" } \ No newline at end of file diff --git a/concerts/go.mod b/concerts/go.mod index 46d5e4db7..5ee5c8a1a 100644 --- a/concerts/go.mod +++ b/concerts/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( github.com/google/uuid v1.6.0 - goa.design/goa/v3 v3.31.0-preview.3 + goa.design/goa/v3 v3.31.0-preview.5.0.20260916070337-f03a5d261cc4 ) require ( @@ -21,6 +21,7 @@ require ( golang.org/x/sync v0.22.0 // indirect golang.org/x/text v0.41.0 // indirect golang.org/x/tools v0.49.0 // indirect + google.golang.org/protobuf v1.36.12 // indirect gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/concerts/go.sum b/concerts/go.sum index 9a703a804..827082f98 100644 --- a/concerts/go.sum +++ b/concerts/go.sum @@ -31,8 +31,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.31.0-preview.3 h1:E0vYOE/KbU7eogc+RJ7WXIDZGIbUkueC/i5KAzuhI/k= -goa.design/goa/v3 v3.31.0-preview.3/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.31.0-preview.5.0.20260916070337-f03a5d261cc4 h1:cPGzdpnxPKn1Xj46xCwJ6YOJkMmQ85a9bh2dS9NpC0g= +goa.design/goa/v3 v3.31.0-preview.5.0.20260916070337-f03a5d261cc4/go.mod h1:d0bJ2ryjJh9pe3wWp6MD8szkKA48RspjKFPj0tDWpCs= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= @@ -41,6 +41,8 @@ golang.org/x/text v0.41.0 h1:vz/seA0lnX87Othu2f/0L24RcgrXD9/YFTSuGjj3rH8= golang.org/x/text v0.41.0/go.mod h1:jvf1O8ajNzZqhSrQBPbutR/EB83Cc0CFrezNQIwbb5M= golang.org/x/tools v0.49.0 h1:3NI7VXzL9+1WZD52Dx2ttoPwD5DWrFGpl9mFZDlmisI= golang.org/x/tools v0.49.0/go.mod h1:SJNXV9DBKT0UbdttsQjbfJlAE/q+y36++zo3uL3N0Oo= +google.golang.org/protobuf v1.36.12 h1:pJOKDDOyeXErUroCihFAd5LQuwXBSpVnKGrj5o/fwxc= +google.golang.org/protobuf v1.36.12/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= diff --git a/cookies/gen/goa.json b/cookies/gen/goa.json index f3581f210..8358dc795 100644 --- a/cookies/gen/goa.json +++ b/cookies/gen/goa.json @@ -1,3 +1,3 @@ { - "goa_version": "v3.31.0-preview.3" + "goa_version": "v3.31.0-preview.5" } \ No newline at end of file diff --git a/cookies/go.mod b/cookies/go.mod index 91cde93ad..a8b6f1112 100644 --- a/cookies/go.mod +++ b/cookies/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( github.com/rs/xid v1.6.0 - goa.design/goa/v3 v3.31.0-preview.3 + goa.design/goa/v3 v3.31.0-preview.5.0.20260916070337-f03a5d261cc4 ) require ( @@ -22,6 +22,7 @@ require ( golang.org/x/sync v0.22.0 // indirect golang.org/x/text v0.41.0 // indirect golang.org/x/tools v0.49.0 // indirect + google.golang.org/protobuf v1.36.12 // indirect gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/cookies/go.sum b/cookies/go.sum index ca02a458a..bdf7b85e5 100644 --- a/cookies/go.sum +++ b/cookies/go.sum @@ -33,8 +33,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.31.0-preview.3 h1:E0vYOE/KbU7eogc+RJ7WXIDZGIbUkueC/i5KAzuhI/k= -goa.design/goa/v3 v3.31.0-preview.3/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.31.0-preview.5.0.20260916070337-f03a5d261cc4 h1:cPGzdpnxPKn1Xj46xCwJ6YOJkMmQ85a9bh2dS9NpC0g= +goa.design/goa/v3 v3.31.0-preview.5.0.20260916070337-f03a5d261cc4/go.mod h1:d0bJ2ryjJh9pe3wWp6MD8szkKA48RspjKFPj0tDWpCs= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= @@ -43,6 +43,8 @@ golang.org/x/text v0.41.0 h1:vz/seA0lnX87Othu2f/0L24RcgrXD9/YFTSuGjj3rH8= golang.org/x/text v0.41.0/go.mod h1:jvf1O8ajNzZqhSrQBPbutR/EB83Cc0CFrezNQIwbb5M= golang.org/x/tools v0.49.0 h1:3NI7VXzL9+1WZD52Dx2ttoPwD5DWrFGpl9mFZDlmisI= golang.org/x/tools v0.49.0/go.mod h1:SJNXV9DBKT0UbdttsQjbfJlAE/q+y36++zo3uL3N0Oo= +google.golang.org/protobuf v1.36.12 h1:pJOKDDOyeXErUroCihFAd5LQuwXBSpVnKGrj5o/fwxc= +google.golang.org/protobuf v1.36.12/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= diff --git a/encodings/cbor/gen/goa.json b/encodings/cbor/gen/goa.json index f3581f210..8358dc795 100644 --- a/encodings/cbor/gen/goa.json +++ b/encodings/cbor/gen/goa.json @@ -1,3 +1,3 @@ { - "goa_version": "v3.31.0-preview.3" + "goa_version": "v3.31.0-preview.5" } \ No newline at end of file diff --git a/encodings/cbor/go.mod b/encodings/cbor/go.mod index 257fede53..3a4a035fc 100644 --- a/encodings/cbor/go.mod +++ b/encodings/cbor/go.mod @@ -5,7 +5,7 @@ go 1.26.0 require ( github.com/fxamacker/cbor/v2 v2.9.3 goa.design/clue v1.2.6 - goa.design/goa/v3 v3.31.0-preview.3 + goa.design/goa/v3 v3.31.0-preview.5.0.20260916070337-f03a5d261cc4 ) require ( diff --git a/encodings/cbor/go.sum b/encodings/cbor/go.sum index 40d48173c..397ce88ea 100644 --- a/encodings/cbor/go.sum +++ b/encodings/cbor/go.sum @@ -59,8 +59,8 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/clue v1.2.6 h1:ensyUkwlvEbNy8FuTGMldKuvaNouh8YoDY9QaE+EtYg= goa.design/clue v1.2.6/go.mod h1:Y4RS5o2k6MZiGk2PT3XbKyntjR2xkr8dYOKQ591dIDM= -goa.design/goa/v3 v3.31.0-preview.3 h1:E0vYOE/KbU7eogc+RJ7WXIDZGIbUkueC/i5KAzuhI/k= -goa.design/goa/v3 v3.31.0-preview.3/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.31.0-preview.5.0.20260916070337-f03a5d261cc4 h1:cPGzdpnxPKn1Xj46xCwJ6YOJkMmQ85a9bh2dS9NpC0g= +goa.design/goa/v3 v3.31.0-preview.5.0.20260916070337-f03a5d261cc4/go.mod h1:d0bJ2ryjJh9pe3wWp6MD8szkKA48RspjKFPj0tDWpCs= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/encodings/text/gen/goa.json b/encodings/text/gen/goa.json index f3581f210..8358dc795 100644 --- a/encodings/text/gen/goa.json +++ b/encodings/text/gen/goa.json @@ -1,3 +1,3 @@ { - "goa_version": "v3.31.0-preview.3" + "goa_version": "v3.31.0-preview.5" } \ No newline at end of file diff --git a/encodings/text/go.mod b/encodings/text/go.mod index fd22869c9..51d2499af 100644 --- a/encodings/text/go.mod +++ b/encodings/text/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( goa.design/clue v1.2.6 - goa.design/goa/v3 v3.31.0-preview.3 + goa.design/goa/v3 v3.31.0-preview.5.0.20260916070337-f03a5d261cc4 ) require ( diff --git a/encodings/text/go.sum b/encodings/text/go.sum index 6eb9f9fab..1a96906e8 100644 --- a/encodings/text/go.sum +++ b/encodings/text/go.sum @@ -55,8 +55,8 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/clue v1.2.6 h1:ensyUkwlvEbNy8FuTGMldKuvaNouh8YoDY9QaE+EtYg= goa.design/clue v1.2.6/go.mod h1:Y4RS5o2k6MZiGk2PT3XbKyntjR2xkr8dYOKQ591dIDM= -goa.design/goa/v3 v3.31.0-preview.3 h1:E0vYOE/KbU7eogc+RJ7WXIDZGIbUkueC/i5KAzuhI/k= -goa.design/goa/v3 v3.31.0-preview.3/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.31.0-preview.5.0.20260916070337-f03a5d261cc4 h1:cPGzdpnxPKn1Xj46xCwJ6YOJkMmQ85a9bh2dS9NpC0g= +goa.design/goa/v3 v3.31.0-preview.5.0.20260916070337-f03a5d261cc4/go.mod h1:d0bJ2ryjJh9pe3wWp6MD8szkKA48RspjKFPj0tDWpCs= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/error/gen/goa.json b/error/gen/goa.json index f3581f210..8358dc795 100644 --- a/error/gen/goa.json +++ b/error/gen/goa.json @@ -1,3 +1,3 @@ { - "goa_version": "v3.31.0-preview.3" + "goa_version": "v3.31.0-preview.5" } \ No newline at end of file diff --git a/error/go.mod b/error/go.mod index 96d6f8931..e2b143b94 100644 --- a/error/go.mod +++ b/error/go.mod @@ -3,7 +3,7 @@ module goa.design/examples/error go 1.26.0 require ( - goa.design/goa/v3 v3.31.0-preview.3 + goa.design/goa/v3 v3.31.0-preview.5.0.20260916070337-f03a5d261cc4 google.golang.org/genproto v0.0.0-20260810153831-ec0a7760b754 google.golang.org/grpc v1.83.2 google.golang.org/protobuf v1.36.12 diff --git a/error/go.sum b/error/go.sum index 4d8fa90d3..6f05fe8e7 100644 --- a/error/go.sum +++ b/error/go.sum @@ -49,8 +49,8 @@ go.opentelemetry.io/otel/trace v1.45.0 h1:l/mP6Uv7oNO7/TblbhpbgMidxhq1uO/rPsikOy go.opentelemetry.io/otel/trace v1.45.0/go.mod h1:qoJJA2xNMnxRrdISU/kLtfUH2wNeQbiv+jhs/CxI8bc= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.31.0-preview.3 h1:E0vYOE/KbU7eogc+RJ7WXIDZGIbUkueC/i5KAzuhI/k= -goa.design/goa/v3 v3.31.0-preview.3/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.31.0-preview.5.0.20260916070337-f03a5d261cc4 h1:cPGzdpnxPKn1Xj46xCwJ6YOJkMmQ85a9bh2dS9NpC0g= +goa.design/goa/v3 v3.31.0-preview.5.0.20260916070337-f03a5d261cc4/go.mod h1:d0bJ2ryjJh9pe3wWp6MD8szkKA48RspjKFPj0tDWpCs= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/files/gen/goa.json b/files/gen/goa.json index f3581f210..8358dc795 100644 --- a/files/gen/goa.json +++ b/files/gen/goa.json @@ -1,3 +1,3 @@ { - "goa_version": "v3.31.0-preview.3" + "goa_version": "v3.31.0-preview.5" } \ No newline at end of file diff --git a/files/go.mod b/files/go.mod index 6b8592e09..dc3265974 100644 --- a/files/go.mod +++ b/files/go.mod @@ -2,7 +2,7 @@ module goa.design/examples/files go 1.26.0 -require goa.design/goa/v3 v3.31.0-preview.3 +require goa.design/goa/v3 v3.31.0-preview.5.0.20260916070337-f03a5d261cc4 require ( github.com/dimfeld/httppath v0.0.0-20170720192232-ee938bf73598 // indirect @@ -19,6 +19,7 @@ require ( golang.org/x/sync v0.22.0 // indirect golang.org/x/text v0.41.0 // indirect golang.org/x/tools v0.49.0 // indirect + google.golang.org/protobuf v1.36.12 // indirect gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/files/go.sum b/files/go.sum index 9a703a804..827082f98 100644 --- a/files/go.sum +++ b/files/go.sum @@ -31,8 +31,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.31.0-preview.3 h1:E0vYOE/KbU7eogc+RJ7WXIDZGIbUkueC/i5KAzuhI/k= -goa.design/goa/v3 v3.31.0-preview.3/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.31.0-preview.5.0.20260916070337-f03a5d261cc4 h1:cPGzdpnxPKn1Xj46xCwJ6YOJkMmQ85a9bh2dS9NpC0g= +goa.design/goa/v3 v3.31.0-preview.5.0.20260916070337-f03a5d261cc4/go.mod h1:d0bJ2ryjJh9pe3wWp6MD8szkKA48RspjKFPj0tDWpCs= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= @@ -41,6 +41,8 @@ golang.org/x/text v0.41.0 h1:vz/seA0lnX87Othu2f/0L24RcgrXD9/YFTSuGjj3rH8= golang.org/x/text v0.41.0/go.mod h1:jvf1O8ajNzZqhSrQBPbutR/EB83Cc0CFrezNQIwbb5M= golang.org/x/tools v0.49.0 h1:3NI7VXzL9+1WZD52Dx2ttoPwD5DWrFGpl9mFZDlmisI= golang.org/x/tools v0.49.0/go.mod h1:SJNXV9DBKT0UbdttsQjbfJlAE/q+y36++zo3uL3N0Oo= +google.golang.org/protobuf v1.36.12 h1:pJOKDDOyeXErUroCihFAd5LQuwXBSpVnKGrj5o/fwxc= +google.golang.org/protobuf v1.36.12/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= diff --git a/httpstatus/gen/goa.json b/httpstatus/gen/goa.json index f3581f210..8358dc795 100644 --- a/httpstatus/gen/goa.json +++ b/httpstatus/gen/goa.json @@ -1,3 +1,3 @@ { - "goa_version": "v3.31.0-preview.3" + "goa_version": "v3.31.0-preview.5" } \ No newline at end of file diff --git a/httpstatus/go.mod b/httpstatus/go.mod index 9efe20347..fcef226d9 100644 --- a/httpstatus/go.mod +++ b/httpstatus/go.mod @@ -2,7 +2,7 @@ module goa.design/examples/httpstatus go 1.26.0 -require goa.design/goa/v3 v3.31.0-preview.3 +require goa.design/goa/v3 v3.31.0-preview.5.0.20260916070337-f03a5d261cc4 require ( github.com/dimfeld/httppath v0.0.0-20170720192232-ee938bf73598 // indirect @@ -19,6 +19,7 @@ require ( golang.org/x/sync v0.22.0 // indirect golang.org/x/text v0.41.0 // indirect golang.org/x/tools v0.49.0 // indirect + google.golang.org/protobuf v1.36.12 // indirect gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/httpstatus/go.sum b/httpstatus/go.sum index 9a703a804..827082f98 100644 --- a/httpstatus/go.sum +++ b/httpstatus/go.sum @@ -31,8 +31,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.31.0-preview.3 h1:E0vYOE/KbU7eogc+RJ7WXIDZGIbUkueC/i5KAzuhI/k= -goa.design/goa/v3 v3.31.0-preview.3/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.31.0-preview.5.0.20260916070337-f03a5d261cc4 h1:cPGzdpnxPKn1Xj46xCwJ6YOJkMmQ85a9bh2dS9NpC0g= +goa.design/goa/v3 v3.31.0-preview.5.0.20260916070337-f03a5d261cc4/go.mod h1:d0bJ2ryjJh9pe3wWp6MD8szkKA48RspjKFPj0tDWpCs= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= @@ -41,6 +41,8 @@ golang.org/x/text v0.41.0 h1:vz/seA0lnX87Othu2f/0L24RcgrXD9/YFTSuGjj3rH8= golang.org/x/text v0.41.0/go.mod h1:jvf1O8ajNzZqhSrQBPbutR/EB83Cc0CFrezNQIwbb5M= golang.org/x/tools v0.49.0 h1:3NI7VXzL9+1WZD52Dx2ttoPwD5DWrFGpl9mFZDlmisI= golang.org/x/tools v0.49.0/go.mod h1:SJNXV9DBKT0UbdttsQjbfJlAE/q+y36++zo3uL3N0Oo= +google.golang.org/protobuf v1.36.12 h1:pJOKDDOyeXErUroCihFAd5LQuwXBSpVnKGrj5o/fwxc= +google.golang.org/protobuf v1.36.12/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= diff --git a/interceptors/gen/goa.json b/interceptors/gen/goa.json index f3581f210..8358dc795 100644 --- a/interceptors/gen/goa.json +++ b/interceptors/gen/goa.json @@ -1,3 +1,3 @@ { - "goa_version": "v3.31.0-preview.3" + "goa_version": "v3.31.0-preview.5" } \ No newline at end of file diff --git a/interceptors/go.mod b/interceptors/go.mod index 3821cdce6..ccd33e5b8 100644 --- a/interceptors/go.mod +++ b/interceptors/go.mod @@ -6,7 +6,7 @@ require ( github.com/google/uuid v1.6.0 github.com/gorilla/websocket v1.5.3 goa.design/clue v1.2.6 - goa.design/goa/v3 v3.31.0-preview.3 + goa.design/goa/v3 v3.31.0-preview.5.0.20260916070337-f03a5d261cc4 google.golang.org/grpc v1.83.2 google.golang.org/protobuf v1.36.12 ) diff --git a/interceptors/go.sum b/interceptors/go.sum index 6eb9f9fab..1a96906e8 100644 --- a/interceptors/go.sum +++ b/interceptors/go.sum @@ -55,8 +55,8 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/clue v1.2.6 h1:ensyUkwlvEbNy8FuTGMldKuvaNouh8YoDY9QaE+EtYg= goa.design/clue v1.2.6/go.mod h1:Y4RS5o2k6MZiGk2PT3XbKyntjR2xkr8dYOKQ591dIDM= -goa.design/goa/v3 v3.31.0-preview.3 h1:E0vYOE/KbU7eogc+RJ7WXIDZGIbUkueC/i5KAzuhI/k= -goa.design/goa/v3 v3.31.0-preview.3/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.31.0-preview.5.0.20260916070337-f03a5d261cc4 h1:cPGzdpnxPKn1Xj46xCwJ6YOJkMmQ85a9bh2dS9NpC0g= +goa.design/goa/v3 v3.31.0-preview.5.0.20260916070337-f03a5d261cc4/go.mod h1:d0bJ2ryjJh9pe3wWp6MD8szkKA48RspjKFPj0tDWpCs= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/multipart/gen/goa.json b/multipart/gen/goa.json index f3581f210..8358dc795 100644 --- a/multipart/gen/goa.json +++ b/multipart/gen/goa.json @@ -1,3 +1,3 @@ { - "goa_version": "v3.31.0-preview.3" + "goa_version": "v3.31.0-preview.5" } \ No newline at end of file diff --git a/multipart/go.mod b/multipart/go.mod index 8deb84f2b..3dff6a5f3 100644 --- a/multipart/go.mod +++ b/multipart/go.mod @@ -2,7 +2,7 @@ module goa.design/examples/multipart go 1.26.0 -require goa.design/goa/v3 v3.31.0-preview.3 +require goa.design/goa/v3 v3.31.0-preview.5.0.20260916070337-f03a5d261cc4 require ( github.com/dimfeld/httppath v0.0.0-20170720192232-ee938bf73598 // indirect @@ -19,6 +19,7 @@ require ( golang.org/x/sync v0.22.0 // indirect golang.org/x/text v0.41.0 // indirect golang.org/x/tools v0.49.0 // indirect + google.golang.org/protobuf v1.36.12 // indirect gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/multipart/go.sum b/multipart/go.sum index 9a703a804..827082f98 100644 --- a/multipart/go.sum +++ b/multipart/go.sum @@ -31,8 +31,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.31.0-preview.3 h1:E0vYOE/KbU7eogc+RJ7WXIDZGIbUkueC/i5KAzuhI/k= -goa.design/goa/v3 v3.31.0-preview.3/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.31.0-preview.5.0.20260916070337-f03a5d261cc4 h1:cPGzdpnxPKn1Xj46xCwJ6YOJkMmQ85a9bh2dS9NpC0g= +goa.design/goa/v3 v3.31.0-preview.5.0.20260916070337-f03a5d261cc4/go.mod h1:d0bJ2ryjJh9pe3wWp6MD8szkKA48RspjKFPj0tDWpCs= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= @@ -41,6 +41,8 @@ golang.org/x/text v0.41.0 h1:vz/seA0lnX87Othu2f/0L24RcgrXD9/YFTSuGjj3rH8= golang.org/x/text v0.41.0/go.mod h1:jvf1O8ajNzZqhSrQBPbutR/EB83Cc0CFrezNQIwbb5M= golang.org/x/tools v0.49.0 h1:3NI7VXzL9+1WZD52Dx2ttoPwD5DWrFGpl9mFZDlmisI= golang.org/x/tools v0.49.0/go.mod h1:SJNXV9DBKT0UbdttsQjbfJlAE/q+y36++zo3uL3N0Oo= +google.golang.org/protobuf v1.36.12 h1:pJOKDDOyeXErUroCihFAd5LQuwXBSpVnKGrj5o/fwxc= +google.golang.org/protobuf v1.36.12/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= diff --git a/retry/gen/goa.json b/retry/gen/goa.json index f3581f210..8358dc795 100644 --- a/retry/gen/goa.json +++ b/retry/gen/goa.json @@ -1,3 +1,3 @@ { - "goa_version": "v3.31.0-preview.3" + "goa_version": "v3.31.0-preview.5" } \ No newline at end of file diff --git a/retry/go.mod b/retry/go.mod index 048e1d742..8d63f42c4 100644 --- a/retry/go.mod +++ b/retry/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( goa.design/clue v1.2.6 - goa.design/goa/v3 v3.31.0-preview.3 + goa.design/goa/v3 v3.31.0-preview.5.0.20260916070337-f03a5d261cc4 google.golang.org/grpc v1.83.2 google.golang.org/protobuf v1.36.12 ) diff --git a/retry/go.sum b/retry/go.sum index 6eb9f9fab..1a96906e8 100644 --- a/retry/go.sum +++ b/retry/go.sum @@ -55,8 +55,8 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/clue v1.2.6 h1:ensyUkwlvEbNy8FuTGMldKuvaNouh8YoDY9QaE+EtYg= goa.design/clue v1.2.6/go.mod h1:Y4RS5o2k6MZiGk2PT3XbKyntjR2xkr8dYOKQ591dIDM= -goa.design/goa/v3 v3.31.0-preview.3 h1:E0vYOE/KbU7eogc+RJ7WXIDZGIbUkueC/i5KAzuhI/k= -goa.design/goa/v3 v3.31.0-preview.3/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.31.0-preview.5.0.20260916070337-f03a5d261cc4 h1:cPGzdpnxPKn1Xj46xCwJ6YOJkMmQ85a9bh2dS9NpC0g= +goa.design/goa/v3 v3.31.0-preview.5.0.20260916070337-f03a5d261cc4/go.mod h1:d0bJ2ryjJh9pe3wWp6MD8szkKA48RspjKFPj0tDWpCs= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/security/hierarchy/gen/api_key_service/endpoints.go b/security/hierarchy/gen/api_key_service/endpoints.go index ed1a074f0..68dd9787f 100644 --- a/security/hierarchy/gen/api_key_service/endpoints.go +++ b/security/hierarchy/gen/api_key_service/endpoints.go @@ -52,7 +52,7 @@ func NewDefaultEndpoint(s Service, authAPIKeyFn security.AuthAPIKeyFunc) goa.End Scopes: []string{}, RequiredScopes: []string{}, } - ctx, err = authAPIKeyFn(ctx, p.Key, &sc) + ctx, err = authAPIKeyFn(ctx, string(p.Key), &sc) if err != nil { return nil, err } @@ -71,7 +71,7 @@ func NewSecureEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint { Scopes: []string{}, RequiredScopes: []string{}, } - ctx, err = authJWTFn(ctx, p.Token, &sc) + ctx, err = authJWTFn(ctx, string(p.Token), &sc) if err != nil { return nil, err } diff --git a/security/hierarchy/gen/default_service/endpoints.go b/security/hierarchy/gen/default_service/endpoints.go index c01cde478..6a8062a31 100644 --- a/security/hierarchy/gen/default_service/endpoints.go +++ b/security/hierarchy/gen/default_service/endpoints.go @@ -46,7 +46,7 @@ func NewDefaultEndpoint(s Service, authBasicFn security.AuthBasicFunc) goa.Endpo Scopes: []string{}, RequiredScopes: []string{}, } - ctx, err = authBasicFn(ctx, p.Username, p.Password, &sc) + ctx, err = authBasicFn(ctx, string(p.Username), string(p.Password), &sc) if err != nil { return nil, err } diff --git a/security/hierarchy/gen/goa.json b/security/hierarchy/gen/goa.json index f3581f210..8358dc795 100644 --- a/security/hierarchy/gen/goa.json +++ b/security/hierarchy/gen/goa.json @@ -1,3 +1,3 @@ { - "goa_version": "v3.31.0-preview.3" + "goa_version": "v3.31.0-preview.5" } \ No newline at end of file diff --git a/security/hierarchy/gen/http/api_key_service/server/encode_decode.go b/security/hierarchy/gen/http/api_key_service/server/encode_decode.go index 8d68df91b..b6e83e8ca 100644 --- a/security/hierarchy/gen/http/api_key_service/server/encode_decode.go +++ b/security/hierarchy/gen/http/api_key_service/server/encode_decode.go @@ -43,10 +43,9 @@ func DecodeDefaultRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp return payload, err } payload = NewDefaultPayload(key) - if strings.Contains(payload.Key, " ") { + if index := strings.IndexByte(string(payload.Key), ' '); index >= 0 { // Remove authorization scheme prefix (e.g. "Bearer") - cred := strings.SplitN(payload.Key, " ", 2)[1] - payload.Key = cred + payload.Key = payload.Key[index+1:] } return payload, nil @@ -79,10 +78,9 @@ func DecodeSecureRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp. return payload, err } payload = NewSecurePayload(token) - if strings.Contains(payload.Token, " ") { + if index := strings.IndexByte(string(payload.Token), ' '); index >= 0 { // Remove authorization scheme prefix (e.g. "Bearer") - cred := strings.SplitN(payload.Token, " ", 2)[1] - payload.Token = cred + payload.Token = payload.Token[index+1:] } return payload, nil diff --git a/security/hierarchy/gen/http/default_service/client/encode_decode.go b/security/hierarchy/gen/http/default_service/client/encode_decode.go index 24195d8c8..d16f2a996 100644 --- a/security/hierarchy/gen/http/default_service/client/encode_decode.go +++ b/security/hierarchy/gen/http/default_service/client/encode_decode.go @@ -42,7 +42,7 @@ func EncodeDefaultRequest(encoder func(*http.Request) goahttp.Encoder) func(*htt if !ok { return goahttp.ErrInvalidType("default_service", "default", "*defaultservice.DefaultPayload", v) } - req.SetBasicAuth(p.Username, p.Password) + req.SetBasicAuth(string(p.Username), string(p.Password)) return nil } } diff --git a/security/hierarchy/gen/http/default_service/server/encode_decode.go b/security/hierarchy/gen/http/default_service/server/encode_decode.go index f09835dcf..322bf6fb0 100644 --- a/security/hierarchy/gen/http/default_service/server/encode_decode.go +++ b/security/hierarchy/gen/http/default_service/server/encode_decode.go @@ -30,13 +30,11 @@ func EncodeDefaultResponse(encoder func(context.Context, http.ResponseWriter) go func DecodeDefaultRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder) func(*http.Request) (*defaultservice.DefaultPayload, error) { return func(r *http.Request) (*defaultservice.DefaultPayload, error) { var payload *defaultservice.DefaultPayload - payload = NewDefaultPayload() user, pass, ok := r.BasicAuth() if !ok { return payload, goa.MissingFieldError("Authorization", "header") } - payload.Username = user - payload.Password = pass + payload = NewDefaultPayload(user, pass) return payload, nil } diff --git a/security/hierarchy/gen/http/default_service/server/types.go b/security/hierarchy/gen/http/default_service/server/types.go index 890be43eb..0446e142c 100644 --- a/security/hierarchy/gen/http/default_service/server/types.go +++ b/security/hierarchy/gen/http/default_service/server/types.go @@ -10,8 +10,10 @@ package server import defaultservice "goa.design/examples/security/hierarchy/gen/default_service" // NewDefaultPayload builds a default_service service default endpoint payload. -func NewDefaultPayload() *defaultservice.DefaultPayload { +func NewDefaultPayload(username string, password string) *defaultservice.DefaultPayload { v := &defaultservice.DefaultPayload{} + v.Username = username + v.Password = password return v } diff --git a/security/hierarchy/go.mod b/security/hierarchy/go.mod index 2c54997af..e5ddf19b2 100644 --- a/security/hierarchy/go.mod +++ b/security/hierarchy/go.mod @@ -2,7 +2,7 @@ module goa.design/examples/security/hierarchy go 1.26.0 -require goa.design/goa/v3 v3.31.0-preview.3 +require goa.design/goa/v3 v3.31.0-preview.5.0.20260916070337-f03a5d261cc4 require ( github.com/dimfeld/httppath v0.0.0-20170720192232-ee938bf73598 // indirect @@ -19,6 +19,7 @@ require ( golang.org/x/sync v0.22.0 // indirect golang.org/x/text v0.41.0 // indirect golang.org/x/tools v0.49.0 // indirect + google.golang.org/protobuf v1.36.12 // indirect gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/security/hierarchy/go.sum b/security/hierarchy/go.sum index 9a703a804..827082f98 100644 --- a/security/hierarchy/go.sum +++ b/security/hierarchy/go.sum @@ -31,8 +31,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.31.0-preview.3 h1:E0vYOE/KbU7eogc+RJ7WXIDZGIbUkueC/i5KAzuhI/k= -goa.design/goa/v3 v3.31.0-preview.3/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.31.0-preview.5.0.20260916070337-f03a5d261cc4 h1:cPGzdpnxPKn1Xj46xCwJ6YOJkMmQ85a9bh2dS9NpC0g= +goa.design/goa/v3 v3.31.0-preview.5.0.20260916070337-f03a5d261cc4/go.mod h1:d0bJ2ryjJh9pe3wWp6MD8szkKA48RspjKFPj0tDWpCs= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= @@ -41,6 +41,8 @@ golang.org/x/text v0.41.0 h1:vz/seA0lnX87Othu2f/0L24RcgrXD9/YFTSuGjj3rH8= golang.org/x/text v0.41.0/go.mod h1:jvf1O8ajNzZqhSrQBPbutR/EB83Cc0CFrezNQIwbb5M= golang.org/x/tools v0.49.0 h1:3NI7VXzL9+1WZD52Dx2ttoPwD5DWrFGpl9mFZDlmisI= golang.org/x/tools v0.49.0/go.mod h1:SJNXV9DBKT0UbdttsQjbfJlAE/q+y36++zo3uL3N0Oo= +google.golang.org/protobuf v1.36.12 h1:pJOKDDOyeXErUroCihFAd5LQuwXBSpVnKGrj5o/fwxc= +google.golang.org/protobuf v1.36.12/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= diff --git a/security/multiauth/gen/goa.json b/security/multiauth/gen/goa.json index f3581f210..8358dc795 100644 --- a/security/multiauth/gen/goa.json +++ b/security/multiauth/gen/goa.json @@ -1,3 +1,3 @@ { - "goa_version": "v3.31.0-preview.3" + "goa_version": "v3.31.0-preview.5" } \ No newline at end of file diff --git a/security/multiauth/gen/grpc/secured_service/server/encode_decode.go b/security/multiauth/gen/grpc/secured_service/server/encode_decode.go index 788ead6c8..f0a9fb4de 100644 --- a/security/multiauth/gen/grpc/secured_service/server/encode_decode.go +++ b/security/multiauth/gen/grpc/secured_service/server/encode_decode.go @@ -99,10 +99,9 @@ func DecodeSecureRequest(ctx context.Context, v any, md metadata.MD) (any, error var payload *securedservice.SecurePayload { payload = NewSecurePayload(message, token) - if strings.Contains(payload.Token, " ") { + if index := strings.IndexByte(string(payload.Token), ' '); index >= 0 { // Remove authorization scheme prefix (e.g. "Bearer") - cred := strings.SplitN(payload.Token, " ", 2)[1] - payload.Token = cred + payload.Token = payload.Token[index+1:] } } return payload, nil @@ -151,10 +150,9 @@ func DecodeDoublySecureRequest(ctx context.Context, v any, md metadata.MD) (any, var payload *securedservice.DoublySecurePayload { payload = NewDoublySecurePayload(message, token) - if strings.Contains(payload.Token, " ") { + if index := strings.IndexByte(string(payload.Token), ' '); index >= 0 { // Remove authorization scheme prefix (e.g. "Bearer") - cred := strings.SplitN(payload.Token, " ", 2)[1] - payload.Token = cred + payload.Token = payload.Token[index+1:] } } return payload, nil @@ -203,16 +201,18 @@ func DecodeAlsoDoublySecureRequest(ctx context.Context, v any, md metadata.MD) ( { payload = NewAlsoDoublySecurePayload(message, oauthToken, token) if payload.Token != nil { - if strings.Contains(*payload.Token, " ") { + cred := *payload.Token + if index := strings.IndexByte(string(cred), ' '); index >= 0 { // Remove authorization scheme prefix (e.g. "Bearer") - cred := strings.SplitN(*payload.Token, " ", 2)[1] + cred = cred[index+1:] payload.Token = &cred } } if payload.OauthToken != nil { - if strings.Contains(*payload.OauthToken, " ") { + cred := *payload.OauthToken + if index := strings.IndexByte(string(cred), ' '); index >= 0 { // Remove authorization scheme prefix (e.g. "Bearer") - cred := strings.SplitN(*payload.OauthToken, " ", 2)[1] + cred = cred[index+1:] payload.OauthToken = &cred } } diff --git a/security/multiauth/gen/http/secured_service/client/encode_decode.go b/security/multiauth/gen/http/secured_service/client/encode_decode.go index fa92af671..43f74776a 100644 --- a/security/multiauth/gen/http/secured_service/client/encode_decode.go +++ b/security/multiauth/gen/http/secured_service/client/encode_decode.go @@ -44,7 +44,7 @@ func EncodeSigninRequest(encoder func(*http.Request) goahttp.Encoder) func(*http if !ok { return goahttp.ErrInvalidType("secured_service", "signin", "*securedservice.SigninPayload", v) } - req.SetBasicAuth(p.Username, p.Password) + req.SetBasicAuth(string(p.Username), string(p.Password)) return nil } } @@ -361,10 +361,16 @@ func EncodeAlsoDoublySecureRequest(encoder func(*http.Request) goahttp.Encoder) values.Add("oauth", *p.OauthToken) } req.URL.RawQuery = values.Encode() + var user string if p.Username != nil { - if p.Password != nil { - req.SetBasicAuth(*p.Username, *p.Password) - } + user = string(*p.Username) + } + var pass string + if p.Password != nil { + pass = string(*p.Password) + } + if p.Username != nil || p.Password != nil { + req.SetBasicAuth(user, pass) } return nil } diff --git a/security/multiauth/gen/http/secured_service/server/encode_decode.go b/security/multiauth/gen/http/secured_service/server/encode_decode.go index dd49659d7..d40944578 100644 --- a/security/multiauth/gen/http/secured_service/server/encode_decode.go +++ b/security/multiauth/gen/http/secured_service/server/encode_decode.go @@ -36,13 +36,11 @@ func EncodeSigninResponse(encoder func(context.Context, http.ResponseWriter) goa func DecodeSigninRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder) func(*http.Request) (*securedservice.SigninPayload, error) { return func(r *http.Request) (*securedservice.SigninPayload, error) { var payload *securedservice.SigninPayload - payload = NewSigninPayload() user, pass, ok := r.BasicAuth() if !ok { return payload, goa.MissingFieldError("Authorization", "header") } - payload.Username = user - payload.Password = pass + payload = NewSigninPayload(user, pass) return payload, nil } @@ -112,10 +110,9 @@ func DecodeSecureRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp. return payload, err } payload = NewSecurePayload(fail, token) - if strings.Contains(payload.Token, " ") { + if index := strings.IndexByte(string(payload.Token), ' '); index >= 0 { // Remove authorization scheme prefix (e.g. "Bearer") - cred := strings.SplitN(payload.Token, " ", 2)[1] - payload.Token = cred + payload.Token = payload.Token[index+1:] } return payload, nil @@ -188,10 +185,9 @@ func DecodeDoublySecureRequest(mux goahttp.Muxer, decoder func(*http.Request) go return payload, err } payload = NewDoublySecurePayload(key, token) - if strings.Contains(payload.Token, " ") { + if index := strings.IndexByte(string(payload.Token), ' '); index >= 0 { // Remove authorization scheme prefix (e.g. "Bearer") - cred := strings.SplitN(payload.Token, " ", 2)[1] - payload.Token = cred + payload.Token = payload.Token[index+1:] } return payload, nil @@ -265,14 +261,18 @@ func DecodeAlsoDoublySecureRequest(mux goahttp.Muxer, decoder func(*http.Request if tokenRaw != "" { token = &tokenRaw } - payload = NewAlsoDoublySecurePayload(key, oauthToken, token) - user, pass, _ := r.BasicAuth() - payload.Username = &user - payload.Password = &pass + user, pass, ok := r.BasicAuth() + var userPtr, passPtr *string + if ok { + userPtr = &user + passPtr = &pass + } + payload = NewAlsoDoublySecurePayload(key, oauthToken, token, userPtr, passPtr) if payload.Token != nil { - if strings.Contains(*payload.Token, " ") { + cred := *payload.Token + if index := strings.IndexByte(string(cred), ' '); index >= 0 { // Remove authorization scheme prefix (e.g. "Bearer") - cred := strings.SplitN(*payload.Token, " ", 2)[1] + cred = cred[index+1:] payload.Token = &cred } } diff --git a/security/multiauth/gen/http/secured_service/server/types.go b/security/multiauth/gen/http/secured_service/server/types.go index ff3b4322f..7310c4237 100644 --- a/security/multiauth/gen/http/secured_service/server/types.go +++ b/security/multiauth/gen/http/secured_service/server/types.go @@ -32,8 +32,10 @@ func NewSigninResponseBody(res *securedservice.Creds) *SigninResponseBody { } // NewSigninPayload builds a secured_service service signin endpoint payload. -func NewSigninPayload() *securedservice.SigninPayload { +func NewSigninPayload(username string, password string) *securedservice.SigninPayload { v := &securedservice.SigninPayload{} + v.Username = username + v.Password = password return v } @@ -59,11 +61,13 @@ func NewDoublySecurePayload(key string, token string) *securedservice.DoublySecu // NewAlsoDoublySecurePayload builds a secured_service service // also_doubly_secure endpoint payload. -func NewAlsoDoublySecurePayload(key *string, oauthToken *string, token *string) *securedservice.AlsoDoublySecurePayload { +func NewAlsoDoublySecurePayload(key *string, oauthToken *string, token *string, username *string, password *string) *securedservice.AlsoDoublySecurePayload { v := &securedservice.AlsoDoublySecurePayload{} v.Key = key v.OauthToken = oauthToken v.Token = token + v.Username = username + v.Password = password return v } diff --git a/security/multiauth/gen/secured_service/endpoints.go b/security/multiauth/gen/secured_service/endpoints.go index 05d60f457..cdd03e27b 100644 --- a/security/multiauth/gen/secured_service/endpoints.go +++ b/security/multiauth/gen/secured_service/endpoints.go @@ -55,7 +55,7 @@ func NewSigninEndpoint(s Service, authBasicFn security.AuthBasicFunc) goa.Endpoi Scopes: []string{"api:read"}, RequiredScopes: []string{}, } - ctx, err = authBasicFn(ctx, p.Username, p.Password, &sc) + ctx, err = authBasicFn(ctx, string(p.Username), string(p.Password), &sc) if err != nil { return nil, err } @@ -74,7 +74,7 @@ func NewSecureEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint { Scopes: []string{"api:read", "api:write"}, RequiredScopes: []string{"api:read"}, } - ctx, err = authJWTFn(ctx, p.Token, &sc) + ctx, err = authJWTFn(ctx, string(p.Token), &sc) if err != nil { return nil, err } @@ -93,14 +93,14 @@ func NewDoublySecureEndpoint(s Service, authJWTFn security.AuthJWTFunc, authAPIK Scopes: []string{"api:read", "api:write"}, RequiredScopes: []string{"api:read", "api:write"}, } - ctx, err = authJWTFn(ctx, p.Token, &sc) + ctx, err = authJWTFn(ctx, string(p.Token), &sc) if err == nil { sc := security.APIKeyScheme{ Name: "api_key", Scopes: []string{}, RequiredScopes: []string{"api:read", "api:write"}, } - ctx, err = authAPIKeyFn(ctx, p.Key, &sc) + ctx, err = authAPIKeyFn(ctx, string(p.Key), &sc) } if err != nil { return nil, err @@ -122,7 +122,7 @@ func NewAlsoDoublySecureEndpoint(s Service, authJWTFn security.AuthJWTFunc, auth } var token string if p.Token != nil { - token = *p.Token + token = string(*p.Token) } ctx, err = authJWTFn(ctx, token, &sc) if err == nil { @@ -133,7 +133,7 @@ func NewAlsoDoublySecureEndpoint(s Service, authJWTFn security.AuthJWTFunc, auth } var key string if p.Key != nil { - key = *p.Key + key = string(*p.Key) } ctx, err = authAPIKeyFn(ctx, key, &sc) } @@ -153,7 +153,7 @@ func NewAlsoDoublySecureEndpoint(s Service, authJWTFn security.AuthJWTFunc, auth } var token string if p.OauthToken != nil { - token = *p.OauthToken + token = string(*p.OauthToken) } ctx, err = authOAuth2Fn(ctx, token, &sc) if err == nil { @@ -164,11 +164,11 @@ func NewAlsoDoublySecureEndpoint(s Service, authJWTFn security.AuthJWTFunc, auth } var user string if p.Username != nil { - user = *p.Username + user = string(*p.Username) } var pass string if p.Password != nil { - pass = *p.Password + pass = string(*p.Password) } ctx, err = authBasicFn(ctx, user, pass, &sc) } diff --git a/security/multiauth/go.mod b/security/multiauth/go.mod index 045d13097..73370e917 100644 --- a/security/multiauth/go.mod +++ b/security/multiauth/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( github.com/golang-jwt/jwt/v4 v4.5.2 - goa.design/goa/v3 v3.31.0-preview.3 + goa.design/goa/v3 v3.31.0-preview.5.0.20260916070337-f03a5d261cc4 google.golang.org/grpc v1.83.2 google.golang.org/protobuf v1.36.12 ) diff --git a/security/multiauth/go.sum b/security/multiauth/go.sum index bb8a06899..52da590d0 100644 --- a/security/multiauth/go.sum +++ b/security/multiauth/go.sum @@ -51,8 +51,8 @@ go.opentelemetry.io/otel/trace v1.45.0 h1:l/mP6Uv7oNO7/TblbhpbgMidxhq1uO/rPsikOy go.opentelemetry.io/otel/trace v1.45.0/go.mod h1:qoJJA2xNMnxRrdISU/kLtfUH2wNeQbiv+jhs/CxI8bc= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.31.0-preview.3 h1:E0vYOE/KbU7eogc+RJ7WXIDZGIbUkueC/i5KAzuhI/k= -goa.design/goa/v3 v3.31.0-preview.3/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.31.0-preview.5.0.20260916070337-f03a5d261cc4 h1:cPGzdpnxPKn1Xj46xCwJ6YOJkMmQ85a9bh2dS9NpC0g= +goa.design/goa/v3 v3.31.0-preview.5.0.20260916070337-f03a5d261cc4/go.mod h1:d0bJ2ryjJh9pe3wWp6MD8szkKA48RspjKFPj0tDWpCs= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/sse/gen/goa.json b/sse/gen/goa.json index f3581f210..8358dc795 100644 --- a/sse/gen/goa.json +++ b/sse/gen/goa.json @@ -1,3 +1,3 @@ { - "goa_version": "v3.31.0-preview.3" + "goa_version": "v3.31.0-preview.5" } \ No newline at end of file diff --git a/sse/go.mod b/sse/go.mod index 7805256d4..82ffe6408 100644 --- a/sse/go.mod +++ b/sse/go.mod @@ -5,7 +5,7 @@ go 1.26.0 require ( github.com/shirou/gopsutil/v3 v3.24.5 goa.design/clue v1.2.6 - goa.design/goa/v3 v3.31.0-preview.3 + goa.design/goa/v3 v3.31.0-preview.5.0.20260916070337-f03a5d261cc4 ) require ( diff --git a/sse/go.sum b/sse/go.sum index c2c20b86b..c247b1aec 100644 --- a/sse/go.sum +++ b/sse/go.sum @@ -74,8 +74,8 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/clue v1.2.6 h1:ensyUkwlvEbNy8FuTGMldKuvaNouh8YoDY9QaE+EtYg= goa.design/clue v1.2.6/go.mod h1:Y4RS5o2k6MZiGk2PT3XbKyntjR2xkr8dYOKQ591dIDM= -goa.design/goa/v3 v3.31.0-preview.3 h1:E0vYOE/KbU7eogc+RJ7WXIDZGIbUkueC/i5KAzuhI/k= -goa.design/goa/v3 v3.31.0-preview.3/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.31.0-preview.5.0.20260916070337-f03a5d261cc4 h1:cPGzdpnxPKn1Xj46xCwJ6YOJkMmQ85a9bh2dS9NpC0g= +goa.design/goa/v3 v3.31.0-preview.5.0.20260916070337-f03a5d261cc4/go.mod h1:d0bJ2ryjJh9pe3wWp6MD8szkKA48RspjKFPj0tDWpCs= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/streaming/gen/chatter/endpoints.go b/streaming/gen/chatter/endpoints.go index a8e20cae5..a568eb862 100644 --- a/streaming/gen/chatter/endpoints.go +++ b/streaming/gen/chatter/endpoints.go @@ -104,7 +104,7 @@ func NewLoginEndpoint(s Service, authBasicFn security.AuthBasicFunc) goa.Endpoin Scopes: []string{}, RequiredScopes: []string{}, } - ctx, err = authBasicFn(ctx, p.User, p.Password, &sc) + ctx, err = authBasicFn(ctx, string(p.User), string(p.Password), &sc) if err != nil { return nil, err } @@ -123,7 +123,7 @@ func NewEchoerEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint { Scopes: []string{"stream:read", "stream:write"}, RequiredScopes: []string{"stream:write"}, } - ctx, err = authJWTFn(ctx, ep.Payload.Token, &sc) + ctx, err = authJWTFn(ctx, string(ep.Payload.Token), &sc) if err != nil { return nil, err } @@ -142,7 +142,7 @@ func NewListenerEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint Scopes: []string{"stream:read", "stream:write"}, RequiredScopes: []string{"stream:write"}, } - ctx, err = authJWTFn(ctx, ep.Payload.Token, &sc) + ctx, err = authJWTFn(ctx, string(ep.Payload.Token), &sc) if err != nil { return nil, err } @@ -161,7 +161,7 @@ func NewSummaryEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint Scopes: []string{"stream:read", "stream:write"}, RequiredScopes: []string{"stream:write"}, } - ctx, err = authJWTFn(ctx, ep.Payload.Token, &sc) + ctx, err = authJWTFn(ctx, string(ep.Payload.Token), &sc) if err != nil { return nil, err } @@ -180,7 +180,7 @@ func NewSubscribeEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoin Scopes: []string{"stream:read", "stream:write"}, RequiredScopes: []string{"stream:write"}, } - ctx, err = authJWTFn(ctx, ep.Payload.Token, &sc) + ctx, err = authJWTFn(ctx, string(ep.Payload.Token), &sc) if err != nil { return nil, err } @@ -199,7 +199,7 @@ func NewHistoryEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint Scopes: []string{"stream:read", "stream:write"}, RequiredScopes: []string{"stream:read"}, } - ctx, err = authJWTFn(ctx, ep.Payload.Token, &sc) + ctx, err = authJWTFn(ctx, string(ep.Payload.Token), &sc) if err != nil { return nil, err } diff --git a/streaming/gen/goa.json b/streaming/gen/goa.json index f3581f210..8358dc795 100644 --- a/streaming/gen/goa.json +++ b/streaming/gen/goa.json @@ -1,3 +1,3 @@ { - "goa_version": "v3.31.0-preview.3" + "goa_version": "v3.31.0-preview.5" } \ No newline at end of file diff --git a/streaming/gen/grpc/chatter/server/encode_decode.go b/streaming/gen/grpc/chatter/server/encode_decode.go index 946a97776..b6dcdc7d3 100644 --- a/streaming/gen/grpc/chatter/server/encode_decode.go +++ b/streaming/gen/grpc/chatter/server/encode_decode.go @@ -91,10 +91,9 @@ func DecodeEchoerRequest(ctx context.Context, v any, md metadata.MD) (any, error var payload *chatter.EchoerPayload { payload = NewEchoerPayload(token) - if strings.Contains(payload.Token, " ") { + if index := strings.IndexByte(string(payload.Token), ' '); index >= 0 { // Remove authorization scheme prefix (e.g. "Bearer") - cred := strings.SplitN(payload.Token, " ", 2)[1] - payload.Token = cred + payload.Token = payload.Token[index+1:] } } return payload, nil @@ -127,10 +126,9 @@ func DecodeListenerRequest(ctx context.Context, v any, md metadata.MD) (any, err var payload *chatter.ListenerPayload { payload = NewListenerPayload(token) - if strings.Contains(payload.Token, " ") { + if index := strings.IndexByte(string(payload.Token), ' '); index >= 0 { // Remove authorization scheme prefix (e.g. "Bearer") - cred := strings.SplitN(payload.Token, " ", 2)[1] - payload.Token = cred + payload.Token = payload.Token[index+1:] } } return payload, nil @@ -169,10 +167,9 @@ func DecodeSummaryRequest(ctx context.Context, v any, md metadata.MD) (any, erro var payload *chatter.SummaryPayload { payload = NewSummaryPayload(token) - if strings.Contains(payload.Token, " ") { + if index := strings.IndexByte(string(payload.Token), ' '); index >= 0 { // Remove authorization scheme prefix (e.g. "Bearer") - cred := strings.SplitN(payload.Token, " ", 2)[1] - payload.Token = cred + payload.Token = payload.Token[index+1:] } } return payload, nil @@ -209,10 +206,9 @@ func DecodeSubscribeRequest(ctx context.Context, v any, md metadata.MD) (any, er var payload *chatter.SubscribePayload { payload = NewSubscribePayload(token) - if strings.Contains(payload.Token, " ") { + if index := strings.IndexByte(string(payload.Token), ' '); index >= 0 { // Remove authorization scheme prefix (e.g. "Bearer") - cred := strings.SplitN(payload.Token, " ", 2)[1] - payload.Token = cred + payload.Token = payload.Token[index+1:] } } return payload, nil @@ -268,10 +264,9 @@ func DecodeHistoryRequest(ctx context.Context, v any, md metadata.MD) (any, erro var payload *chatter.HistoryPayload { payload = NewHistoryPayload(view, token) - if strings.Contains(payload.Token, " ") { + if index := strings.IndexByte(string(payload.Token), ' '); index >= 0 { // Remove authorization scheme prefix (e.g. "Bearer") - cred := strings.SplitN(payload.Token, " ", 2)[1] - payload.Token = cred + payload.Token = payload.Token[index+1:] } } return payload, nil diff --git a/streaming/gen/http/chatter/client/encode_decode.go b/streaming/gen/http/chatter/client/encode_decode.go index 05f187c72..d75a022f2 100644 --- a/streaming/gen/http/chatter/client/encode_decode.go +++ b/streaming/gen/http/chatter/client/encode_decode.go @@ -44,7 +44,7 @@ func EncodeLoginRequest(encoder func(*http.Request) goahttp.Encoder) func(*http. if !ok { return goahttp.ErrInvalidType("chatter", "login", "*chatter.LoginPayload", v) } - req.SetBasicAuth(p.User, p.Password) + req.SetBasicAuth(string(p.User), string(p.Password)) return nil } } diff --git a/streaming/gen/http/chatter/server/encode_decode.go b/streaming/gen/http/chatter/server/encode_decode.go index 3ee57c634..10e878da5 100644 --- a/streaming/gen/http/chatter/server/encode_decode.go +++ b/streaming/gen/http/chatter/server/encode_decode.go @@ -36,13 +36,11 @@ func EncodeLoginResponse(encoder func(context.Context, http.ResponseWriter) goah func DecodeLoginRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder) func(*http.Request) (*chatter.LoginPayload, error) { return func(r *http.Request) (*chatter.LoginPayload, error) { var payload *chatter.LoginPayload - payload = NewLoginPayload() user, pass, ok := r.BasicAuth() if !ok { return payload, goa.MissingFieldError("Authorization", "header") } - payload.User = user - payload.Password = pass + payload = NewLoginPayload(user, pass) return payload, nil } @@ -89,10 +87,9 @@ func DecodeEchoerRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp. return payload, err } payload = NewEchoerPayload(token) - if strings.Contains(payload.Token, " ") { + if index := strings.IndexByte(string(payload.Token), ' '); index >= 0 { // Remove authorization scheme prefix (e.g. "Bearer") - cred := strings.SplitN(payload.Token, " ", 2)[1] - payload.Token = cred + payload.Token = payload.Token[index+1:] } return payload, nil @@ -148,10 +145,9 @@ func DecodeListenerRequest(mux goahttp.Muxer, decoder func(*http.Request) goahtt return payload, err } payload = NewListenerPayload(token) - if strings.Contains(payload.Token, " ") { + if index := strings.IndexByte(string(payload.Token), ' '); index >= 0 { // Remove authorization scheme prefix (e.g. "Bearer") - cred := strings.SplitN(payload.Token, " ", 2)[1] - payload.Token = cred + payload.Token = payload.Token[index+1:] } return payload, nil @@ -207,10 +203,9 @@ func DecodeSummaryRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp return payload, err } payload = NewSummaryPayload(token) - if strings.Contains(payload.Token, " ") { + if index := strings.IndexByte(string(payload.Token), ' '); index >= 0 { // Remove authorization scheme prefix (e.g. "Bearer") - cred := strings.SplitN(payload.Token, " ", 2)[1] - payload.Token = cred + payload.Token = payload.Token[index+1:] } return payload, nil @@ -266,10 +261,9 @@ func DecodeSubscribeRequest(mux goahttp.Muxer, decoder func(*http.Request) goaht return payload, err } payload = NewSubscribePayload(token) - if strings.Contains(payload.Token, " ") { + if index := strings.IndexByte(string(payload.Token), ' '); index >= 0 { // Remove authorization scheme prefix (e.g. "Bearer") - cred := strings.SplitN(payload.Token, " ", 2)[1] - payload.Token = cred + payload.Token = payload.Token[index+1:] } return payload, nil @@ -335,10 +329,9 @@ func DecodeHistoryRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp return payload, err } payload = NewHistoryPayload(view, token) - if strings.Contains(payload.Token, " ") { + if index := strings.IndexByte(string(payload.Token), ' '); index >= 0 { // Remove authorization scheme prefix (e.g. "Bearer") - cred := strings.SplitN(payload.Token, " ", 2)[1] - payload.Token = cred + payload.Token = payload.Token[index+1:] } return payload, nil diff --git a/streaming/gen/http/chatter/server/types.go b/streaming/gen/http/chatter/server/types.go index 218639131..b73ba464d 100644 --- a/streaming/gen/http/chatter/server/types.go +++ b/streaming/gen/http/chatter/server/types.go @@ -100,8 +100,10 @@ func NewHistoryResponseBody(res *chatterviews.ChatSummaryView) *HistoryResponseB } // NewLoginPayload builds a chatter service login endpoint payload. -func NewLoginPayload() *chatter.LoginPayload { +func NewLoginPayload(user string, password string) *chatter.LoginPayload { v := &chatter.LoginPayload{} + v.User = user + v.Password = password return v } diff --git a/streaming/go.mod b/streaming/go.mod index 93f42006d..0e1f1fd40 100644 --- a/streaming/go.mod +++ b/streaming/go.mod @@ -5,7 +5,7 @@ go 1.26.0 require ( github.com/golang-jwt/jwt/v4 v4.5.2 github.com/gorilla/websocket v1.5.3 - goa.design/goa/v3 v3.31.0-preview.3 + goa.design/goa/v3 v3.31.0-preview.5.0.20260916070337-f03a5d261cc4 google.golang.org/grpc v1.83.2 google.golang.org/protobuf v1.36.12 ) diff --git a/streaming/go.sum b/streaming/go.sum index bb8a06899..52da590d0 100644 --- a/streaming/go.sum +++ b/streaming/go.sum @@ -51,8 +51,8 @@ go.opentelemetry.io/otel/trace v1.45.0 h1:l/mP6Uv7oNO7/TblbhpbgMidxhq1uO/rPsikOy go.opentelemetry.io/otel/trace v1.45.0/go.mod h1:qoJJA2xNMnxRrdISU/kLtfUH2wNeQbiv+jhs/CxI8bc= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.31.0-preview.3 h1:E0vYOE/KbU7eogc+RJ7WXIDZGIbUkueC/i5KAzuhI/k= -goa.design/goa/v3 v3.31.0-preview.3/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.31.0-preview.5.0.20260916070337-f03a5d261cc4 h1:cPGzdpnxPKn1Xj46xCwJ6YOJkMmQ85a9bh2dS9NpC0g= +goa.design/goa/v3 v3.31.0-preview.5.0.20260916070337-f03a5d261cc4/go.mod h1:d0bJ2ryjJh9pe3wWp6MD8szkKA48RspjKFPj0tDWpCs= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= diff --git a/tracing/go.mod b/tracing/go.mod index 377779109..05f4c13ea 100644 --- a/tracing/go.mod +++ b/tracing/go.mod @@ -5,7 +5,7 @@ go 1.26.0 require ( github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 goa.design/examples/basic v0.0.0-20260810182504-f834f43955c5 - goa.design/goa/v3 v3.31.0-preview.3 + goa.design/goa/v3 v3.31.0-preview.5.0.20260916070337-f03a5d261cc4 google.golang.org/grpc v1.83.2 ) diff --git a/tracing/go.sum b/tracing/go.sum index 622a7d338..ecbe68afb 100644 --- a/tracing/go.sum +++ b/tracing/go.sum @@ -81,8 +81,8 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= goa.design/examples/basic v0.0.0-20260810182504-f834f43955c5 h1:SRSrUaLTTdA4bUXb8+zA5MDhMEx8YaP+Knd+pddBcrg= goa.design/examples/basic v0.0.0-20260810182504-f834f43955c5/go.mod h1:XRziIzNcLb9fk7ZrfiHx5FIeAj+orJ4fkzLG0nXpiAo= -goa.design/goa/v3 v3.31.0-preview.3 h1:E0vYOE/KbU7eogc+RJ7WXIDZGIbUkueC/i5KAzuhI/k= -goa.design/goa/v3 v3.31.0-preview.3/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.31.0-preview.5.0.20260916070337-f03a5d261cc4 h1:cPGzdpnxPKn1Xj46xCwJ6YOJkMmQ85a9bh2dS9NpC0g= +goa.design/goa/v3 v3.31.0-preview.5.0.20260916070337-f03a5d261cc4/go.mod h1:d0bJ2ryjJh9pe3wWp6MD8szkKA48RspjKFPj0tDWpCs= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= diff --git a/tus/gen/goa.json b/tus/gen/goa.json index f3581f210..8358dc795 100644 --- a/tus/gen/goa.json +++ b/tus/gen/goa.json @@ -1,3 +1,3 @@ { - "goa_version": "v3.31.0-preview.3" + "goa_version": "v3.31.0-preview.5" } \ No newline at end of file diff --git a/tus/go.mod b/tus/go.mod index c91fdfaf0..233d3218f 100644 --- a/tus/go.mod +++ b/tus/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( github.com/rs/xid v1.6.0 - goa.design/goa/v3 v3.31.0-preview.3 + goa.design/goa/v3 v3.31.0-preview.5.0.20260916070337-f03a5d261cc4 ) require ( @@ -22,6 +22,7 @@ require ( golang.org/x/sync v0.22.0 // indirect golang.org/x/text v0.41.0 // indirect golang.org/x/tools v0.49.0 // indirect + google.golang.org/protobuf v1.36.12 // indirect gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/tus/go.sum b/tus/go.sum index ca02a458a..bdf7b85e5 100644 --- a/tus/go.sum +++ b/tus/go.sum @@ -33,8 +33,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.31.0-preview.3 h1:E0vYOE/KbU7eogc+RJ7WXIDZGIbUkueC/i5KAzuhI/k= -goa.design/goa/v3 v3.31.0-preview.3/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.31.0-preview.5.0.20260916070337-f03a5d261cc4 h1:cPGzdpnxPKn1Xj46xCwJ6YOJkMmQ85a9bh2dS9NpC0g= +goa.design/goa/v3 v3.31.0-preview.5.0.20260916070337-f03a5d261cc4/go.mod h1:d0bJ2ryjJh9pe3wWp6MD8szkKA48RspjKFPj0tDWpCs= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= @@ -43,6 +43,8 @@ golang.org/x/text v0.41.0 h1:vz/seA0lnX87Othu2f/0L24RcgrXD9/YFTSuGjj3rH8= golang.org/x/text v0.41.0/go.mod h1:jvf1O8ajNzZqhSrQBPbutR/EB83Cc0CFrezNQIwbb5M= golang.org/x/tools v0.49.0 h1:3NI7VXzL9+1WZD52Dx2ttoPwD5DWrFGpl9mFZDlmisI= golang.org/x/tools v0.49.0/go.mod h1:SJNXV9DBKT0UbdttsQjbfJlAE/q+y36++zo3uL3N0Oo= +google.golang.org/protobuf v1.36.12 h1:pJOKDDOyeXErUroCihFAd5LQuwXBSpVnKGrj5o/fwxc= +google.golang.org/protobuf v1.36.12/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= diff --git a/upload_download/gen/goa.json b/upload_download/gen/goa.json index f3581f210..8358dc795 100644 --- a/upload_download/gen/goa.json +++ b/upload_download/gen/goa.json @@ -1,3 +1,3 @@ { - "goa_version": "v3.31.0-preview.3" + "goa_version": "v3.31.0-preview.5" } \ No newline at end of file diff --git a/upload_download/go.mod b/upload_download/go.mod index c6921e73e..cbdfb2b1a 100644 --- a/upload_download/go.mod +++ b/upload_download/go.mod @@ -2,7 +2,7 @@ module goa.design/examples/upload_download go 1.26.0 -require goa.design/goa/v3 v3.31.0-preview.3 +require goa.design/goa/v3 v3.31.0-preview.5.0.20260916070337-f03a5d261cc4 require ( github.com/dimfeld/httppath v0.0.0-20170720192232-ee938bf73598 // indirect @@ -19,6 +19,7 @@ require ( golang.org/x/sync v0.22.0 // indirect golang.org/x/text v0.41.0 // indirect golang.org/x/tools v0.49.0 // indirect + google.golang.org/protobuf v1.36.12 // indirect gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/upload_download/go.sum b/upload_download/go.sum index 9a703a804..827082f98 100644 --- a/upload_download/go.sum +++ b/upload_download/go.sum @@ -31,8 +31,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -goa.design/goa/v3 v3.31.0-preview.3 h1:E0vYOE/KbU7eogc+RJ7WXIDZGIbUkueC/i5KAzuhI/k= -goa.design/goa/v3 v3.31.0-preview.3/go.mod h1:XpqR5Ho75FrEGDZd6o/hIWnv7lN/TUHudl2QxfM1kFU= +goa.design/goa/v3 v3.31.0-preview.5.0.20260916070337-f03a5d261cc4 h1:cPGzdpnxPKn1Xj46xCwJ6YOJkMmQ85a9bh2dS9NpC0g= +goa.design/goa/v3 v3.31.0-preview.5.0.20260916070337-f03a5d261cc4/go.mod h1:d0bJ2ryjJh9pe3wWp6MD8szkKA48RspjKFPj0tDWpCs= golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= @@ -41,6 +41,8 @@ golang.org/x/text v0.41.0 h1:vz/seA0lnX87Othu2f/0L24RcgrXD9/YFTSuGjj3rH8= golang.org/x/text v0.41.0/go.mod h1:jvf1O8ajNzZqhSrQBPbutR/EB83Cc0CFrezNQIwbb5M= golang.org/x/tools v0.49.0 h1:3NI7VXzL9+1WZD52Dx2ttoPwD5DWrFGpl9mFZDlmisI= golang.org/x/tools v0.49.0/go.mod h1:SJNXV9DBKT0UbdttsQjbfJlAE/q+y36++zo3uL3N0Oo= +google.golang.org/protobuf v1.36.12 h1:pJOKDDOyeXErUroCihFAd5LQuwXBSpVnKGrj5o/fwxc= +google.golang.org/protobuf v1.36.12/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=