public ICommand GeneratorCommand( OpenApiModel openApiModel, Action onSuccess, Action <Exception> onError ) { return(new GenerateCommand(_appController, _logger, openApiModel, onSuccess, onError)); }
public OpenApiModeWasCreatedState(OpenApiModel openApiModel, ICommandsProvider commandsProvider) { _commandsProvider = commandsProvider; _exitCommand = commandsProvider.ExitCommand(); _generateCommand = commandsProvider.GeneratorCommand(openApiModel, OnSuccess, OnError); }
public GenerateCommand(AppController controller, ILogger logger, OpenApiModel openApiModel, Action onSuccess, Action <Exception> onError) { _controller = controller; _logger = logger; _openApiModel = openApiModel; _onSuccess = onSuccess; _onError = onError; }
public void Generate(OpenApiModel openApiModel) { ParseSchemas(openApiModel.Schemas); ParseEndpoints(openApiModel.Endpoints); CreateFiles(GeneratorContext.GetTypesToGenerate(), GeneratorContext.GetFunctionsToGenerate()); }
private void OnDeserialization(OpenApiModel openApiModel) { _window.ChangeState(new OpenApiModeWasCreatedState(openApiModel, _commandsProvider)); }