-
Notifications
You must be signed in to change notification settings - Fork 26
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
Unable to transform links with .Net Core 3.1 and Microsoft.AspNetCore.Mvc.Versioning #35
Comments
It appears to be because the HttpContext RouteValues now contains a "version" which is not in the LinkSpec RouteValues. The following code inserted prior to
|
Further debugging suggests it is because of the lack of If I add in
|
I have figured out how to sort this with a LinksHandler
|
This is great info. Thanks for posting it, hopefully help anyone in future. |
Sweet thanks! Any word when this will be pushed to a package? |
I have been adding links successfully to a .Net Core 3.1 API project.
Today I have tried to add versioning to my API via the
Microsoft.AspNetCore.Mvc.Versioning
package and am now getting errors inLinkTransformationBuilderExtensions.AddRoutePath
.Specifically,
ctx.LinkGenerator.GetPathByRouteValues()
returns null for insert and delete links.I have added a .Net Core 3.1 sample project to my fork (https://github.com/doowruc/riskfirst.hateoas) which demonstrates the issue. This is a copy of the existing classes in the BasicSimple sample
The text was updated successfully, but these errors were encountered: