fix: Add JSON string enum converter for Issue Management API
- Configure AddControllers() with JsonStringEnumConverter
- Allows API to accept Issue type/priority/status as strings ("Story", "High", "Backlog")
- Frontend can now send readable enum values instead of integers
- All Issue Management CRUD operations tested and working
Test results:
- Create Issue (Story, Bug, Task) ✓
- List all issues ✓
- Filter by status (Backlog, InProgress) ✓
- Change issue status (Kanban workflow) ✓
- Update issue details ✓
- Multi-tenant isolation verified ✓
This commit is contained in:
@@ -44,8 +44,12 @@ builder.Services.Configure<Microsoft.AspNetCore.ResponseCompression.GzipCompress
|
||||
options.Level = System.IO.Compression.CompressionLevel.Fastest;
|
||||
});
|
||||
|
||||
// Add controllers
|
||||
builder.Services.AddControllers();
|
||||
// Add controllers with JSON string enum converter
|
||||
builder.Services.AddControllers()
|
||||
.AddJsonOptions(options =>
|
||||
{
|
||||
options.JsonSerializerOptions.Converters.Add(new System.Text.Json.Serialization.JsonStringEnumConverter());
|
||||
});
|
||||
|
||||
// Configure exception handling (IExceptionHandler - .NET 8+)
|
||||
builder.Services.AddExceptionHandler<GlobalExceptionHandler>();
|
||||
|
||||
Reference in New Issue
Block a user