Skip to content

Commit 4480e6b

Browse files
committed
fix(link-builder): do not dasherize routes by default
1 parent aec7e1c commit 4480e6b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/JsonApiDotNetCore/Builders/LinkBuilder.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,18 +26,18 @@ private string GetNamespaceFromPath(string path, string entityName)
2626

2727
for(var i = 1; i < segments.Length; i++)
2828
{
29-
if(segments[i].ToLower() == entityName.Dasherize())
29+
if(segments[i].ToLower() == entityName)
3030
break;
3131

32-
nSpace += $"/{segments[i].Dasherize()}";
32+
nSpace += $"/{segments[i]}";
3333
}
3434

3535
return nSpace;
3636
}
3737

3838
public string GetSelfRelationLink(string parent, string parentId, string child)
3939
{
40-
return $"{_context.BasePath}/{parent.Dasherize()}/{parentId}/relationships/{child.Dasherize()}";
40+
return $"{_context.BasePath}/{parent}/{parentId}/relationships/{child}";
4141
}
4242

4343
public string GetRelatedRelationLink(string parent, string parentId, string child)

0 commit comments

Comments
 (0)