From 5789860eaf9324dd30b78cebbb894df9fa92fa23 Mon Sep 17 00:00:00 2001 From: JAME VAALET Date: Thu, 12 Sep 2024 14:43:48 -0700 Subject: [PATCH] Update schema of DataSource in v3 YAML (#715) --- .../PaYaml/Models/SchemaV3/DataSourceInstance.cs | 10 +++++----- .../Examples/Src/DataSources/DataSources1.pa.yaml | 15 +++++++++------ 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/src/Persistence/PaYaml/Models/SchemaV3/DataSourceInstance.cs b/src/Persistence/PaYaml/Models/SchemaV3/DataSourceInstance.cs index 0bb84a4e..561b83e9 100644 --- a/src/Persistence/PaYaml/Models/SchemaV3/DataSourceInstance.cs +++ b/src/Persistence/PaYaml/Models/SchemaV3/DataSourceInstance.cs @@ -5,14 +5,14 @@ namespace Microsoft.PowerPlatform.PowerApps.Persistence.PaYaml.Models.SchemaV3; -public enum DataSourceInstanceType +public enum DataSourceType { - DataverseTable, + Table, + Actions } - public record DataSourceInstance { [YamlMember(DefaultValuesHandling = DefaultValuesHandling.Preserve)] - public required DataSourceInstanceType Type { get; init; } - public string? TableLogicalName { get; init; } + public required DataSourceType Type { get; init; } + public NamedObjectMapping? Parameters { get; init; } } diff --git a/src/schemas-tests/pa-yaml/v3.0/Examples/Src/DataSources/DataSources1.pa.yaml b/src/schemas-tests/pa-yaml/v3.0/Examples/Src/DataSources/DataSources1.pa.yaml index 2851fc7a..73a1c0a9 100644 --- a/src/schemas-tests/pa-yaml/v3.0/Examples/Src/DataSources/DataSources1.pa.yaml +++ b/src/schemas-tests/pa-yaml/v3.0/Examples/Src/DataSources/DataSources1.pa.yaml @@ -1,10 +1,13 @@ DataSources: Accounts: - Type: DataverseTable - TableLogicalName: account + Type: Table + Parameters: + TableLogicalName: account Contacts: - Type: DataverseTable - TableLogicalName: contact + Type: Table + Parameters: + TableLogicalName: contact Users: - Type: DataverseTable - TableLogicalName: systemuser \ No newline at end of file + Type: Table + Parameters: + TableLogicalName: systemuser