com.networknt.oas.validator.ObjectValidatorBase Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of openapi-parser Show documentation
Show all versions of openapi-parser Show documentation
A light-weight, fast OpenAPI 3.0 parser and validator
/*******************************************************************************
* Copyright (c) 2017 ModelSolv, Inc. and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* ModelSolv, Inc. - initial API and implementation and/or initial documentation
*******************************************************************************/
package com.networknt.oas.validator;
import com.networknt.oas.jsonoverlay.IPropertiesOverlay;
public abstract class ObjectValidatorBase extends ValidatorBase {
private ImplValidator implValidator;
public abstract void validateObject(T object, ValidationResults results);
@Override
public void validate(T value, ValidationResults results) {
@SuppressWarnings("unchecked")
IPropertiesOverlay propValue = (IPropertiesOverlay) value;
if (propValue.isElaborated()) {
validateObject(value, results);
if (implValidator != null) {
implValidator.validateImpl(value, results);
}
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy