File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -323,7 +323,7 @@ export default class ElasticApiParser {
323323
324324 if ( paramCfg . default ) {
325325 result . defaultValue = paramCfg . default ;
326- if ( result . type === 'Float' ) {
326+ if ( result . type === 'Float' || result . type === 'Int' ) {
327327 const defaultNumber = Number ( result . defaultValue ) ;
328328 if ( Number . isNaN ( defaultNumber ) ) {
329329 // Handle broken data where default is not valid for the given type
@@ -332,6 +332,9 @@ export default class ElasticApiParser {
332332 } else {
333333 result . defaultValue = defaultNumber ;
334334 }
335+ } else if ( result . type === 'Boolean' ) {
336+ const t = result . defaultValue ;
337+ result . defaultValue = t === 'true' || t === '1' || t === true ;
335338 }
336339 } else if ( fieldName === 'format' ) {
337340 result . defaultValue = 'json' ;
You can’t perform that action at this time.
0 commit comments