es-mapping-to-schema
Advanced tools
Comparing version 3.0.4 to 3.0.5
16
index.js
@@ -48,13 +48,11 @@ const _ = require('lodash'); | ||
if (mapping.properties || mapping.type === 'object' || mapping.type === 'nested') { | ||
if (options.isArray) { | ||
schema.items = RecurseMappingToSchema(mapping.properties, {}, schemaType, options, {}); | ||
} else { | ||
if (mapping.properties) { | ||
schema.properties = RecurseMappingToSchema(mapping.properties, {}, schemaType, options, {}); | ||
} | ||
const fieldName = options.isArray ? 'items' : 'properties'; | ||
if (strict) { | ||
schema.strict = true; | ||
} | ||
if (mapping.properties) { | ||
schema[fieldName] = RecurseMappingToSchema(mapping.properties, {}, schemaType, options, {}); | ||
} | ||
if (strict) { | ||
schema.strict = true; | ||
} | ||
} | ||
@@ -61,0 +59,0 @@ |
{ | ||
"name": "es-mapping-to-schema", | ||
"version": "3.0.4", | ||
"version": "3.0.5", | ||
"description": "Convert Elasticsearch mappings to Schema Inspector schemas", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
113430
1168