Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,22 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Swashbuckle.AspNetCore.SwaggerGen" Version="6.3.0" />
<ProjectReference Include="..\Elsa.Activities.Http\Elsa.Activities.Http.csproj" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Elsa.Activities.Http\Elsa.Activities.Http.csproj" />
<ItemGroup Condition=" '$(TargetFramework)' == 'net8.0'">
<PackageReference Include="Swashbuckle.AspNetCore.SwaggerGen" Version="6.3.0" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net9.0'">
<PackageReference Include="Swashbuckle.AspNetCore.SwaggerGen" Version="6.3.0" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net10.0'">
<PackageReference Include="System.Linq.Async" Version="6.0.1">
<ExcludeAssets>compile</ExcludeAssets>
</PackageReference>
<PackageReference Include="Swashbuckle.AspNetCore.SwaggerGen" Version="10.1.7" />
<PackageReference Include="System.Linq.Async" Version="6.0.1">
<ExcludeAssets>compile</ExcludeAssets>
</PackageReference>
</ItemGroup>


Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System.Runtime.CompilerServices;
using System.Runtime.CompilerServices;
using Elsa.Activities.Http.Bookmarks;
using Elsa.Activities.Http.Options;
using Elsa.Models;
Expand All @@ -7,7 +7,11 @@
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Options;
#if NET10_0_OR_GREATER
using Microsoft.OpenApi;
#else
using Microsoft.OpenApi.Models;
#endif
using Open.Linq.AsyncExtensions;
using Swashbuckle.AspNetCore.SwaggerGen;

