Skip to content

Commit

Permalink
Merge pull request #15 from altasoft/feature/net9AndSwaggerExtensions
Browse files Browse the repository at this point in the history
1. Added support for .net 9 and  moved SwaggerExtensions from AltaSoft.DomainPrimitives to separate assembly
  • Loading branch information
GregoryNikolaishvili authored Nov 21, 2024
2 parents ef03c30 + 5a58ac1 commit debc0d9
Show file tree
Hide file tree
Showing 9 changed files with 35 additions and 3 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build_nuget_dont_publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ jobs:
uses: actions/setup-dotnet@v1
with:
dotnet-version: |
9.0.x
8.0.x
7.0.x
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ jobs:
uses: actions/setup-dotnet@v3
with:
dotnet-version: |
9.0.x
8.0.x
7.0.x
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/publish_nuget.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ jobs:
uses: actions/setup-dotnet@v1
with:
dotnet-version: |
9.0.x
8.0.x
7.0.x
Expand Down
6 changes: 6 additions & 0 deletions AltaSoft.DomainPrimitives.sln
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "GitHubActions", "GitHubActi
.github\workflows\publish_nuget.yml = .github\workflows\publish_nuget.yml
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AltaSoft.DomainPrimitives.SwaggerExtensions", "src\AltaSoft.DomainPrimitives.SwaggerExtensions\AltaSoft.DomainPrimitives.SwaggerExtensions.csproj", "{289BC781-8B67-4A15-87A9-198EEA255160}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand All @@ -55,6 +57,10 @@ Global
{E49201A0-DCC3-4ED2-A5A0-25DDD5E3D017}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E49201A0-DCC3-4ED2-A5A0-25DDD5E3D017}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E49201A0-DCC3-4ED2-A5A0-25DDD5E3D017}.Release|Any CPU.Build.0 = Release|Any CPU
{289BC781-8B67-4A15-87A9-198EEA255160}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{289BC781-8B67-4A15-87A9-198EEA255160}.Debug|Any CPU.Build.0 = Debug|Any CPU
{289BC781-8B67-4A15-87A9-198EEA255160}.Release|Any CPU.ActiveCfg = Release|Any CPU
{289BC781-8B67-4A15-87A9-198EEA255160}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -557,7 +557,8 @@ public sealed class PositiveIntegerTypeConverter : Int32Converter
```
## **Swagger Mappers**

A single file for all domainPrimitives containing all type mappings is generated.
A single file for all domainPrimitives containing all type mappings is generated.
**Please note that you need to manually add Swashbuckle.AspNetCore.SwaggerGen nuget package to the project**

```csharp
//------------------------------------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-16"?>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net7.0;net8.0;net9.0</TargetFrameworks>
</PropertyGroup>

<PropertyGroup>
<Title>AltaSoft.DomainPrimitives.SwaggerExtensions</Title>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Swashbuckle.AspNetCore.SwaggerGen" Version="7.0.0" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\AltaSoft.DomainPrimitives\AltaSoft.DomainPrimitives.csproj" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

// ReSharper disable UnusedMember.Global

namespace AltaSoft.DomainPrimitives;
namespace AltaSoft.DomainPrimitives.SwaggerExtensions;

/// <summary>
/// A static class providing methods to configure Swagger mappings for DomainPrimitive types.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net7.0;net8.0</TargetFrameworks>
<TargetFrameworks>net7.0;net8.0;net9.0</TargetFrameworks>
<AssemblyTitle>Domain Primitives XML Data Types</AssemblyTitle>
<Description>Domain Primitives library for C# (XML Data Types).</Description>
</PropertyGroup>
Expand All @@ -24,6 +24,10 @@
<CompilerVisibleProperty Include="DomainPrimitiveGenerator_GenerateXmlSerialization" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Swashbuckle.AspNetCore.SwaggerGen" Version="7.0.0" />
</ItemGroup>


<ItemGroup>
<ProjectReference Include="..\AltaSoft.DomainPrimitives\AltaSoft.DomainPrimitives.csproj" />
Expand Down
Binary file modified src/AltaSoft.DomainPrimitives/AltaSoft.DomainPrimitives.csproj
Binary file not shown.

0 comments on commit debc0d9

Please sign in to comment.