riya2305 commented on PR #8449: URL: https://github.com/apache/hadoop/pull/8449#issuecomment-4305531306
> * continuous-integration/jenkins/pr-merge > Thanks Riya for the fix! > > what do you think can we modify the IncludeRootJsonProvider to handle scenarios when DTO not present in any list? > > So kinda modify this > > ` boolean match = classSerialisationConfig.getWrappedClasses().contains(type);` > > to > > ` boolean match = classSerialisationConfig.getWrappedClasses().contains(type) || !classSerialisationConfig.getWrappedClasses().contains(type) && !classSerialisationConfig.getUnWrappedClasses().contains(type));` Interesting idea — one concern: with that condition, wouldn’t IncludeRoot effectively claim every type that isn’t explicitly unwrapped, so “forgotten” DTOs default to wrapped JSON (extra root object)? That might fix the missing writer but still change the response shape for clients. Alternatively, if we want a fallback, should it bias toward unwrapped instead, so we don’t introduce an extra root by default? Curious what you think is the safer default. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
