Update Notifications BaseModel to extend ToXContentObject instead of ToXContent#173
Merged
qreshi merged 1 commit intoopensearch-project:mainfrom May 11, 2022
Merged
Conversation
Signed-off-by: Mohammad Qureshi <47198598+qreshi@users.noreply.github.com>
lezzago
approved these changes
May 10, 2022
getsaurabh02
approved these changes
May 11, 2022
opensearch-trigger-bot bot
pushed a commit
that referenced
this pull request
May 11, 2022
Signed-off-by: Mohammad Qureshi <47198598+qreshi@users.noreply.github.com> (cherry picked from commit d36924d)
qreshi
added a commit
that referenced
this pull request
May 12, 2022
zelinh
pushed a commit
that referenced
this pull request
Aug 18, 2022
Signed-off-by: Mohammad Qureshi <47198598+qreshi@users.noreply.github.com> Signed-off-by: Zelin Hao <zelinhao@amazon.com>
wuychn
pushed a commit
to ochprince/common-utils
that referenced
this pull request
Mar 16, 2023
…ensearch-project#173) Signed-off-by: Mohammad Qureshi <47198598+qreshi@users.noreply.github.com>
This file contains hidden or 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
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.
Signed-off-by: Mohammad Qureshi 47198598+qreshi@users.noreply.github.com
Description
By default
ToXContenthasisFragmentset totrue. When callingXContentHelper.toXContent()for a fragment, it will wrap the contents in another object and expect a named object afterwards, this results inIOExceptions when not satisfied (like in NotificationEvent when converting to a string).Since all of the children of
BaseModelare already wrapped in objects, they should not be treated as fragments. This PR updates BaseModel to be aToXContentObjectinstead to reflect this.Issues Resolved
[List any issues this PR will resolve]
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.