public class ResourceValidator extends Object
Modifier and Type | Field and Description |
---|---|
static String |
SCHEMA_JSON |
Constructor and Description |
---|
ResourceValidator(File inputFile) |
ResourceValidator(File inputFile,
ResourceClassifier target,
KitLogger log) |
Modifier and Type | Method and Description |
---|---|
com.google.gson.JsonObject |
getSchemaJson(URL schemaUrl) |
int |
validate()
Validates the resource descriptors as per JSON schema.
|
public static final String SCHEMA_JSON
public ResourceValidator(File inputFile)
inputFile
- File/Directory path of resource descriptorspublic ResourceValidator(File inputFile, ResourceClassifier target, KitLogger log)
inputFile
- File/Directory path of resource descriptorstarget
- Target platform e.g OpenShift, Kuberneteslog
- KitLogger for logging messages on standard output devicespublic int validate() throws IOException
ConstraintViolationException
with
all violated constraintsjavax.validation.ConstraintViolationException
- ConstraintViolationExceptionIOException
- IOExceptionpublic com.google.gson.JsonObject getSchemaJson(URL schemaUrl) throws IOException
IOException
Copyright © 2021. All rights reserved.