Skip to content

Commit

Permalink
AddProblemDetails to example projects
Browse files Browse the repository at this point in the history
  • Loading branch information
commonsensesoftware committed Nov 26, 2022
1 parent 3b85f84 commit 71a5be9
Show file tree
Hide file tree
Showing 11 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions examples/AspNetCore/OData/ODataAdvancedExample/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
// Add services to the container.

builder.Services.AddControllers().AddOData();
builder.Services.AddProblemDetails();
builder.Services.AddApiVersioning(
options =>
{
Expand Down
1 change: 1 addition & 0 deletions examples/AspNetCore/OData/ODataBasicExample/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
// Add services to the container.

builder.Services.AddControllers().AddOData();
builder.Services.AddProblemDetails();
builder.Services.AddApiVersioning()
.AddOData(
options =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
// Add services to the container.

builder.Services.AddControllers().AddOData();
builder.Services.AddProblemDetails();
builder.Services.AddApiVersioning(
options =>
{
Expand Down
1 change: 1 addition & 0 deletions examples/AspNetCore/OData/ODataOpenApiExample/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
options.RouteOptions.EnableQualifiedOperationCall = false;
options.RouteOptions.EnableUnqualifiedOperationCall = true;
} );
builder.Services.AddProblemDetails();
builder.Services.AddApiVersioning(
options =>
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@

builder.Services.AddControllers()
.AddOData( options => options.Select() );
builder.Services.AddProblemDetails();
builder.Services.AddApiVersioning()
.AddODataApiExplorer(
options =>
Expand Down
1 change: 1 addition & 0 deletions examples/AspNetCore/WebApi/BasicExample/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
// Add services to the container.

builder.Services.AddControllers();
builder.Services.AddProblemDetails();
builder.Services.AddApiVersioning(
options =>
{
Expand Down
1 change: 1 addition & 0 deletions examples/AspNetCore/WebApi/ByNamespaceExample/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
// Add services to the container.

builder.Services.AddControllers();
builder.Services.AddProblemDetails();
builder.Services.AddApiVersioning(
options =>
{
Expand Down
1 change: 1 addition & 0 deletions examples/AspNetCore/WebApi/ConventionsExample/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
// Add services to the container.

builder.Services.AddControllers();
builder.Services.AddProblemDetails();
builder.Services.AddApiVersioning(
options =>
{
Expand Down
2 changes: 2 additions & 0 deletions examples/AspNetCore/WebApi/MinimalApiExample/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

// Add services to the container.

builder.Services.AddProblemDetails();

// enable api versioning and return the headers
// "api-supported-versions" and "api-deprecated-versions"
builder.Services.AddApiVersioning( options => options.ReportApiVersions = true );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
var services = builder.Services;

// Add services to the container.
services.AddProblemDetails();
services.AddEndpointsApiExplorer();
services.AddApiVersioning(
options =>
Expand Down
1 change: 1 addition & 0 deletions examples/AspNetCore/WebApi/OpenApiExample/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
// Add services to the container.

builder.Services.AddControllers();
builder.Services.AddProblemDetails();
builder.Services.AddApiVersioning(
options =>
{
Expand Down

0 comments on commit 71a5be9

Please sign in to comment.