Skip to content

Commit 900d9ef

Browse files
Case 'code' attribute for JSON
1 parent dcf6c20 commit 900d9ef

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/AspNetCore/WebApi/src/Asp.Versioning.Http/Routing/EndpointProblem.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ internal static class EndpointProblem
1111
{
1212
internal static ProblemDetailsContext New( HttpContext context, ProblemDetailsInfo info, string detail )
1313
{
14-
const string Code = nameof( Code );
1514
var (type, title, code) = info;
1615
var newContext = new ProblemDetailsContext()
1716
{
@@ -27,7 +26,7 @@ internal static ProblemDetailsContext New( HttpContext context, ProblemDetailsIn
2726

2827
if ( string.IsNullOrEmpty( code ) )
2928
{
30-
newContext.ProblemDetails.Extensions[Code] = code;
29+
newContext.ProblemDetails.Extensions[nameof( code )] = code;
3130
}
3231

3332
return newContext;

0 commit comments

Comments
 (0)