@attraqt/search
Advanced tools
Comparing version 1.4.1 to 1.5.0
@@ -38,2 +38,5 @@ { | ||
"properties": { | ||
"aiSearch": { | ||
"type": "boolean" | ||
}, | ||
"customResponseMask": { | ||
@@ -40,0 +43,0 @@ "description": "Response mask to return only specific attributes of items", |
"use strict"; | ||
module.exports = validate20; | ||
module.exports.default = validate20; | ||
var schema22 = { "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "definitions": { "DisableOptions": { "additionalProperties": false, "properties": { "name": { "description": "Feature to disable in the query\nExample: \"facet\"", "type": "string" } }, "required": ["name"], "type": "object" }, "SortOptions": { "additionalProperties": false, "properties": { "attribute": { "description": "Attribute to sort by", "type": "string" }, "order": { "description": "Order of the sort.\nMust be either \"asc\" or \"desc\"", "type": "string" } }, "required": ["attribute", "order"], "type": "object" } }, "properties": { "customResponseMask": { "description": "Response mask to return only specific attributes of items", "type": "string" }, "disable": { "description": "Disable rules\nIf specified, disable specific functionalities", "items": { "$ref": "#/definitions/DisableOptions" }, "type": "array" }, "facets": { "items": { "additionalProperties": false, "properties": { "attribute": { "description": "Selected facet to filter by\nTODO: Should be removed after migration to ids", "type": "string" }, "id": { "description": "Selected facet to filter by", "type": "string" }, "values": { "description": "Values of the facet used for filtering the results", "items": { "type": "string" }, "type": "array" } }, "required": ["values"], "type": "object" }, "type": "array" }, "filter": { "description": "Filter string", "type": "string" }, "limit": { "description": "Pagination: size of the page", "type": "number" }, "offset": { "description": "Pagination: index of the first item to return", "type": "number" }, "sortBy": { "description": "List of sorting rules\n(applied in order)", "items": { "$ref": "#/definitions/SortOptions" }, "type": "array" } }, "type": "object" }; | ||
var schema22 = { "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "definitions": { "DisableOptions": { "additionalProperties": false, "properties": { "name": { "description": "Feature to disable in the query\nExample: \"facet\"", "type": "string" } }, "required": ["name"], "type": "object" }, "SortOptions": { "additionalProperties": false, "properties": { "attribute": { "description": "Attribute to sort by", "type": "string" }, "order": { "description": "Order of the sort.\nMust be either \"asc\" or \"desc\"", "type": "string" } }, "required": ["attribute", "order"], "type": "object" } }, "properties": { "aiSearch": { "type": "boolean" }, "customResponseMask": { "description": "Response mask to return only specific attributes of items", "type": "string" }, "disable": { "description": "Disable rules\nIf specified, disable specific functionalities", "items": { "$ref": "#/definitions/DisableOptions" }, "type": "array" }, "facets": { "items": { "additionalProperties": false, "properties": { "attribute": { "description": "Selected facet to filter by\nTODO: Should be removed after migration to ids", "type": "string" }, "id": { "description": "Selected facet to filter by", "type": "string" }, "values": { "description": "Values of the facet used for filtering the results", "items": { "type": "string" }, "type": "array" } }, "required": ["values"], "type": "object" }, "type": "array" }, "filter": { "description": "Filter string", "type": "string" }, "limit": { "description": "Pagination: size of the page", "type": "number" }, "offset": { "description": "Pagination: index of the first item to return", "type": "number" }, "sortBy": { "description": "List of sorting rules\n(applied in order)", "items": { "$ref": "#/definitions/SortOptions" }, "type": "array" } }, "type": "object" }; | ||
var schema23 = { "additionalProperties": false, "properties": { "name": { "description": "Feature to disable in the query\nExample: \"facet\"", "type": "string" } }, "required": ["name"], "type": "object" }; | ||
@@ -26,3 +26,3 @@ var schema24 = { "additionalProperties": false, "properties": { "attribute": { "description": "Attribute to sort by", "type": "string" }, "order": { "description": "Order of the sort.\nMust be either \"asc\" or \"desc\"", "type": "string" } }, "required": ["attribute", "order"], "type": "object" }; | ||
for (var key0 in data) { | ||
if (!(((((((key0 === "customResponseMask") || (key0 === "disable")) || (key0 === "facets")) || (key0 === "filter")) || (key0 === "limit")) || (key0 === "offset")) || (key0 === "sortBy"))) { | ||
if (!((((((((key0 === "aiSearch") || (key0 === "customResponseMask")) || (key0 === "disable")) || (key0 === "facets")) || (key0 === "filter")) || (key0 === "limit")) || (key0 === "offset")) || (key0 === "sortBy"))) { | ||
var err0 = { instancePath: instancePath, schemaPath: "#/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key0 }, message: "must NOT have additional properties", schema: false, parentSchema: schema22, data: data }; | ||
@@ -38,6 +38,6 @@ if (vErrors === null) { | ||
} | ||
if (data.customResponseMask !== undefined) { | ||
var data0 = data.customResponseMask; | ||
if (typeof data0 !== "string") { | ||
var err1 = { instancePath: instancePath + "/customResponseMask", schemaPath: "#/properties/customResponseMask/type", keyword: "type", params: { type: "string" }, message: "must be string", schema: schema22.properties.customResponseMask.type, parentSchema: schema22.properties.customResponseMask, data: data0 }; | ||
if (data.aiSearch !== undefined) { | ||
var data0 = data.aiSearch; | ||
if (typeof data0 !== "boolean") { | ||
var err1 = { instancePath: instancePath + "/aiSearch", schemaPath: "#/properties/aiSearch/type", keyword: "type", params: { type: "boolean" }, message: "must be boolean", schema: schema22.properties.aiSearch.type, parentSchema: schema22.properties.aiSearch, data: data0 }; | ||
if (vErrors === null) { | ||
@@ -52,27 +52,40 @@ vErrors = [err1]; | ||
} | ||
if (data.customResponseMask !== undefined) { | ||
var data1 = data.customResponseMask; | ||
if (typeof data1 !== "string") { | ||
var err2 = { instancePath: instancePath + "/customResponseMask", schemaPath: "#/properties/customResponseMask/type", keyword: "type", params: { type: "string" }, message: "must be string", schema: schema22.properties.customResponseMask.type, parentSchema: schema22.properties.customResponseMask, data: data1 }; | ||
if (vErrors === null) { | ||
vErrors = [err2]; | ||
} | ||
else { | ||
vErrors.push(err2); | ||
} | ||
errors++; | ||
} | ||
} | ||
if (data.disable !== undefined) { | ||
var data1 = data.disable; | ||
if (Array.isArray(data1)) { | ||
var len0 = data1.length; | ||
var data2 = data.disable; | ||
if (Array.isArray(data2)) { | ||
var len0 = data2.length; | ||
for (var i0 = 0; i0 < len0; i0++) { | ||
var data2 = data1[i0]; | ||
if (data2 && typeof data2 == "object" && !Array.isArray(data2)) { | ||
if (data2.name === undefined) { | ||
var err2 = { instancePath: instancePath + "/disable/" + i0, schemaPath: "#/definitions/DisableOptions/required", keyword: "required", params: { missingProperty: "name" }, message: "must have required property '" + "name" + "'", schema: schema23.required, parentSchema: schema23, data: data2 }; | ||
var data3 = data2[i0]; | ||
if (data3 && typeof data3 == "object" && !Array.isArray(data3)) { | ||
if (data3.name === undefined) { | ||
var err3 = { instancePath: instancePath + "/disable/" + i0, schemaPath: "#/definitions/DisableOptions/required", keyword: "required", params: { missingProperty: "name" }, message: "must have required property '" + "name" + "'", schema: schema23.required, parentSchema: schema23, data: data3 }; | ||
if (vErrors === null) { | ||
vErrors = [err2]; | ||
vErrors = [err3]; | ||
} | ||
else { | ||
vErrors.push(err2); | ||
vErrors.push(err3); | ||
} | ||
errors++; | ||
} | ||
for (var key1 in data2) { | ||
for (var key1 in data3) { | ||
if (!(key1 === "name")) { | ||
var err3 = { instancePath: instancePath + "/disable/" + i0, schemaPath: "#/definitions/DisableOptions/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key1 }, message: "must NOT have additional properties", schema: false, parentSchema: schema23, data: data2 }; | ||
var err4 = { instancePath: instancePath + "/disable/" + i0, schemaPath: "#/definitions/DisableOptions/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key1 }, message: "must NOT have additional properties", schema: false, parentSchema: schema23, data: data3 }; | ||
if (vErrors === null) { | ||
vErrors = [err3]; | ||
vErrors = [err4]; | ||
} | ||
else { | ||
vErrors.push(err3); | ||
vErrors.push(err4); | ||
} | ||
@@ -82,11 +95,11 @@ errors++; | ||
} | ||
if (data2.name !== undefined) { | ||
var data3 = data2.name; | ||
if (typeof data3 !== "string") { | ||
var err4 = { instancePath: instancePath + "/disable/" + i0 + "/name", schemaPath: "#/definitions/DisableOptions/properties/name/type", keyword: "type", params: { type: "string" }, message: "must be string", schema: schema23.properties.name.type, parentSchema: schema23.properties.name, data: data3 }; | ||
if (data3.name !== undefined) { | ||
var data4 = data3.name; | ||
if (typeof data4 !== "string") { | ||
var err5 = { instancePath: instancePath + "/disable/" + i0 + "/name", schemaPath: "#/definitions/DisableOptions/properties/name/type", keyword: "type", params: { type: "string" }, message: "must be string", schema: schema23.properties.name.type, parentSchema: schema23.properties.name, data: data4 }; | ||
if (vErrors === null) { | ||
vErrors = [err4]; | ||
vErrors = [err5]; | ||
} | ||
else { | ||
vErrors.push(err4); | ||
vErrors.push(err5); | ||
} | ||
@@ -98,8 +111,8 @@ errors++; | ||
else { | ||
var err5 = { instancePath: instancePath + "/disable/" + i0, schemaPath: "#/definitions/DisableOptions/type", keyword: "type", params: { type: "object" }, message: "must be object", schema: schema23.type, parentSchema: schema23, data: data2 }; | ||
var err6 = { instancePath: instancePath + "/disable/" + i0, schemaPath: "#/definitions/DisableOptions/type", keyword: "type", params: { type: "object" }, message: "must be object", schema: schema23.type, parentSchema: schema23, data: data3 }; | ||
if (vErrors === null) { | ||
vErrors = [err5]; | ||
vErrors = [err6]; | ||
} | ||
else { | ||
vErrors.push(err5); | ||
vErrors.push(err6); | ||
} | ||
@@ -111,8 +124,8 @@ errors++; | ||
else { | ||
var err6 = { instancePath: instancePath + "/disable", schemaPath: "#/properties/disable/type", keyword: "type", params: { type: "array" }, message: "must be array", schema: schema22.properties.disable.type, parentSchema: schema22.properties.disable, data: data1 }; | ||
var err7 = { instancePath: instancePath + "/disable", schemaPath: "#/properties/disable/type", keyword: "type", params: { type: "array" }, message: "must be array", schema: schema22.properties.disable.type, parentSchema: schema22.properties.disable, data: data2 }; | ||
if (vErrors === null) { | ||
vErrors = [err6]; | ||
vErrors = [err7]; | ||
} | ||
else { | ||
vErrors.push(err6); | ||
vErrors.push(err7); | ||
} | ||
@@ -123,26 +136,26 @@ errors++; | ||
if (data.facets !== undefined) { | ||
var data4 = data.facets; | ||
if (Array.isArray(data4)) { | ||
var len1 = data4.length; | ||
var data5 = data.facets; | ||
if (Array.isArray(data5)) { | ||
var len1 = data5.length; | ||
for (var i1 = 0; i1 < len1; i1++) { | ||
var data5 = data4[i1]; | ||
if (data5 && typeof data5 == "object" && !Array.isArray(data5)) { | ||
if (data5.values === undefined) { | ||
var err7 = { instancePath: instancePath + "/facets/" + i1, schemaPath: "#/properties/facets/items/required", keyword: "required", params: { missingProperty: "values" }, message: "must have required property '" + "values" + "'", schema: schema22.properties.facets.items.required, parentSchema: schema22.properties.facets.items, data: data5 }; | ||
var data6 = data5[i1]; | ||
if (data6 && typeof data6 == "object" && !Array.isArray(data6)) { | ||
if (data6.values === undefined) { | ||
var err8 = { instancePath: instancePath + "/facets/" + i1, schemaPath: "#/properties/facets/items/required", keyword: "required", params: { missingProperty: "values" }, message: "must have required property '" + "values" + "'", schema: schema22.properties.facets.items.required, parentSchema: schema22.properties.facets.items, data: data6 }; | ||
if (vErrors === null) { | ||
vErrors = [err7]; | ||
vErrors = [err8]; | ||
} | ||
else { | ||
vErrors.push(err7); | ||
vErrors.push(err8); | ||
} | ||
errors++; | ||
} | ||
for (var key2 in data5) { | ||
for (var key2 in data6) { | ||
if (!(((key2 === "attribute") || (key2 === "id")) || (key2 === "values"))) { | ||
var err8 = { instancePath: instancePath + "/facets/" + i1, schemaPath: "#/properties/facets/items/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key2 }, message: "must NOT have additional properties", schema: false, parentSchema: schema22.properties.facets.items, data: data5 }; | ||
var err9 = { instancePath: instancePath + "/facets/" + i1, schemaPath: "#/properties/facets/items/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key2 }, message: "must NOT have additional properties", schema: false, parentSchema: schema22.properties.facets.items, data: data6 }; | ||
if (vErrors === null) { | ||
vErrors = [err8]; | ||
vErrors = [err9]; | ||
} | ||
else { | ||
vErrors.push(err8); | ||
vErrors.push(err9); | ||
} | ||
@@ -152,11 +165,11 @@ errors++; | ||
} | ||
if (data5.attribute !== undefined) { | ||
var data6 = data5.attribute; | ||
if (typeof data6 !== "string") { | ||
var err9 = { instancePath: instancePath + "/facets/" + i1 + "/attribute", schemaPath: "#/properties/facets/items/properties/attribute/type", keyword: "type", params: { type: "string" }, message: "must be string", schema: schema22.properties.facets.items.properties.attribute.type, parentSchema: schema22.properties.facets.items.properties.attribute, data: data6 }; | ||
if (data6.attribute !== undefined) { | ||
var data7 = data6.attribute; | ||
if (typeof data7 !== "string") { | ||
var err10 = { instancePath: instancePath + "/facets/" + i1 + "/attribute", schemaPath: "#/properties/facets/items/properties/attribute/type", keyword: "type", params: { type: "string" }, message: "must be string", schema: schema22.properties.facets.items.properties.attribute.type, parentSchema: schema22.properties.facets.items.properties.attribute, data: data7 }; | ||
if (vErrors === null) { | ||
vErrors = [err9]; | ||
vErrors = [err10]; | ||
} | ||
else { | ||
vErrors.push(err9); | ||
vErrors.push(err10); | ||
} | ||
@@ -166,11 +179,11 @@ errors++; | ||
} | ||
if (data5.id !== undefined) { | ||
var data7 = data5.id; | ||
if (typeof data7 !== "string") { | ||
var err10 = { instancePath: instancePath + "/facets/" + i1 + "/id", schemaPath: "#/properties/facets/items/properties/id/type", keyword: "type", params: { type: "string" }, message: "must be string", schema: schema22.properties.facets.items.properties.id.type, parentSchema: schema22.properties.facets.items.properties.id, data: data7 }; | ||
if (data6.id !== undefined) { | ||
var data8 = data6.id; | ||
if (typeof data8 !== "string") { | ||
var err11 = { instancePath: instancePath + "/facets/" + i1 + "/id", schemaPath: "#/properties/facets/items/properties/id/type", keyword: "type", params: { type: "string" }, message: "must be string", schema: schema22.properties.facets.items.properties.id.type, parentSchema: schema22.properties.facets.items.properties.id, data: data8 }; | ||
if (vErrors === null) { | ||
vErrors = [err10]; | ||
vErrors = [err11]; | ||
} | ||
else { | ||
vErrors.push(err10); | ||
vErrors.push(err11); | ||
} | ||
@@ -180,15 +193,15 @@ errors++; | ||
} | ||
if (data5.values !== undefined) { | ||
var data8 = data5.values; | ||
if (Array.isArray(data8)) { | ||
var len2 = data8.length; | ||
if (data6.values !== undefined) { | ||
var data9 = data6.values; | ||
if (Array.isArray(data9)) { | ||
var len2 = data9.length; | ||
for (var i2 = 0; i2 < len2; i2++) { | ||
var data9 = data8[i2]; | ||
if (typeof data9 !== "string") { | ||
var err11 = { instancePath: instancePath + "/facets/" + i1 + "/values/" + i2, schemaPath: "#/properties/facets/items/properties/values/items/type", keyword: "type", params: { type: "string" }, message: "must be string", schema: schema22.properties.facets.items.properties.values.items.type, parentSchema: schema22.properties.facets.items.properties.values.items, data: data9 }; | ||
var data10 = data9[i2]; | ||
if (typeof data10 !== "string") { | ||
var err12 = { instancePath: instancePath + "/facets/" + i1 + "/values/" + i2, schemaPath: "#/properties/facets/items/properties/values/items/type", keyword: "type", params: { type: "string" }, message: "must be string", schema: schema22.properties.facets.items.properties.values.items.type, parentSchema: schema22.properties.facets.items.properties.values.items, data: data10 }; | ||
if (vErrors === null) { | ||
vErrors = [err11]; | ||
vErrors = [err12]; | ||
} | ||
else { | ||
vErrors.push(err11); | ||
vErrors.push(err12); | ||
} | ||
@@ -200,8 +213,8 @@ errors++; | ||
else { | ||
var err12 = { instancePath: instancePath + "/facets/" + i1 + "/values", schemaPath: "#/properties/facets/items/properties/values/type", keyword: "type", params: { type: "array" }, message: "must be array", schema: schema22.properties.facets.items.properties.values.type, parentSchema: schema22.properties.facets.items.properties.values, data: data8 }; | ||
var err13 = { instancePath: instancePath + "/facets/" + i1 + "/values", schemaPath: "#/properties/facets/items/properties/values/type", keyword: "type", params: { type: "array" }, message: "must be array", schema: schema22.properties.facets.items.properties.values.type, parentSchema: schema22.properties.facets.items.properties.values, data: data9 }; | ||
if (vErrors === null) { | ||
vErrors = [err12]; | ||
vErrors = [err13]; | ||
} | ||
else { | ||
vErrors.push(err12); | ||
vErrors.push(err13); | ||
} | ||
@@ -213,8 +226,8 @@ errors++; | ||
else { | ||
var err13 = { instancePath: instancePath + "/facets/" + i1, schemaPath: "#/properties/facets/items/type", keyword: "type", params: { type: "object" }, message: "must be object", schema: schema22.properties.facets.items.type, parentSchema: schema22.properties.facets.items, data: data5 }; | ||
var err14 = { instancePath: instancePath + "/facets/" + i1, schemaPath: "#/properties/facets/items/type", keyword: "type", params: { type: "object" }, message: "must be object", schema: schema22.properties.facets.items.type, parentSchema: schema22.properties.facets.items, data: data6 }; | ||
if (vErrors === null) { | ||
vErrors = [err13]; | ||
vErrors = [err14]; | ||
} | ||
else { | ||
vErrors.push(err13); | ||
vErrors.push(err14); | ||
} | ||
@@ -226,8 +239,8 @@ errors++; | ||
else { | ||
var err14 = { instancePath: instancePath + "/facets", schemaPath: "#/properties/facets/type", keyword: "type", params: { type: "array" }, message: "must be array", schema: schema22.properties.facets.type, parentSchema: schema22.properties.facets, data: data4 }; | ||
var err15 = { instancePath: instancePath + "/facets", schemaPath: "#/properties/facets/type", keyword: "type", params: { type: "array" }, message: "must be array", schema: schema22.properties.facets.type, parentSchema: schema22.properties.facets, data: data5 }; | ||
if (vErrors === null) { | ||
vErrors = [err14]; | ||
vErrors = [err15]; | ||
} | ||
else { | ||
vErrors.push(err14); | ||
vErrors.push(err15); | ||
} | ||
@@ -238,10 +251,10 @@ errors++; | ||
if (data.filter !== undefined) { | ||
var data10 = data.filter; | ||
if (typeof data10 !== "string") { | ||
var err15 = { instancePath: instancePath + "/filter", schemaPath: "#/properties/filter/type", keyword: "type", params: { type: "string" }, message: "must be string", schema: schema22.properties.filter.type, parentSchema: schema22.properties.filter, data: data10 }; | ||
var data11 = data.filter; | ||
if (typeof data11 !== "string") { | ||
var err16 = { instancePath: instancePath + "/filter", schemaPath: "#/properties/filter/type", keyword: "type", params: { type: "string" }, message: "must be string", schema: schema22.properties.filter.type, parentSchema: schema22.properties.filter, data: data11 }; | ||
if (vErrors === null) { | ||
vErrors = [err15]; | ||
vErrors = [err16]; | ||
} | ||
else { | ||
vErrors.push(err15); | ||
vErrors.push(err16); | ||
} | ||
@@ -252,10 +265,10 @@ errors++; | ||
if (data.limit !== undefined) { | ||
var data11 = data.limit; | ||
if (!((typeof data11 == "number") && (isFinite(data11)))) { | ||
var err16 = { instancePath: instancePath + "/limit", schemaPath: "#/properties/limit/type", keyword: "type", params: { type: "number" }, message: "must be number", schema: schema22.properties.limit.type, parentSchema: schema22.properties.limit, data: data11 }; | ||
var data12 = data.limit; | ||
if (!((typeof data12 == "number") && (isFinite(data12)))) { | ||
var err17 = { instancePath: instancePath + "/limit", schemaPath: "#/properties/limit/type", keyword: "type", params: { type: "number" }, message: "must be number", schema: schema22.properties.limit.type, parentSchema: schema22.properties.limit, data: data12 }; | ||
if (vErrors === null) { | ||
vErrors = [err16]; | ||
vErrors = [err17]; | ||
} | ||
else { | ||
vErrors.push(err16); | ||
vErrors.push(err17); | ||
} | ||
@@ -266,10 +279,10 @@ errors++; | ||
if (data.offset !== undefined) { | ||
var data12 = data.offset; | ||
if (!((typeof data12 == "number") && (isFinite(data12)))) { | ||
var err17 = { instancePath: instancePath + "/offset", schemaPath: "#/properties/offset/type", keyword: "type", params: { type: "number" }, message: "must be number", schema: schema22.properties.offset.type, parentSchema: schema22.properties.offset, data: data12 }; | ||
var data13 = data.offset; | ||
if (!((typeof data13 == "number") && (isFinite(data13)))) { | ||
var err18 = { instancePath: instancePath + "/offset", schemaPath: "#/properties/offset/type", keyword: "type", params: { type: "number" }, message: "must be number", schema: schema22.properties.offset.type, parentSchema: schema22.properties.offset, data: data13 }; | ||
if (vErrors === null) { | ||
vErrors = [err17]; | ||
vErrors = [err18]; | ||
} | ||
else { | ||
vErrors.push(err17); | ||
vErrors.push(err18); | ||
} | ||
@@ -280,36 +293,36 @@ errors++; | ||
if (data.sortBy !== undefined) { | ||
var data13 = data.sortBy; | ||
if (Array.isArray(data13)) { | ||
var len3 = data13.length; | ||
var data14 = data.sortBy; | ||
if (Array.isArray(data14)) { | ||
var len3 = data14.length; | ||
for (var i3 = 0; i3 < len3; i3++) { | ||
var data14 = data13[i3]; | ||
if (data14 && typeof data14 == "object" && !Array.isArray(data14)) { | ||
if (data14.attribute === undefined) { | ||
var err18 = { instancePath: instancePath + "/sortBy/" + i3, schemaPath: "#/definitions/SortOptions/required", keyword: "required", params: { missingProperty: "attribute" }, message: "must have required property '" + "attribute" + "'", schema: schema24.required, parentSchema: schema24, data: data14 }; | ||
var data15 = data14[i3]; | ||
if (data15 && typeof data15 == "object" && !Array.isArray(data15)) { | ||
if (data15.attribute === undefined) { | ||
var err19 = { instancePath: instancePath + "/sortBy/" + i3, schemaPath: "#/definitions/SortOptions/required", keyword: "required", params: { missingProperty: "attribute" }, message: "must have required property '" + "attribute" + "'", schema: schema24.required, parentSchema: schema24, data: data15 }; | ||
if (vErrors === null) { | ||
vErrors = [err18]; | ||
vErrors = [err19]; | ||
} | ||
else { | ||
vErrors.push(err18); | ||
vErrors.push(err19); | ||
} | ||
errors++; | ||
} | ||
if (data14.order === undefined) { | ||
var err19 = { instancePath: instancePath + "/sortBy/" + i3, schemaPath: "#/definitions/SortOptions/required", keyword: "required", params: { missingProperty: "order" }, message: "must have required property '" + "order" + "'", schema: schema24.required, parentSchema: schema24, data: data14 }; | ||
if (data15.order === undefined) { | ||
var err20 = { instancePath: instancePath + "/sortBy/" + i3, schemaPath: "#/definitions/SortOptions/required", keyword: "required", params: { missingProperty: "order" }, message: "must have required property '" + "order" + "'", schema: schema24.required, parentSchema: schema24, data: data15 }; | ||
if (vErrors === null) { | ||
vErrors = [err19]; | ||
vErrors = [err20]; | ||
} | ||
else { | ||
vErrors.push(err19); | ||
vErrors.push(err20); | ||
} | ||
errors++; | ||
} | ||
for (var key3 in data14) { | ||
for (var key3 in data15) { | ||
if (!((key3 === "attribute") || (key3 === "order"))) { | ||
var err20 = { instancePath: instancePath + "/sortBy/" + i3, schemaPath: "#/definitions/SortOptions/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key3 }, message: "must NOT have additional properties", schema: false, parentSchema: schema24, data: data14 }; | ||
var err21 = { instancePath: instancePath + "/sortBy/" + i3, schemaPath: "#/definitions/SortOptions/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key3 }, message: "must NOT have additional properties", schema: false, parentSchema: schema24, data: data15 }; | ||
if (vErrors === null) { | ||
vErrors = [err20]; | ||
vErrors = [err21]; | ||
} | ||
else { | ||
vErrors.push(err20); | ||
vErrors.push(err21); | ||
} | ||
@@ -319,11 +332,11 @@ errors++; | ||
} | ||
if (data14.attribute !== undefined) { | ||
var data15 = data14.attribute; | ||
if (typeof data15 !== "string") { | ||
var err21 = { instancePath: instancePath + "/sortBy/" + i3 + "/attribute", schemaPath: "#/definitions/SortOptions/properties/attribute/type", keyword: "type", params: { type: "string" }, message: "must be string", schema: schema24.properties.attribute.type, parentSchema: schema24.properties.attribute, data: data15 }; | ||
if (data15.attribute !== undefined) { | ||
var data16 = data15.attribute; | ||
if (typeof data16 !== "string") { | ||
var err22 = { instancePath: instancePath + "/sortBy/" + i3 + "/attribute", schemaPath: "#/definitions/SortOptions/properties/attribute/type", keyword: "type", params: { type: "string" }, message: "must be string", schema: schema24.properties.attribute.type, parentSchema: schema24.properties.attribute, data: data16 }; | ||
if (vErrors === null) { | ||
vErrors = [err21]; | ||
vErrors = [err22]; | ||
} | ||
else { | ||
vErrors.push(err21); | ||
vErrors.push(err22); | ||
} | ||
@@ -333,11 +346,11 @@ errors++; | ||
} | ||
if (data14.order !== undefined) { | ||
var data16 = data14.order; | ||
if (typeof data16 !== "string") { | ||
var err22 = { instancePath: instancePath + "/sortBy/" + i3 + "/order", schemaPath: "#/definitions/SortOptions/properties/order/type", keyword: "type", params: { type: "string" }, message: "must be string", schema: schema24.properties.order.type, parentSchema: schema24.properties.order, data: data16 }; | ||
if (data15.order !== undefined) { | ||
var data17 = data15.order; | ||
if (typeof data17 !== "string") { | ||
var err23 = { instancePath: instancePath + "/sortBy/" + i3 + "/order", schemaPath: "#/definitions/SortOptions/properties/order/type", keyword: "type", params: { type: "string" }, message: "must be string", schema: schema24.properties.order.type, parentSchema: schema24.properties.order, data: data17 }; | ||
if (vErrors === null) { | ||
vErrors = [err22]; | ||
vErrors = [err23]; | ||
} | ||
else { | ||
vErrors.push(err22); | ||
vErrors.push(err23); | ||
} | ||
@@ -349,8 +362,8 @@ errors++; | ||
else { | ||
var err23 = { instancePath: instancePath + "/sortBy/" + i3, schemaPath: "#/definitions/SortOptions/type", keyword: "type", params: { type: "object" }, message: "must be object", schema: schema24.type, parentSchema: schema24, data: data14 }; | ||
var err24 = { instancePath: instancePath + "/sortBy/" + i3, schemaPath: "#/definitions/SortOptions/type", keyword: "type", params: { type: "object" }, message: "must be object", schema: schema24.type, parentSchema: schema24, data: data15 }; | ||
if (vErrors === null) { | ||
vErrors = [err23]; | ||
vErrors = [err24]; | ||
} | ||
else { | ||
vErrors.push(err23); | ||
vErrors.push(err24); | ||
} | ||
@@ -362,8 +375,8 @@ errors++; | ||
else { | ||
var err24 = { instancePath: instancePath + "/sortBy", schemaPath: "#/properties/sortBy/type", keyword: "type", params: { type: "array" }, message: "must be array", schema: schema22.properties.sortBy.type, parentSchema: schema22.properties.sortBy, data: data13 }; | ||
var err25 = { instancePath: instancePath + "/sortBy", schemaPath: "#/properties/sortBy/type", keyword: "type", params: { type: "array" }, message: "must be array", schema: schema22.properties.sortBy.type, parentSchema: schema22.properties.sortBy, data: data14 }; | ||
if (vErrors === null) { | ||
vErrors = [err24]; | ||
vErrors = [err25]; | ||
} | ||
else { | ||
vErrors.push(err24); | ||
vErrors.push(err25); | ||
} | ||
@@ -375,8 +388,8 @@ errors++; | ||
else { | ||
var err25 = { instancePath: instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object", schema: schema22.type, parentSchema: schema22, data: data }; | ||
var err26 = { instancePath: instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object", schema: schema22.type, parentSchema: schema22, data: data }; | ||
if (vErrors === null) { | ||
vErrors = [err25]; | ||
vErrors = [err26]; | ||
} | ||
else { | ||
vErrors.push(err25); | ||
vErrors.push(err26); | ||
} | ||
@@ -383,0 +396,0 @@ errors++; |
{ | ||
"name": "@attraqt/search", | ||
"version": "1.4.1", | ||
"version": "1.5.0", | ||
"license": "MIT", | ||
@@ -35,3 +35,3 @@ "repository": "git://github.com:Attraqt/attraqt-js.git", | ||
"@attraqt/http-client-node": "^1.3.0", | ||
"@attraqt/search-commons": "^1.4.0" | ||
"@attraqt/search-commons": "^1.6.0" | ||
}, | ||
@@ -46,3 +46,3 @@ "devDependencies": { | ||
}, | ||
"gitHead": "4c5ca70ff45c40eb8216023d8609c7ec3b1dd947" | ||
"gitHead": "76686a9e87fc4a9c766e57dfc1bb2d108f338e72" | ||
} |
Sorry, the diff of this file is not supported yet
101995
1149