Skip to Content
Author's profile photo Jerry Wang

YaaS client automatical generation approach

Open url: https://devportal.yaas.io/tools/servicesdk/index.html#Plug-ins

The ‘generate-service’ plug-in goal

This goal provides support to expose your RAML API as JAX-RS endpoints in your Java project. It also helps keep the implementation in sync with your API definition.

To configure the generator plug-in to execute the generate-service goal, you must add this plug-in configuration to your project.

Template:

/wp-content/uploads/2016/05/clipboard1_946192.png

Actual content in pom.xml:


/wp-content/uploads/2016/05/clipboard2_946301.png

The ‘generate-client’ plug-in goal

Use this Maven goal to generate client code for a RAML API definition during the project build process.

To configure the generator plug-in to execute the generate-client goal, you must modify or extend the service-sdk-generator-maven-plugin configuration.

Template:

/wp-content/uploads/2016/05/clipboard3_946302.png

Actual content in pom.xml:

/wp-content/uploads/2016/05/clipboard4_946303.png

mvn clean install, the corresponding client class is automatically generated in the folder specified in pom.xml:

/wp-content/uploads/2016/05/clipboard5_946304.png

Assigned Tags

      Be the first to leave a comment
      You must be Logged on to comment or reply to a post.