Class 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 Detail

      • MainGenerator

        public MainGenerator​(File openApiJsonFile,
                             File outputDirectory)
        Initializes the generator.
        Parameters:
        openApiJsonFile - the api spec file to analyze
        outputDirectory - 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 analyze
        outputDirectory - the directory to generate the files into
        properties - 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 analyze
        outputDirectory - the directory to generate the files into
        defaultClientPath - 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 analyze
        outputDirectory - the directory to generate the files into
        properties - the properties with the data required for the Client API file generation
        defaultClientPath - the path of the default Client API file which is imported in the generated files.
    • Method Detail

      • start

        public void start()
        Starts the generation.