From f58c271dce1ac60afecaf800e58a6c1ac5ce9fe6 Mon Sep 17 00:00:00 2001 From: Temo Nikolaishvili Date: Thu, 21 Nov 2024 18:59:32 +0400 Subject: [PATCH 1/2] 1. Added support for .net 9. 2. Moved SwaggerExtensions from AltaSoft.DomainPrimitives to separate assembly. --- .../workflows/build_nuget_dont_publish.yml | 1 + .github/workflows/dotnet.yml | 1 + .github/workflows/publish_nuget.yml | 1 + AltaSoft.DomainPrimitives.sln | 6 ++++++ ....DomainPrimitives.SwaggerExtensions.csproj | 18 ++++++++++++++++++ .../SwaggerGenOptionsExt.cs | 2 +- ...aSoft.DomainPrimitives.XmlDataTypes.csproj | 6 +++++- .../AltaSoft.DomainPrimitives.csproj | Bin 754 -> 259 bytes 8 files changed, 33 insertions(+), 2 deletions(-) create mode 100644 src/AltaSoft.DomainPrimitives.SwaggerExtensions/AltaSoft.DomainPrimitives.SwaggerExtensions.csproj rename src/{AltaSoft.DomainPrimitives => AltaSoft.DomainPrimitives.SwaggerExtensions}/SwaggerGenOptionsExt.cs (98%) diff --git a/.github/workflows/build_nuget_dont_publish.yml b/.github/workflows/build_nuget_dont_publish.yml index 926224a..cfcc209 100644 --- a/.github/workflows/build_nuget_dont_publish.yml +++ b/.github/workflows/build_nuget_dont_publish.yml @@ -14,6 +14,7 @@ jobs: uses: actions/setup-dotnet@v1 with: dotnet-version: | + 9.0.x 8.0.x 7.0.x diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 83166dd..a1325c8 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -26,6 +26,7 @@ jobs: uses: actions/setup-dotnet@v3 with: dotnet-version: | + 9.0.x 8.0.x 7.0.x diff --git a/.github/workflows/publish_nuget.yml b/.github/workflows/publish_nuget.yml index 9209aaf..10384c0 100644 --- a/.github/workflows/publish_nuget.yml +++ b/.github/workflows/publish_nuget.yml @@ -15,6 +15,7 @@ jobs: uses: actions/setup-dotnet@v1 with: dotnet-version: | + 9.0.x 8.0.x 7.0.x diff --git a/AltaSoft.DomainPrimitives.sln b/AltaSoft.DomainPrimitives.sln index 5778c0a..1a6da75 100644 --- a/AltaSoft.DomainPrimitives.sln +++ b/AltaSoft.DomainPrimitives.sln @@ -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 @@ -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 diff --git a/src/AltaSoft.DomainPrimitives.SwaggerExtensions/AltaSoft.DomainPrimitives.SwaggerExtensions.csproj b/src/AltaSoft.DomainPrimitives.SwaggerExtensions/AltaSoft.DomainPrimitives.SwaggerExtensions.csproj new file mode 100644 index 0000000..b180e4a --- /dev/null +++ b/src/AltaSoft.DomainPrimitives.SwaggerExtensions/AltaSoft.DomainPrimitives.SwaggerExtensions.csproj @@ -0,0 +1,18 @@ + + + + net8.0;net9.0 + + + + AltaSoft.DomainPrimitives.SwaggerExtensions + + + + + + + + + + \ No newline at end of file diff --git a/src/AltaSoft.DomainPrimitives/SwaggerGenOptionsExt.cs b/src/AltaSoft.DomainPrimitives.SwaggerExtensions/SwaggerGenOptionsExt.cs similarity index 98% rename from src/AltaSoft.DomainPrimitives/SwaggerGenOptionsExt.cs rename to src/AltaSoft.DomainPrimitives.SwaggerExtensions/SwaggerGenOptionsExt.cs index f382398..219b57b 100644 --- a/src/AltaSoft.DomainPrimitives/SwaggerGenOptionsExt.cs +++ b/src/AltaSoft.DomainPrimitives.SwaggerExtensions/SwaggerGenOptionsExt.cs @@ -6,7 +6,7 @@ // ReSharper disable UnusedMember.Global -namespace AltaSoft.DomainPrimitives; +namespace AltaSoft.DomainPrimitives.SwaggerExtensions; /// /// A static class providing methods to configure Swagger mappings for DomainPrimitive types. diff --git a/src/AltaSoft.DomainPrimitives.XmlDataTypes/AltaSoft.DomainPrimitives.XmlDataTypes.csproj b/src/AltaSoft.DomainPrimitives.XmlDataTypes/AltaSoft.DomainPrimitives.XmlDataTypes.csproj index 5adf491..f656d4a 100644 --- a/src/AltaSoft.DomainPrimitives.XmlDataTypes/AltaSoft.DomainPrimitives.XmlDataTypes.csproj +++ b/src/AltaSoft.DomainPrimitives.XmlDataTypes/AltaSoft.DomainPrimitives.XmlDataTypes.csproj @@ -1,7 +1,7 @@ - net7.0;net8.0 + net7.0;net8.0;net9.0 Domain Primitives XML Data Types Domain Primitives library for C# (XML Data Types). @@ -24,6 +24,10 @@ + + + + diff --git a/src/AltaSoft.DomainPrimitives/AltaSoft.DomainPrimitives.csproj b/src/AltaSoft.DomainPrimitives/AltaSoft.DomainPrimitives.csproj index 8f4c8d77189a0b21c6d16211bb7ad4fd640a3d28..5100b2304bd451429ed72b359f5296afab2b2979 100644 GIT binary patch literal 259 zcmZvX%MOAt5JlJU6{LF$Yr8zu`T;0wIB{H71?ymQFnz@DauZg Q9Kl%g3@qv9f$1ah0ez`f>i_@% literal 754 zcma))OHaa35QWbc6aPcQ-l8th1cVr0VIeV=xUaP!0)@22$Ddcf8K7zm35(m#ojG&v z%$)i9Y^$qx%`{b@SEb5TXso$1ovE%Pg*xOP5XqF_eRgDRi!?3DvY59it&#? zmAb}?=_b`1{5h`{U^9=McrUH>?bL5=HFn6iuI#18y0h&SZIG)8Y{%7{Z@@H4CZAH{ zIscN{qiQafSTj5}Z{r(tGyK?fD!iWG44b!iud)YQ3hV#52B>B_#;7&nYty~w3^_T+ zb|D4Rb8D(43a74c#N=b9{;Ws5mTmoo^jDx;AG_3rYh&IOdgS~$br`d4+XL3$O>Ba; UbL{a(wE?EewmyCo+w5XT- Date: Thu, 21 Nov 2024 19:14:16 +0400 Subject: [PATCH 2/2] added net7.0 support to SwaggerExtensions and updated readme --- README.md | 3 ++- .../AltaSoft.DomainPrimitives.SwaggerExtensions.csproj | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index ccd89a1..5c7fe41 100644 --- a/README.md +++ b/README.md @@ -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 //------------------------------------------------------------------------------ diff --git a/src/AltaSoft.DomainPrimitives.SwaggerExtensions/AltaSoft.DomainPrimitives.SwaggerExtensions.csproj b/src/AltaSoft.DomainPrimitives.SwaggerExtensions/AltaSoft.DomainPrimitives.SwaggerExtensions.csproj index b180e4a..34931ce 100644 --- a/src/AltaSoft.DomainPrimitives.SwaggerExtensions/AltaSoft.DomainPrimitives.SwaggerExtensions.csproj +++ b/src/AltaSoft.DomainPrimitives.SwaggerExtensions/AltaSoft.DomainPrimitives.SwaggerExtensions.csproj @@ -1,7 +1,7 @@ - net8.0;net9.0 + net7.0;net8.0;net9.0