Skip to content

Commit 612ca8a

Browse files
committed
Refactor CustomerModel status property and update OpenAPI generation settings
1 parent 8dcfada commit 612ca8a

4 files changed

Lines changed: 594 additions & 13 deletions

File tree

src/Modules/CoreModule/CoreModule.Application/Models/CustomerModel.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public class CustomerModel
4141
/// <summary>
4242
/// Gets or sets the current status of the customer (Enumeration Id).
4343
/// </summary>
44-
public int Status { get; set; } = CustomerStatus.Lead.Id;
44+
public int Status { get; set; }
4545

4646
/// <summary>
4747
/// Gets or sets the concurrency version (as a string Guid).

src/Presentation.Web.Server/Presentation.Web.Server.csproj

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,10 @@
1212
<!-- OpenAPI build-time generation configuration -->
1313
<PropertyGroup>
1414
<OpenApiGenerateDocuments>true</OpenApiGenerateDocuments>
15-
<OpenApiDocumentsDirectory>.</OpenApiDocumentsDirectory>
15+
<OpenApiDocumentsDirectory>$(MSBuildProjectDirectory)</OpenApiDocumentsDirectory>
16+
<OpenApiGenerateDocumentsOptions>--file-name openapi</OpenApiGenerateDocumentsOptions>
1617
</PropertyGroup>
1718

18-
<!-- Copy the generated OpenAPI JSON (produced under obj/.../EndpointInfo/) to project root as openapi.json -->
19-
<Target Name="CopyOpenApiToRoot" AfterTargets="Build">
20-
<PropertyGroup>
21-
<_OpenApiSourceFile>$(IntermediateOutputPath)EndpointInfo\$(MSBuildProjectName).json</_OpenApiSourceFile>
22-
<_OpenApiDestFile>$(MSBuildProjectDirectory)\openapi.json</_OpenApiDestFile>
23-
</PropertyGroup>
24-
<Message Text="OpenAPI Copy: $(_OpenApiSourceFile) -> $(_OpenApiDestFile)" Importance="High" Condition="Exists('$(_OpenApiSourceFile)')" />
25-
<Copy SourceFiles="$(_OpenApiSourceFile)" DestinationFiles="$(_OpenApiDestFile)" SkipUnchangedFiles="true" Condition="Exists('$(_OpenApiSourceFile)')" />
26-
</Target>
27-
2819
<ItemGroup>
2920
<PackageReference Include="BridgingIT.DevKit.Infrastructure.EntityFramework.SqlServer" />
3021
<PackageReference Include="BridgingIT.DevKit.Presentation.Web" />

src/Presentation.Web.Server/Program.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
builder.Services.AddMapping()
4141
.WithMapster<CoreModuleMapperRegister>();
4242

43-
// builder.Services.AddEndpoints<SystemEndpoints>(builder.Environment.IsDevelopment());
43+
builder.Services.AddEndpoints<SystemEndpoints>(builder.Environment.IsDevelopment());
4444

4545
builder.Services.AddControllers();
4646
builder.Services.AddEndpointsApiExplorer();

0 commit comments

Comments
 (0)