Remove include_type_name parameter from REST layer#48632
Merged
romseygeek merged 14 commits intoelastic:masterfrom Nov 1, 2019
Merged
Remove include_type_name parameter from REST layer#48632romseygeek merged 14 commits intoelastic:masterfrom
include_type_name parameter from REST layer#48632romseygeek merged 14 commits intoelastic:masterfrom
Conversation
Collaborator
|
Pinging @elastic/es-search (:Search/Mapping) |
Collaborator
|
Pinging @elastic/es-core-features (:Core/Features/Indices APIs) |
| Map<String, Object> mappings = parser.map(); | ||
| if (MapperService.isMappingSourceTyped(MapperService.SINGLE_MAPPING_NAME, mappings)) { | ||
| throw new IllegalArgumentException("The mapping definition cannot be nested under a type " + | ||
| "[" + MapperService.SINGLE_MAPPING_NAME + "] unless include_type_name is set to true."); |
Contributor
There was a problem hiding this comment.
As we don't have include_type_name parameter anymore, I think the error message should just say: "The mapping definition cannot be nested under a type."
mayya-sharipova
approved these changes
Oct 30, 2019
Contributor
mayya-sharipova
left a comment
There was a problem hiding this comment.
@romseygeek, this PR LGTM.
I have just a small comment about the error message, which can also be addressed in next PRs of type removals.
| if (includeTypeName | ||
| || source.containsKey("mappings") == false | ||
| static Map<String, Object> prepareMappings(Map<String, Object> source) { | ||
| if (source.containsKey("mappings") == false |
Contributor
There was a problem hiding this comment.
here also on the line 80, may be also worth correcting the error message to have only "The mapping definition cannot be nested under a type"
Contributor
Author
|
@elasticmachine update branch |
Contributor
Author
|
@elasticmachine update branch |
41 tasks
jtibshirani
added a commit
that referenced
this pull request
Nov 12, 2019
In #48632 we removed support for `include_type_name` in the REST API. This PR removes it from the API spec and documentation.
66 tasks
pgomulka
added a commit
that referenced
this pull request
Apr 19, 2021
80 tasks
jrodewig
added a commit
that referenced
this pull request
Sep 29, 2021
Adds an 8.0 breaking change for PR #48632.
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.
This commit removes support for the
include_type_nameparameter from allREST actions that receive or return mapping configurations.
Relates to #41059