Skip to content

Commit

Permalink
Merge pull request #475 from serverlessworkflow/feat-asyncapi-v3
Browse files Browse the repository at this point in the history
Implement the `AsyncAPI` function call
  • Loading branch information
cdavernas authored Jan 10, 2025
2 parents e680ab7 + 076ce93 commit 7c158a6
Show file tree
Hide file tree
Showing 19 changed files with 267 additions and 30 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.SignalR.Client" Version="9.0.0" />
<PackageReference Include="ServerlessWorkflow.Sdk.IO" Version="1.0.0-alpha5.2" />
<PackageReference Include="ServerlessWorkflow.Sdk.IO" Version="1.0.0-alpha6.2" />
<PackageReference Include="System.Reactive" Version="6.0.1" />
</ItemGroup>

Expand Down
2 changes: 1 addition & 1 deletion src/api/Synapse.Api.Http/Synapse.Api.Http.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
<ItemGroup>
<PackageReference Include="Neuroglia.Mediation.AspNetCore" Version="4.18.1" />
<PackageReference Include="Neuroglia.Security.AspNetCore" Version="4.18.1" />
<PackageReference Include="Swashbuckle.AspNetCore.SwaggerGen" Version="7.1.0" />
<PackageReference Include="Swashbuckle.AspNetCore.SwaggerGen" Version="7.2.0" />
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/api/Synapse.Api.Server/Synapse.Api.Server.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
<PackageReference Include="Microsoft.AspNetCore.Authentication.OpenIdConnect" Version="9.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="9.0.0" />
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.21.0" />
<PackageReference Include="Swashbuckle.AspNetCore.SwaggerUI" Version="7.1.0" />
<PackageReference Include="Swashbuckle.AspNetCore.SwaggerUI" Version="7.2.0" />
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/cli/Synapse.Cli/Synapse.Cli.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="9.0.0" />
<PackageReference Include="moment.net" Version="1.3.4" />
<PackageReference Include="NetEscapades.Configuration.Yaml" Version="3.1.0" />
<PackageReference Include="ServerlessWorkflow.Sdk.IO" Version="1.0.0-alpha5.2" />
<PackageReference Include="ServerlessWorkflow.Sdk.IO" Version="1.0.0-alpha6.2" />
<PackageReference Include="Spectre.Console" Version="0.49.1" />
<PackageReference Include="System.CommandLine.NamingConventionBinder" Version="2.0.0-beta4.22272.1" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,8 @@
using Neuroglia.Serialization;
using ServerlessWorkflow.Sdk;
using System.Net;
using System.Xml.Schema;
using System.Xml;
using Avro.Generic;
using System.Xml.Schema;

namespace Synapse.Core.Infrastructure.Services;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
<PackageReference Include="Neuroglia.Mediation" Version="4.18.1" />
<PackageReference Include="Neuroglia.Plugins" Version="4.18.1" />
<PackageReference Include="Neuroglia.Serialization.Xml" Version="4.18.1" />
<PackageReference Include="ServerlessWorkflow.Sdk.IO" Version="1.0.0-alpha5.2" />
<PackageReference Include="ServerlessWorkflow.Sdk.IO" Version="1.0.0-alpha6.2" />
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/core/Synapse.Core/Synapse.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
<PackageReference Include="Neuroglia.Data.Infrastructure.ResourceOriented" Version="4.18.1" />
<PackageReference Include="Neuroglia.Eventing.CloudEvents" Version="4.18.1" />
<PackageReference Include="Semver" Version="3.0.0" />
<PackageReference Include="ServerlessWorkflow.Sdk" Version="1.0.0-alpha5.2" />
<PackageReference Include="ServerlessWorkflow.Sdk" Version="1.0.0-alpha6.2" />
</ItemGroup>

</Project>
4 changes: 2 additions & 2 deletions src/correlator/Synapse.Correlator/Synapse.Correlator.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@
<PackageReference Include="Neuroglia.Mediation.AspNetCore" Version="4.18.1" />
<PackageReference Include="Neuroglia.Eventing.CloudEvents.Infrastructure" Version="4.18.1" />
<PackageReference Include="Neuroglia.Security.AspNetCore" Version="4.18.1" />
<PackageReference Include="Swashbuckle.AspNetCore.SwaggerGen" Version="7.1.0" />
<PackageReference Include="Swashbuckle.AspNetCore.SwaggerUI" Version="7.0.0" />
<PackageReference Include="Swashbuckle.AspNetCore.SwaggerGen" Version="7.2.0" />
<PackageReference Include="Swashbuckle.AspNetCore.SwaggerUI" Version="7.2.0" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -226,15 +226,15 @@ protected INodeViewModel BuildTaskNode(TaskNodeRenderingContext context)
protected virtual NodeViewModel BuildCallTaskNode(TaskNodeRenderingContext<CallTaskDefinition> context)
{
ArgumentNullException.ThrowIfNull(context);
var content = string.Empty;
string content; ;
string callType;
switch (context.TaskDefinition.Call.ToLower())
{
case "asyncapi":
{
var definition = (AsyncApiCallDefinition)this.JsonSerializer.Convert(context.TaskDefinition.With, typeof(AsyncApiCallDefinition))!;
callType = context.TaskDefinition.Call.ToLower();
content = definition.OperationRef;
content = definition.Operation!;
break;
}
case "grpc":
Expand Down
2 changes: 1 addition & 1 deletion src/dashboard/Synapse.Dashboard/Synapse.Dashboard.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

<ItemGroup>
<PackageReference Include="Blazor.Bootstrap" Version="3.2.0" />
<PackageReference Include="BlazorMonaco" Version="3.2.0" />
<PackageReference Include="BlazorMonaco" Version="3.3.0" />
<PackageReference Include="IdentityModel" Version="7.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="9.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Authentication" Version="9.0.0" />
Expand Down
5 changes: 5 additions & 0 deletions src/runner/Synapse.Runner/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
// limitations under the License.

using Moq;
using Neuroglia.AsyncApi;
using Neuroglia.AsyncApi.Client;
using Neuroglia.AsyncApi.Client.Bindings;
using Neuroglia.Serialization.Xml;
using NReco.Logging.File;
using ServerlessWorkflow.Sdk.IO;
Expand Down Expand Up @@ -97,6 +100,8 @@
services.AddServerlessWorkflowIO();
services.AddNodeJSScriptExecutor();
services.AddPythonScriptExecutor();
services.AddAsyncApi();
services.AddAsyncApiClient(options => options.AddAllBindingHandlers());
services.AddSingleton<SecretsManager>();
services.AddSingleton<ISecretsManager>(provider => provider.GetRequiredService<SecretsManager>());
services.AddSingleton<IHostedService>(provider => provider.GetRequiredService<SecretsManager>());
Expand Down
Loading

0 comments on commit 7c158a6

Please sign in to comment.