Sha256: d1d91a376cb3383e4c595a34b596fdff9cc0fd6187879b6a86e2ea7846d2b7d3

Contents?: true

Size: 1.12 KB

Versions: 210

Compression:

Stored size: 1.12 KB

Contents

{{# def.definitions }}
{{# def.errors }}
{{# def.setupKeyword }}
{{# def.setupNextLevel }}

{{
  var $currentBaseId = $it.baseId
    , $prevValid = 'prevValid' + $lvl
    , $passingSchemas = 'passingSchemas' + $lvl;
}}

var {{=$errs}} = errors
  , {{=$prevValid}} = false
  , {{=$valid}} = false
  , {{=$passingSchemas}} = null;

{{# def.setCompositeRule }}

{{~ $schema:$sch:$i }}
  {{? {{# def.nonEmptySchema:$sch }} }}
    {{
      $it.schema = $sch;
      $it.schemaPath = $schemaPath + '[' + $i + ']';
      $it.errSchemaPath = $errSchemaPath + '/' + $i;
    }}

    {{# def.insertSubschemaCode }}
  {{??}}
    var {{=$nextValid}} = true;
  {{?}}

  {{? $i }}
    if ({{=$nextValid}} && {{=$prevValid}}) {
      {{=$valid}} = false;
      {{=$passingSchemas}} = [{{=$passingSchemas}}, {{=$i}}];
    } else {
    {{ $closingBraces += '}'; }}
  {{?}}

    if ({{=$nextValid}}) {
      {{=$valid}} = {{=$prevValid}} = true;
      {{=$passingSchemas}} = {{=$i}};
    }
{{~}}

{{# def.resetCompositeRule }}

{{= $closingBraces }}

if (!{{=$valid}}) {
  {{# def.extraError:'oneOf' }}
} else {
  {{# def.resetErrors }}
{{? it.opts.allErrors }} } {{?}}

Version data entries

210 entries across 153 versions & 17 rubygems

Version Path
immosquare-cleaner-0.1.62 node_modules/ajv/lib/dot/oneOf.jst
immosquare-cleaner-0.1.61 node_modules/ajv/lib/dot/oneOf.jst
immosquare-cleaner-0.1.60 node_modules/ajv/lib/dot/oneOf.jst
immosquare-cleaner-0.1.59 node_modules/ajv/lib/dot/oneOf.jst
immosquare-cleaner-0.1.58 node_modules/ajv/lib/dot/oneOf.jst
immosquare-cleaner-0.1.57 node_modules/ajv/lib/dot/oneOf.jst
immosquare-cleaner-0.1.56 node_modules/ajv/lib/dot/oneOf.jst
immosquare-cleaner-0.1.55 node_modules/ajv/lib/dot/oneOf.jst
immosquare-cleaner-0.1.54 node_modules/ajv/lib/dot/oneOf.jst
immosquare-cleaner-0.1.53 node_modules/ajv/lib/dot/oneOf.jst
immosquare-cleaner-0.1.52 node_modules/ajv/lib/dot/oneOf.jst
immosquare-cleaner-0.1.51 node_modules/ajv/lib/dot/oneOf.jst
immosquare-cleaner-0.1.50 node_modules/ajv/lib/dot/oneOf.jst
immosquare-cleaner-0.1.49 node_modules/ajv/lib/dot/oneOf.jst
immosquare-cleaner-0.1.48 node_modules/ajv/lib/dot/oneOf.jst
immosquare-cleaner-0.1.47 node_modules/ajv/lib/dot/oneOf.jst
immosquare-cleaner-0.1.46 node_modules/ajv/lib/dot/oneOf.jst
immosquare-cleaner-0.1.45 node_modules/ajv/lib/dot/oneOf.jst
immosquare-cleaner-0.1.44 node_modules/ajv/lib/dot/oneOf.jst
immosquare-cleaner-0.1.43 node_modules/ajv/lib/dot/oneOf.jst