Expand All @@ -31,12 +35,16 @@ public HttpEndpointDocumentFilter(IServiceScopeFactory scopeFactory, ISchemaGene

public void Apply(OpenApiDocument swaggerDoc, DocumentFilterContext context)
{
#if NET10_0_OR_GREATER
swaggerDoc.Tags ??= new HashSet<OpenApiTag>();
#else
swaggerDoc.Tags ??= new List<OpenApiTag>();
#endif

var tag = new OpenApiTag
{
Name = "Workflow Endpoints",
Description = "A collection of HTTP endpoints exposed by workflows",
Description = "A collection of HTTP endpoints exposed by workflows"
};

var schemaRepository = context.SchemaRepository;
Expand All @@ -55,17 +63,21 @@ public void Apply(OpenApiDocument swaggerDoc, DocumentFilterContext context)
Description = first.Description,
Operations = grouping.ToDictionary(GetOperationType, httpEndpoint =>
{
var operation = new OpenApiOperation
{
Tags = { tag },
};
var operation = new OpenApiOperation();

#if NET10_0_OR_GREATER
operation.Tags ??= new HashSet<OpenApiTagReference>();
operation.Tags.Add(new OpenApiTagReference(tag.Name, swaggerDoc));
#else
operation.Tags.Add(tag);
#endif

if (httpEndpoint.TargetType != null || httpEndpoint.JsonSchema != null)
if (httpEndpoint.TargetType != null || !string.IsNullOrWhiteSpace(httpEndpoint.JsonSchema))
{
operation.RequestBody = new OpenApiRequestBody
{
Required = true,
Content =
Content = new Dictionary<string, OpenApiMediaType>
{
["Unspecified"] = new OpenApiMediaType
{
Expand Down Expand Up @@ -126,19 +138,35 @@ private async Task<HttpEndpointDescriptor> GetHttpEndpointDescriptor(
return new HttpEndpointDescriptor(activityId, path, method, displayName, description, targetType, schema);
}

#if NET10_0_OR_GREATER
private HttpMethod GetOperationType(HttpEndpointDescriptor httpEndpoint) =>
httpEndpoint.Method switch
{
{ } s when s.Equals(HttpMethods.Get, StringComparison.OrdinalIgnoreCase) => HttpMethod.Get,
{ } s when s.Equals(HttpMethods.Post, StringComparison.OrdinalIgnoreCase) => HttpMethod.Post,
{ } s when s.Equals(HttpMethods.Patch, StringComparison.OrdinalIgnoreCase) => HttpMethod.Patch,
{ } s when s.Equals(HttpMethods.Delete, StringComparison.OrdinalIgnoreCase) => HttpMethod.Delete,
{ } s when s.Equals(HttpMethods.Put, StringComparison.OrdinalIgnoreCase) => HttpMethod.Put,
{ } s when s.Equals(HttpMethods.Options, StringComparison.OrdinalIgnoreCase) => HttpMethod.Options,
{ } s when s.Equals(HttpMethods.Head, StringComparison.OrdinalIgnoreCase) => HttpMethod.Head,
{ } s when s.Equals(HttpMethods.Trace, StringComparison.OrdinalIgnoreCase) => HttpMethod.Trace,
_ => HttpMethod.Get
};
#else
private OperationType GetOperationType(HttpEndpointDescriptor httpEndpoint) =>
httpEndpoint.Method switch
{
{ } s when s.Equals(HttpMethods.Get, StringComparison.OrdinalIgnoreCase) => OperationType.Get,
{ } s when s.Equals(HttpMethods.Post, StringComparison.OrdinalIgnoreCase) => OperationType.Post,
{ } s when s.Equals(HttpMethods.Patch, StringComparison.OrdinalIgnoreCase) => OperationType.Patch,
{ } s when s.Equals(HttpMethods.Delete, StringComparison.OrdinalIgnoreCase) => OperationType.Delete,
{ } s when s.Equals(HttpMethods.Put, StringComparison.OrdinalIgnoreCase) => OperationType.Patch,
{ } s when s.Equals(HttpMethods.Put, StringComparison.OrdinalIgnoreCase) => OperationType.Put,
{ } s when s.Equals(HttpMethods.Options, StringComparison.OrdinalIgnoreCase) => OperationType.Options,
{ } s when s.Equals(HttpMethods.Head, StringComparison.OrdinalIgnoreCase) => OperationType.Head,
{ } s when s.Equals(HttpMethods.Trace, StringComparison.OrdinalIgnoreCase) => OperationType.Trace,
_ => OperationType.Get
};
#endif
}

internal record HttpEndpointDescriptor(string Id, string Path, string Method, string? DisplayName, string? Description, Type? TargetType, string? JsonSchema);
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<PackageReference Include="Refit" Version="8.0.0" />
<PackageReference Include="Refit.HttpClientFactory" Version="6.0.94" />
<PackageReference Include="Refit.Newtonsoft.Json" Version="6.0.94" />
<PackageReference Include="System.Text.Encodings.Web" Version="9.0.1" />
<PackageReference Include="System.Text.Encodings.Web" Version="10.0.8" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net10.0'">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="9.0.1" />
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="9.0.16" />
<PackageReference Include="Quartz" Version="3.5.0" />
<PackageReference Include="Quartz.Extensions.DependencyInjection" Version="3.5.0" />
<PackageReference Include="Quartz.Extensions.Hosting" Version="3.5.0" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<Import Project="..\..\..\..\common.props" />
<Import Project="..\..\..\..\configureawait.props" />
Expand All @@ -13,8 +13,8 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="System.Text.Encodings.Web" Version="9.0.1" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.4" />
<PackageReference Include="System.Text.Encodings.Web" Version="10.0.8" />
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/clients/Elsa.Client/Elsa.Client.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.4" />
<PackageReference Include="NodaTime" Version="3.0.9" />
<PackageReference Include="NodaTime.Serialization.JsonNet" Version="3.0.0" />
<PackageReference Include="Refit" Version="8.0.0" />
Expand Down
13 changes: 7 additions & 6 deletions src/core/Elsa.Abstractions/Elsa.Abstractions.csproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<Import Project="..\..\..\common.props" />
<Import Project="..\..\..\configureawait.props" />
Expand All @@ -18,17 +18,18 @@
<PackageReference Include="LinqKit.Core" Version="1.2.5" />
<PackageReference Include="MediatR" Version="12.4.1" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.0" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="9.0.1" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.4" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="9.0.16" />
<PackageReference Include="Microsoft.Extensions.Localization.Abstractions" Version="8.0.1" />
<PackageReference Include="Microsoft.Extensions.Primitives" Version="6.0.0" />
<PackageReference Include="NodaTime" Version="3.0.9" />
<PackageReference Include="NodaTime.Serialization.JsonNet" Version="3.0.0" />
<PackageReference Include="Open.Linq.AsyncExtensions" Version="1.2.0" />
<PackageReference Include="Rebus" Version="8.7.1" />
<PackageReference Include="Rebus" Version="8.9.2" />
<PackageReference Include="System.Linq.Async" Version="5.1.0" />
<PackageReference Include="System.Text.Json" Version="9.0.1" />
<PackageReference Include="System.Threading.Tasks.Extensions" Version="4.5.4" />
<PackageReference Include="System.Text.Encodings.Web" Version="10.0.8" />
<PackageReference Include="System.Text.Json" Version="10.0.8" />
<PackageReference Include="System.Threading.Tasks.Extensions" Version="4.6.3" />
</ItemGroup>

</Project>
7 changes: 3 additions & 4 deletions src/core/Elsa.Core/Elsa.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -23,21 +23,20 @@
<PackageReference Include="MediatR" Version="12.4.1" />
<PackageReference Include="Microsoft.AspNetCore.DataProtection" Version="9.0.1" />
<PackageReference Include="Microsoft.AspNetCore.Http.Abstractions" Version="2.2.0" />
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="9.0.1" />
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
<PackageReference Include="Microsoft.Extensions.Caching.Abstractions" Version="9.0.0" />
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="9.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration" Version="9.0.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="9.0.1" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="9.0.16" />
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="9.0.1" />
<PackageReference Include="Microsoft.Extensions.Localization" Version="9.0.1" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="9.0.0" />
<PackageReference Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="9.0.0" />
<PackageReference Include="netbox" Version="2.5.3" />
<PackageReference Include="NodaTime.Serialization.JsonNet" Version="3.0.0" />
<PackageReference Include="Open.Linq.AsyncExtensions" Version="1.2.0" />
<PackageReference Include="Rebus.Microsoft.Extensions.Logging" Version="5.1.0" />
<PackageReference Include="Rebus.ServiceProvider" Version="10.3.0" />
<PackageReference Include="Rebus.Microsoft.Extensions.Logging" Version="5.2.0" />
<PackageReference Include="Rebus.ServiceProvider" Version="10.7.2" />
<PackageReference Include="Scrutor" Version="3.3.0" />
<PackageReference Include="System.Linq.Async" Version="5.1.0" />
<PackageReference Include="System.Threading.Channels" Version="9.0.0" />
Expand Down
2 changes: 1 addition & 1 deletion src/core/Elsa/Elsa.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Hosting" Version="9.0.1" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="9.0.16" />
</ItemGroup>

</Project>
24 changes: 12 additions & 12 deletions src/designer/elsa-workflows-studio/src/globals/tailwind.css
Original file line number Diff line number Diff line change
Expand Up @@ -2510,6 +2510,10 @@ select {
left: 0.5rem;
}

.elsa-top-10 {
top: 2.5rem;
}

.elsa-bottom-10 {
bottom: 2.5rem;
}
Expand Down Expand Up @@ -2653,14 +2657,18 @@ select {
margin-top: 4rem;
}

.elsa--mt-2 {
margin-top: -0.5rem;
}

.elsa-mb-2 {
margin-bottom: 0.5rem;
}

.-elsa-mr-1 {
margin-right: -0.25rem;
}

.elsa--mt-2 {
margin-top: -0.5rem;
}

.-elsa-ml-0\.5 {
margin-left: -0.125rem;
}
Expand All @@ -2677,10 +2685,6 @@ select {
margin-left: 0px;
}

.-elsa-mr-1 {
margin-right: -0.25rem;
}

.elsa-ml-3\.5 {
margin-left: 0.875rem;
}
Expand Down Expand Up @@ -12429,10 +12433,6 @@ svg.jtk-connector.jtk-hover path {
width: 100%;
}

.sm\:elsa-max-w-4xl {
max-width: 56rem;
}

.sm\:elsa-max-w-md {
max-width: 28rem;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\..\common.props" />
<Import Project="..\..\..\configureawait.props" />

Expand All @@ -18,7 +18,7 @@

<ItemGroup>
<PackageReference Include="NEST" Version="7.14.1" />
<PackageReference Include="System.Text.Encodings.Web" Version="9.0.1" />
<PackageReference Include="System.Text.Encodings.Web" Version="10.0.8" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
using System.Threading;
using System.Threading.Tasks;
using Elsa.Secrets.Extensions;
using Elsa.Secrets.Http.Services;
using Elsa.Secrets.Manager;
using Elsa.Secrets.Persistence;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Configuration;
using System.Threading;
using System.Threading.Tasks;

namespace Elsa.Secrets.Api.Endpoints.OAuth2
{
[ApiController]
[ApiVersion("1")]
[Route("v{apiVersion:apiVersion}/oauth2/callback")]
[Produces("application/json")]
[Tags("Secrets")]
public class SetAuthCodeCallback : Controller
{
private readonly ISecretsManager _secretsManager;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.Net.Mime;
using System.Threading;
Expand All @@ -16,6 +16,7 @@ namespace Elsa.Secrets.Api.Endpoints.OAuth2;
[ApiVersion("1")]
[Route("v{apiVersion:apiVersion}/oauth2/url/{secretId}")]
[Produces(MediaTypeNames.Application.Json)]
[Tags("Secrets")]
public class GetUrl : Controller
{
private readonly ISecretsManager _secretsManager;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ namespace Elsa.Secrets.Api.Endpoints.Secrets
[ApiVersion("1")]
[Route("v{apiVersion:apiVersion}/secrets/{id}")]
[Produces("application/json")]
[Tags("Secrets")]
public class Delete : Controller
{
private readonly ISecretsStore _secretsStore;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ namespace Elsa.Secrets.Api.Endpoints.Secrets
[ApiVersion("1")]
[Route("v{apiVersion:apiVersion}/secrets")]
[Produces(MediaTypeNames.Application.Json)]
[Tags("Secrets")]
public class List : Controller
{
private readonly ISecretsManager _secretsManager;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using Elsa.Secrets.Api.Models;
using Elsa.Secrets.Manager;
using Elsa.Secrets.Models;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;

namespace Elsa.Secrets.Api.Endpoints.Secrets
{
[ApiController]
[ApiVersion("1")]
[Route("v{apiVersion:apiVersion}/secrets")]
[Produces("application/json")]
[Tags("Secrets")]
public class Save : Controller
{
private readonly ISecretsManager _secretsManager;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
</PropertyGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net9.0'">
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="9.0.1" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="9.0.16" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net10.0'">
Expand Down
Loading
Loading