Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go 1.17

require (
github.com/stretchr/testify v1.7.0
github.com/swaggo/files/v2 v2.0.0
github.com/swaggo/files/v2 v2.0.2
github.com/swaggo/swag v1.8.1
)

Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5Cc
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/swaggo/files/v2 v2.0.0 h1:hmAt8Dkynw7Ssz46F6pn8ok6YmGZqHSVLZ+HQM7i0kw=
github.com/swaggo/files/v2 v2.0.0/go.mod h1:24kk2Y9NYEJ5lHuCra6iVwkMjIekMCaFq/0JQj66kyM=
github.com/swaggo/files/v2 v2.0.2 h1:Bq4tgS/yxLB/3nwOMcul5oLEUKa877Ykgz3CJMVbQKU=
github.com/swaggo/files/v2 v2.0.2/go.mod h1:TVqetIzZsO9OhHX1Am9sRf9LdrFZqoK49N37KON/jr0=
github.com/swaggo/swag v1.8.1 h1:JuARzFX1Z1njbCGz+ZytBR15TFJwF2Q7fu8puJHhQYI=
github.com/swaggo/swag v1.8.1/go.mod h1:ugemnJsPZm/kRwFUnzBlbHRd0JY9zE1M4F+uy2pAaPQ=
github.com/urfave/cli/v2 v2.3.0/go.mod h1:LJmUH05zAU44vOAcrfzZQKsZbVcdbOG8rtL3/XcUArI=
Expand Down
8 changes: 6 additions & 2 deletions swagger_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -388,6 +388,7 @@ func TestUIConfigOptions(t *testing.T) {
PersistAuthorization: false,
Layout: StandaloneLayout,
DefaultModelsExpandDepth: ShowModel,
ShowExtensions: false,
},
exp: `window.onload = function() {

Expand All @@ -406,7 +407,8 @@ func TestUIConfigOptions(t *testing.T) {
SwaggerUIBundle.plugins.DownloadUrl
],
layout: "StandaloneLayout",
defaultModelsExpandDepth: 1
defaultModelsExpandDepth: 1 ,
showExtensions: false
})

window.ui = ui
Expand Down Expand Up @@ -439,6 +441,7 @@ func TestUIConfigOptions(t *testing.T) {
"defaultModelRendering": `"model"`,
},
DefaultModelsExpandDepth: HideModel,
ShowExtensions: true,
},
exp: `window.onload = function() {
const SomePlugin = (system) => ({
Expand Down Expand Up @@ -466,7 +469,8 @@ func TestUIConfigOptions(t *testing.T) {
onComplete: () => { window.ui.setBasePath('v3'); },
showExtensions: true,
Copy link
Copy Markdown

@oleg-tsyganii-cariad oleg-tsyganii-cariad May 20, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also wanted to do the same test fix in my PR but was confused why showExtensions mentioned twice in this block

layout: "StandaloneLayout",
defaultModelsExpandDepth: -1
defaultModelsExpandDepth: -1 ,
showExtensions: true
})

window.ui = ui
Expand Down