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 71a5be9

Browse filesBrowse files
AddProblemDetails to example projects
1 parent 3b85f84 commit 71a5be9
Copy full SHA for 71a5be9

File tree

Expand file treeCollapse file tree

11 files changed

+12
-0
lines changed
Filter options
Expand file treeCollapse file tree

11 files changed

+12
-0
lines changed

‎examples/AspNetCore/OData/ODataAdvancedExample/Program.cs

Copy file name to clipboardExpand all lines: examples/AspNetCore/OData/ODataAdvancedExample/Program.cs
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
// Add services to the container.
77

88
builder.Services.AddControllers().AddOData();
9+
builder.Services.AddProblemDetails();
910
builder.Services.AddApiVersioning(
1011
options =>
1112
{

‎examples/AspNetCore/OData/ODataBasicExample/Program.cs

Copy file name to clipboardExpand all lines: examples/AspNetCore/OData/ODataBasicExample/Program.cs
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
// Add services to the container.
66

77
builder.Services.AddControllers().AddOData();
8+
builder.Services.AddProblemDetails();
89
builder.Services.AddApiVersioning()
910
.AddOData(
1011
options =>

‎examples/AspNetCore/OData/ODataConventionsExample/Program.cs

Copy file name to clipboardExpand all lines: examples/AspNetCore/OData/ODataConventionsExample/Program.cs
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
// Add services to the container.
88

99
builder.Services.AddControllers().AddOData();
10+
builder.Services.AddProblemDetails();
1011
builder.Services.AddApiVersioning(
1112
options =>
1213
{

‎examples/AspNetCore/OData/ODataOpenApiExample/Program.cs

Copy file name to clipboardExpand all lines: examples/AspNetCore/OData/ODataOpenApiExample/Program.cs
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
options.RouteOptions.EnableQualifiedOperationCall = false;
2424
options.RouteOptions.EnableUnqualifiedOperationCall = true;
2525
} );
26+
builder.Services.AddProblemDetails();
2627
builder.Services.AddApiVersioning(
2728
options =>
2829
{

‎examples/AspNetCore/OData/SomeODataOpenApiExample/Program.cs

Copy file name to clipboardExpand all lines: examples/AspNetCore/OData/SomeODataOpenApiExample/Program.cs
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727

2828
builder.Services.AddControllers()
2929
.AddOData( options => options.Select() );
30+
builder.Services.AddProblemDetails();
3031
builder.Services.AddApiVersioning()
3132
.AddODataApiExplorer(
3233
options =>

‎examples/AspNetCore/WebApi/BasicExample/Program.cs

Copy file name to clipboardExpand all lines: examples/AspNetCore/WebApi/BasicExample/Program.cs
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
// Add services to the container.
66

77
builder.Services.AddControllers();
8+
builder.Services.AddProblemDetails();
89
builder.Services.AddApiVersioning(
910
options =>
1011
{

‎examples/AspNetCore/WebApi/ByNamespaceExample/Program.cs

Copy file name to clipboardExpand all lines: examples/AspNetCore/WebApi/ByNamespaceExample/Program.cs
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
// Add services to the container.
88

99
builder.Services.AddControllers();
10+
builder.Services.AddProblemDetails();
1011
builder.Services.AddApiVersioning(
1112
options =>
1213
{

‎examples/AspNetCore/WebApi/ConventionsExample/Program.cs

Copy file name to clipboardExpand all lines: examples/AspNetCore/WebApi/ConventionsExample/Program.cs
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
// Add services to the container.
99

1010
builder.Services.AddControllers();
11+
builder.Services.AddProblemDetails();
1112
builder.Services.AddApiVersioning(
1213
options =>
1314
{

‎examples/AspNetCore/WebApi/MinimalApiExample/Program.cs

Copy file name to clipboardExpand all lines: examples/AspNetCore/WebApi/MinimalApiExample/Program.cs
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
// Add services to the container.
44

5+
builder.Services.AddProblemDetails();
6+
57
// enable api versioning and return the headers
68
// "api-supported-versions" and "api-deprecated-versions"
79
builder.Services.AddApiVersioning( options => options.ReportApiVersions = true );

‎examples/AspNetCore/WebApi/MinimalOpenApiExample/Program.cs

Copy file name to clipboardExpand all lines: examples/AspNetCore/WebApi/MinimalOpenApiExample/Program.cs
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
var services = builder.Services;
1414

1515
// Add services to the container.
16+
services.AddProblemDetails();
1617
services.AddEndpointsApiExplorer();
1718
services.AddApiVersioning(
1819
options =>

‎examples/AspNetCore/WebApi/OpenApiExample/Program.cs

Copy file name to clipboardExpand all lines: examples/AspNetCore/WebApi/OpenApiExample/Program.cs
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
// Add services to the container.
1111

1212
builder.Services.AddControllers();
13+
builder.Services.AddProblemDetails();
1314
builder.Services.AddApiVersioning(
1415
options =>
1516
{

0 commit comments

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