From a3fe0b22a2003bf035c432226638c245d5529cc2 Mon Sep 17 00:00:00 2001 From: Charles d'Avernas Date: Fri, 18 Oct 2024 15:14:58 +0200 Subject: [PATCH] fix(Sdk): Fixed the CallTaskDefinitionValidator to not check the inline definition of cataloged functions (which contain an '@' character) Signed-off-by: Charles d'Avernas --- .../ServerlessWorkflow.Sdk.Builders.csproj | 2 +- src/ServerlessWorkflow.Sdk.IO/ServerlessWorkflow.Sdk.IO.csproj | 2 +- src/ServerlessWorkflow.Sdk/ServerlessWorkflow.Sdk.csproj | 2 +- .../Validation/CallTaskDefinitionValidator.cs | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/ServerlessWorkflow.Sdk.Builders/ServerlessWorkflow.Sdk.Builders.csproj b/src/ServerlessWorkflow.Sdk.Builders/ServerlessWorkflow.Sdk.Builders.csproj index e365c80..8603357 100644 --- a/src/ServerlessWorkflow.Sdk.Builders/ServerlessWorkflow.Sdk.Builders.csproj +++ b/src/ServerlessWorkflow.Sdk.Builders/ServerlessWorkflow.Sdk.Builders.csproj @@ -5,7 +5,7 @@ enable enable 1.0.0 - alpha3 + alpha3.1 $(VersionPrefix) $(VersionPrefix) en diff --git a/src/ServerlessWorkflow.Sdk.IO/ServerlessWorkflow.Sdk.IO.csproj b/src/ServerlessWorkflow.Sdk.IO/ServerlessWorkflow.Sdk.IO.csproj index 1cf512b..77593ba 100644 --- a/src/ServerlessWorkflow.Sdk.IO/ServerlessWorkflow.Sdk.IO.csproj +++ b/src/ServerlessWorkflow.Sdk.IO/ServerlessWorkflow.Sdk.IO.csproj @@ -5,7 +5,7 @@ enable enable 1.0.0 - alpha3 + alpha3.1 $(VersionPrefix) $(VersionPrefix) en diff --git a/src/ServerlessWorkflow.Sdk/ServerlessWorkflow.Sdk.csproj b/src/ServerlessWorkflow.Sdk/ServerlessWorkflow.Sdk.csproj index 322fc3d..7a11641 100644 --- a/src/ServerlessWorkflow.Sdk/ServerlessWorkflow.Sdk.csproj +++ b/src/ServerlessWorkflow.Sdk/ServerlessWorkflow.Sdk.csproj @@ -5,7 +5,7 @@ enable enable 1.0.0 - alpha3 + alpha3.1 $(VersionPrefix) $(VersionPrefix) en diff --git a/src/ServerlessWorkflow.Sdk/Validation/CallTaskDefinitionValidator.cs b/src/ServerlessWorkflow.Sdk/Validation/CallTaskDefinitionValidator.cs index 583ad67..674752f 100644 --- a/src/ServerlessWorkflow.Sdk/Validation/CallTaskDefinitionValidator.cs +++ b/src/ServerlessWorkflow.Sdk/Validation/CallTaskDefinitionValidator.cs @@ -35,7 +35,7 @@ public CallTaskDefinitionValidator(IServiceProvider serviceProvider, ComponentDe this.Components = components; this.RuleFor(c => c.Call) .Must(ReferenceAnExistingFunction) - .When(c => !Uri.TryCreate(c.Call, UriKind.Absolute, out _)) + .When(c => !Uri.TryCreate(c.Call, UriKind.Absolute, out _) || c.Call.Contains('@')) .WithMessage(ValidationErrors.UndefinedFunction); this.When(c => c.Call == Function.AsyncApi, () => {