简体   繁体   中英

How to generate documentation and client code for RAML?

I'm new working on a project where they want to use RAML to define the APIs. I got the RAML-JAX-RS p0lugin for Eclipse. With that I was able to generate a RAML file from an existing REST service. I was also able to generate the REST interface classes. There's a checkbox with the option 'Generate client proxy code'. But it doesn't generate any client code whatsoever. Only the REST server interfaces get generated.

I tried searching for a way to generate the client classes and the documentation files. (I'm assuming it can do that, as HTML files or so.) I have seen some maven plugin code to generate client code, but I can't see how it works. Does anyone know how to generate these? Either from Eclipse, command-line or Maven is OK with me. Preferably through Maven.

I have found that the best option so far is

https://github.com/mulesoft-labs/raml-java-client-generator

I would prefer a RAML 1.0 compatible generator, but none seems to exist.

We are finding that some changes are necessary to 1.0 RAML to make it parse properly, such as removing types before examples, etc.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM