public class CodeGenerator extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
projectName |
| 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 |
generateGrpc(String projectName,
String apiDef,
boolean overwrite)
Generates ballerina source for provided Open APIDetailedDTO Definition in
definitionPath. |
public static String projectName
public 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 © 2023 WSO2. All rights reserved.