Swagger-Net icon indicating copy to clipboard operation
Swagger-Net copied to clipboard

Inject plugin

Open splendid25 opened this issue 3 years ago • 1 comments

Hi,

I'm trying to add a plugin to swagger-ui, like so : https://github.com/swagger-api/swagger-ui/issues/3876#issuecomment-412476501

I can inject a custom javascript for the plugin, but I can't find a way to inject it to the plugin list in the SwaggerUIBundle method.

const ui = SwaggerUIBundle({
	//...
	plugins: [ SwaggerUIBundle.plugins.DownloadUrl ], //=> how to customise ?
	//...
});

Is it possible ? Thanks

splendid25 avatar Apr 21 '22 09:04 splendid25

Yes that sounds about right... I never tried that myself, this is the file you will need to change: https://github.com/heldersepu/Swagger-Net/blob/6afdb0c1ba611273f27e8a904ec2bb06a630b1b4/Swagger.Net/SwaggerUi/CustomAssets/index.html#L109

heldersepu avatar Apr 21 '22 12:04 heldersepu