@@ -143,7 +143,9 @@ func TestHandler_FileServer(t *testing.T) {
143143 tc := tc
144144 t .Run (tc .name , func (t * testing.T ) {
145145 t .Parallel ()
146- h := api .New (runtime .New (), tc .config )
146+
147+ cfg := & static.Config {}
148+ h := api .New (runtime .New (cfg ), tc .config )
147149 tc .fn (t , h )
148150 })
149151 }
@@ -157,7 +159,8 @@ func TestOpenGraphInDashboard(t *testing.T) {
157159 {
158160 name : "http service" ,
159161 test : func (t * testing.T ) {
160- app := runtime .New ()
162+ cfg := & static.Config {}
163+ app := runtime .New (cfg )
161164 app .Http .Add (& dynamic.Config {Info : dynamic.ConfigInfo {Url : mustParse ("https://foo.bar" )}, Data : openapitest .NewConfig ("3.0" , openapitest .WithInfo ("Swagger Petstore" , "1.0" , "This is a sample server Petstore server." ))})
162165 h := api .New (app , static.Api {Path : "/mokapi" , Dashboard : true })
163166 try .Handler (t ,
@@ -176,7 +179,8 @@ func TestOpenGraphInDashboard(t *testing.T) {
176179 {
177180 name : "http service path without summary and description" ,
178181 test : func (t * testing.T ) {
179- app := runtime .New ()
182+ cfg := & static.Config {}
183+ app := runtime .New (cfg )
180184 app .Http .Add (& dynamic.Config {Info : dynamic.ConfigInfo {Url : mustParse ("https://foo.bar" )}, Data : openapitest .NewConfig ("3.0" ,
181185 openapitest .WithInfo ("Swagger Petstore" , "1.0" , "This is a sample server Petstore server." ),
182186 openapitest .WithPath ("/pet/{petId}" , openapitest .NewPath ()),
@@ -199,7 +203,8 @@ func TestOpenGraphInDashboard(t *testing.T) {
199203 {
200204 name : "http service path with summary and description" ,
201205 test : func (t * testing.T ) {
202- app := runtime .New ()
206+ cfg := & static.Config {}
207+ app := runtime .New (cfg )
203208 app .Http .Add (& dynamic.Config {Info : dynamic.ConfigInfo {Url : mustParse ("https://foo.bar" )}, Data : openapitest .NewConfig ("3.0" ,
204209 openapitest .WithInfo ("Swagger Petstore" , "1.0" , "This is a sample server Petstore server." ),
205210 openapitest .WithPath ("/pet/{petId}" , openapitest .NewPath (
@@ -224,7 +229,8 @@ func TestOpenGraphInDashboard(t *testing.T) {
224229 {
225230 name : "http service path with no summary but description" ,
226231 test : func (t * testing.T ) {
227- app := runtime .New ()
232+ cfg := & static.Config {}
233+ app := runtime .New (cfg )
228234 app .Http .Add (& dynamic.Config {Info : dynamic.ConfigInfo {Url : mustParse ("https://foo.bar" )}, Data : openapitest .NewConfig ("3.0" ,
229235 openapitest .WithInfo ("Swagger Petstore" , "1.0" , "This is a sample server Petstore server." ),
230236 openapitest .WithPath ("/pet/{petId}" , openapitest .NewPath (
@@ -248,7 +254,8 @@ func TestOpenGraphInDashboard(t *testing.T) {
248254 {
249255 name : "http service endpoint no summary and no description" ,
250256 test : func (t * testing.T ) {
251- app := runtime .New ()
257+ cfg := & static.Config {}
258+ app := runtime .New (cfg )
252259 app .Http .Add (& dynamic.Config {Info : dynamic.ConfigInfo {Url : mustParse ("https://foo.bar" )}, Data : openapitest .NewConfig ("3.0" ,
253260 openapitest .WithInfo ("Swagger Petstore" , "1.0" , "This is a sample server Petstore server." ),
254261 openapitest .WithPath ("/pet/{petId}" , openapitest .NewPath (
@@ -272,7 +279,8 @@ func TestOpenGraphInDashboard(t *testing.T) {
272279 {
273280 name : "http service endpoint get right path" ,
274281 test : func (t * testing.T ) {
275- app := runtime .New ()
282+ cfg := & static.Config {}
283+ app := runtime .New (cfg )
276284 app .Http .Add (& dynamic.Config {Info : dynamic.ConfigInfo {Url : mustParse ("https://foo.bar" )}, Data : openapitest .NewConfig ("3.0" ,
277285 openapitest .WithInfo ("Swagger Petstore" , "1.0" , "This is a sample server Petstore server." ),
278286 openapitest .WithPath ("/pet/{petId}" , openapitest .NewPath (
0 commit comments