Skip to content

swagger updates to only support 10.X version removed support for 9. A…#41

Merged
temonk merged 6 commits intomainfrom
feature/updateToSwashbuckle10
Feb 25, 2026
Merged

swagger updates to only support 10.X version removed support for 9. A…#41
temonk merged 6 commits intomainfrom
feature/updateToSwashbuckle10

Conversation

@temonk
Copy link
Contributor

@temonk temonk commented Feb 17, 2026

…lso updated Microsoft.OpenApi to 2.X version from 1.X versions.

This change requires to have support for Swagger 10.x

…lso updated Microsoft.OpenApi to 2.X version from 1.X versions.

This change requires to have support for Swagger 10.x
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the DomainPrimitives OpenAPI/Swagger integration to align with Swagger/Swashbuckle 10.x and Microsoft.OpenApi 2.x by removing legacy conditional paths and regenerating expected outputs.

Changes:

  • Removed NET10_0_OR_GREATER conditional branches and standardized OpenAPI schema types/usings.
  • Updated generator OpenAPI helper emission and refreshed Verify snapshot baselines accordingly.
  • Centralized package versions for OpenAPI/Swagger dependencies and bumped package version.

Reviewed changes

Copilot reviewed 38 out of 38 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/AltaSoft.DomainPrimitives.SwaggerExtensions/SwaggerGenOptionsExt.cs Removes conditional OpenAPI usings and standardizes on Microsoft.OpenApi.
src/AltaSoft.DomainPrimitives.OpenApiExtensions/OpenApiHelperProcessor.cs Removes conditional OpenAPI usings and standardizes on Microsoft.OpenApi.
src/AltaSoft.DomainPrimitives.Generator/Helpers/MethodGeneratorHelper.cs Removes old OpenAPI generation branch and emits a single OpenAPI helper shape.
Directory.Packages.props Centralizes OpenAPI/SwaggerGen package versions without TFM-specific blocks.
Directory.Build.props Bumps library version to 7.2.0.
Examples/DomainPrimitivesDemo/DomainPrimitivesDemo.csproj Updates Microsoft.OpenApi package reference to a single modern version.
Examples/AltaSoft.DomainPrimitives.Demo/AltaSoft.DomainPrimitives.Demo.csproj Updates OpenAPI/Swashbuckle references for the demo app.
tests/AltaSoft.DomainPrimitives.Generator.Tests/Snapshots/DomainPrimitiveGeneratorTest.ULongValue_GeneratesAllInterfacesAndConverters#OpenApiHelper.g.verified.cs Snapshot updated for new OpenAPI helper output/usings.
tests/AltaSoft.DomainPrimitives.Generator.Tests/Snapshots/DomainPrimitiveGeneratorTest.UIntValue_GeneratesAllInterfacesAndConverters#OpenApiHelper.g.verified.cs Snapshot updated for new OpenAPI helper output/usings.
tests/AltaSoft.DomainPrimitives.Generator.Tests/Snapshots/DomainPrimitiveGeneratorTest.UInt16Value_GeneratesAllInterfacesAndConverters#OpenApiHelper.g.verified.cs Snapshot updated for new OpenAPI helper output/usings.
tests/AltaSoft.DomainPrimitives.Generator.Tests/Snapshots/DomainPrimitiveGeneratorTest.TimeSpanValue_GeneratesAllInterfacesAndConverters#OpenApiHelper.g.verified.cs Snapshot updated for new OpenAPI helper output/usings.
tests/AltaSoft.DomainPrimitives.Generator.Tests/Snapshots/DomainPrimitiveGeneratorTest.TimeOnlyValue_GeneratesAllInterfacesAndConverters#OpenApiHelper.g.verified.cs Snapshot updated for new OpenAPI helper output/usings.
tests/AltaSoft.DomainPrimitives.Generator.Tests/Snapshots/DomainPrimitiveGeneratorTest.StringValue_WithTransformerGeneratesTransformerCall#OpenApiHelper.g.verified.cs Snapshot updated for new OpenAPI helper output/usings.
tests/AltaSoft.DomainPrimitives.Generator.Tests/Snapshots/DomainPrimitiveGeneratorTest.StringValue_GeneratesAllInterfacesAndConvertersForInternalClass#OpenApiHelper.g.verified.cs Snapshot updated for new OpenAPI helper output/usings.
tests/AltaSoft.DomainPrimitives.Generator.Tests/Snapshots/DomainPrimitiveGeneratorTest.StringValue_GeneratesAllInterfacesAndConverters#OpenApiHelper.g.verified.cs Snapshot updated for new OpenAPI helper output/usings.
tests/AltaSoft.DomainPrimitives.Generator.Tests/Snapshots/DomainPrimitiveGeneratorTest.StringOfStringValue_GeneratesAllInterfacesAndConverters#OpenApiHelper.g.verified.cs Snapshot updated for new OpenAPI helper output/usings.
tests/AltaSoft.DomainPrimitives.Generator.Tests/Snapshots/DomainPrimitiveGeneratorTest.SByteValue_GeneratesAllInterfacesAndConverters#OpenApiHelper.g.verified.cs Snapshot updated for new OpenAPI helper output/usings.
tests/AltaSoft.DomainPrimitives.Generator.Tests/Snapshots/DomainPrimitiveGeneratorTest.LongValue_GeneratesAllInterfacesAndConverters#OpenApiHelper.g.verified.cs Snapshot updated for new OpenAPI helper output/usings.
tests/AltaSoft.DomainPrimitives.Generator.Tests/Snapshots/DomainPrimitiveGeneratorTest.IntValue_GeneratesAllInterfacesAndConverters#OpenApiHelper.g.verified.cs Snapshot updated for new OpenAPI helper output/usings.
tests/AltaSoft.DomainPrimitives.Generator.Tests/Snapshots/DomainPrimitiveGeneratorTest.IntOfIntValue_GeneratesAllInterfacesAndConverters#OpenApiHelper.g.verified.cs Snapshot updated for new OpenAPI helper output/usings.
tests/AltaSoft.DomainPrimitives.Generator.Tests/Snapshots/DomainPrimitiveGeneratorTest.Int16Value_GeneratesAllInterfacesAndConverters#OpenApiHelper.g.verified.cs Snapshot updated for new OpenAPI helper output/usings.
tests/AltaSoft.DomainPrimitives.Generator.Tests/Snapshots/DomainPrimitiveGeneratorTest.GuidValue_GeneratesAllInterfacesAndConverters#OpenApiHelper.g.verified.cs Snapshot updated for new OpenAPI helper output/usings.
tests/AltaSoft.DomainPrimitives.Generator.Tests/Snapshots/DomainPrimitiveGeneratorTest.FloatValue_GeneratesAllInterfacesAndConverters#OpenApiHelper.g.verified.cs Snapshot updated for new OpenAPI helper output/usings.
tests/AltaSoft.DomainPrimitives.Generator.Tests/Snapshots/DomainPrimitiveGeneratorTest.DoubleValue_GeneratesAllInterfacesAndConverters#OpenApiHelper.g.verified.cs Snapshot updated for new OpenAPI helper output/usings.
tests/AltaSoft.DomainPrimitives.Generator.Tests/Snapshots/DomainPrimitiveGeneratorTest.DomainPrimitiveWithoutTypeConverters_ShouldNotAddJsonConverter#OpenApiHelper.g.verified.cs Snapshot updated for new OpenAPI helper output/usings.
tests/AltaSoft.DomainPrimitives.Generator.Tests/Snapshots/DomainPrimitiveGeneratorTest.DomainPrimitiveWithoutJsonConverters_ShouldNotAddJsonConverter#OpenApiHelper.g.verified.cs Snapshot updated for new OpenAPI helper output/usings.
tests/AltaSoft.DomainPrimitives.Generator.Tests/Snapshots/DomainPrimitiveGeneratorTest.DecimalValue_GeneratesAllInterfacesAndConverters#OpenApiHelper.g.verified.cs Snapshot updated for new OpenAPI helper output/usings.
tests/AltaSoft.DomainPrimitives.Generator.Tests/Snapshots/DomainPrimitiveGeneratorTest.DateTimeValue_GeneratesAllInterfacesAndConverters#OpenApiHelper.g.verified.cs Snapshot updated for new OpenAPI helper output/usings.
tests/AltaSoft.DomainPrimitives.Generator.Tests/Snapshots/DomainPrimitiveGeneratorTest.DateTimeOffsetValue_GeneratesAllInterfacesAndConverters#OpenApiHelper.g.verified.cs Snapshot updated for new OpenAPI helper output/usings.
tests/AltaSoft.DomainPrimitives.Generator.Tests/Snapshots/DomainPrimitiveGeneratorTest.DateOnlyValue_GeneratesAllInterfacesAndConverters#OpenApiHelper.g.verified.cs Snapshot updated for new OpenAPI helper output/usings.
tests/AltaSoft.DomainPrimitives.Generator.Tests/Snapshots/DomainPrimitiveGeneratorTest.CustomTimeSpan_GeneratesAllInterfacesAndConvertersWithSerializationFormat#OpenApiHelper.g.verified.cs Snapshot updated for new OpenAPI helper output/usings.
tests/AltaSoft.DomainPrimitives.Generator.Tests/Snapshots/DomainPrimitiveGeneratorTest.CustomTimeOnly_GeneratesAllInterfacesAndConvertersWithSerializationFormat#OpenApiHelper.g.verified.cs Snapshot updated for new OpenAPI helper output/usings.
tests/AltaSoft.DomainPrimitives.Generator.Tests/Snapshots/DomainPrimitiveGeneratorTest.CustomDateTime_GeneratesAllInterfacesAndConvertersWithSerializationFormat#OpenApiHelper.g.verified.cs Snapshot updated for new OpenAPI helper output/usings.
tests/AltaSoft.DomainPrimitives.Generator.Tests/Snapshots/DomainPrimitiveGeneratorTest.CustomDateTimeOffset_GeneratesAllInterfacesAndConvertersWithSerializationFormat#OpenApiHelper.g.verified.cs Snapshot updated for new OpenAPI helper output/usings.
tests/AltaSoft.DomainPrimitives.Generator.Tests/Snapshots/DomainPrimitiveGeneratorTest.CustomDateOnly_GeneratesAllInterfacesAndConvertersWithSerializationFormat#OpenApiHelper.g.verified.cs Snapshot updated for new OpenAPI helper output/usings.
tests/AltaSoft.DomainPrimitives.Generator.Tests/Snapshots/DomainPrimitiveGeneratorTest.CharValue_GeneratesAllInterfacesAndConverters#OpenApiHelper.g.verified.cs Snapshot updated for new OpenAPI helper output/usings.
tests/AltaSoft.DomainPrimitives.Generator.Tests/Snapshots/DomainPrimitiveGeneratorTest.ByteValue_GeneratesAllInterfacesAndConverters#OpenApiHelper.g.verified.cs Snapshot updated for new OpenAPI helper output/usings.
tests/AltaSoft.DomainPrimitives.Generator.Tests/Snapshots/DomainPrimitiveGeneratorTest.BoolValue_GeneratesAllInterfacesAndConverters#OpenApiHelper.g.verified.cs Snapshot updated for new OpenAPI helper output/usings.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 39 out of 39 changed files in this pull request and generated 2 comments.

Comments suppressed due to low confidence (1)

src/AltaSoft.DomainPrimitives.Generator/Helpers/MethodGeneratorHelper.cs:35

  • AddOpenApiSchemas always adds System.Text.Json.Nodes to the generated usings list, but JsonValue is only emitted when an <example> XML doc node exists. This can generate CS8019 (unnecessary using) warnings for consumers. Consider only adding this using when at least one type has an example (or always emitting a JsonValue reference).
        var usings = types.ConvertAll(x => x.Namespace);
        usings.Add("Microsoft.OpenApi");
        usings.Add("System");
        usings.Add("System.Collections.Frozen");
        usings.Add("System.Collections.Generic");
        usings.Add("System.Text.Json.Nodes");
        usings.Add("AltaSoft.DomainPrimitives");

temonk and others added 2 commits February 25, 2026 10:42
…rHelper.cs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@temonk temonk merged commit e5a3a9b into main Feb 25, 2026
1 check passed
@temonk temonk deleted the feature/updateToSwashbuckle10 branch February 25, 2026 06:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants