From f5463567b9fd58b1bf6715ace4dfad0ff845de93 Mon Sep 17 00:00:00 2001 From: Bart Koelman <10324372+bkoelman@users.noreply.github.com> Date: Sat, 26 Apr 2025 23:47:32 +0200 Subject: [PATCH] Remove Experimental attribute from AddOpenApiForJsonApi, now that preview packages are deployed on NuGet --- src/Examples/JsonApiDotNetCoreExample/Program.cs | 2 -- .../ServiceCollectionExtensions.cs | 2 -- test/OpenApiTests/OpenApiStartup.cs | 3 --- 3 files changed, 7 deletions(-) diff --git a/src/Examples/JsonApiDotNetCoreExample/Program.cs b/src/Examples/JsonApiDotNetCoreExample/Program.cs index d2677ea781..56448b271e 100644 --- a/src/Examples/JsonApiDotNetCoreExample/Program.cs +++ b/src/Examples/JsonApiDotNetCoreExample/Program.cs @@ -79,9 +79,7 @@ static void ConfigureServices(WebApplicationBuilder builder) using (CodeTimingSessionManager.Current.Measure("AddOpenApiForJsonApi()")) { -#pragma warning disable JADNC_OA_001 // Type is for evaluation purposes only and is subject to change or removal in future updates. Suppress this diagnostic to proceed. builder.Services.AddOpenApiForJsonApi(options => options.DocumentFilter()); -#pragma warning restore JADNC_OA_001 // Type is for evaluation purposes only and is subject to change or removal in future updates. Suppress this diagnostic to proceed. } } diff --git a/src/JsonApiDotNetCore.OpenApi.Swashbuckle/ServiceCollectionExtensions.cs b/src/JsonApiDotNetCore.OpenApi.Swashbuckle/ServiceCollectionExtensions.cs index df5247d9de..3b421c31db 100644 --- a/src/JsonApiDotNetCore.OpenApi.Swashbuckle/ServiceCollectionExtensions.cs +++ b/src/JsonApiDotNetCore.OpenApi.Swashbuckle/ServiceCollectionExtensions.cs @@ -1,4 +1,3 @@ -using System.Diagnostics.CodeAnalysis; using JsonApiDotNetCore.Configuration; using JsonApiDotNetCore.Middleware; using JsonApiDotNetCore.OpenApi.Swashbuckle.JsonApiMetadata; @@ -21,7 +20,6 @@ public static class ServiceCollectionExtensions /// /// Configures OpenAPI for JsonApiDotNetCore using Swashbuckle. /// - [Experimental("JADNC_OA_001", UrlFormat = "https://github.com/json-api-dotnet/JsonApiDotNetCore/blob/master/docs/usage/openapi.md")] public static void AddOpenApiForJsonApi(this IServiceCollection services, Action? configureSwaggerGenOptions = null) { ArgumentNullException.ThrowIfNull(services); diff --git a/test/OpenApiTests/OpenApiStartup.cs b/test/OpenApiTests/OpenApiStartup.cs index ba0a5256ca..e8ee0fdb20 100644 --- a/test/OpenApiTests/OpenApiStartup.cs +++ b/test/OpenApiTests/OpenApiStartup.cs @@ -14,10 +14,7 @@ public class OpenApiStartup : TestableStartup public override void ConfigureServices(IServiceCollection services) { base.ConfigureServices(services); - -#pragma warning disable JADNC_OA_001 // Type is for evaluation purposes only and is subject to change or removal in future updates. Suppress this diagnostic to proceed. services.AddOpenApiForJsonApi(SetupSwaggerGenAction); -#pragma warning restore JADNC_OA_001 // Type is for evaluation purposes only and is subject to change or removal in future updates. Suppress this diagnostic to proceed. } protected override void SetJsonApiOptions(JsonApiOptions options)