Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allows instance names to be configured #174

Closed
wants to merge 1 commit into from
Closed
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
3 changes: 2 additions & 1 deletion swagger.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ type Config struct {
DeepLinking bool
DocExpansion string
DefaultModelsExpandDepth int
InstanceName string
}

// URL presents the url pointing to API definition (normally swagger.json or swagger.yaml).
Expand Down Expand Up @@ -109,7 +110,7 @@ func CustomWrapHandler(config *Config, handler *webdav.Handler) gin.HandlerFunc
case "index.html":
_ = index.Execute(c.Writer, config)
case "doc.json":
doc, err := swag.ReadDoc()
doc, err := swag.ReadDoc(config.InstanceName)
if err != nil {
c.AbortWithStatus(http.StatusInternalServerError)

Expand Down