Skip to content

Allow adding external scripts to the index.html #83

@Zhomart

Description

@Zhomart

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/htm@3.1.1/dist/htm.js"),
		httpSwagger.ScriptSrc("https://unpkg.com/react@17.0.2/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
	))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions