Skip to content

Commit

Permalink
#3861 V2 NuGetEntityTypeSerializer Id link patcher must retain curate…
Browse files Browse the repository at this point in the history
…d feed name (#3864)
  • Loading branch information
xavierdecoster committed May 18, 2017
1 parent dda7922 commit 2538748
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ private void TryAnnotateV2FeedPackage(ODataEntry entry, EntityInstanceContext en

private static void NormalizeNavigationLinks(ODataEntry entry, HttpRequestMessage request, V2FeedPackage instance, string normalizedVersion)
{
var idLink = BuildIdLink("v2", instance.Id, normalizedVersion, request);
var idLink = BuildIdLink(instance.Id, normalizedVersion, request);

if (entry.ReadLink != null)
{
Expand Down Expand Up @@ -135,9 +135,9 @@ private static Uri BuildLinkForStreamProperty(string routePrefix, string id, str
return builder.Uri;
}

private static Uri BuildIdLink(string routePrefix, string id, string version, HttpRequestMessage request)
private static Uri BuildIdLink(string id, string version, HttpRequestMessage request)
{
return new Uri($"{request.RequestUri.Scheme}://{request.RequestUri.Host}/api/{routePrefix}/Packages(Id='{id}',Version='{version}')");
return new Uri($"{request.RequestUri.Scheme}://{request.RequestUri.Host}{request.RequestUri.LocalPath}(Id='{id}',Version='{version}')");
}

private static string EnsureTrailingSlash(string url)
Expand Down

0 comments on commit 2538748

Please sign in to comment.