public IActionResult Populate(string topicname) { var text = AvroHelper.PopulateAvroJson(_schema[topicname]); return(View("Produce", new ProducerViewModel { TopicNames = FIleHelper.GetAllFiles(_settings.SchemaDirectory, Constants.AvroSchemaFileExtension) })); }
public IActionResult Produce(string topicname = null) { var topics = FIleHelper.GetAllFiles(_settings.SchemaDirectory, Constants.AvroSchemaFileExtension); if (string.IsNullOrEmpty(topicname)) { return(View(new ProducerViewModel { TopicNames = topics })); } return(View(new ProducerViewModel { TopicNames = FIleHelper.GetAllFiles(_settings.SchemaDirectory, Constants.AvroSchemaFileExtension), CurrentTopic = topicname, AvroJson = _schema.ContainsKey(topicname) ? AvroHelper.PopulateAvroJson(_schema[topicname]) : string.Empty })); }
public IActionResult Refresh() { AvroHelper.GenerateAvroTypes(_settings.AvrogenDirectory, _settings.SchemaDirectory, _settings.MessageTypeDirectory); return(RedirectToAction("Index")); }
public HomeController(IOptions <ApplicationSettings> options) { _settings = options.Value; _schema = AvroHelper.LoadCurrentSchema(_settings.SchemaDirectory); }