-
Notifications
You must be signed in to change notification settings - Fork 337
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
feat(api): respond with 200/201 with empty json for successful PUT #12642
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Signed-off-by: slonka <[email protected]>
Reviewer Checklist🔍 Each of these sections need to be checked by the reviewer of the PR 🔍:
|
slonka
force-pushed
the
add-content-type-on-put
branch
from
January 22, 2025 19:26
2b7506e
to
05553eb
Compare
slonka
changed the title
feat(api): set content type on response without warnings
feat(api): respond with 204 on empty responses for PUT
Jan 22, 2025
lahabana
reviewed
Jan 23, 2025
slonka
force-pushed
the
add-content-type-on-put
branch
from
January 23, 2025 07:35
05553eb
to
6a43880
Compare
Signed-off-by: slonka <[email protected]>
slonka
force-pushed
the
add-content-type-on-put
branch
from
January 23, 2025 07:48
6a43880
to
eb53d57
Compare
lobkovilya
reviewed
Jan 23, 2025
@slonka title of the PR needs updating |
lahabana
reviewed
Jan 23, 2025
slonka
changed the title
feat(api): respond with 204 on empty responses for PUT
feat(api): respond with 200/201 with empty json for PUT
Jan 23, 2025
Signed-off-by: slonka <[email protected]>
slonka
force-pushed
the
add-content-type-on-put
branch
from
January 23, 2025 08:56
6643bfb
to
44a8b82
Compare
slonka
changed the title
feat(api): respond with 200/201 with empty json for PUT
feat(api): respond with 200/201 with empty json for successful PUT
Jan 23, 2025
Automaat
approved these changes
Jan 23, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation
In our OpenAPI spec we say that we're returning
application/json
for put 200/201kuma/tools/openapi/templates/endpoints.yaml
Line 63 in a00b2e0
oneOf
on that level). I tried this:If we don't do this change terraform does not like the response not having content type:
Implementation information
Respond with 200/201 and empty
{}
when there are no errors.Supporting documentation
xrel https://github.com/Kong/kong-mesh/issues/7201