Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support API modifier #34

Open
poscat0x04 opened this issue Mar 31, 2020 · 3 comments
Open

Support API modifier #34

poscat0x04 opened this issue Mar 31, 2020 · 3 comments

Comments

@poscat0x04
Copy link

It would be nice if we can distinguish between optional and required arguments.

@alpmestan
Copy link
Contributor

Are you talking about individual components of the "form" being optional/required, or the whole multipart request body?

@poscat0x04
Copy link
Author

poscat0x04 commented Apr 1, 2020

Optional individual components, that is to distinguish optional/required/multiple at the type level, much like QueryParam' and QueryParams.

@alpmestan
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants