Skip to content

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

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

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

Conversation

@lepsa

@lepsa lepsa commented Sep 13, 2023

Copy link
Copy Markdown

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

@fisx fisx left a comment

Copy link
Copy Markdown
Contributor

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

MangoIV commented Jan 17, 2024

Copy link
Copy Markdown

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