Skip to content

Commit c7c818c

Browse files
authored
Merge pull request #480 from serverlessworkflow/fix-dashboard-schema-validation
Fix the workflow schema validation, which was using obsolete URIs to get the schema files
2 parents ba59245 + 34d20f3 commit c7c818c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/dashboard/Synapse.Dashboard/Pages/Functions/Create/Store.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -565,7 +565,7 @@ protected async Task SetValidationSchema(string? version = null)
565565
this._processingVersion = true;
566566
try
567567
{
568-
var schema = $"https://raw.githubusercontent.com/serverlessworkflow/serverlessworkflow.github.io/main/static/schemas/{version}/workflow.yaml#/$defs/task";
568+
var schema = $"https://raw.githubusercontent.com/serverlessworkflow/serverlessworkflow.github.io/main/public/schemas/{version}/workflow.yaml#/$defs/task";
569569
var type = $"create_{typeof(CustomFunction).Name.ToLower()}_{version}_schema";
570570
await this.MonacoInterop.AddValidationSchemaAsync(schema, $"https://synapse.io/schemas/{type}.json", $"{type}*").ConfigureAwait(false);
571571
this._textModelUri = this.MonacoEditorHelper.GetResourceUri(type);

src/dashboard/Synapse.Dashboard/Services/SpecificationSchemaManager.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public async Task<string> GetLatestVersion()
5757
public async Task<string> GetSchema(string version)
5858
{
5959
if (_knownSchemas.TryGetValue(version, out string? value)) return value;
60-
var address = $"https://raw.githubusercontent.com/serverlessworkflow/serverlessworkflow.github.io/main/static/schemas/{version}/workflow.yaml";
60+
var address = $"https://raw.githubusercontent.com/serverlessworkflow/serverlessworkflow.github.io/main/public/schemas/{version}/workflow.yaml";
6161
var yamlSchema = await this.HttpClient.GetStringAsync(address);
6262
this._knownSchemas.Add(version, this.YamlSerializer.ConvertToJson(yamlSchema));
6363
return this._knownSchemas[version];

0 commit comments

Comments
 (0)