Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 0a99931

Browse filesBrowse files
Case 'code' attribute for JSON
1 parent 93495ad commit 0a99931
Copy full SHA for 0a99931

File tree

Expand file treeCollapse file tree

2 files changed

+5
-6
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+5
-6
lines changed

‎src/AspNet/WebApi/src/Asp.Versioning.WebApi/ProblemDetailsFactory.cs

Copy file name to clipboardExpand all lines: src/AspNet/WebApi/src/Asp.Versioning.WebApi/ProblemDetailsFactory.cs
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
namespace Asp.Versioning;
55

66
using Newtonsoft.Json;
7-
using System.Web.Http;
87
using static Asp.Versioning.ProblemDetailsDefaults;
98
using static Newtonsoft.Json.NullValueHandling;
109
using static System.Globalization.CultureInfo;

‎src/AspNetCore/WebApi/src/Asp.Versioning.Http/DefaultProblemDetailsFactory.cs

Copy file name to clipboardExpand all lines: src/AspNetCore/WebApi/src/Asp.Versioning.Http/DefaultProblemDetailsFactory.cs
+5-5Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,24 +51,24 @@ public ProblemDetails CreateProblemDetails(
5151
/// <exception cref="ArgumentNullException"><paramref name="problemDetails"/> is <c>null</c>.</exception>
5252
public static void ApplyExtensions( ProblemDetails problemDetails )
5353
{
54-
const string Code = nameof( Code );
54+
const string code = nameof( code );
5555
var type = ( problemDetails ?? throw new ArgumentNullException( nameof( problemDetails ) ) ).Type;
5656

5757
if ( type == Ambiguous.Type )
5858
{
59-
problemDetails.Extensions[Code] = Ambiguous.Code;
59+
problemDetails.Extensions[code] = Ambiguous.Code;
6060
}
6161
else if ( type == Invalid.Type )
6262
{
63-
problemDetails.Extensions[Code] = Invalid.Code;
63+
problemDetails.Extensions[code] = Invalid.Code;
6464
}
6565
else if ( type == Unspecified.Type )
6666
{
67-
problemDetails.Extensions[Code] = Unspecified.Code;
67+
problemDetails.Extensions[code] = Unspecified.Code;
6868
}
6969
else if ( type == Unsupported.Type )
7070
{
71-
problemDetails.Extensions[Code] = Unsupported.Code;
71+
problemDetails.Extensions[code] = Unsupported.Code;
7272
}
7373
}
7474
}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.