public class CodeGenerator extends Object
| Constructor and Description |
|---|
CodeGenerator() |
| Modifier and Type | Method and Description |
|---|---|
void |
generate(String projectName,
boolean overwrite)
Generates ballerina source for provided Open APIDetailedDTO Definition in
definitionPath. |
void |
generate(String projectName,
List<ExtendedAPI> apis,
boolean overwrite)
Generates ballerina source for provided Open APIDetailedDTO Definition in
definitionPath. |
void |
generateGrpc(String projectName,
String apiDef,
boolean overwrite)
Generates ballerina source for provided Open APIDetailedDTO Definition in
definitionPath. |
public void generate(String projectName, List<ExtendedAPI> apis, boolean overwrite) throws IOException, BallerinaServiceGenException
definitionPath.
Generated source will be written to a ballerina package at outPath
Method can be used for generating Ballerina mock services and clients
IOException - when file operations failBallerinaServiceGenException - when code generator failspublic void generate(String projectName, boolean overwrite) throws IOException
definitionPath.
Generated source will be written to a ballerina package at outPath
Method can be used for generating Ballerina mock services and clients
IOException - when file operations failpublic void generateGrpc(String projectName, String apiDef, boolean overwrite) throws IOException
definitionPath.
Generated source will be written to a ballerina package at outPath
Method can be user for generating Ballerina mock services and clients
projectName - name of the project being set upapiDef - api definition stringoverwrite - whether existing files overwrite or notIOException - when file operations failCopyright © 2019 WSO2. All rights reserved.