Example in java jaxrs-to-raml


I don’t find any complete example to use jaxrs-to-raml in java.

Input: ApiRest.java
Output: String json

Thank you


Hi ApiDeveloper, actually there are some:

RAML->Java examples




Thanks Pavel,

I already saw those examples but they use maven instead of making the parser in a java class that I need.

I expected a main class with the transformation to create a raml definition on the fly.

Could you send me that kind of sample?



I guess what you need is RuntimeRAMLBuilder class. You may see example of using it in BasicTest



Yes, thank you.

But, the problem is when there are any entity in the method throws a nullpointperexception.
The BasicTest is too basic and works fine, BUT if it’s included another example doesn’t work:

public void post(Entity entity)



Yep, There is a bug in the code. :frowning: You may try to use raml1.0 branch in my fork https://github.com/petrochenko-pavel-a/raml-for-jax-rs whish should not suffer from this issue, but it is still pretty new, so you may expect another kinds of issues there)