-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Description
Is there an existing issue for this?
- I have searched the existing issues
Is your feature request related to a problem? Please describe the problem.
Hi Maintainers,
Currently there doesn't seem to be an option to dynamically pass ie. the EntryAssembly XML documents to AddOpenApi() if AddOpenApi() lives inside a Nuget package which is referenced by the EntryAssembly. This means that we can't generate OpenApi documentation for Controllers/Models that live inside the EntryAssembly.
This is a similar issue to #62941 except assume the class library given in that sample repo is a Nuget package referenced by the EntryAssembly.
This feature was previously possible when using Swashbuckle.WebApi.
Example Scenario:
- Create Organisation.Common Nuget package with
WebApplication.CreateBuilder()and all the common bootstrapping code along withAddOpenApi()andMapOpenApi()in it. - EntryAssembly which as Program.Main() references the Organisation.Common Nuget Package
- EntryAssembly calls the common bootstrapper code.
- Enable XML documentation for EntryAssembly.
- Build and run EntryAssembly.
- No OpenAPI documentation is produced for the Controllers and Models in EntryAssembly.
Thanks
Describe the solution you'd like
Provide a way to dynamically pass XML documenation files to AddOpenApi() just like SwashBuckle so that if an Organisation has a Nuget package with all the common bootstrap code in it then OpenApi documentation can still be generated for the Controllers and Models in the EntryAssembly.
Additional context
Enable XML documentation in an ASP.NET Core API project
Microsoft.AspNetCore.OpenApi 10.0.0
dotnet --version
10.0.100