-
Notifications
You must be signed in to change notification settings - Fork 717
Closed
Labels
Description
Is there an existing issue for this?
- I have searched the existing issues
Describe the bug
Adding [AdvertiseApiVersions] attribute to either Controller or Method causes stack overflow exception when enumarted.
Because AdvertiseApiVersionsAttribute.GetHashCode() doesn't call base.GetHashCode() it causes a stackoverflow when enumerated. I.e when Swagger generates docs (Swashbuckle.AspNetCore.SwaggerGen.SwaggerGenerator.GenerateResponse)
Expected Behavior
Adding [AdvertiseApiVersions] does not cause stack overflow when enumerated.
Steps To Reproduce
Add [AdvertiseApiVersions(3.0)] attribute to a controller V2/Controllers/OrdersController.cs in your example (AspNetCore/OpenApiExample)
Exceptions (if any)
If I completely misunderstand the reason for [AdvertiseApiVersions]
.NET Version
7.0.100
Anything else?
I was unable to get the FormatProviderTest to run locally, otherwise this would've been a PR 😢