feat: add support for non-external premaps

This commit is contained in:
Wieland Schöbl
2021-05-12 14:06:13 +00:00
committed by Jovan Krunić
parent 89bbb4ecf5
commit 74298065e0
5 changed files with 53 additions and 4 deletions

View File

@@ -457,7 +457,7 @@ function handleType(type: Type, generics: Map<string, ElasticsearchValue>, path:
return handleUnionType(type, new Map(generics), path, topTypeName, tags);
}
if (type instanceof ReferenceType) {
if (typeof type.reflection !== 'undefined') {
if (typeof premaps[type.name] === 'undefined' && typeof type.reflection !== 'undefined') {
// there is really no way to make this typesafe, every element in DeclarationReflection is optional.
return handleDeclarationReflection(type.reflection as DeclarationReflection,
getReflectionGeneric(type, new Map(generics), path, topTypeName, tags), path, topTypeName, tags);

View File

@@ -32,7 +32,7 @@ export enum ElasticsearchDataType {
geo_point = 'geo_point',
geo_shape = 'geo_shape',
completion = 'completion',
date_range = 'date_rage',
date_range = 'date_range',
// integer_range = 'integer_range',
// float_range = 'float_range',
// long_range = 'long_range',