kab/kab/static/js/monaco-yaml/yamlWorker.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) {
    var 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 ) { var 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