Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Or 2665 vzer header #1060

Merged
merged 12 commits into from
Feb 13, 2025
Merged
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
2 changes: 1 addition & 1 deletion paket.dependencies
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ nuget IdentityModel.AspNetCore.OAuth2Introspection
nuget CompareNETObjects

nuget Marten
nuget Marten.AspNetCore 7.37.1
nuget Marten.Commandline

nuget Microsoft.AspNetCore.App.Ref
Expand Down Expand Up @@ -116,4 +117,3 @@ nuget NEST 7.17.4
nuget Npgsql



210 changes: 138 additions & 72 deletions paket.lock
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ NUGET
System.Buffers (>= 4.5.1)
System.Diagnostics.DiagnosticSource (>= 5.0)
Fare (2.2.1)
FastExpressionCompiler (4.2)
FastExpressionCompiler (5.0.2)
FluentAssertions (6.12)
System.Configuration.ConfigurationManager (>= 4.4)
FluentAssertions.Json (6.1)
Expand All @@ -236,6 +236,7 @@ NUGET
Microsoft.Extensions.FileProviders.Abstractions (>= 8.0)
Parlot (>= 0.0.25)
TimeZoneConverter (>= 6.1)
FSharp.Core (9.0.101)
Google.Protobuf (3.26.1)
Grpc.Core.Api (2.62)
Grpc.Net.Client (2.62)
Expand All @@ -247,21 +248,21 @@ NUGET
IdentityModel (7.0)
IdentityModel.AspNetCore.OAuth2Introspection (6.2)
IdentityModel (>= 6.0)
JasperFx.CodeGeneration (3.5.3)
FastExpressionCompiler (>= 4.1)
JasperFx.Core (>= 1.5)
JasperFx.CodeGeneration.Commands (3.5.3)
JasperFx.CodeGeneration (>= 3.5.3)
JasperFx.RuntimeCompiler (>= 3.5.3)
Oakton (>= 6.1)
JasperFx.Core (1.8)
JasperFx.CodeGeneration (3.7.2)
FastExpressionCompiler (>= 4.2.2)
JasperFx.Core (>= 1.9)
JasperFx.CodeGeneration.Commands (3.7.2)
JasperFx.CodeGeneration (>= 3.7.2)
JasperFx.RuntimeCompiler (>= 3.7.2)
Oakton (>= 6.3)
JasperFx.Core (1.12)
Microsoft.Extensions.DependencyInjection.Abstractions (>= 8.0)
JasperFx.RuntimeCompiler (3.5.3)
JasperFx.CodeGeneration (>= 3.5.3)
Microsoft.CodeAnalysis (>= 4.8)
Microsoft.CodeAnalysis.CSharp (>= 4.8)
Microsoft.CodeAnalysis.Scripting (>= 4.8)
Microsoft.Extensions.Logging.Abstractions (>= 6.0 < 9.0)
JasperFx.RuntimeCompiler (3.7.2)
JasperFx.CodeGeneration (>= 3.7.2)
Microsoft.CodeAnalysis (>= 4.11)
Microsoft.CodeAnalysis.CSharp (>= 4.11)
Microsoft.CodeAnalysis.Scripting (>= 4.11)
Microsoft.Extensions.Logging.Abstractions (>= 6.0 < 10.0)
Lamar (13.0.4)
JasperFx.CodeGeneration (>= 3.4)
JasperFx.Core (>= 1.5.1)
Expand All @@ -275,25 +276,29 @@ NUGET
Microsoft.Extensions.Logging (>= 8.0)
Microsoft.Extensions.Options (>= 8.0)
librdkafka.redist (2.4)
Marten (7.23.1)
JasperFx.CodeGeneration (>= 3.5.3)
JasperFx.Core (>= 1.7.2)
JasperFx.RuntimeCompiler (>= 3.5.3)
Marten (7.37.1)
FSharp.Core (>= 9.0.100)
JasperFx.CodeGeneration (>= 3.7.2)
JasperFx.Core (>= 1.12)
JasperFx.RuntimeCompiler (>= 3.7.2)
Microsoft.Extensions.DependencyInjection.Abstractions (>= 8.0)
Microsoft.Extensions.Hosting.Abstractions (>= 8.0)
Microsoft.Extensions.Logging.Abstractions (>= 8.0)
Newtonsoft.Json (>= 13.0.3)
Npgsql.Json.NET (>= 8.0)
OpenTelemetry.Api (>= 1.8)
Polly.Core (>= 8.3.1)
System.Text.Json (>= 8.0)
Polly.Core (>= 8.5)
System.Text.Json (>= 8.0.5)
System.Threading.Tasks.Dataflow (>= 8.0)
Weasel.Postgresql (>= 7.4.1)
Marten.CommandLine (7.23.1)
JasperFx.CodeGeneration.Commands (>= 3.5.3)
Marten (>= 7.23.1)
Oakton (>= 6.1)
Weasel.CommandLine (>= 7.4.1)
Weasel.Postgresql (>= 7.13.5)
Marten.AspNetCore (7.37.1)
Marten (>= 7.37.1)
Microsoft.Extensions.Diagnostics.HealthChecks (>= 8.0)
Marten.CommandLine (7.37.1)
JasperFx.CodeGeneration.Commands (>= 3.7.1)
Marten (>= 7.37.1)
Oakton (>= 6.3)
Weasel.CommandLine (>= 7.13.2)
Microsoft.AspNetCore.App.Ref (8.0.6)
Microsoft.AspNetCore.Authentication.JwtBearer (8.0.7)
Microsoft.IdentityModel.Protocols.OpenIdConnect (>= 7.1.2)
Expand Down Expand Up @@ -354,43 +359,94 @@ NUGET
Microsoft.Net.Http.Headers (>= 8.0.5)
System.IO.Pipelines (>= 8.0)
Microsoft.Bcl.AsyncInterfaces (8.0)
Microsoft.CodeAnalysis (4.9.2)
Microsoft.CodeAnalysis.CSharp.Workspaces (4.9.2)
Microsoft.CodeAnalysis.VisualBasic.Workspaces (4.9.2)
Microsoft.CodeAnalysis.Analyzers (3.3.4)
Microsoft.CodeAnalysis.Common (4.9.2)
Microsoft.CodeAnalysis (4.12)
Humanizer.Core (>= 2.14.1)
Microsoft.Bcl.AsyncInterfaces (>= 8.0)
Microsoft.CodeAnalysis.Analyzers (>= 3.3.4)
Microsoft.CodeAnalysis.CSharp.Workspaces (4.12)
Microsoft.CodeAnalysis.VisualBasic.Workspaces (4.12)
System.Buffers (>= 4.5.1)
System.Collections.Immutable (>= 8.0)
System.Composition (>= 8.0)
System.IO.Pipelines (>= 8.0)
System.Memory (>= 4.5.5)
System.Numerics.Vectors (>= 4.5)
System.Reflection.Metadata (>= 8.0)
System.Runtime.CompilerServices.Unsafe (>= 6.0)
Microsoft.CodeAnalysis.CSharp (4.9.2)
Microsoft.CodeAnalysis.Common (4.9.2)
Microsoft.CodeAnalysis.CSharp.Scripting (4.9.2)
Microsoft.CodeAnalysis.Common (4.9.2)
Microsoft.CodeAnalysis.CSharp (4.9.2)
Microsoft.CodeAnalysis.Scripting.Common (4.9.2)
System.Text.Encoding.CodePages (>= 7.0)
System.Threading.Channels (>= 7.0)
System.Threading.Tasks.Extensions (>= 4.5.4)
Microsoft.CodeAnalysis.Analyzers (3.3.4)
Microsoft.CodeAnalysis.Common (4.12)
Microsoft.CodeAnalysis.Analyzers (>= 3.3.4)
System.Collections.Immutable (>= 8.0)
System.Reflection.Metadata (>= 8.0)
Microsoft.CodeAnalysis.CSharp (4.12)
Microsoft.CodeAnalysis.Analyzers (>= 3.3.4)
Microsoft.CodeAnalysis.Common (4.12)
System.Collections.Immutable (>= 8.0)
System.Reflection.Metadata (>= 8.0)
Microsoft.CodeAnalysis.CSharp.Scripting (4.12)
Microsoft.CodeAnalysis.Analyzers (>= 3.3.4)
Microsoft.CodeAnalysis.Common (4.12)
Microsoft.CodeAnalysis.CSharp (4.12)
Microsoft.CodeAnalysis.Scripting.Common (4.12)
Microsoft.CSharp (>= 4.7)
Microsoft.CodeAnalysis.CSharp.Workspaces (4.9.2)
System.Collections.Immutable (>= 8.0)
System.Reflection.Metadata (>= 8.0)
Microsoft.CodeAnalysis.CSharp.Workspaces (4.12)
Humanizer.Core (>= 2.14.1)
Microsoft.CodeAnalysis.Common (4.9.2)
Microsoft.CodeAnalysis.CSharp (4.9.2)
Microsoft.CodeAnalysis.Workspaces.Common (4.9.2)
Microsoft.CodeAnalysis.Scripting (4.9.2)
Microsoft.CodeAnalysis.CSharp.Scripting (4.9.2)
Microsoft.CodeAnalysis.Scripting.Common (4.9.2)
Microsoft.CodeAnalysis.Common (4.9.2)
Microsoft.CodeAnalysis.VisualBasic (4.9.2)
Microsoft.CodeAnalysis.Common (4.9.2)
Microsoft.CodeAnalysis.VisualBasic.Workspaces (4.9.2)
Microsoft.CodeAnalysis.Common (4.9.2)
Microsoft.CodeAnalysis.VisualBasic (4.9.2)
Microsoft.CodeAnalysis.Workspaces.Common (4.9.2)
Microsoft.CodeAnalysis.Workspaces.Common (4.9.2)
Microsoft.CodeAnalysis.Analyzers (>= 3.3.4)
Microsoft.CodeAnalysis.Common (4.12)
Microsoft.CodeAnalysis.CSharp (4.12)
Microsoft.CodeAnalysis.Workspaces.Common (4.12)
System.Collections.Immutable (>= 8.0)
System.Composition (>= 8.0)
System.IO.Pipelines (>= 8.0)
System.Reflection.Metadata (>= 8.0)
System.Threading.Channels (>= 7.0)
Microsoft.CodeAnalysis.Scripting (4.12)
Microsoft.CodeAnalysis.Analyzers (>= 3.3.4)
Microsoft.CodeAnalysis.CSharp.Scripting (4.12)
Microsoft.CSharp (>= 4.7)
System.Buffers (>= 4.5.1)
System.Collections.Immutable (>= 8.0)
System.Memory (>= 4.5.5)
System.Numerics.Vectors (>= 4.5)
System.Reflection.Metadata (>= 8.0)
System.Runtime.CompilerServices.Unsafe (>= 6.0)
System.Text.Encoding.CodePages (>= 7.0)
System.Threading.Tasks.Extensions (>= 4.5.4)
Microsoft.CodeAnalysis.Scripting.Common (4.12)
Microsoft.CodeAnalysis.Analyzers (>= 3.3.4)
Microsoft.CodeAnalysis.Common (4.12)
System.Collections.Immutable (>= 8.0)
System.Reflection.Metadata (>= 8.0)
Microsoft.CodeAnalysis.VisualBasic (4.12)
Microsoft.CodeAnalysis.Analyzers (>= 3.3.4)
Microsoft.CodeAnalysis.Common (4.12)
System.Collections.Immutable (>= 8.0)
System.Reflection.Metadata (>= 8.0)
Microsoft.CodeAnalysis.VisualBasic.Workspaces (4.12)
Humanizer.Core (>= 2.14.1)
Microsoft.CodeAnalysis.Analyzers (>= 3.3.4)
Microsoft.CodeAnalysis.Common (4.12)
Microsoft.CodeAnalysis.VisualBasic (4.12)
Microsoft.CodeAnalysis.Workspaces.Common (4.12)
System.Collections.Immutable (>= 8.0)
System.Composition (>= 8.0)
System.IO.Pipelines (>= 8.0)
System.Reflection.Metadata (>= 8.0)
System.Threading.Channels (>= 7.0)
Microsoft.CodeAnalysis.Workspaces.Common (4.12)
Humanizer.Core (>= 2.14.1)
Microsoft.CodeAnalysis.Common (4.9.2)
Microsoft.CodeAnalysis.Analyzers (>= 3.3.4)
Microsoft.CodeAnalysis.Common (4.12)
System.Collections.Immutable (>= 8.0)
System.Composition (>= 8.0)
System.IO.Pipelines (>= 8.0)
System.Threading.Channels (>= 8.0)
System.Reflection.Metadata (>= 8.0)
System.Threading.Channels (>= 7.0)
Microsoft.CodeCoverage (17.10)
Microsoft.CSharp (4.7)
Microsoft.Data.SqlClient (5.2)
Expand Down Expand Up @@ -628,6 +684,10 @@ NUGET
Elasticsearch.Net (>= 7.17.4)
NETStandard.Library (2.0.3)
Microsoft.NETCore.Platforms (>= 1.1)
NetTopologySuite (2.5)
System.Memory (>= 4.5.4)
NetTopologySuite.IO.PostGis (2.1)
NetTopologySuite (>= 2.0 < 3.0.0-A)
Newtonsoft.Json (13.0.3)
Newtonsoft.Json.Bson (1.0.2)
Newtonsoft.Json (>= 12.0.1)
Expand All @@ -648,11 +708,15 @@ NUGET
NodaTime.Serialization.JsonNet (3.1)
Newtonsoft.Json (>= 13.0.3)
NodaTime (>= 3.0 < 4.0)
Npgsql (8.0.3)
Npgsql (8.0.6)
Microsoft.Extensions.Logging.Abstractions (>= 8.0)
Npgsql.Json.NET (8.0.3)
Newtonsoft.Json (>= 13.0.3)
Npgsql (>= 8.0.3)
Npgsql.NetTopologySuite (8.0.6)
NetTopologySuite (>= 2.5)
NetTopologySuite.IO.PostGis (>= 2.1)
Npgsql (>= 8.0.6)
Npgsql.OpenTelemetry (8.0.3)
Npgsql (>= 8.0.3)
OpenTelemetry.Api (>= 1.6)
Expand All @@ -667,9 +731,9 @@ NUGET
NSwag.CodeGeneration (>= 14.0.7)
NSwag.Core (14.0.7)
NJsonSchema (>= 11.0)
Oakton (6.1)
JasperFx.Core (>= 1.5.1)
Microsoft.Extensions.Hosting (>= 6.0 < 9.0)
Oakton (6.3)
JasperFx.Core (>= 1.9)
Microsoft.Extensions.Hosting (>= 6.0 < 10.0)
Spectre.Console (>= 0.47)
OpenTelemetry (1.9)
Microsoft.Extensions.Diagnostics.Abstractions (>= 8.0)
Expand Down Expand Up @@ -713,7 +777,7 @@ NUGET
Parlot (0.0.27)
Polly (8.4)
Polly.Core (>= 8.4)
Polly.Core (8.4)
Polly.Core (8.5.2)
Result.Net (1.4)
runtime.debian.8-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3)
runtime.debian.9-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3)
Expand Down Expand Up @@ -919,7 +983,7 @@ NUGET
System.Threading.Tasks (>= 4.3)
System.IO.FileSystem.Primitives (4.3)
System.Runtime (>= 4.3)
System.IO.Pipelines (8.0)
System.IO.Pipelines (9.0.1)
System.Linq (4.3)
System.Collections (>= 4.3)
System.Diagnostics.Debug (>= 4.3)
Expand Down Expand Up @@ -1135,9 +1199,10 @@ NUGET
Microsoft.NETCore.Targets (>= 1.1)
System.Runtime (>= 4.3)
System.Text.Encoding (>= 4.3)
System.Text.Encodings.Web (8.0)
System.Text.Json (8.0.4)
System.Text.Encodings.Web (>= 8.0)
System.Text.Encodings.Web (9.0.1)
System.Text.Json (9.0.1)
System.IO.Pipelines (>= 9.0.1)
System.Text.Encodings.Web (>= 9.0.1)
System.Text.RegularExpressions (4.3.1)
System.Runtime (>= 4.3.1)
System.Threading (4.3)
Expand Down Expand Up @@ -1167,14 +1232,15 @@ NUGET
System.Threading.Tasks (>= 4.3)
System.Threading.Tasks.Extensions (>= 4.3)
TimeZoneConverter (6.1)
Weasel.CommandLine (7.6)
Oakton (>= 6.1)
Weasel.Core (>= 7.6)
Weasel.Core (7.6)
JasperFx.Core (>= 1.5.1)
Weasel.Postgresql (7.6)
Npgsql (>= 8.0.3)
Weasel.Core (>= 7.6)
Weasel.CommandLine (7.13.5)
Oakton (>= 6.3)
Weasel.Core (>= 7.13.5)
Weasel.Core (7.13.5)
JasperFx.Core (>= 1.9)
Weasel.Postgresql (7.13.5)
Npgsql (>= 8.0.6)
Npgsql.NetTopologySuite (>= 8.0.6)
Weasel.Core (>= 7.13.5)
WolverineFx (2.9)
FastExpressionCompiler (>= 4.1)
JasperFx.CodeGeneration.Commands (>= 3.5.2)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
using AssociationRegistry.Admin.Schema.Detail;
using AssociationRegistry.Formats;
using AssociationRegistry.Hosts.Configuration.ConfigurationBindings;
using Infrastructure;
using ResponseModels;
using Adres = ResponseModels.Adres;
using AdresId = ResponseModels.AdresId;
Expand All @@ -23,11 +24,14 @@ public class BeheerVerenigingDetailMapper
{
private readonly AppSettings _appSettings;
private readonly INamenVoorLidmaatschapMapper _namenVoorLidmaatschapMapper;
private readonly string? _version;
private readonly IVerenigingsTypeMapper _verenigingsTypeMapper;

public BeheerVerenigingDetailMapper(AppSettings appSettings, INamenVoorLidmaatschapMapper namenVoorLidmaatschapMapper)
public BeheerVerenigingDetailMapper(AppSettings appSettings, INamenVoorLidmaatschapMapper namenVoorLidmaatschapMapper, string? version)
{
_appSettings = appSettings;
_namenVoorLidmaatschapMapper = namenVoorLidmaatschapMapper;
_verenigingsTypeMapper = version == WellknownVersions.V2 ? new VerenigingsTypeMapperV2() : new VerenigingsTypeMapper();
}

public DetailVerenigingResponse Map(BeheerVerenigingDetailDocument vereniging)
Expand All @@ -44,7 +48,7 @@ private static Metadata MapMetadata(BeheerVerenigingDetailDocument vereniging)
DatumLaatsteAanpassing = vereniging.DatumLaatsteAanpassing,
};

private static VerenigingDetail Map(
private VerenigingDetail Map(
BeheerVerenigingDetailDocument vereniging,
INamenVoorLidmaatschapMapper namenVoorLidmaatschapMapper,
string baseUrl)
Expand All @@ -54,7 +58,7 @@ private static VerenigingDetail Map(
type = vereniging.JsonLdMetadataType,
VCode = vereniging.VCode,
CorresponderendeVCodes = vereniging.CorresponderendeVCodes,
Verenigingstype = Map(vereniging.Verenigingstype),
Verenigingstype = _verenigingsTypeMapper.Map<VerenigingsType, Schema.VerenigingsType>(vereniging.Verenigingstype),
Naam = vereniging.Naam,
Roepnaam = vereniging.Roepnaam,
KorteNaam = vereniging.KorteNaam,
Expand Down Expand Up @@ -120,13 +124,6 @@ private static GerelateerdeVereniging Map(
: string.Empty,
};

private static VerenigingsType Map(Schema.Detail.VerenigingsType verenigingsType)
=> new()
{
Code = verenigingsType.Code,
Naam = verenigingsType.Naam,
};

private static Sleutel Map(Schema.Detail.Sleutel sleutel)
=> new()
{
Expand Down
Loading
Loading