Two SwaggerUI for one Solution
Hey guys, I have been looking around for a way to create two SwaggerUI for one project. I want to create a separate document just for 3 Endpoints to be displayed while the other contains all the endpoints. Is this doable? If anyone has any leads, I'd really appreciate it.
8 Replies
Ooof, this awoke some bad memories lol
I was fighting with the very same issue not long ago
Lemme dig up the code I used
this is inside of the
Startup.cs
And it uses processors like this:
IIRC, it kinda-sorta uses the API versioning mechanism of SwaggerUI, so instead of switching between V1/V2/V3 and so on, you switch between public/internal/whatever
Haven't found a way that would be without this tradeoffOmg! Thanks a lotttt. I will test this out and see what it produces.
@Angius one question if you don't mind, in what namespace is "NSwagNestedNameGenerator" available? or is it a different package than NSwag?
Ah, that's also my own class
I think you can just not set it
Ah alright. It threw me off a bit. I will test it now and see.
@Angius thanks a lot. It worked like a charm. Life saver. 🙇
Nice
anywhere to change the title of the document?
settings.DocumentName = "public";
should be it
If not, not sure
There probably is some wayyeah I figured it out. it has a property to add a title