mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
Update documentation/examples of deprecated namespaceAgnostic field (#68039)
* Update documentation/examples of deprecated namespaceAgnostic field to namespaceType * Update src/core/CONVENTIONS.md Co-authored-by: Brandon Kobel <brandon.kobel@gmail.com> Co-authored-by: Brandon Kobel <brandon.kobel@gmail.com>
This commit is contained in:
parent
ee323bd86e
commit
b3e7ab3f5c
2 changed files with 4 additions and 4 deletions
|
@ -336,7 +336,7 @@ import { SavedObjectsType } from 'src/core/server';
|
|||
export const myType: SavedObjectsType = {
|
||||
name: 'my-type',
|
||||
hidden: false,
|
||||
namespaceAgnostic: true,
|
||||
namespaceType: 'single',
|
||||
mappings: {
|
||||
properties: {
|
||||
someField: {
|
||||
|
|
|
@ -850,7 +850,7 @@ import { SavedObjectsType } from 'src/core/server';
|
|||
export const firstType: SavedObjectsType = {
|
||||
name: 'first-type',
|
||||
hidden: false,
|
||||
namespaceAgnostic: true,
|
||||
namespaceType: 'agnostic',
|
||||
mappings: {
|
||||
properties: {
|
||||
someField: {
|
||||
|
@ -888,7 +888,7 @@ import { SavedObjectsType } from 'src/core/server';
|
|||
export const secondType: SavedObjectsType = {
|
||||
name: 'second-type',
|
||||
hidden: true,
|
||||
namespaceAgnostic: false,
|
||||
namespaceType: 'single',
|
||||
mappings: {
|
||||
properties: {
|
||||
textField: {
|
||||
|
@ -936,7 +936,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.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue