Following document discusses implementation details for generating client library using swagger API definition.
Tools:
Swagger Codegen
Swagger Editor
Maven mojo plugins
Apache CXF
Procedure:
First step is to generate swagger API specification using swagger editor.
Next step is to create a maven project and add the created swagger specification yaml file to the resources folder.
There are certain dependencies to be added to the POM file.
To generate a war with tomac naming convention use maven-war-plugin.
mvn swagger2cxf:generate command is used to generate the server stub
In src/gen/java folder, set of factories are generated and in main/Java folder, a set of impl files are generated.
The remaining logic should be added to the impl to complete the REST API code