diff --git a/PluginOracleADW/Plugin/Plugin.cs b/PluginOracleADW/Plugin/Plugin.cs index c19112e..4b1e081 100644 --- a/PluginOracleADW/Plugin/Plugin.cs +++ b/PluginOracleADW/Plugin/Plugin.cs @@ -236,10 +236,21 @@ await foreach (var record in records) public override Task ConfigureReplication(ConfigureReplicationRequest request, ServerCallContext context) { - //Logger.Info("Configuring write..."); + Logger.Info("Configuring write..."); // - // var schemaJson = Replication.GetSchemaJson(); - // var uiJson = Replication.GetUIJson(); + var schemaJson = GetSchemaJson(); + var uiJson = GetUIJson(); + + return Task.FromResult(new ConfigureReplicationResponse + { + Form = new ConfigurationFormResponse + { + DataJson = request.Form.DataJson, + SchemaJson = schemaJson, + UiJson = uiJson, + StateJson = request.Form.StateJson + } + }); // // try // { @@ -447,5 +458,45 @@ public override Task Disconnect(DisconnectRequest request, S Logger.Info("Disconnected"); return Task.FromResult(new DisconnectResponse()); } + + public static string GetSchemaJson() + { + var schemaJsonObj = new Dictionary + { + {"type", "object"}, + {"properties", new Dictionary + { + {"TableName", new Dictionary + { + {"type", "string"}, + {"title", "Table Name"}, + {"description", "Name for your golden record table"}, + }} + }}, + {"required", new [] + { + "TableName" + }} + }; + +// var schemaJsonObj = new Dictionary(); + + return JsonConvert.SerializeObject(schemaJsonObj); + } + + public static string GetUIJson() + { + var uiJsonObj = new Dictionary + { + {"ui:order", new [] + { + "TableName" + }} + }; + +// var uiJsonObj = new Dictionary(); + + return JsonConvert.SerializeObject(uiJsonObj); + } } } \ No newline at end of file diff --git a/PluginOracleADW/PluginOracleADW.csproj b/PluginOracleADW/PluginOracleADW.csproj index 5ec7083..f7bdaf5 100644 --- a/PluginOracleADW/PluginOracleADW.csproj +++ b/PluginOracleADW/PluginOracleADW.csproj @@ -30,22 +30,22 @@ - - + + - - + + - - + + diff --git a/manifest.json b/manifest.json index 67510aa..56b930f 100644 --- a/manifest.json +++ b/manifest.json @@ -4,7 +4,7 @@ "description": "Publisher which connects to Oracle's Autonomous Data Warehouse", "apiVersion": "2", "versionDescription": "Version 2", - "version": "1.0.0", + "version": "0.7.1", "iconFile": "icon.png", "executable": "PluginOracleADW", "kind": "publisher",