-
Notifications
You must be signed in to change notification settings - Fork 8.1k
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
[savedObjects/mappings] limit valid type names #17511
[savedObjects/mappings] limit valid type names #17511
Conversation
💚 Build Succeeded |
const props = formatListAsProse(illegal); | ||
const owner = pluginId ? `registered by plugin ${pluginId} ` : ''; | ||
throw new Error( | ||
`Property name${props.length > 1 ? 's' : ''} ${props} ${owner}are not allowed to start with an underscore (_)` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason there's no space between ${owner}
and are
? Also same thing on line 38.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, lines 36 & 44 have the trailing space. Just feels wrong.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nevermind, this is fine.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
d4e7890
to
7df8404
Compare
💚 Build Succeeded |
6.3/6.x: f04dcb0 |
💚 Build Succeeded |
Part of #17510
Limits the valid type names supported by the SavedObject mappings to ensure that users don't register type names that start with
_
. This is done similarly to how we verify that saved object mappings between plugins don't conflict, by checking when attempting to merge the mappings together.Release note:
Starting in Kibana 6.3 the Saved Object API will use underscore-prefixed names for certain endpoints, so to disambiguate these endpoint names from the type parameter supported by some other Saved Object API endpoints, type names can no longer start with an underscore (_) character.