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

Adding the required flag to request bodies, matching servant semantics #49

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

lepsa
Copy link

@lepsa lepsa commented Sep 13, 2023

servant-openapi3 isn't setting the required flag for marking request bodies as required. This PR updates the ReqBody' instance to add that flag.

Request bodies are optional by default
https://swagger.io/docs/specification/describing-request-body/

Servant requires request bodies to be Required.
https://hackage.haskell.org/package/servant-0.20/docs/Servant-API-ReqBody.html

Copy link
Contributor

@fisx fisx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks!

@isomorpheme
Copy link

Note that there's PR haskell-servant/servant#1347 to no longer ignore Optional when used with ReqBody', so then it's not always required.

@MangoIV
Copy link

MangoIV commented Jan 17, 2024

Hi! Is there anything we can do to move this forward?

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

Successfully merging this pull request may close these issues.

4 participants