-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multiple UseSwaggerUI support removed? #1996
Comments
Hi @effyteva. In the latest version, if you're configuring the So, for your usecase you'll need to use the overload that accepts a specific instance of options instead of the setup action: app.UseSwaggerUI(new SwaggerUIOptions
{
RoutePrefix = "foo-docs",
ConfigObject = new ConfigObject
{
Urls = new[] { new UrlDescriptor { Url = "/swagger/foo/swagger.json", Name = "Foo Docs"} }
}
});
app.UseSwaggerUI(new SwaggerUIOptions
{
RoutePrefix = "bar-docs",
ConfigObject = new ConfigObject
{
Urls = new[] { new UrlDescriptor { Url = "/swagger/bar/swagger.json", Name = "Bar Docs"} }
}
}); |
Thank you @domaindrivendev Effy |
That helped me out! Thank you so much for the ConfigObject usage Example! I worked for days to have two different Swagger UIs for different endpoints! |
Hi,
We're trying to migrate to the new 6.0.2 release,
We're currently using UseSwaggerUI twice, while each UI renders different API methods (one is used for the most common methods, and the other for all methods regardless of their usage).
The methods are excluded using the DocInclusionPredicate, based on the DocumentName.
After migrating to the new 6.0.2 release, only the second UseSwaggerUI call is actually working, and the first one seems to be completely ignored.
Is that intended behavior or a bug? Is there any other way to achieve multiple endpoints with different methods?
Thank you,
Effy
The text was updated successfully, but these errors were encountered: