Conditions | 1 |
Total Lines | 9 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | package com.hltech.vaunt.validator; |
||
24 | public static List<String> validate(JsonSchema consumerSchema, JsonSchema providerSchema) { |
||
25 | JsonSchemaValidator matchingValidator = schemaValidators.stream() |
||
26 | .filter(v -> v.supportsSchemaType().equals(consumerSchema.getClass())) |
||
27 | .filter(v -> v.supportsSchemaType().equals(providerSchema.getClass())) |
||
28 | .findAny() |
||
29 | .orElseThrow(() -> new RuntimeException( |
||
30 | "Exactly one validator should exist for consumer and provider")); |
||
31 | |||
32 | return matchingValidator.validate(consumerSchema, providerSchema); |
||
33 | } |
||
35 |