update/plugins/org.eclipse.wildwebdeveloper_0.5.8.202005190736/node_modules/yaml-language-server/out/server/src/languageservice/parser/jsonParser04.js
//Alternative comparison is specifically used by the kubernetes/openshift schema but may lead to better results then genericComparison depending on the schema
Alternative comparison is specifically used by the kubernetes/openshift schema but may lead to better results then genericComparison depending on the schema
Alternative comparison is specifically used by the kubernetes / openshift schema but may lead to better results then genericComparison depending on the schema
function alternativeComparison(subValidationResult, bestMatch, subSchema, subMatchingSchemas) {
    const compareResult = subValidationResult.compareKubernetes(bestMatch.validationResult);
    if (compareResult > 0) {
        bestMatch = { schema: subSchema, validationResult: subValidationResult, matchingSchemas: subMatchingSchemas };
    }
    else if (compareResult === 0) {
        bestMatch.matchingSchemas.merge(subMatchingSchemas);
        bestMatch.validationResult.mergeEnumValues(subValidationResult);
    }
    return bestMatch;
}
function alternativeComparison ( subValidationResult , bestMatch , subSchema , subMatchingSchemas ) { const compareResult = subValidationResult . compareKubernetes ( bestMatch . validationResult ) ; if ( compareResult > 0 ) { bestMatch = { schema : subSchema , validationResult : subValidationResult , matchingSchemas : subMatchingSchemas } ; } else if ( compareResult === 0 ) { bestMatch . matchingSchemas . merge ( subMatchingSchemas ) ; bestMatch . validationResult . mergeEnumValues ( subValidationResult ) ; } return bestMatch ; }
Alternative comparison is specifically used by the kubernetes/openshift schema but may lead to better results then genericComparison depending on the schema
Alternative comparison is specifically used by the kubernetes / openshift schema but may lead to better results then genericComparison depending on the schema
// our node is the best matching so far // there's already a best matching but we are as good