feat: Started Game controller - needs more error handling and handling for 404’s

This commit is contained in:
Michael Green
2023-06-12 10:09:16 +10:00
parent 0e70c9f999
commit 76673c42b9
5 changed files with 375 additions and 9 deletions

View File

@@ -28,6 +28,9 @@ builder.Services.AddControllers().AddJsonOptions(x =>
{
// serialize enums as strings in api responses (e.g. Role)
x.JsonSerializerOptions.Converters.Add(new JsonStringEnumConverter());
// suppress nulls
x.JsonSerializerOptions.DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull;
});
// Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle