-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Show deprecation warning for OpenAPI analyzers #49915
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this 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 |
There was a problem hiding this comment.
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.
#nullable disable | |
#nullable enable |
Copilot uses AI. Check for mistakes.
/backport to release/10.0.1xx-preview7 |
Started backporting to release/10.0.1xx-preview7: https://github.com/dotnet/sdk/actions/runs/16482466464 |
Closes dotnet/aspnetcore#62689.