Skip to content

Commit 6658979

Browse files
committed
fix(Runner): Renamed Runner project and directory
fix(Test): Fixed all tests fix(Core): Fixed Document BSON serialization by adding a new (untyped) ObjectSerializer Signed-off-by: Charles d'Avernas <charles.davernas@neuroglia.io>
1 parent 769a243 commit 6658979

File tree

112 files changed

+368
-218
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

112 files changed

+368
-218
lines changed

Synapse.sln

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -43,17 +43,17 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Synapse.UnitTests", "tests\
4343
EndProject
4444
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Synapse.Api.Client.Core", "src\api\Synapse.Api.Client.Core\Synapse.Api.Client.Core.csproj", "{3E650D2D-B018-4056-8922-FC7DF68233B1}"
4545
EndProject
46-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Synapse.Runner.Application", "src\runner\Synapse.Runner.Application\Synapse.Runner.Application.csproj", "{DDC90022-43B5-48CC-A967-0826C2A385F2}"
47-
EndProject
4846
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Synapse.Operator.Application", "src\operator\Synapse.Operator.Application\Synapse.Operator.Application.csproj", "{7627C036-B55A-479C-AB0D-C859D4A11238}"
4947
EndProject
5048
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "runtime", "runtime", "{175CE1C5-FE17-4C8B-8823-E812BAD4E527}"
5149
EndProject
52-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Synapse.Runtime.Abstractions", "src\runtime\Synapse.Runtime.Abstractions\Synapse.Runtime.Abstractions.csproj", "{A0E5E7F2-8C9C-4F36-B3FD-C09074893023}"
50+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Synapse.Runtime.Abstractions", "src\runtime\Synapse.Runtime.Abstractions\Synapse.Runtime.Abstractions.csproj", "{A0E5E7F2-8C9C-4F36-B3FD-C09074893023}"
5351
EndProject
5452
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Synapse.Runtime.Native", "src\runtime\Synapse.Runtime.Native\Synapse.Runtime.Native.csproj", "{DC24E506-602F-4FD9-B8C0-CEA6B2AD8888}"
5553
EndProject
56-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Synapse.Runtime.Containerized", "src\runtime\Synapse.Runtime.Containerized\Synapse.Runtime.Containerized.csproj", "{F327B8F1-9A13-4924-AE1B-E69788AC73E7}"
54+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Synapse.Runtime.Containerized", "src\runtime\Synapse.Runtime.Containerized\Synapse.Runtime.Containerized.csproj", "{F327B8F1-9A13-4924-AE1B-E69788AC73E7}"
55+
EndProject
56+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Synapse.Runner", "src\runner\Synapse.Runner\Synapse.Runner.csproj", "{E5FAA9BA-07C3-49CF-AD3B-897AE1D0B018}"
5757
EndProject
5858
Global
5959
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -105,10 +105,6 @@ Global
105105
{3E650D2D-B018-4056-8922-FC7DF68233B1}.Debug|Any CPU.Build.0 = Debug|Any CPU
106106
{3E650D2D-B018-4056-8922-FC7DF68233B1}.Release|Any CPU.ActiveCfg = Release|Any CPU
107107
{3E650D2D-B018-4056-8922-FC7DF68233B1}.Release|Any CPU.Build.0 = Release|Any CPU
108-
{DDC90022-43B5-48CC-A967-0826C2A385F2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
109-
{DDC90022-43B5-48CC-A967-0826C2A385F2}.Debug|Any CPU.Build.0 = Debug|Any CPU
110-
{DDC90022-43B5-48CC-A967-0826C2A385F2}.Release|Any CPU.ActiveCfg = Release|Any CPU
111-
{DDC90022-43B5-48CC-A967-0826C2A385F2}.Release|Any CPU.Build.0 = Release|Any CPU
112108
{7627C036-B55A-479C-AB0D-C859D4A11238}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
113109
{7627C036-B55A-479C-AB0D-C859D4A11238}.Debug|Any CPU.Build.0 = Debug|Any CPU
114110
{7627C036-B55A-479C-AB0D-C859D4A11238}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -125,6 +121,10 @@ Global
125121
{F327B8F1-9A13-4924-AE1B-E69788AC73E7}.Debug|Any CPU.Build.0 = Debug|Any CPU
126122
{F327B8F1-9A13-4924-AE1B-E69788AC73E7}.Release|Any CPU.ActiveCfg = Release|Any CPU
127123
{F327B8F1-9A13-4924-AE1B-E69788AC73E7}.Release|Any CPU.Build.0 = Release|Any CPU
124+
{E5FAA9BA-07C3-49CF-AD3B-897AE1D0B018}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
125+
{E5FAA9BA-07C3-49CF-AD3B-897AE1D0B018}.Debug|Any CPU.Build.0 = Debug|Any CPU
126+
{E5FAA9BA-07C3-49CF-AD3B-897AE1D0B018}.Release|Any CPU.ActiveCfg = Release|Any CPU
127+
{E5FAA9BA-07C3-49CF-AD3B-897AE1D0B018}.Release|Any CPU.Build.0 = Release|Any CPU
128128
EndGlobalSection
129129
GlobalSection(SolutionProperties) = preSolution
130130
HideSolutionNode = FALSE
@@ -147,12 +147,12 @@ Global
147147
{6F7ED286-A02C-4E78-9FE3-2689BD94B97C} = {F041A1CB-45FA-4432-BAD2-DE2EE174C6FC}
148148
{CB1DF439-BFBA-408D-BC09-3FF94E6C4F0F} = {F041A1CB-45FA-4432-BAD2-DE2EE174C6FC}
149149
{3E650D2D-B018-4056-8922-FC7DF68233B1} = {63715FC0-736D-4972-A865-41126155DF45}
150-
{DDC90022-43B5-48CC-A967-0826C2A385F2} = {1DA47E5F-B23A-4D3C-96AA-4BD2662AB946}
151150
{7627C036-B55A-479C-AB0D-C859D4A11238} = {32EAD165-3D99-42CD-B3AF-05136DCC7F35}
152151
{175CE1C5-FE17-4C8B-8823-E812BAD4E527} = {4B9AF05C-9D6D-48C0-994D-D4A5C28FA24D}
153152
{A0E5E7F2-8C9C-4F36-B3FD-C09074893023} = {175CE1C5-FE17-4C8B-8823-E812BAD4E527}
154153
{DC24E506-602F-4FD9-B8C0-CEA6B2AD8888} = {175CE1C5-FE17-4C8B-8823-E812BAD4E527}
155154
{F327B8F1-9A13-4924-AE1B-E69788AC73E7} = {175CE1C5-FE17-4C8B-8823-E812BAD4E527}
155+
{E5FAA9BA-07C3-49CF-AD3B-897AE1D0B018} = {1DA47E5F-B23A-4D3C-96AA-4BD2662AB946}
156156
EndGlobalSection
157157
GlobalSection(ExtensibilityGlobals) = postSolution
158158
SolutionGuid = {2A6C03D6-355A-4B39-9F2B-D0FDE429C0E2}

src/api/Synapse.Api.Application/Commands/WorkflowDataDocuments/CreateWorkflowDataDocumentCommand.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
namespace Synapse.Api.Application.Commands.WorkflowDataDocuments;
1818

1919
/// <summary>
20-
/// Represents the <see cref="ICommand"/> used to create a new workflow data <see cref="Resources.Document"/>
20+
/// Represents the <see cref="ICommand"/> used to create a new workflow data <see cref="Synapse.Resources.Document"/>
2121
/// </summary>
2222
/// <param name="document">The workflow data document to create</param>
2323
public class CreateWorkflowDataDocumentCommand(Document document)

src/api/Synapse.Api.Application/Extensions/IServiceCollectionExtensions.cs

Lines changed: 3 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -11,22 +11,13 @@
1111
// See the License for the specific language governing permissions and
1212
// limitations under the License.
1313

14+
using Microsoft.Extensions.Configuration;
15+
using Microsoft.Extensions.DependencyInjection;
1416
using Synapse.Api.Application.Commands.Resources.Generic;
1517
using Synapse.Api.Application.Commands.WorkflowDataDocuments;
1618
using Synapse.Api.Application.Queries.Resources.Generic;
1719
using Synapse.Api.Application.Queries.WorkflowDataDocuments;
1820
using Synapse.Resources;
19-
using ServerlessWorkflow.Sdk.IO;
20-
using Microsoft.Extensions.Configuration;
21-
using Microsoft.Extensions.DependencyInjection;
22-
using Neuroglia.Data.Infrastructure;
23-
using Neuroglia.Data.Infrastructure.Mongo.Services;
24-
using Neuroglia.Data.Infrastructure.ResourceOriented.Redis;
25-
using Neuroglia.Data.Infrastructure.Services;
26-
using Neuroglia.Data.PatchModel.Services;
27-
using Neuroglia.Plugins;
28-
using Neuroglia.Security.Services;
29-
using Neuroglia.Serialization;
3021

3122
namespace Synapse.Api.Application;
3223

@@ -40,37 +31,11 @@ public static class IServiceCollectionExtensions
4031
/// Adds and configures runtime infrastructure services
4132
/// </summary>
4233
/// <param name="services">The <see cref="IServiceCollection"/> to configure</param>
43-
/// <param name="configuration">The current <see cref="IConfiguration"/></param>
4434
/// <returns>The configured <see cref="IServiceCollection"/></returns>
45-
public static IServiceCollection AddSynapseApi(this IServiceCollection services, IConfiguration configuration)
35+
public static IServiceCollection AddSynapseApi(this IServiceCollection services)
4636
{
47-
services.AddHttpClient();
48-
services.AddSerialization();
49-
services.AddJsonSerializer();
50-
services.AddYamlDotNetSerializer();
51-
services.AddScoped<IUserInfoProvider, UserInfoProvider>();
52-
services.AddMediator();
5337
services.AddApiCommands();
5438
services.AddApiQueries();
55-
services.AddServerlessWorkflowIO();
56-
services.AddPluginProvider();
57-
58-
var redisConnectionString = configuration.GetConnectionString(RedisDatabase.ConnectionStringName);
59-
services.AddPlugin(typeof(IDatabase), string.IsNullOrWhiteSpace(redisConnectionString) ? null : provider => provider.GetRequiredService<RedisDatabase>(), serviceLifetime: ServiceLifetime.Scoped);
60-
61-
if (!string.IsNullOrWhiteSpace(redisConnectionString)) services.AddRedisDatabase(redisConnectionString, ServiceLifetime.Scoped);
62-
services.AddHostedService<Core.Infrastructure.Services.DatabaseInitializer>();
63-
64-
services.AddPlugin(typeof(IRepository<Document>), provider => provider.GetRequiredService<MongoRepository<Document, string>>(), serviceLifetime: ServiceLifetime.Scoped);
65-
services.AddMongoDatabase("synapse");
66-
services.AddMongoRepository<Document, string>(lifetime: ServiceLifetime.Scoped);
67-
68-
services.AddScoped<IResourceRepository, ResourceRepository>();
69-
services.AddScoped<IAdmissionControl, AdmissionControl>();
70-
services.AddScoped<IVersionControl, VersionControl>();
71-
services.AddSingleton<IPatchHandler, JsonMergePatchHandler>();
72-
services.AddSingleton<IPatchHandler, JsonPatchHandler>();
73-
services.AddSingleton<IPatchHandler, JsonStrategicMergePatchHandler>();
7439

7540
return services;
7641
}

src/api/Synapse.Api.Application/Synapse.Api.Application.csproj

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,10 @@
55
<OutputType>Library</OutputType>
66
<ImplicitUsings>enable</ImplicitUsings>
77
<Nullable>enable</Nullable>
8+
<NeutralLanguage>en</NeutralLanguage>
9+
<GenerateDocumentationFile>True</GenerateDocumentationFile>
810
</PropertyGroup>
911

10-
<ItemGroup>
11-
<PackageReference Include="Neuroglia.Data.Infrastructure.Mongo" Version="4.9.15" />
12-
<PackageReference Include="Neuroglia.Data.Infrastructure.ResourceOriented.Redis" Version="4.9.15" />
13-
<PackageReference Include="Neuroglia.Mediation" Version="4.9.15" />
14-
<PackageReference Include="Neuroglia.Plugins" Version="4.9.15" />
15-
<PackageReference Include="ServerlessWorkflow.Sdk.IO" Version="1.0.0-alpha1" />
16-
</ItemGroup>
17-
1812
<ItemGroup>
1913
<ProjectReference Include="..\..\core\Synapse.Core.Infrastructure\Synapse.Core.Infrastructure.csproj" />
2014
<ProjectReference Include="..\Synapse.Api.Client.Core\Synapse.Api.Client.Core.csproj" />

src/api/Synapse.Api.Client.Core/IClusterResourceApiClient.cs renamed to src/api/Synapse.Api.Client.Core/Services/IClusterResourceApiClient.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
using Neuroglia.Data;
22

3-
namespace Synapse.Api;
3+
namespace Synapse.Api.Client.Services;
44

55
/// <summary>
66
/// Defines the fundamentals of a service used to manage cluster <see cref="IResource"/>s

src/api/Synapse.Api.Client.Core/IDocumentApiClient.cs renamed to src/api/Synapse.Api.Client.Core/Services/IDocumentApiClient.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
namespace Synapse.Api;
1+
namespace Synapse.Api.Client.Services;
22

33
/// <summary>
44
/// Defines the fundamentals of the Synapse API used to manage <see cref="Document"/>s

src/api/Synapse.Api.Client.Core/INamespacedResourceApiClient.cs renamed to src/api/Synapse.Api.Client.Core/Services/INamespacedResourceApiClient.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
using Neuroglia.Data;
22

3-
namespace Synapse.Api;
3+
namespace Synapse.Api.Client.Services;
44

55
/// <summary>
66
/// Defines the fundamentals of a service used to manage namespaced <see cref="IResource"/>s

src/api/Synapse.Api.Client.Core/IResourceApiClient.cs renamed to src/api/Synapse.Api.Client.Core/Services/IResourceApiClient.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
using Neuroglia.Data.Infrastructure.ResourceOriented;
2-
3-
namespace Synapse.Api;
1+
namespace Synapse.Api.Client.Services;
42

53
/// <summary>
64
/// Defines the fundamentals of a service used to manage <see cref="IResource"/>s

src/api/Synapse.Api.Client.Core/ISynapseApiClient.cs renamed to src/api/Synapse.Api.Client.Core/Services/ISynapseApiClient.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
namespace Synapse.Api;
1+
namespace Synapse.Api.Client.Services;
22

33
/// <summary>
44
/// Defines the fundamentals of a Synapse API client

src/api/Synapse.Api.Client.Core/Synapse.Api.Client.Core.csproj

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,16 @@
55
<ImplicitUsings>enable</ImplicitUsings>
66
<Nullable>enable</Nullable>
77
<RootNamespace>$(MSBuildProjectName.Replace(" ", "_").Replace(".Core", ""))</RootNamespace>
8+
<NeutralLanguage>en</NeutralLanguage>
9+
<GenerateDocumentationFile>True</GenerateDocumentationFile>
810
</PropertyGroup>
911

1012
<ItemGroup>
1113
<ProjectReference Include="..\..\core\Synapse.Core\Synapse.Core.csproj" />
1214
</ItemGroup>
1315

16+
<ItemGroup>
17+
<Folder Include="Services\Interfaces\" />
18+
</ItemGroup>
19+
1420
</Project>
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
using Microsoft.Extensions.DependencyInjection;
2+
using Microsoft.Extensions.DependencyInjection.Extensions;
3+
using Synapse.Api.Client.Services;
4+
5+
namespace Synapse.Api.Client;
6+
7+
/// <summary>
8+
/// Defines extensions for <see cref="IServiceCollection"/>s
9+
/// </summary>
10+
public static class IServiceCollectionExtensions
11+
{
12+
13+
/// <summary>
14+
/// Adds and configures a client for the Synapse HTTP API
15+
/// </summary>
16+
/// <param name="services">The <see cref="IServiceCollection"/> to configure</param>
17+
/// <param name="httpClientSetup">An <see cref="Action{T}"/> used to configure the <see cref="HttpClient"/> to use</param>
18+
/// <returns>The configured <see cref="IServiceCollection"/></returns>
19+
public static IServiceCollection AddSynapseHttpApiClient(this IServiceCollection services, Action<HttpClient> httpClientSetup)
20+
{
21+
services.AddHttpClient(typeof(SynapseHttpApiClient).Name, http => httpClientSetup(http));
22+
services.TryAddSingleton<ISynapseApiClient, SynapseHttpApiClient>();
23+
return services;
24+
}
25+
26+
}

src/api/Synapse.Api.Client.Http/HttpResourceManagementApiClient.cs renamed to src/api/Synapse.Api.Client.Http/Services/HttpResourceManagementApiClient.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
using System.Net.Mime;
2020
using System.Text;
2121

22-
namespace Synapse.Api.Client;
22+
namespace Synapse.Api.Client.Services;
2323

2424
/// <summary>
2525
/// Represents the HTTP implementation of the <see cref="IResourceApiClient{TResource}"/> interface
@@ -132,7 +132,7 @@ public virtual async Task<TResource> PatchAsync(string name, string @namespace,
132132
ArgumentException.ThrowIfNullOrWhiteSpace(@namespace);
133133
ArgumentNullException.ThrowIfNull(patch);
134134
var resource = new TResource();
135-
var uri = $"/api/{resource.Definition.Version}/{resource.Definition.Plural}/{@namespace}/{name}";
135+
var uri = $"/api/{resource.Definition.Version}/{resource.Definition.Plural}/{@namespace}/{name}";
136136
var json = this.JsonSerializer.SerializeToText(patch);
137137
using var content = new StringContent(json, Encoding.UTF8, MediaTypeNames.Application.Json);
138138
using var request = await this.ProcessRequestAsync(new HttpRequestMessage(HttpMethod.Patch, uri) { Content = content }, cancellationToken).ConfigureAwait(false);
@@ -205,7 +205,7 @@ public virtual async Task DeleteAsync(string name, CancellationToken cancellatio
205205
var resource = new TResource();
206206
var uri = $"/api/{resource.Definition.Version}/{resource.Definition.Plural}/{name}";
207207
using var request = await this.ProcessRequestAsync(new HttpRequestMessage(HttpMethod.Delete, uri), cancellationToken).ConfigureAwait(false);
208-
await this.ProcessResponseAsync(await this.HttpClient.SendAsync(request, cancellationToken).ConfigureAwait(false), cancellationToken).ConfigureAwait(false);
208+
await ProcessResponseAsync(await this.HttpClient.SendAsync(request, cancellationToken).ConfigureAwait(false), cancellationToken).ConfigureAwait(false);
209209
}
210210

211211
/// <inheritdoc/>
@@ -216,7 +216,7 @@ public virtual async Task DeleteAsync(string name, string @namespace, Cancellati
216216
var resource = new TResource();
217217
var uri = $"/api/{resource.Definition.Version}/{@namespace}/{resource.Definition.Plural}/{name}";
218218
using var request = await this.ProcessRequestAsync(new HttpRequestMessage(HttpMethod.Delete, uri), cancellationToken).ConfigureAwait(false);
219-
await this.ProcessResponseAsync(await this.HttpClient.SendAsync(request, cancellationToken).ConfigureAwait(false), cancellationToken).ConfigureAwait(false);
219+
await ProcessResponseAsync(await this.HttpClient.SendAsync(request, cancellationToken).ConfigureAwait(false), cancellationToken).ConfigureAwait(false);
220220
}
221221

222222
/// <summary>

src/api/Synapse.Api.Client.Http/HttpCloudFlowsApiClient.cs renamed to src/api/Synapse.Api.Client.Http/Services/SynapseHttpApiClient.cs

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,34 +15,33 @@
1515
using Microsoft.Extensions.Logging;
1616
using Neuroglia.Serialization;
1717
using Neuroglia;
18-
using Synapse.Api.Client;
1918
using Neuroglia.Data.Infrastructure.ResourceOriented;
2019

21-
namespace Synapse.Api.Http.Client;
20+
namespace Synapse.Api.Client.Services;
2221

2322
/// <summary>
2423
/// Represents the default HTTP implementation of the <see cref="ISynapseApiClient"/> interface
2524
/// </summary>
26-
public class HttpSynapseApiClient
25+
public class SynapseHttpApiClient
2726
: ISynapseApiClient
2827
{
2928

3029
/// <summary>
31-
/// Initializes a new <see cref="HttpSynapseApiClient"/>
30+
/// Initializes a new <see cref="SynapseHttpApiClient"/>
3231
/// </summary>
3332
/// <param name="serviceProvider">The current <see cref="IServiceProvider"/></param>
3433
/// <param name="loggerFactory">The service used to create <see cref="ILogger"/>s</param>
3534
/// <param name="serializer">The service used to serialize/deserialize objects to/from JSON</param>
3635
/// <param name="documents">The service used to manage <see cref="Document"/>s</param>
3736
/// <param name="httpClient">The service used to perform http requests</param>
38-
public HttpSynapseApiClient(IServiceProvider serviceProvider, ILoggerFactory loggerFactory, IJsonSerializer serializer, IDocumentApiClient documents, HttpClient httpClient)
37+
public SynapseHttpApiClient(IServiceProvider serviceProvider, ILoggerFactory loggerFactory, IJsonSerializer serializer, IDocumentApiClient documents, HttpClient httpClient)
3938
{
4039
this.ServiceProvider = serviceProvider;
41-
this.Logger = loggerFactory.CreateLogger(this.GetType());
40+
this.Logger = loggerFactory.CreateLogger(GetType());
4241
this.Serializer = serializer;
4342
this.WorkflowData = documents;
4443
this.HttpClient = httpClient;
45-
foreach (var apiProperty in this.GetType().GetProperties().Where(p => p.CanRead && p.PropertyType.GetGenericType(typeof(IResourceApiClient<>)) != null))
44+
foreach (var apiProperty in GetType().GetProperties().Where(p => p.CanRead && p.PropertyType.GetGenericType(typeof(IResourceApiClient<>)) != null))
4645
{
4746
var apiType = apiProperty.PropertyType.GetGenericType(typeof(IResourceApiClient<>))!;
4847
var resourceType = apiType.GetGenericArguments()[0];

src/api/Synapse.Api.Client.Http/Synapse.Api.Client.Http.csproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
<TargetFramework>net8.0</TargetFramework>
55
<ImplicitUsings>enable</ImplicitUsings>
66
<Nullable>enable</Nullable>
7+
<NeutralLanguage>en</NeutralLanguage>
8+
<GenerateDocumentationFile>True</GenerateDocumentationFile>
79
</PropertyGroup>
810

911
<ItemGroup>

src/api/Synapse.Api.Http/ClusterResourceController.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,6 @@ public virtual async Task<IActionResult> PatchResourceStatus(string name,[FromBo
8282
/// Deletes the resource with the specified name
8383
/// </summary>
8484
/// <param name="name">The name of the resource to delete</param>
85-
/// <param name="namespace">The namespace the delete to get belongs to</param>
8685
/// <param name="cancellationToken">A <see cref="CancellationToken"/></param>
8786
/// <returns>A new <see cref="IActionResult"/></returns>
8887
[HttpDelete("{name}")]

src/api/Synapse.Api.Http/Synapse.Api.Http.csproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
<Nullable>enable</Nullable>
66
<ImplicitUsings>enable</ImplicitUsings>
77
<OutputType>Library</OutputType>
8+
<NeutralLanguage>en</NeutralLanguage>
9+
<GenerateDocumentationFile>True</GenerateDocumentationFile>
810
</PropertyGroup>
911

1012
<ItemGroup>

src/api/Synapse.Api.Server/Dockerfile

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#See https://aka.ms/customizecontainer to learn how to customize your debug container and how Visual Studio uses this Dockerfile to build your images for faster debugging.
2-
31
FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base
42
USER app
53
WORKDIR /app

src/api/Synapse.Api.Server/Program.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,11 @@
1919
using Neuroglia.Serialization;
2020
using Swashbuckle.AspNetCore.SwaggerUI;
2121
using System.Net.Mime;
22+
using Synapse;
2223

2324
var builder = WebApplication.CreateBuilder(args);
24-
builder.Services.AddSynapseApi(builder.Configuration);
25+
builder.Services.AddSynapse(builder.Configuration);
26+
builder.Services.AddSynapseApi();
2527
builder.Services.AddSynapseHttpApi();
2628
using var app = builder.Build();
2729

@@ -56,4 +58,7 @@
5658

5759
await app.RunAsync();
5860

61+
/// <summary>
62+
/// The API server's program
63+
/// </summary>
5964
public partial class Program { }

src/api/Synapse.Api.Server/Synapse.Api.Server.csproj

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
<TargetFramework>net8.0</TargetFramework>
55
<Nullable>enable</Nullable>
66
<ImplicitUsings>enable</ImplicitUsings>
7+
<NeutralLanguage>en</NeutralLanguage>
8+
<GenerateDocumentationFile>True</GenerateDocumentationFile>
9+
<DockerFileTag>ghcr.io/serverlessworkflow/synapse/api</DockerFileTag>
710
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
811
<DockerfileContext>..\..\..</DockerfileContext>
912
</PropertyGroup>

src/core/Synapse.Core.Infrastructure.Containers.Docker/Synapse.Core.Infrastructure.Containers.Docker.csproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
<ImplicitUsings>enable</ImplicitUsings>
66
<Nullable>enable</Nullable>
77
<RootNamespace>$(MSBuildProjectName.Replace(" ", "_").Replace(".Docker", ""))</RootNamespace>
8+
<NeutralLanguage>en</NeutralLanguage>
9+
<GenerateDocumentationFile>true</GenerateDocumentationFile>
810
</PropertyGroup>
911

1012
<ItemGroup>

0 commit comments

Comments
 (0)