raml-java-parser
raml-java-parser copied to clipboard
Surrogate characters are not supported
Issue: Validation fails for RAML documents that contain surrogate chars (e.g. '𠿿').
Investigation: Raml-java-parser uses the 'org.yaml.snakeyaml.reader.StreamReader.checkPrintable()' method for validation of RAML documents. This method works with chars from a String representation of a RAML document. A surrogate character from the example is represented by a pair of chars: uD843 and uDFFF (https://docs.oracle.com/javase/6/docs/api/java/lang/Character.html). Looks like StreamReader.checkPrintable() doesn't support the case and checks each of these two chars as a separate char. That's why the check fails.
Example of RAML file:
#%RAML 0.8
title: simpleapi
version: 1.0
baseUri: /test1/test2/api1
protocols: [HTTPS]
/test:
displayName: test𠿿
get:
protocols: [HTTPS]
Aha! Link: https://mulesoft-roadmap.aha.io/features/APIRAML-143
Can you please report this in SnakeYAML ?