raml-java-parser icon indicating copy to clipboard operation
raml-java-parser copied to clipboard

RAML successfully parsed but isVersion08() and isVersion10() both return false

Open martinpg2001 opened this issue 8 years ago • 0 comments

I have installed Version 2.1.0.17 and its dependencies. When the following code runs, the output is:

unrecognized RAML version

I expected that isVersion10() would return true. Have I done something wrong?

RamlModelResult ramlModelResult = new RamlModelBuilder().buildApi("https://raw.githubusercontent.com/raml-org/raml-tutorial-200/step8/jukebox-api.raml"); if (ramlModelResult.hasErrors()) { for (ValidationResult validationResult : ramlModelResult.getValidationResults()) { System.out.println(validationResult.getMessage()); } } else { if (ramlModelResult.isVersion08()) { LOGGER.debug("Version 0.8"); } else if (ramlModelResult.isVersion10()) { LOGGER.debug("Version 1.0"); } else { LOGGER.warn("unrecognized RAML version"); } }

Aha! Link: https://mulesoft-roadmap.aha.io/features/APIRAML-71

martinpg2001 avatar Nov 28 '17 21:11 martinpg2001