Skip to content
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

Soft deprecate returning a new object from generateResponse() #4302

Merged
merged 1 commit into from
Oct 12, 2021

Conversation

kanongil
Copy link
Contributor

@kanongil kanongil commented Oct 11, 2021

This is a doc only fix for issue in #4299 so no one should try to use the broken "new object" return feature.

This makes the API weird (always return the passed object), but that should be fixed in an upcoming breaking release.

I opted not to also allow empty return values. This way once the breaking release has been published, plugins must explicitly choose to support old versions by returning response. If it returns undefined it will break on all version of v20.

@kanongil kanongil added the documentation Non-code related changes label Oct 11, 2021
@devinivy devinivy self-assigned this Oct 12, 2021
@devinivy devinivy added this to the 20.2.2 milestone Oct 12, 2021
@devinivy devinivy merged commit c7cfa2e into hapijs:master Oct 12, 2021
@kanongil kanongil deleted the gr-doc-fix branch October 12, 2021 09:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Non-code related changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants