diff --git a/src/core/CONVENTIONS.md b/src/core/CONVENTIONS.md index a82cc27839a1d7..afcc122c11b903 100644 --- a/src/core/CONVENTIONS.md +++ b/src/core/CONVENTIONS.md @@ -302,7 +302,7 @@ import { SavedObjectsType } from 'src/core/server'; export const myType: SavedObjectsType = { name: 'my-type', hidden: false, - namespaceAgnostic: true, + namespaceType: 'single', mappings: { properties: { someField: { diff --git a/src/core/MIGRATION_EXAMPLES.md b/src/core/MIGRATION_EXAMPLES.md index c91c00bc1aa021..59a142fa3ebd7a 100644 --- a/src/core/MIGRATION_EXAMPLES.md +++ b/src/core/MIGRATION_EXAMPLES.md @@ -844,7 +844,7 @@ import { SavedObjectsType } from 'src/core/server'; export const firstType: SavedObjectsType = { name: 'first-type', hidden: false, - namespaceAgnostic: true, + namespaceType: 'agnostic', mappings: { properties: { someField: { @@ -882,7 +882,7 @@ import { SavedObjectsType } from 'src/core/server'; export const secondType: SavedObjectsType = { name: 'second-type', hidden: true, - namespaceAgnostic: false, + namespaceType: 'single', mappings: { properties: { textField: { @@ -930,7 +930,7 @@ export class MyPlugin implements Plugin { The NP `registerType` expected input is very close to the legacy format. However, there are some minor changes: -- The `schema.isNamespaceAgnostic` property has been renamed: `SavedObjectsType.namespaceAgnostic` +- The `schema.isNamespaceAgnostic` property has been renamed: `SavedObjectsType.namespaceType`. It no longer accepts a boolean but instead an enum of 'single', 'multiple', or 'agnostic' (see [SavedObjectsNamespaceType](/docs/development/core/server/kibana-plugin-core-server.savedobjectsnamespacetype.md)). - The `schema.indexPattern` was accepting either a `string` or a `(config: LegacyConfig) => string`. `SavedObjectsType.indexPattern` only accepts a string, as you can access the configuration during your plugin's setup phase.