mirror of
				https://github.com/MindWorkAI/AI-Studio.git
				synced 2025-11-04 05:20:21 +00:00 
			
		
		
		
	Fixed serialization & deserialization of data sources
This commit is contained in:
		
							parent
							
								
									dd08a7e1aa
								
							
						
					
					
						commit
						5d37d42cd2
					
				@ -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>
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user