DocumentMapper to not implement ToXContent (#68653)

DocumentMapper does not need to implement ToXContent, in fact it is its inner Mapping that needs to and already does. Consumers can switch to calling mapping() and toXContent against it.
This commit is contained in:
Luca Cavanna 2021-02-08 14:17:31 +01:00 committed by GitHub
parent 8d975d2ae6
commit 0ca6819882
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 13 additions and 22 deletions

View file

@ -434,7 +434,7 @@ public class AnnotatedTextFieldMapperTests extends MapperTestCase {
XContentBuilder builder = XContentFactory.jsonBuilder();
builder.startObject();
mapper.toXContent(builder, new ToXContent.MapParams(Collections.singletonMap("include_defaults", "true")));
mapper.mapping().toXContent(builder, new ToXContent.MapParams(Collections.singletonMap("include_defaults", "true")));
builder.endObject();
String mappingString = Strings.toString(builder);