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
Originally posted by pvanhooren June 12, 2024
I am currently in the process of writing a second API application in our microservices codebase and I stumbled upon this package when researching how to combine two Swagger documentation pages.
I have set everything up to create the combined Swagger page with version selector and all, but now I can't find the option to inject
my own stylesheet and JavaScript file to customize the documentation. Our current Swagger page does have custom CSS and JavaScript, so I'd rather have it on our new combined one as well.
Now I cannot find the extension method in UseSwaggerForOcelotUI , which I assumed to be the substitution of UseSwaggerUI, which does support these extension methods. Therefore I assume this feature is not (yet) supported. I'd also love to hear if that's wrong and if there's a workaround. But if not, I'd like to suggest the idea of adding this here as it would be very helpful for my case and probably many others :)
try to use overload method with setupAction.
Something like:
app.UseSwaggerForOcelotUI(opt =>{// configure OcelotSwaggerUIOptions}, setup =>{// configure SwaggerUIOptions// 👇 this is place for yousetup.InjectJavascript("/swagger-ui/custom.js");setup.InjectStylesheet("/swagger-ui/custom.css");}).UseOcelot().Wait();
Discussed in #298
Originally posted by pvanhooren June 12, 2024
I am currently in the process of writing a second API application in our microservices codebase and I stumbled upon this package when researching how to combine two Swagger documentation pages.
I have set everything up to create the combined Swagger page with version selector and all, but now I can't find the option to inject
my own stylesheet and JavaScript file to customize the documentation. Our current Swagger page does have custom CSS and JavaScript, so I'd rather have it on our new combined one as well.
Now I cannot find the extension method in UseSwaggerForOcelotUI , which I assumed to be the substitution of UseSwaggerUI, which does support these extension methods. Therefore I assume this feature is not (yet) supported. I'd also love to hear if that's wrong and if there's a workaround. But if not, I'd like to suggest the idea of adding this here as it would be very helpful for my case and probably many others :)
Here's what I expect to be able to do:
or something along those lines. Again, I'm open for workarounds too, please join the discussion if you have anything to say on this topic!
The text was updated successfully, but these errors were encountered: