Skip to content

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

Open
lepsa wants to merge 1 commit intobiocad:masterfrom
lepsa:required-request-bodies
Open

Adding the required flag to request bodies, matching servant semantics#49
lepsa wants to merge 1 commit intobiocad:masterfrom
lepsa:required-request-bodies

Conversation

@lepsa
Copy link
Copy Markdown

@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
Copy Markdown
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
Copy Markdown

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
Copy Markdown

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