Closed abdusco closed 3 weeks ago
This issue is stale because it has been open for 60 days with no activity. It will be automatically closed in 14 days if no further updates are made.
This issue was closed because it has been inactive for 14 days since being marked as stale.
I've come across this usecase where I wanted to serve the same OpenAPI document twice with two different sets of operation IDs.
It would have been easier if I could inject
ISwaggerGenerator
inside anIDocumentFilter
implementation,but I hit this wall:
exception I get
So I decided to go with a custom
ISwaggerProvider
, but it has no virtual methods. This means I can't access to runtime information to enhance operation ids inside a subclass without reimplementing the whole logic. All I have is the what's left after Swashbuckle does its thing.If would be nice if methods of the
SwaggerGenerator
wereprotected virtual
so I could override & modify their output and still have access toApiDescription
info ASP.NET Core provides.https://github.com/domaindrivendev/Swashbuckle.AspNetCore/blob/21391c2ea7dcb407784689ad861560623169673f/src/Swashbuckle.AspNetCore.SwaggerGen/SwaggerGenerator/SwaggerGenerator.cs#L134