I have an asp.net WebApi REST application where I have included Swashbuckle to get Swagger support for my endpoints.
I have injected some custom JavaScript where I want to customize the header section of the UI (a bit more than what I can so with just the CSS).
Ie I have added.
.EnableSwaggerUi( c =>
c.InjectJavaScript(Assembly.GetExecutingAssembly(), "my.swagger.js");
I wish to pass some extra data to this JavaScript so I can the add to the custom header I will build in code.
Adding a breakpoint in my JavaScript, I can see the following objects in the global scope...
- swaggerApi
- swaggerUi
- swashbuckleConfig
Is there any way add some data to any of these objects (from my C# code), so I can then consume it in my JavaScript?