Package dev.hilla.generator
Class MainGenerator
- java.lang.Object
-
- dev.hilla.generator.MainGenerator
-
public class MainGenerator extends Object
Performs the generation of TypeScript files for endpoints, Client API file and endpoint barrel file based on the data from the OpenAPI json. Generation occurs in the directory specified, overwriting the files and creating the target directory, if necessary.
-
-
Constructor Summary
Constructors Constructor Description MainGenerator(File openApiJsonFile, File outputDirectory)Initializes the generator.MainGenerator(File openApiJsonFile, File outputDirectory, String defaultClientPath)Initializes the generator.MainGenerator(File openApiJsonFile, File outputDirectory, Properties properties)Initializes the generator.MainGenerator(File openApiJsonFile, File outputDirectory, Properties properties, String defaultClientPath)Initializes the generator.
-
-
-
Field Detail
-
MODEL
public static final String MODEL
- See Also:
- Constant Field Values
-
OPTIONAL_SUFFIX
public static final String OPTIONAL_SUFFIX
- See Also:
- Constant Field Values
-
TS
public static final String TS
- See Also:
- Constant Field Values
-
MODEL_TS
public static final String MODEL_TS
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
MainGenerator
public MainGenerator(File openApiJsonFile, File outputDirectory)
Initializes the generator.- Parameters:
openApiJsonFile- the api spec file to analyzeoutputDirectory- the directory to generate the files into
-
MainGenerator
public MainGenerator(File openApiJsonFile, File outputDirectory, Properties properties)
Initializes the generator.- Parameters:
openApiJsonFile- the api spec file to analyzeoutputDirectory- the directory to generate the files intoproperties- the properties with the data required for the Client API file generation
-
MainGenerator
public MainGenerator(File openApiJsonFile, File outputDirectory, String defaultClientPath)
Initializes the generator.- Parameters:
openApiJsonFile- the api spec file to analyzeoutputDirectory- the directory to generate the files intodefaultClientPath- the path of the default Client API file which is imported in the generated files.
-
MainGenerator
public MainGenerator(File openApiJsonFile, File outputDirectory, Properties properties, String defaultClientPath)
Initializes the generator.- Parameters:
openApiJsonFile- the api spec file to analyzeoutputDirectory- the directory to generate the files intoproperties- the properties with the data required for the Client API file generationdefaultClientPath- the path of the default Client API file which is imported in the generated files.
-
-