mulesoft-labs / raml-for-jax-rs

This project is all about two way transformation of JAX-RS-annotated Java code to RAML API description and back.
Other
295 stars 181 forks source link

JAX-RS generation should not include non-textual samples in generated class comments #178

Open sohrab- opened 8 years ago

sohrab- commented 8 years ago

It is valid to include binary examples in the RAML file, e.g. see https://github.com/raml-org/raml-tutorial-200

In these scenarios, the generator tries to jam the binary file into the class comments, making the whole class invalid.

image

[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR : 
[INFO] -------------------------------------------------------------
[ERROR] /Users/sohrab/workspace/raml-test/target/generated-sources/raml-jaxrs/com/acme/api/resource/SongsResource.java:[198,2] error: illegal unicode escape
[ERROR] /Users/sohrab/workspace/raml-test/target/generated-sources/raml-jaxrs/com/acme/api/resource/SongsResource.java:[389,160] error: illegal unicode escape
[ERROR] /Users/sohrab/workspace/raml-test/target/generated-sources/raml-jaxrs/com/acme/api/resource/SongsResource.java:[2504,2] error: illegal unicode escape
[ERROR] /Users/sohrab/workspace/raml-test/target/generated-sources/raml-jaxrs/com/acme/api/resource/SongsResource.java:[2695,164] error: illegal unicode escape
[ERROR] /Users/sohrab/workspace/raml-test/target/generated-sources/raml-jaxrs/com/acme/api/resource/SongsResource.java:[187,8356] error: illegal unicode escape
[ERROR] /Users/sohrab/workspace/raml-test/target/generated-sources/raml-jaxrs/com/acme/api/resource/SongsResource.java:[361,788] error: illegal unicode escape
[ERROR] /Users/sohrab/workspace/raml-test/target/generated-sources/raml-jaxrs/com/acme/api/resource/SongsResource.java:[2493,8386] error: illegal unicode escape
[ERROR] /Users/sohrab/workspace/raml-test/target/generated-sources/raml-jaxrs/com/acme/api/resource/SongsResource.java:[2669,25] error: illegal unicode escape

Ideally we should not include these in the generated classes.

jpbelang commented 6 years ago

check for 2.x