@@ -66,59 +66,54 @@ GET /undocumented/{undocumented_id}
6666func 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
0 commit comments