Swashbuckle.AspNetCore
Swashbuckle.AspNetCore copied to clipboard
array of objects property in multipart/form-data (FormForm)
Hi,
I am posting an object with property that is an array of objects. When I execute method I get an empty array/ienumerable for "NestedList" property even though I have added two items in the UI.
public class NestedRequest {
public int MyProperty { get; set; }
}
public class SampleRequest
{
public IEnumerable<NestedRequest> NestedList { get; set; }= null!;
}
[HttpPost()]
public async override Task<ActionResult> HandleAsync([FromForm] SampleRequest request, CancellationToken cancellationToken = default)
{
return await Task.FromResult(new OkResult());
}