Open poscat0x04 opened 4 years ago
Are you talking about individual components of the "form" being optional/required, or the whole multipart request body?
Optional individual components, that is to distinguish optional/required/multiple at the type level, much like QueryParam' and QueryParams.
Ah... Hmm, well it's not entirely trivial to implement, you'd quite likely have to write your own variant on the multipart combinator from this package.
You can already have optional/required "fields" in the form, merely by using a Maybe
for the optional fields, but the design of this package is such that you need to parse all the optional/required values in a single "aggregated" data type. Separating everything is a lot trickier I think.
It would be nice if we can distinguish between optional and required arguments.