mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-10-17 18:18:52 +00:00
Fixed serialization & deserialization of data sources
This commit is contained in:
1 file changed
+6
@@ -1,3 +1,5 @@
|
|||||||
|
using System.Text.Json.Serialization;
|
||||||
|
|
||||||
using AIStudio.Settings.DataModel;
|
using AIStudio.Settings.DataModel;
|
||||||
|
|
||||||
namespace AIStudio.Settings;
|
namespace AIStudio.Settings;
|
||||||
@@ -5,6 +7,10 @@ namespace AIStudio.Settings;
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// The common interface for all data sources.
|
/// The common interface for all data sources.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[JsonPolymorphic(TypeDiscriminatorPropertyName = "$type_discriminator")]
|
||||||
|
[JsonDerivedType(typeof(DataSourceLocalDirectory), nameof(DataSourceType.LOCAL_DIRECTORY))]
|
||||||
|
[JsonDerivedType(typeof(DataSourceLocalFile), nameof(DataSourceType.LOCAL_FILE))]
|
||||||
|
[JsonDerivedType(typeof(DataSourceERI_V1), nameof(DataSourceType.ERI_V1))]
|
||||||
public interface IDataSource
|
public interface IDataSource
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
Reference in new issue
Block a user