From 34d20f3f45e2391985d91610332b5ee821e1904d Mon Sep 17 00:00:00 2001 From: Charles d'Avernas Date: Wed, 22 Jan 2025 13:34:56 +0100 Subject: [PATCH] fix(Dashboard): Fixed the workflow schema validation, which was using obsolete URIs to get the schema files Signed-off-by: Charles d'Avernas --- src/dashboard/Synapse.Dashboard/Pages/Functions/Create/Store.cs | 2 +- .../Synapse.Dashboard/Services/SpecificationSchemaManager.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/dashboard/Synapse.Dashboard/Pages/Functions/Create/Store.cs b/src/dashboard/Synapse.Dashboard/Pages/Functions/Create/Store.cs index 254d13fff..273ec61b2 100644 --- a/src/dashboard/Synapse.Dashboard/Pages/Functions/Create/Store.cs +++ b/src/dashboard/Synapse.Dashboard/Pages/Functions/Create/Store.cs @@ -565,7 +565,7 @@ protected async Task SetValidationSchema(string? version = null) this._processingVersion = true; try { - var schema = $"https://raw.githubusercontent.com/serverlessworkflow/serverlessworkflow.github.io/main/static/schemas/{version}/workflow.yaml#/$defs/task"; + var schema = $"https://raw.githubusercontent.com/serverlessworkflow/serverlessworkflow.github.io/main/public/schemas/{version}/workflow.yaml#/$defs/task"; var type = $"create_{typeof(CustomFunction).Name.ToLower()}_{version}_schema"; await this.MonacoInterop.AddValidationSchemaAsync(schema, $"https://synapse.io/schemas/{type}.json", $"{type}*").ConfigureAwait(false); this._textModelUri = this.MonacoEditorHelper.GetResourceUri(type); diff --git a/src/dashboard/Synapse.Dashboard/Services/SpecificationSchemaManager.cs b/src/dashboard/Synapse.Dashboard/Services/SpecificationSchemaManager.cs index f14267c8b..928132eee 100644 --- a/src/dashboard/Synapse.Dashboard/Services/SpecificationSchemaManager.cs +++ b/src/dashboard/Synapse.Dashboard/Services/SpecificationSchemaManager.cs @@ -57,7 +57,7 @@ public async Task GetLatestVersion() public async Task GetSchema(string version) { if (_knownSchemas.TryGetValue(version, out string? value)) return value; - var address = $"https://raw.githubusercontent.com/serverlessworkflow/serverlessworkflow.github.io/main/static/schemas/{version}/workflow.yaml"; + var address = $"https://raw.githubusercontent.com/serverlessworkflow/serverlessworkflow.github.io/main/public/schemas/{version}/workflow.yaml"; var yamlSchema = await this.HttpClient.GetStringAsync(address); this._knownSchemas.Add(version, this.YamlSerializer.ConvertToJson(yamlSchema)); return this._knownSchemas[version];