You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently these is no way to add more <script src="local or extern"> </script> tags. Having this is useful to add local or external swagger-ui plugins.
I'm thinking of this kind of config
r.Get("/swagger/*", httpSwagger.Handler(
httpSwagger.ScriptSrc("https://unpkg.com/[email protected]/dist/htm.js"),
httpSwagger.ScriptSrc("https://unpkg.com/[email protected]/umd/react.production.min.js"),
httpSwagger.ScriptSrc("/static/myplugin.js"),
httpSwagger.Plugins([]string{"MyPlugin"}),
httpSwagger.URL("http://localhost:1323/swagger/doc.json"), //The url pointing to API definition
))
The text was updated successfully, but these errors were encountered:
Zhomart
added a commit
to Zhomart/http-swagger
that referenced
this issue
Jan 13, 2023
Summary: This allows importing plugins from local and external hosts.
```
r.Get("/swagger/*", httpSwagger.Handler(
httpSwagger.ScriptSrc("/static/swagger-helper.js"),
httpSwagger.ScriptSrc("https://unpkg.com/[email protected]/build/index.js"),
httpSwagger.Plugins([]string{"DisableTryItOutWithoutServersPlugin"},
httpSwagger.URL("http://localhost:1323/swagger/doc.json"), //The url pointing to API definition
))
```
Closesswaggo#83
Test Plan: Updated existing tests. Added example in example/go-chi/
Summary: This allows importing plugins from local and external hosts.
```
r.Get("/swagger/*", httpSwagger.Handler(
httpSwagger.ScriptSrc("/static/swagger-helper.js"),
httpSwagger.ScriptSrc("https://unpkg.com/[email protected]/build/index.js"),
httpSwagger.Plugins([]string{"DisableTryItOutWithoutServersPlugin"},
httpSwagger.URL("http://localhost:1323/swagger/doc.json"), //The url pointing to API definition
))
```
Closesswaggo#83
Test Plan: Updated existing tests. Added example in example/go-chi/
Currently these is no way to add more
<script src="local or extern"> </script>
tags. Having this is useful to add local or externalswagger-ui
plugins.I'm thinking of this kind of config
The text was updated successfully, but these errors were encountered: