From 6adc35303f2648eecbcf5648e3d3e89904eda13c Mon Sep 17 00:00:00 2001
From: Brian Lagunas <835562+brianlagunas@users.noreply.github.com>
Date: Fri, 22 Nov 2024 13:27:57 -0700
Subject: [PATCH 1/6] added additional frameworks
also upgraded dependencies
---
.../Reveal.Sdk.Dom.Tests.csproj | 19 +++++++++++++------
src/Reveal.Sdk.Dom/Reveal.Sdk.Dom.csproj | 8 ++------
2 files changed, 15 insertions(+), 12 deletions(-)
diff --git a/src/Reveal.Sdk.Dom.Tests/Reveal.Sdk.Dom.Tests.csproj b/src/Reveal.Sdk.Dom.Tests/Reveal.Sdk.Dom.Tests.csproj
index 1257f29e..1f97cdc2 100644
--- a/src/Reveal.Sdk.Dom.Tests/Reveal.Sdk.Dom.Tests.csproj
+++ b/src/Reveal.Sdk.Dom.Tests/Reveal.Sdk.Dom.Tests.csproj
@@ -1,16 +1,16 @@
- net6.0
+ net462;net6.0;net7.0;net8.0;net9.0
false
-
-
-
-
-
+
+
+
+
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
@@ -45,4 +45,11 @@
+
+
+ all
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+
+
+
diff --git a/src/Reveal.Sdk.Dom/Reveal.Sdk.Dom.csproj b/src/Reveal.Sdk.Dom/Reveal.Sdk.Dom.csproj
index 258d8a0a..d1c8336d 100644
--- a/src/Reveal.Sdk.Dom/Reveal.Sdk.Dom.csproj
+++ b/src/Reveal.Sdk.Dom/Reveal.Sdk.Dom.csproj
@@ -1,7 +1,7 @@
- net462;net6.0
+ net462;net6.0;net7.0;net8.0;net9.0
true
true
True
@@ -9,10 +9,6 @@
-
- all
- runtime; build; native; contentfiles; analyzers
-
@@ -20,7 +16,7 @@
-
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
From 91d28a94903e954fc339a67c6bdc965fd5789639 Mon Sep 17 00:00:00 2001
From: Brian Lagunas <835562+brianlagunas@users.noreply.github.com>
Date: Fri, 22 Nov 2024 13:29:50 -0700
Subject: [PATCH 2/6] removed schema file test
---
.../RdashDocumentFixture.cs | 23 -------
.../Reveal.Sdk.Dom.Tests.csproj | 4 --
.../Schemas/RdashDocument.json | 67 -------------------
3 files changed, 94 deletions(-)
delete mode 100644 src/Reveal.Sdk.Dom.Tests/Schemas/RdashDocument.json
diff --git a/src/Reveal.Sdk.Dom.Tests/RdashDocumentFixture.cs b/src/Reveal.Sdk.Dom.Tests/RdashDocumentFixture.cs
index 01df3700..6303c1d9 100644
--- a/src/Reveal.Sdk.Dom.Tests/RdashDocumentFixture.cs
+++ b/src/Reveal.Sdk.Dom.Tests/RdashDocumentFixture.cs
@@ -1,5 +1,4 @@
using Newtonsoft.Json.Linq;
-using Newtonsoft.Json.Schema;
using Reveal.Sdk.Dom.Core.Constants;
using Reveal.Sdk.Dom.Core.Utilities;
using Reveal.Sdk.Dom.Data;
@@ -237,28 +236,6 @@ public void RdashDocument_ToJsonString_ShouldReturnJsonStringRepresentation()
Assert.Equal(expectedJObject, actualJObject);
}
- [Fact]
- public void ToJsonString_IsValidSchema()
- {
- var schemaJson = File.ReadAllText(Path.Combine(Environment.CurrentDirectory, "Schemas", "RdashDocument.json"));
- var schema = JSchema.Parse(schemaJson);
-
- var dashboard = new RdashDocument()
- {
- Title = "New Dashboard",
- Description = "This is a test dashboard",
- Theme = Theme.Aurora,
- Tags = "tag1,tag2,tag3"
- };
- var json = dashboard.ToJsonString();
-
- var jsonDocument = JObject.Parse(json);
-
- bool isValid = jsonDocument.IsValid(schema);
-
- Assert.True(isValid);
- }
-
[Fact]
public void ImportThrows_WhenDocumentIsNull()
{
diff --git a/src/Reveal.Sdk.Dom.Tests/Reveal.Sdk.Dom.Tests.csproj b/src/Reveal.Sdk.Dom.Tests/Reveal.Sdk.Dom.Tests.csproj
index 1f97cdc2..8e9633e8 100644
--- a/src/Reveal.Sdk.Dom.Tests/Reveal.Sdk.Dom.Tests.csproj
+++ b/src/Reveal.Sdk.Dom.Tests/Reveal.Sdk.Dom.Tests.csproj
@@ -8,7 +8,6 @@
-
all
@@ -36,9 +35,6 @@
PreserveNewest
-
- PreserveNewest
-
diff --git a/src/Reveal.Sdk.Dom.Tests/Schemas/RdashDocument.json b/src/Reveal.Sdk.Dom.Tests/Schemas/RdashDocument.json
deleted file mode 100644
index 0b36da07..00000000
--- a/src/Reveal.Sdk.Dom.Tests/Schemas/RdashDocument.json
+++ /dev/null
@@ -1,67 +0,0 @@
-{
- "$schema": "https://json-schema.org/draft/2020-12/schema",
- "$id": "rdash-document.schema.json",
- "title": "Dashboard",
- "type": "object",
- "additionalProperties" : false,
- "properties": {
- "Title": {
- "required": true,
- "type": "string"
- },
- "Description": {
- "type": "string"
- },
- "ThemeName": {
- "required": true,
- "type": "string"
- },
- "CreatedWith": {
- "required": true,
- "type": "string"
- },
- "SavedWith": {
- "required": true,
- "type": "string"
- },
- "FormatVersion": {
- "required": true,
- "type": "integer"
- },
- "UseAutoLayout": {
- "required": true,
- "type": "boolean"
- },
- "Tags": {
- "type": "string"
- },
- "DataSources": {
- "required": true,
- "type": "array",
- "items": {
- "type": "any"
- }
- },
- "GlobalFilters": {
- "required": true,
- "type": "array",
- "items": {
- "type": "any"
- }
- },
- "GlobalVariables": {
- "required": true,
- "type": "array",
- "items": {
- "type": "any"
- }
- },
- "Widgets": {
- "required": true,
- "type": "array",
- "items": {
- "type": "any"
- }
- }
- }
-}
\ No newline at end of file
From 65e0994b33dc0cdcbbf738ea684f400a6e325d1f Mon Sep 17 00:00:00 2001
From: Brian Lagunas <835562+brianlagunas@users.noreply.github.com>
Date: Fri, 22 Nov 2024 13:38:37 -0700
Subject: [PATCH 3/6] updated test project language to v11
---
.../RdashDocumentFixture.cs | 32 +++++++++++--------
.../Reveal.Sdk.Dom.Tests.csproj | 3 +-
2 files changed, 21 insertions(+), 14 deletions(-)
diff --git a/src/Reveal.Sdk.Dom.Tests/RdashDocumentFixture.cs b/src/Reveal.Sdk.Dom.Tests/RdashDocumentFixture.cs
index 6303c1d9..f342c062 100644
--- a/src/Reveal.Sdk.Dom.Tests/RdashDocumentFixture.cs
+++ b/src/Reveal.Sdk.Dom.Tests/RdashDocumentFixture.cs
@@ -166,7 +166,12 @@ public void RdashDocument_Load_WithStream_ShouldLoadDocumentFromStream()
public void RdashDocument_LoadFromJson_ShouldLoadDocumentFromJsonString()
{
// Arrange
- var json = "{\"Title\":\"My Dashboard\",\"ThemeName\":\"Mountain\"}";
+ var json = """
+ {
+ "Title":"My Dashboard",
+ "ThemeName":"Mountain"
+ }
+ """;
// Act
var document = RdashDocument.LoadFromJson(json);
@@ -211,19 +216,20 @@ public void RdashDocument_ToJsonString_ShouldReturnJsonStringRepresentation()
{
// Arrange
var document = new RdashDocument();
- string expectedJson = @"
+ string expectedJson = """
{
- ""Title"": ""New Dashboard"",
- ""ThemeName"": ""rvDashboardMountainTheme"",
- ""CreatedWith"": ""Reveal.Sdk.Dom"",
- ""SavedWith"": """",
- ""FormatVersion"": 6,
- ""UseAutoLayout"": true,
- ""DataSources"": [],
- ""GlobalFilters"": [],
- ""GlobalVariables"": [],
- ""Widgets"": []
- }";
+ "Title": "New Dashboard",
+ "ThemeName": "rvDashboardMountainTheme",
+ "CreatedWith": "Reveal.Sdk.Dom",
+ "SavedWith": "",
+ "FormatVersion": 6,
+ "UseAutoLayout": true,
+ "DataSources": [],
+ "GlobalFilters": [],
+ "GlobalVariables": [],
+ "Widgets": []
+ }
+ """;
// Act
var jsonString = document.ToJsonString();
diff --git a/src/Reveal.Sdk.Dom.Tests/Reveal.Sdk.Dom.Tests.csproj b/src/Reveal.Sdk.Dom.Tests/Reveal.Sdk.Dom.Tests.csproj
index 8e9633e8..f3313f39 100644
--- a/src/Reveal.Sdk.Dom.Tests/Reveal.Sdk.Dom.Tests.csproj
+++ b/src/Reveal.Sdk.Dom.Tests/Reveal.Sdk.Dom.Tests.csproj
@@ -1,8 +1,9 @@
-
+
net462;net6.0;net7.0;net8.0;net9.0
false
+ 11.0
From 841d617a0dcc23780f22eb3f593b2fdbf6f9ac24 Mon Sep 17 00:00:00 2001
From: Brian Lagunas <835562+brianlagunas@users.noreply.github.com>
Date: Fri, 22 Nov 2024 13:44:27 -0700
Subject: [PATCH 4/6] update build to use dotnet 9
---
.github/workflows/build.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index a2118953..365d3708 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -18,7 +18,7 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v2
with:
- dotnet-version: 6.0.x
+ dotnet-version: 9.0.x
- name: NuGet Restore
run: dotnet restore
- name: Build
From edacaf0bfa8864ffc2296144fcf305b0dc4ddb1e Mon Sep 17 00:00:00 2001
From: Brian Lagunas <835562+brianlagunas@users.noreply.github.com>
Date: Fri, 22 Nov 2024 13:47:12 -0700
Subject: [PATCH 5/6] added additional dotnet frameworks to build
---
.github/workflows/build.yml | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 365d3708..dd86f8b1 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -18,7 +18,11 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v2
with:
- dotnet-version: 9.0.x
+ dotnet-version: |
+ 6.0.x
+ 7.0.x
+ 8.0.x
+ 9.0.x
- name: NuGet Restore
run: dotnet restore
- name: Build
From d303b4d0ffb327418f33da0d7f150ed7149db8d4 Mon Sep 17 00:00:00 2001
From: Brian Lagunas <835562+brianlagunas@users.noreply.github.com>
Date: Fri, 22 Nov 2024 13:48:50 -0700
Subject: [PATCH 6/6] fixed yaml syntax
---
.github/workflows/build.yml | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index dd86f8b1..cf74ac60 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -19,10 +19,10 @@ jobs:
uses: actions/setup-dotnet@v2
with:
dotnet-version: |
- 6.0.x
- 7.0.x
- 8.0.x
- 9.0.x
+ 6.0.x
+ 7.0.x
+ 8.0.x
+ 9.0.x
- name: NuGet Restore
run: dotnet restore
- name: Build