Skip to content

ThamaliW/Swagger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

WSO2 Machine Learner REST API Implementation

Generating REST API Code using Swagger Definition

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

About

Converting swagger definition to client code

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages