-
Notifications
You must be signed in to change notification settings - Fork 712
NullReferenceException in TryMatchModelVersion with OData + OpenAPI and only the default version #850
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Interesting. I'll have a look. The strange thing is the current source doesn't show anything on line 198. The repro will definitely help. Thanks |
This is in the Line 198 in f5cd8e5
|
Doh! Hmm... looks like |
I'm thinking my example code is missing a call to what was previously |
I found the root cause. It's here: Line 124 in 9f7ecd8
This is an over-optimization. OData adds some additional endpoints based on convention, but doesn't copy the existing metadata from any other endpoints. This is problematic when there are multiple EDMs, but also if API Versioning never got a chance to visit the endpoint. As a result, you can end up with a versioned endpoint that doesn't have the API Versioning metadata attached. The first clue is skipping over the
But the
The fix will go into the next release. Thanks for putting together the repo. It helped track down the issue. |
|
Hi.
When I try to get swagger.json for an OData API which exposes only the default version, the following exception occurs:
I will create a PR with a sample project that can reproduce the issue.
I'm using the latest code from the
dev/css/preview3-fixes
branch with an ASP.NET Core web application targeting .NET Core 3.1.It seems to be different than #837
Thank you.
The text was updated successfully, but these errors were encountered: