(context, location, input)
| 1086 | } |
| 1087 | |
| 1088 | function buildAllOf (context, location, input) { |
| 1089 | const schema = location.schema |
| 1090 | |
| 1091 | let mergedSchemaId = context.mergedSchemasIds.get(schema) |
| 1092 | if (mergedSchemaId) { |
| 1093 | const mergedLocation = getMergedLocation(context, mergedSchemaId) |
| 1094 | return buildValue(context, mergedLocation, input) |
| 1095 | } |
| 1096 | |
| 1097 | mergedSchemaId = `__fjs_merged_${schemaIdCounter++}` |
| 1098 | context.mergedSchemasIds.set(schema, mergedSchemaId) |
| 1099 | |
| 1100 | const { allOf, ...schemaWithoutAllOf } = location.schema |
| 1101 | const locations = [ |
| 1102 | new Location( |
| 1103 | schemaWithoutAllOf, |
| 1104 | location.schemaId, |
| 1105 | location.jsonPointer |
| 1106 | ) |
| 1107 | ] |
| 1108 | |
| 1109 | const allOfsLocation = location.getPropertyLocation('allOf') |
| 1110 | for (let i = 0, allOfLength = allOf.length; i < allOfLength; i++) { |
| 1111 | locations.push(allOfsLocation.getPropertyLocation(i)) |
| 1112 | } |
| 1113 | |
| 1114 | const mergedLocation = mergeLocations(context, mergedSchemaId, locations) |
| 1115 | return buildValue(context, mergedLocation, input) |
| 1116 | } |
| 1117 | |
| 1118 | function buildOneOf (context, location, input) { |
| 1119 | context.validatorSchemasIds.add(location.schemaId) |
no test coverage detected
searching dependent graphs…