Skip to content

Fix dynamic_templates type #3909

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

Merged
merged 1 commit into from
Mar 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions specification/_types/mapping/TypeMapping.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* under the License.
*/

import { Dictionary } from '@spec_utils/Dictionary'
import { Dictionary, SingleKeyDictionary } from '@spec_utils/Dictionary'
import { Metadata, PropertyName } from '@_types/common'
import { DynamicMapping, DynamicTemplate } from './dynamic-template'
import {
Expand All @@ -36,7 +36,7 @@ export class TypeMapping {
date_detection?: boolean
dynamic?: DynamicMapping
dynamic_date_formats?: string[]
dynamic_templates?: Dictionary<string, DynamicTemplate>[]
dynamic_templates?: SingleKeyDictionary<string, DynamicTemplate>[]
_field_names?: FieldNamesField
index_field?: IndexField
/** @doc_id mapping-meta-field */
Expand Down
4 changes: 2 additions & 2 deletions specification/indices/put_mapping/IndicesPutMappingRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* under the License.
*/

import { Dictionary } from '@spec_utils/Dictionary'
import { Dictionary, SingleKeyDictionary } from '@spec_utils/Dictionary'
import { RequestBase } from '@_types/Base'
import {
ExpandWildcards,
Expand Down Expand Up @@ -141,7 +141,7 @@ export interface Request extends RequestBase {
/**
* Specify dynamic templates for the mapping.
*/
dynamic_templates?: Dictionary<string, DynamicTemplate>[]
dynamic_templates?: SingleKeyDictionary<string, DynamicTemplate>[]
/**
* Control whether field names are enabled for the index.
*/
Expand Down
Loading