domaindrivendev / Swashbuckle.AspNetCore

Swagger tools for documenting API's built on ASP.NET Core
MIT License
5.26k stars 1.32k forks source link

Fix NotSupportedException in AoT test project #3171

Closed martincostello closed 5 days ago

martincostello commented 6 days ago

Fix NotSupportedException being thrown with .NET 9 when accessing ModelMetadata.ElementType in a native AoT application due to Microsoft.AspNetCore.Mvc.ApiExplorer.IsEnhancedModelMetadataSupported being disabled.

Found while investigating #3153.