We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I want to change swagger.json url.
if we can change it, we can have multiple swagger definitions with #27 like below.
publicSwPlugin := swagger.NewPlugin(&swagger.Options{ // SwaggerJSONPath: "/api/swagger.json", this is default Object: &swagger.Object{ Info: &swagger.Info{ Title: "Todo list", Version: "v1", }, Schemes: []string{"http"}, }, DefinitionNameModifier: func(refT reflect.Type, defName string) string { if strings.HasSuffix(defName, "JSON") { return defName[:len(defName)-4] } return defName }, IgnoreRoute: func(rd *ucon.RouteDefinition) bool { return strings.HasPrefix(rd.PathTemplate.PathTemplate, "/admin") }, }) ucon.Plugin(publicSwPlugin) adminSwPlugin := swagger.NewPlugin(&swagger.Options{ SwaggerJSONPath: "/admin/api/swagger.json", Object: &swagger.Object{ Info: &swagger.Info{ Title: "Todo list", Version: "v1", }, Schemes: []string{"http"}, }, DefinitionNameModifier: func(refT reflect.Type, defName string) string { if strings.HasSuffix(defName, "JSON") { return defName[:len(defName)-4] } return defName }, IgnoreRoute: func(rd *ucon.RouteDefinition) bool { return !strings.HasPrefix(rd.PathTemplate.PathTemplate, "/admin") }, }) ucon.Plugin(adminSwPlugin)
The text was updated successfully, but these errors were encountered:
looks good.
Sorry, something went wrong.
No branches or pull requests
I want to change swagger.json url.
if we can change it, we can have multiple swagger definitions with #27 like below.
The text was updated successfully, but these errors were encountered: