Skip to content

Commit 6b71b0b

Browse files
committed
Address review comments
1 parent 6d2789e commit 6b71b0b

7 files changed

+22
-16
lines changed

docs/development/core/server/kibana-plugin-core-server.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ The plugin integrates with the core system via lifecycle events: `setup`<!-- -->
154154
| [SavedObjectsBulkUpdateResponse](./kibana-plugin-core-server.savedobjectsbulkupdateresponse.md) | |
155155
| [SavedObjectsClientProviderOptions](./kibana-plugin-core-server.savedobjectsclientprovideroptions.md) | Options to control the creation of the Saved Objects Client. |
156156
| [SavedObjectsClientWrapperOptions](./kibana-plugin-core-server.savedobjectsclientwrapperoptions.md) | Options passed to each SavedObjectsClientWrapperFactory to aid in creating the wrapper instance. |
157-
| [SavedObjectsComplexFieldMapping](./kibana-plugin-core-server.savedobjectscomplexfieldmapping.md) | See [SavedObjectsFieldMapping](./kibana-plugin-core-server.savedobjectsfieldmapping.md) for documentation.<!-- -->Note: this type intentially doesn't include a type definition for defining <code>dynamic: true</code>. To limit the number of mapping fields, Saved Object types should only ever be set to <code>dynamic: false</code> or inherit the default <code>dynamic: 'strict'</code> from the top-level mapping. |
157+
| [SavedObjectsComplexFieldMapping](./kibana-plugin-core-server.savedobjectscomplexfieldmapping.md) | See [SavedObjectsFieldMapping](./kibana-plugin-core-server.savedobjectsfieldmapping.md) for documentation. |
158158
| [SavedObjectsCoreFieldMapping](./kibana-plugin-core-server.savedobjectscorefieldmapping.md) | See [SavedObjectsFieldMapping](./kibana-plugin-core-server.savedobjectsfieldmapping.md) for documentation. |
159159
| [SavedObjectsCreateOptions](./kibana-plugin-core-server.savedobjectscreateoptions.md) | |
160160
| [SavedObjectsDeleteByNamespaceOptions](./kibana-plugin-core-server.savedobjectsdeletebynamespaceoptions.md) | |

docs/development/core/server/kibana-plugin-core-server.savedobjectscomplexfieldmapping.dynamic.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,12 @@
44

55
## SavedObjectsComplexFieldMapping.dynamic property
66

7+
The dynamic property of the mapping, either `false` or `'strict'`<!-- -->. If unspecified `dynamic: 'strict'` will be inherited from the top-level index mappings.
8+
9+
Note: To limit the number of mapping fields Saved Object types should \*never\* use `dynamic: true`<!-- -->.
10+
711
<b>Signature:</b>
812

913
```typescript
10-
dynamic?: false;
14+
dynamic?: false | 'strict';
1115
```

docs/development/core/server/kibana-plugin-core-server.savedobjectscomplexfieldmapping.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66

77
See [SavedObjectsFieldMapping](./kibana-plugin-core-server.savedobjectsfieldmapping.md) for documentation.
88

9-
Note: this type intentially doesn't include a type definition for defining `dynamic: true`<!-- -->. To limit the number of mapping fields, Saved Object types should only ever be set to `dynamic: false` or inherit the default `dynamic: 'strict'` from the top-level mapping.
10-
119
<b>Signature:</b>
1210

