Skip to content

Commit ea253f8

Browse files
committed
Release v3.27.0
1 parent 84ae5c0 commit ea253f8

44 files changed

Lines changed: 90 additions & 36 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

arnz/example/gen/goa.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"goa_version": "v3.26.0"
2+
"goa_version": "v3.27.0"
33
}

cors/examples/calc/cmd/calc-cli/http.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package main
22

33
import (
4+
"fmt"
45
"net/http"
56
"time"
67

@@ -20,14 +21,18 @@ func doHTTP(scheme, host string, timeout int, debug bool) (goa.Endpoint, any, er
2021
}
2122
}
2223

23-
return cli.ParseEndpoint(
24+
endpoint, payload, err := cli.ParseEndpoint(
2425
scheme,
2526
host,
2627
doer,
2728
goahttp.RequestEncoder,
2829
goahttp.ResponseDecoder,
2930
debug,
3031
)
32+
if err != nil {
33+
return nil, nil, fmt.Errorf("parse endpoint: %w", err)
34+
}
35+
return endpoint, payload, nil
3136
}
3237

3338
func httpUsageCommands() []string {

cors/examples/calc/cmd/calc-cli/main.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package main
33
import (
44
"context"
55
"encoding/json"
6+
"errors"
67
"flag"
78
"fmt"
89
"net/url"
@@ -75,7 +76,7 @@ func main() {
7576
}
7677
}
7778
if err != nil {
78-
if err == flag.ErrHelp {
79+
if errors.Is(err, flag.ErrHelp) {
7980
os.Exit(0)
8081
}
8182
fmt.Fprintln(os.Stderr, err.Error())

cors/examples/calc/gen/goa.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"goa_version": "v3.26.0"
2+
"goa_version": "v3.27.0"
33
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"swagger":"2.0","info":{"title":"CORS Example Calc API","description":"This API demonstrates the use of the goa CORS plugin","version":"0.0.1"},"host":"localhost:80","consumes":["application/json","application/xml","application/gob"],"produces":["application/json","application/xml","application/gob"],"paths":{"/":{"get":{"tags":["calc"],"summary":"Download /index.html","operationId":"calc#/","responses":{"200":{"description":"File downloaded","schema":{"type":"file"}}},"schemes":["http"]}},"/add/{a}/{b}":{"get":{"tags":["calc"],"summary":"add calc","description":"Add adds up the two integer parameters and returns the results.","operationId":"calc#add","parameters":[{"name":"a","in":"path","description":"Left operand","required":true,"type":"integer"},{"name":"b","in":"path","description":"Right operand","required":true,"type":"integer"}],"responses":{"200":{"description":"OK response.","schema":{"type":"integer","format":"int64"}}},"schemes":["http"]}}}}
1+
{"swagger":"2.0","info":{"title":"CORS Example Calc API","description":"This API demonstrates the use of the goa CORS plugin","version":"0.0.1"},"host":"localhost:80","consumes":["application/json","application/xml","application/gob"],"produces":["application/json","application/xml","application/gob"],"paths":{"/":{"get":{"tags":["calc"],"summary":"Download /index.html","operationId":"calc#/","responses":{"200":{"description":"File downloaded","schema":{"type":"file"}}},"schemes":["http"]}},"/add/{a}/{b}":{"get":{"tags":["calc"],"summary":"add calc","description":"Add adds up the two integer parameters and returns the results.","operationId":"calc#add","parameters":[{"name":"a","in":"path","description":"Left operand","required":true,"type":"integer","format":"int64"},{"name":"b","in":"path","description":"Right operand","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"OK response.","schema":{"type":"integer","format":"int64"}}},"schemes":["http"]}}}}

cors/examples/calc/gen/http/openapi.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,13 @@ paths:
3939
description: Left operand
4040
required: true
4141
type: integer
42+
format: int64
4243
- name: b
4344
in: path
4445
description: Right operand
4546
required: true
4647
type: integer
48+
format: int64
4749
responses:
4850
"200":
4951
description: OK response.

docs/examples/calc/cmd/calc-cli/http.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package main
22

33
import (
4+
"fmt"
45
"net/http"
56
"time"
67

@@ -20,14 +21,18 @@ func doHTTP(scheme, host string, timeout int, debug bool) (goa.Endpoint, any, er
2021
}
2122
}
2223

23-
return cli.ParseEndpoint(
24+
endpoint, payload, err := cli.ParseEndpoint(
2425
scheme,
2526
host,
2627
doer,
2728
goahttp.RequestEncoder,
2829
goahttp.ResponseDecoder,
2930
debug,
3031
)
32+
if err != nil {
33+
return nil, nil, fmt.Errorf("parse endpoint: %w", err)
34+
}
35+
return endpoint, payload, nil
3136
}
3237

3338
func httpUsageCommands() []string {

docs/examples/calc/cmd/calc-cli/main.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package main
33
import (
44
"context"
55
"encoding/json"
6+
"errors"
67
"flag"
78
"fmt"
89
"net/url"
@@ -75,7 +76,7 @@ func main() {
7576
}
7677
}
7778
if err != nil {
78-
if err == flag.ErrHelp {
79+
if errors.Is(err, flag.ErrHelp) {
7980
os.Exit(0)
8081
}
8182
fmt.Fprintln(os.Stderr, err.Error())

docs/examples/calc/gen/goa.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"goa_version": "v3.26.0"
2+
"goa_version": "v3.27.0"
33
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"swagger":"2.0","info":{"title":"Calculator Service","version":"0.0.1"},"host":"localhost:80","consumes":["application/json","application/xml","application/gob"],"produces":["application/json","application/xml","application/gob"],"paths":{"/add/{left}/{right}":{"get":{"tags":["calc"],"summary":"add calc","operationId":"calc#add","parameters":[{"name":"left","in":"path","description":"Left operand","required":true,"type":"integer"},{"name":"right","in":"path","description":"Right operand","required":true,"type":"integer"}],"responses":{"200":{"description":"OK response.","schema":{"type":"integer","format":"int64"}}},"schemes":["http"]}},"/swagger.json":{"get":{"tags":["calc"],"summary":"Download ../../gen/http/openapi.json","operationId":"calc#/swagger.json","responses":{"200":{"description":"File downloaded","schema":{"type":"file"}}},"schemes":["http"]}}}}
1+
{"swagger":"2.0","info":{"title":"Calculator Service","version":"0.0.1"},"host":"localhost:80","consumes":["application/json","application/xml","application/gob"],"produces":["application/json","application/xml","application/gob"],"paths":{"/add/{left}/{right}":{"get":{"tags":["calc"],"summary":"add calc","operationId":"calc#add","parameters":[{"name":"left","in":"path","description":"Left operand","required":true,"type":"integer","format":"int64"},{"name":"right","in":"path","description":"Right operand","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"OK response.","schema":{"type":"integer","format":"int64"}}},"schemes":["http"]}},"/swagger.json":{"get":{"tags":["calc"],"summary":"Download ../../gen/http/openapi.json","operationId":"calc#/swagger.json","responses":{"200":{"description":"File downloaded","schema":{"type":"file"}}},"schemes":["http"]}}}}

0 commit comments

Comments
 (0)