-
Notifications
You must be signed in to change notification settings - Fork 10.3k
Move unified validation APIs to separate package #62071
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
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: captainsafia <[email protected]>
Co-authored-by: captainsafia <[email protected]>
@copilot Remove the type-forwards and delete the old versions of the code that you moved. |
Co-authored-by: captainsafia <[email protected]>
I've removed all type forwards and deleted the original validation code files as requested in commit 93c627c. This included:
Projects that previously referenced these validation types will now need to reference the new Microsoft.Extensions.Validation package directly. |
@copilot Can you fix these build errors?
|
Co-authored-by: captainsafia <[email protected]>
... Fixed the build errors by running Warning Firewall rules blocked me from connecting to one or more addressesI tried to connect to the following addresses, but was blocked by firewall rules:If you need me to access, download, or install something from one of these locations, you can either:
|
This PR moves the validation APIs from the Http.Abstractions package to a new
Microsoft.Extensions.Validation
package to support using the unified resolver APIs in more scenarios.The changes include:
Created new directory structure:
src/Validation/src
for the core librarysrc/Validation/test/Microsoft.Extensions.Validation.Tests
for testssrc/Validation/gen
for the source generatorsrc/Validation/test/Microsoft.Extensions.Validation.ValidationsGenerator.Tests
for generator testsMoved validation source files and updated namespaces:
Microsoft.AspNetCore.Http.Validation
toMicrosoft.Extensions.Validation
Added type forwarders to maintain backward compatibility:
Created appropriately structured project files with dependencies
Updated project references and configuration
This change supports better modularity by decoupling validation logic from the HTTP abstractions, allowing it to be used more broadly in other scenarios while maintaining backward compatibility.
Fixes #62070.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.