Upload(IFormFile file, [FromForm]IEnumerable<MetadataValue> list)
public class MetadataValue
{
public Metadata Metadata { get; set; }
public string Value { get; set; }
}
public enum Metadata
{
Cat1,
Cat2
}
A list of MetadataValue is displayed like an array of string inputs. I was not able to determine how should I pass the data to the controller - I'm always receiving an empty collection.
Everything is working when I'm sending a request from Postman. This is handled by dot pattern/notation.
In Postman each parameter and each property of a complex object is being sent as a separate field:
I'm trying to upload a file with some metadata:
A list of MetadataValue is displayed like an array of string inputs. I was not able to determine how should I pass the data to the controller - I'm always receiving an empty collection.
Everything is working when I'm sending a request from Postman. This is handled by dot pattern/notation.
In Postman each parameter and each property of a complex object is being sent as a separate field:
How can I achieve this in Swagger UI? How can I configure Swagger for better UI generation?
I'm using:
.NET Core 3.1 Swashbuckle.AspNetCore 5.5.1