Skip to content

Conversation

@captainsafia
Copy link
Member

Copilot AI review requested due to automatic review settings July 23, 2025 16:41
@captainsafia captainsafia requested a review from vijayrkn as a code owner July 23, 2025 16:41
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

This PR implements a deprecation warning for the OpenAPI analyzers feature in ASP.NET Core projects. The change adds a warning message (ASPDEPR007) that displays when the IncludeOpenAPIAnalyzers property is set to true, indicating that this feature and its associated MVC API analyzers will be removed in a future release.

  • Adds MSBuild target to emit deprecation warning when IncludeOpenAPIAnalyzers is enabled
  • Includes comprehensive test coverage for various scenarios (property not set, false, and true across multiple target frameworks)

Reviewed Changes

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

File Description
src/WebSdk/Web/Targets/Sdk.Server.targets Adds MSBuild target that emits ASPDEPR007 warning when IncludeOpenAPIAnalyzers is true
test/Microsoft.NET.Sdk.Web.Tests/DeprecationTests.cs New test class with comprehensive coverage for deprecation warning scenarios

// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

#nullable disable
Copy link

Copilot AI Jul 23, 2025

Choose a reason for hiding this comment

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

[nitpick] Consider enabling nullable reference types instead of disabling them globally. This would improve type safety and align with modern C# practices.

Suggested change
#nullable disable
#nullable enable

Copilot uses AI. Check for mistakes.
@captainsafia captainsafia merged commit 72226a6 into main Jul 23, 2025
28 checks passed
@captainsafia captainsafia deleted the safia/obsolete-api-analyzers branch July 23, 2025 21:43
@captainsafia
Copy link
Member Author

/backport to release/10.0.1xx-preview7

@github-actions
Copy link
Contributor

Started backporting to release/10.0.1xx-preview7: https://github.com/dotnet/sdk/actions/runs/16482466464

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.

Obsolete Mvc.Api.Analyzers shipped in the framework

4 participants