import { TaskExecutor } from '@angular-devkit/schematics'; /** * Common configuration for all the code generators */ export type CodegenTaskOptions = { /** * Path to the Swagger specification * @default 'swagger-spec.yaml' */ specPath: string; /** * Path to the swagger configuration */ specConfigPath: string; /** * Output path for the generated sdk */ outputPath: string; }; /** * Expose angular schematics to run any code generator. * Handle the task registration, configuration and the schematic's schedule. * * As is, the CodeGenerator does not implement any actual code generation and needs to be extended to be functional * @see {@link OpenApiCliGenerator} */ export declare abstract class CodeGenerator { /** * Refers to the name the {@link Task} will be identified in a {@link Rule} ${@link SchematicContext} */ protected abstract generatorName: string; /** * Configure the code generation task * Merge the generator's default options with the dynamic one provided by the schematics * @param options to override the generator's {@link getDefaultOptions} */ private getTaskConfiguration; /** * Register the task in the rule's {@link SchematicContext} * @param factoryOptions execution options (root directory for instance) * @param factoryOptions.rootDirectory */ private registerGeneratorExecutor; /** * Returns the generator specific default options */ protected abstract getDefaultOptions(): T; /** * Returns the schematic that will run the code generator * @param _factoryOptions execution options (root directory for instance) * @param _factoryOptions.rootDirectory */ protected runCodeGeneratorFactory(_factoryOptions?: { rootDirectory?: string; }): TaskExecutor; /** * Returns the schematic to register, configure and run your code generator task * @param generatorOptions to configure the generator and the specification file to use * @param factoryOptions to configure the generator execution context * @param factoryOptions.rootDirectory directory where all your commands will be run - fallback to process.cwd */ getGeneratorRunSchematic(generatorOptions: Partial, factoryOptions?: { rootDirectory?: string; }): import("@angular-devkit/schematics").Rule; } //# sourceMappingURL=code-generator.d.ts.map