mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-04 04:22:50 +00:00
fix: use value type in IndexSignature type instead of key type
This commit is contained in:
committed by
wulkanat@gmail.com
parent
681cef9260
commit
b7cdb6a9ad
34204
map/template.json
34204
map/template.json
File diff suppressed because it is too large
Load Diff
@@ -117,7 +117,6 @@ function composeErrorMessage(path: string, topTypeName: string, typeName: string
|
||||
* @param type the ReferenceType of a DeclarationReflection
|
||||
* @param out the previous reflection, it then overrides all parameters or keeps old ones
|
||||
* @param path the current path to the object we are in
|
||||
* @param topTypeName the type field value
|
||||
* @param tags any tags attached to the type
|
||||
*/
|
||||
function getReflectionGeneric(type: ReferenceType,
|
||||
@@ -211,7 +210,7 @@ function handleDeclarationReflection(decl: DeclarationReflection,
|
||||
// check if we have an object referencing a generic
|
||||
if (generics.has(decl.name)) { // if the object name is the same as the generic name
|
||||
return readFieldTags(generics.get(decl.name) as ElasticsearchObject | ElasticsearchType, path, topTypeName,
|
||||
typeof decl.comment !== 'undefined' ? typeof decl.comment.tags !== 'undefined' ? decl.comment.tags : [] : []);
|
||||
decl.comment?.tags ?? []);
|
||||
// use the value defined by the generic
|
||||
|
||||
}
|
||||
@@ -232,9 +231,9 @@ function handleDeclarationReflection(decl: DeclarationReflection,
|
||||
const template: ElasticsearchDynamicTemplate = {};
|
||||
template[decl.name] = {
|
||||
mapping: handleType(
|
||||
decl.indexSignature.type,
|
||||
new Map(generics), path, topTypeName,
|
||||
getCommentTags(decl.indexSignature)),
|
||||
decl.indexSignature.type,
|
||||
new Map(generics), path, topTypeName,
|
||||
getCommentTags(decl.indexSignature)),
|
||||
match: '*',
|
||||
match_mapping_type: '*',
|
||||
path_match: `${path}*`,
|
||||
|
||||
Reference in New Issue
Block a user