new Validator().validate(args);
}
private void validate(String[] resources) throws FileNotFoundException
{
ResourceLoader loader = new DefaultResourceLoader();
for (String ramlResource : resources)
{
System.out.format("Validation Results for %s:\n", ramlResource);
String ramlResourceToFetch = ramlResource;
if (ramlResource.startsWith("/"))
{
ramlResourceToFetch = "file://" + ramlResource;
}
List<ValidationResult> results = new ArrayList<ValidationResult>();
InputStream content = loader.fetchResource(ramlResourceToFetch);
if (content != null)
{
results = RamlValidationService.createDefault().validate(content, ramlResourceToFetch);
}
else