Skip to content

No headers bodytype - #1918

Merged
ysangkok merged 5 commits into
haskell-servant:masterfrom
bellroy:no-headers-bodytype
Sep 17, 2026
Merged

ysangkok merged 5 commits into
haskell-servant:masterfrom
bellroy:no-headers-bodytype

Conversation

@lrworth

@lrworth lrworth commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

This is a renewal of this PR against biocad/servant-openapi3.

Stop BodyTypes incorrectly adding NoContent to the list of body types if it appears within a Headers (on endpoints that set response headers but don't return a response body).

Recurse through `Headers hdrs` just like any other decorator that
should be ignored.
@JackKelly-Bellroy

Copy link
Copy Markdown
Contributor

Thanks for doing this.

@ysangkok

ysangkok commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

The compilation failure seems related to this change, but I haven't looked very much into it. Would you say it is a problem with this PR, or a problem with the CI suite?

@lrworth
lrworth force-pushed the no-headers-bodytype branch from 5a37772 to 2640ded Compare September 8, 2026 22:15
@lrworth

lrworth commented Sep 8, 2026

Copy link
Copy Markdown
Contributor Author

The compilation failure seems related to this change, but I haven't looked very much into it. Would you say it is a problem with this PR, or a problem with the CI suite?

As rare as it is these days, PEBKAC.

JackKelly-Bellroy and others added 4 commits September 9, 2026 08:58
Unconditionally requesting `ToSchema a` etc means that we erroneously
demand `ToSchema NoContent`. Instead delegate to the `HasOpenApi`
instance for the related `Verb`, allowing the overlapping instances
for `NoContent` to be selected.
@lrworth
lrworth force-pushed the no-headers-bodytype branch from 2640ded to 7756702 Compare September 8, 2026 22:59

@LaurentRDC LaurentRDC 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.

This is great, thanks!

@ysangkok
ysangkok merged commit 5f059a4 into haskell-servant:master Sep 17, 2026
10 checks passed
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