Generating RAML from JAX-RS via CLI

In addition to the maven plugin, RAML for the JAX-RS project also has a command-line interface (CLI) tool for generating RAML from the JAX-RS resources. Its usage is as follows:

  1. Clone the https://github.com/mulesoft-labs/raml-for-jax-rs project and build it locally.
  2. To generate the RAML code, run the jaxrstoraml command with the following arguments:
jaxrstoraml -a <arg> -o <arg> [-s <arg>] [-t <arg>]
 -a,--applicationDirectory <arg>    application path
 -o,--output <arg>                  RAML output file
 -s,--sourceRoot <arg>              JaxRs source root
 -t,--translatedAnnotations <arg>   translated annotation list (comma separated)

From the jaxrs-to-raml-cli project folder, execute the jaxrstoraml program to generate the test.raml file, as shown ahead:

java -jar ./target/jaxrs-to-raml-cli-2.1.0-jar-with-dependencies.jar -a ../jaxrs-test-resources/target/classes -o /tmp/test.raml
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.145.191.134