/** * Indicates if the given RAML definition is valid according to RAML * specifications. * * @param location * The RAML definition. * @throws TranslationException */ public static List<ValidationResult> validate(String location) throws TranslationException { // TODO see if needed as it requires lots of dependencies. return RamlValidationService.createDefault().validate(location); } }
/** * Indicates if the given RAML definition is valid according to RAML * specifications. * * @param location * The RAML definition. * @throws TranslationException */ public static List<ValidationResult> validate(String location) throws TranslationException { // TODO see if needed as it requires lots of dependencies. return RamlValidationService.createDefault().validate(location); } }
/** * Indicates if the given RAML definition is valid according to RAML * specifications. * * @param location * The RAML definition. * @throws TranslationException */ public static List<ValidationResult> validate(String location) throws TranslationException { // TODO see if needed as it requires lots of dependencies. return RamlValidationService.createDefault().validate(location); } }
/** * Indicates if the given RAML definition is valid according to RAML * specifications. * * @param location * The RAML definition. * @throws TranslationException */ public static List<ValidationResult> validate(String location) throws TranslationException { // TODO see if needed as it requires lots of dependencies. return RamlValidationService.createDefault().validate(location); } }
/** * Indicates if the given RAML definition is valid according to RAML * specifications. * * @param location * The RAML definition. * @throws TranslationException */ public static List<ValidationResult> validate(String location) throws TranslationException { // TODO see if needed as it requires lots of dependencies. return RamlValidationService.createDefault().validate(location); } }
if (content != null) results = RamlValidationService.createDefault().validate(content, ramlResourceToFetch);
if (content != null) results = RamlValidationService.createDefault().validate(content, ramlResourceToFetch);
public Set<String> run(final Reader ramlReader, final Configuration configuration) throws Exception { final String ramlBuffer = IOUtils.toString(ramlReader); ResourceLoader[] loaderArray = prepareResourceLoaders(configuration); final List<ValidationResult> results = RamlValidationService.createDefault( new CompositeResourceLoader(loaderArray)).validate(ramlBuffer, ""); if (ValidationResult.areValid(results)) { return run(new RamlDocumentBuilder(new CompositeResourceLoader( loaderArray)).build(ramlBuffer, ""), configuration); } else { final List<String> validationErrors = Lists.transform(results, new Function<ValidationResult, String>() { @Override public String apply(final ValidationResult vr) { return String.format("%s %s", vr.getStartColumn(), vr.getMessage()); } }); throw new IllegalArgumentException("Invalid RAML definition:\n" + join(validationErrors, "\n")); } }
.validate(ramlBuffer, readerLocation); if (ValidationResult.areValid(results)) { return run(new RamlDocumentBuilder(new CompositeResourceLoader(