The Error
Response still camelCase:
{"firstName": "John"}Quick Fix - 1 Min
1. builder.Services.ConfigureHttpJsonOptions(o => o.SerializerOptions.PropertyNamingPolicy = null). 2. Not Configure<JsonOptions> - that's for MVC. 3. Or app.MapGet("/", () => result).WithMetadata(new JsonOptionsAttribute())
Root Cause
Minimal APIs use HttpJsonOptions. MVC uses JsonOptions. Different services.
No comments yet. Be the first to share your thoughts!