Skip to content

Commit 3bb05c2

Browse files
Bump github.com/getkin/kin-openapi from 0.120.0 to 0.122.0 in /tools (#3015)
1 parent a7c8db8 commit 3bb05c2

File tree

4 files changed

+19
-24
lines changed

4 files changed

+19
-24
lines changed

tools/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ go 1.20
44

55
require (
66
github.com/alecthomas/kong v0.8.1
7-
github.com/getkin/kin-openapi v0.120.0
7+
github.com/getkin/kin-openapi v0.122.0
88
github.com/google/go-cmp v0.6.0
99
github.com/google/go-github/v57 v57.0.0
1010
golang.org/x/sync v0.5.0

tools/go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ3
66
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
77
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
88
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
9-
github.com/getkin/kin-openapi v0.120.0 h1:MqJcNJFrMDFNc07iwE8iFC5eT2k/NPUFDIpNeiZv8Jg=
10-
github.com/getkin/kin-openapi v0.120.0/go.mod h1:PCWw/lfBrJY4HcdqE3jj+QFkaFK8ABoqo7PvqVhXXqw=
9+
github.com/getkin/kin-openapi v0.122.0 h1:WB9Jbl0Hp/T79/JF9xlSW5Kl9uYdk/AWD0yAd9HOM10=
10+
github.com/getkin/kin-openapi v0.122.0/go.mod h1:PCWw/lfBrJY4HcdqE3jj+QFkaFK8ABoqo7PvqVhXXqw=
1111
github.com/go-openapi/jsonpointer v0.19.6 h1:eCs3fxoIi3Wh6vtgmLTOjdhSpiqphQ+DaPn38N2ZdrE=
1212
github.com/go-openapi/jsonpointer v0.19.6/go.mod h1:osyAmYz/mB/C3I+WsTTSgw1ONzaLJoLCyoi6/zppojs=
1313
github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14=

tools/metadata/main_test.go

Lines changed: 15 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -66,59 +66,54 @@ GET /undocumented/{undocumented_id}
6666
func TestUpdateOpenAPI(t *testing.T) {
6767
testServer := newTestServer(t, "main", map[string]interface{}{
6868
"api.github.com/api.github.com.json": openapi3.T{
69-
Paths: openapi3.Paths{
70-
"/a/{a_id}": &openapi3.PathItem{
69+
Paths: openapi3.NewPaths(
70+
openapi3.WithPath("/a/{a_id}", &openapi3.PathItem{
7171
Get: &openapi3.Operation{
7272
ExternalDocs: &openapi3.ExternalDocs{
7373
URL: "https://docs.github.com/rest/reference/a",
7474
},
7575
},
76-
},
77-
},
76+
})),
7877
},
7978
"ghec/ghec.json": openapi3.T{
80-
Paths: openapi3.Paths{
81-
"/a/b/{a_id}": &openapi3.PathItem{
79+
Paths: openapi3.NewPaths(
80+
openapi3.WithPath("/a/b/{a_id}", &openapi3.PathItem{
8281
Get: &openapi3.Operation{
8382
ExternalDocs: &openapi3.ExternalDocs{
8483
URL: "https://docs.github.com/rest/reference/a",
8584
},
8685
},
87-
},
88-
},
86+
})),
8987
},
9088
"ghes-3.9/ghes-3.9.json": openapi3.T{
91-
Paths: openapi3.Paths{
92-
"/a/b/{a_id}": &openapi3.PathItem{
89+
Paths: openapi3.NewPaths(
90+
openapi3.WithPath("/a/b/{a_id}", &openapi3.PathItem{
9391
Get: &openapi3.Operation{
9492
ExternalDocs: &openapi3.ExternalDocs{
9593
URL: "https://docs.github.com/rest/reference/a",
9694
},
9795
},
98-
},
99-
},
96+
})),
10097
},
10198
"ghes-3.10/ghes-3.10.json": openapi3.T{
102-
Paths: openapi3.Paths{
103-
"/a/b/{a_id}": &openapi3.PathItem{
99+
Paths: openapi3.NewPaths(
100+
openapi3.WithPath("/a/b/{a_id}", &openapi3.PathItem{
104101
Get: &openapi3.Operation{
105102
ExternalDocs: &openapi3.ExternalDocs{
106103
URL: "https://docs.github.com/rest/reference/a",
107104
},
108105
},
109-
},
110-
},
106+
})),
111107
},
112108
"ghes-2.22/ghes-2.22.json": openapi3.T{
113-
Paths: openapi3.Paths{
114-
"/a/b/{a_id}": &openapi3.PathItem{
109+
Paths: openapi3.NewPaths(
110+
openapi3.WithPath("/a/b/{a_id}", &openapi3.PathItem{
115111
Get: &openapi3.Operation{
116112
ExternalDocs: &openapi3.ExternalDocs{
117113
URL: "https://docs.github.com/rest/reference/a",
118114
},
119115
},
120-
},
121-
},
116+
})),
122117
},
123118
})
124119

tools/metadata/openapi.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ func getOpsFromGithub(ctx context.Context, client *github.Client, gitRef string)
4040
}
4141
var ops []*operation
4242
for _, desc := range descs {
43-
for p, pathItem := range desc.description.Paths {
43+
for p, pathItem := range desc.description.Paths.Map() {
4444
for method, op := range pathItem.Operations() {
4545
docURL := ""
4646
if op.ExternalDocs != nil {

0 commit comments

Comments
 (0)