1311
```typescript
@@ -19,7 +17,7 @@ export interface SavedObjectsComplexFieldMapping
1917
| Property | Type | Description |
2018
| --- | --- | --- |
2119
| [doc\_values](./kibana-plugin-core-server.savedobjectscomplexfieldmapping.doc_values.md) | <code>boolean</code> | |
22-
| [dynamic](./kibana-plugin-core-server.savedobjectscomplexfieldmapping.dynamic.md) | <code>false</code> | |
20+
| [dynamic](./kibana-plugin-core-server.savedobjectscomplexfieldmapping.dynamic.md) | <code>false &#124; 'strict'</code> | The dynamic property of the mapping, either <code>false</code> or <code>'strict'</code>. If unspecified <code>dynamic: 'strict'</code> will be inherited from the top-level index mappings.<!-- -->Note: To limit the number of mapping fields Saved Object types should \*never\* use <code>dynamic: true</code>. |
2321
| [enabled](./kibana-plugin-core-server.savedobjectscomplexfieldmapping.enabled.md) | <code>boolean</code> | |
2422
| [properties](./kibana-plugin-core-server.savedobjectscomplexfieldmapping.properties.md) | <code>SavedObjectsMappingProperties</code> | |
2523
| [type](./kibana-plugin-core-server.savedobjectscomplexfieldmapping.type.md) | <code>string</code> | |

docs/development/core/server/kibana-plugin-core-server.savedobjectstypemappingdefinition.dynamic.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
## SavedObjectsTypeMappingDefinition.dynamic property
66

7-
The dynamic property of the mapping, either `false` or 'strict'.
7+
The dynamic property of the mapping, either `false` or `'strict'`<!-- -->. If unspecified `dynamic: 'strict'` will be inherited from the top-level index mappings.
88

99
<b>Signature:</b>
1010

docs/development/core/server/kibana-plugin-core-server.savedobjectstypemappingdefinition.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,6 @@ const typeDefinition: SavedObjectsTypeMappingDefinition = {
4141

4242
| Property | Type | Description |
4343
| --- | --- | --- |
44-
| [dynamic](./kibana-plugin-core-server.savedobjectstypemappingdefinition.dynamic.md) | <code>false &#124; 'strict'</code> | The dynamic property of the mapping, either <code>false</code> or 'strict'. |
44+
| [dynamic](./kibana-plugin-core-server.savedobjectstypemappingdefinition.dynamic.md) | <code>false &#124; 'strict'</code> | The dynamic property of the mapping, either <code>false</code> or <code>'strict'</code>. If unspecified <code>dynamic: 'strict'</code> will be inherited from the top-level index mappings. |
4545
| [properties](./kibana-plugin-core-server.savedobjectstypemappingdefinition.properties.md) | <code>SavedObjectsMappingProperties</code> | The underlying properties of the type mapping |
4646

src/core/server/saved_objects/mappings/types.ts

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,9 @@
4545
* @public
4646
*/
4747
export interface SavedObjectsTypeMappingDefinition {
48-
/** The dynamic property of the mapping, either `false` or 'strict'. */
48+
/** The dynamic property of the mapping, either `false` or `'strict'`. If
49+
* unspecified `dynamic: 'strict'` will be inherited from the top-level
50+
* index mappings. */
4951
dynamic?: false | 'strict';
5052
/** The underlying properties of the type mapping */
5153
properties: SavedObjectsMappingProperties;
@@ -145,15 +147,18 @@ export interface SavedObjectsCoreFieldMapping {
145147
/**
146148
* See {@link SavedObjectsFieldMapping} for documentation.
147149
*
148-
* Note: this type intentially doesn't include a type definition for defining
149-
* `dynamic: true`. To limit the number of mapping fields, Saved Object types
150-
* should only ever be set to `dynamic: false` or inherit the default
151-
* `dynamic: 'strict'` from the top-level mapping.
152-
*
153150
* @public
154151
*/
155152
export interface SavedObjectsComplexFieldMapping {
156-
dynamic?: false;
153+
/**
154+
* The dynamic property of the mapping, either `false` or `'strict'`. If
155+
* unspecified `dynamic: 'strict'` will be inherited from the top-level
156+
* index mappings.
157+
*
158+
* Note: To limit the number of mapping fields Saved Object types should
159+
* *never* use `dynamic: true`.
160+
*/
161+
dynamic?: false | 'strict';
157162
enabled?: boolean;
158163
doc_values?: boolean;
159164
type?: string;

src/core/server/server.api.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2022,8 +2022,7 @@ export interface SavedObjectsClientWrapperOptions {
20222022
export interface SavedObjectsComplexFieldMapping {
20232023
// (undocumented)
20242024
doc_values?: boolean;
2025-
// (undocumented)
2026-
dynamic?: false;
2025+
dynamic?: false | 'strict';
20272026
// (undocumented)
20282027
enabled?: boolean;
20292028
// (undocumented)

0 commit comments

Comments
 (0)