Is there an existing issue for this?
Describe the bug
I am getting an "Object reference not set to an instance of an object" error in https://github.com/dotnet/dotnet/blob/1c23bbd05201330c302a0a8c7b55b4368df573e6/src/aspnetcore/src/OpenApi/gen/XmlCommentGenerator.Emitter.cs#L447 due to my route having a parameter that is NOT being used in the controller. This worked fine in previous .NET verisons.
ERROR:
Controller that breaks it (all my controllers are designed like this, so pretty much none of my controllers work)
This is what I see when debugging.
Any idea on how to avoid this exception? It is preventing me from moving forward with NET 10.
Expected Behavior
To not throw an exception. It breaks the API.
Steps To Reproduce
Exceptions (if any)
System.NullReferenceException: 'Object reference not set to an instance of an object.'
.NET Version
10
Anything else?
No response