All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.openapi4j.parser.validation.ValidationContext Maven / Gradle / Ivy

There is a newer version: 1.0.7
Show newest version
package org.openapi4j.parser.validation;

import org.openapi4j.core.model.OAI;
import org.openapi4j.core.validation.ValidationResults;

import java.util.HashSet;
import java.util.Set;

public class ValidationContext {
  private final Set visitedElements = new HashSet<>();

  public  void validate(O api, V value, final Validator validator, ValidationResults results) {
    if (!visitedElements.add(value.hashCode())) {
      return;
    }

    validator.validate(this, api, value, results);
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy