Skip to content

fix: Fix response format of PATCH endpoints - #71

Merged
janbuchar merged 1 commit into
janbuchar:masterfrom
toppynl:fix-patch-response
Feb 16, 2026
Merged

fix: Fix response format of PATCH endpoints#71
janbuchar merged 1 commit into
janbuchar:masterfrom
toppynl:fix-patch-response

Conversation

@Swahjak

@Swahjak Swahjak commented Nov 19, 2025

Copy link
Copy Markdown
Contributor

Fixes #70

@Swahjak

Swahjak commented Nov 19, 2025

Copy link
Copy Markdown
Contributor Author

@janbuchar I went the 'easy way' on this first attempt. This would obviously cause backward compatibility issues on clients that were generated based on the current openapi specs. I could also rewrite it to have a NewEntity and UpdatedEntity, but given the responses are the same I leave that up to you.

Comment thread src/openapi/generators.ts
tags,
responses: singleObjectResponses,
responses: {
200: composeRef('responses', singular, { prefix: 'Mutate' }),

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

@Swahjak Did you maybe mean to make this change under patch: below instead of get?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I guess I did, but to be honest I'm not sure given it has been a while.

@janbuchar janbuchar changed the title fix: nested doc entity on pathc request. Fixes #70 fix: Fix response format of PATCH endpoints Feb 16, 2026
@janbuchar

Copy link
Copy Markdown
Owner

Thank you @Swahjak and @GeKorm, LGTM

@janbuchar
janbuchar merged commit 50b1105 into janbuchar:master Feb 16, 2026
3 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.

Patch request incorrect response format

3 participants