Skip to content

Commit 8d11b11

Browse files
Merge branch 'swaggo:master' into master
2 parents c985248 + c7b1da0 commit 8d11b11

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

go.mod

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

55
require (
66
github.com/stretchr/testify v1.7.0
7-
github.com/swaggo/files/v2 v2.0.0
7+
github.com/swaggo/files/v2 v2.0.2
88
github.com/swaggo/swag v1.8.1
99
)
1010

go.sum

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@ github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5Cc
5757
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
5858
github.com/swaggo/files/v2 v2.0.0 h1:hmAt8Dkynw7Ssz46F6pn8ok6YmGZqHSVLZ+HQM7i0kw=
5959
github.com/swaggo/files/v2 v2.0.0/go.mod h1:24kk2Y9NYEJ5lHuCra6iVwkMjIekMCaFq/0JQj66kyM=
60+
github.com/swaggo/files/v2 v2.0.2 h1:Bq4tgS/yxLB/3nwOMcul5oLEUKa877Ykgz3CJMVbQKU=
61+
github.com/swaggo/files/v2 v2.0.2/go.mod h1:TVqetIzZsO9OhHX1Am9sRf9LdrFZqoK49N37KON/jr0=
6062
github.com/swaggo/swag v1.8.1 h1:JuARzFX1Z1njbCGz+ZytBR15TFJwF2Q7fu8puJHhQYI=
6163
github.com/swaggo/swag v1.8.1/go.mod h1:ugemnJsPZm/kRwFUnzBlbHRd0JY9zE1M4F+uy2pAaPQ=
6264
github.com/urfave/cli/v2 v2.3.0/go.mod h1:LJmUH05zAU44vOAcrfzZQKsZbVcdbOG8rtL3/XcUArI=

swagger_test.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -394,6 +394,7 @@ func TestUIConfigOptions(t *testing.T) {
394394
PersistAuthorization: false,
395395
Layout: StandaloneLayout,
396396
DefaultModelsExpandDepth: ShowModel,
397+
ShowExtensions: false,
397398
},
398399
exp: `window.onload = function() {
399400
@@ -412,7 +413,8 @@ func TestUIConfigOptions(t *testing.T) {
412413
SwaggerUIBundle.plugins.DownloadUrl
413414
],
414415
layout: "StandaloneLayout",
415-
defaultModelsExpandDepth: 1
416+
defaultModelsExpandDepth: 1 ,
417+
showExtensions: false
416418
})
417419
418420
window.ui = ui
@@ -445,6 +447,7 @@ func TestUIConfigOptions(t *testing.T) {
445447
"defaultModelRendering": `"model"`,
446448
},
447449
DefaultModelsExpandDepth: HideModel,
450+
ShowExtensions: true,
448451
},
449452
exp: `window.onload = function() {
450453
const SomePlugin = (system) => ({
@@ -472,7 +475,8 @@ func TestUIConfigOptions(t *testing.T) {
472475
onComplete: () => { window.ui.setBasePath('v3'); },
473476
showExtensions: true,
474477
layout: "StandaloneLayout",
475-
defaultModelsExpandDepth: -1
478+
defaultModelsExpandDepth: -1 ,
479+
showExtensions: true
476480
})
477481
478482
window.ui = ui

0 commit comments

Comments
 (0)