Skip to content

[WIP] Implement runtime-based IValidatableTypeInfoResolver implementation #62041

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

Closed
wants to merge 1 commit into from

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented May 21, 2025

  • Create the new RuntimeValidatableTypeInfoResolver class in src/Http/Http.Abstractions/src/Validation/RuntimeValidatableTypeInfoResolver.cs
    • Implement type validation with caching
    • Handle recursive type discovery with cycle detection
    • Create internal RuntimeValidatableTypeInfo and RuntimeValidatablePropertyInfo classes
    • Support property validation attributes
    • Support nullable reference types and required attributes
    • Handle enumerable types
  • Update the validation service registration in ValidationServiceCollectionExtensions.cs
  • Create unit tests for the new resolver in src/Http/Http.Extensions/test/
    • Test simple POCO classes with validation attributes
    • Test complex nested types with validation
    • Test collection types validation
    • Test handling of cyclic references
    • Test validation integration with real validator
  • Run all tests to ensure existing functionality works

Fixes #61220.


💡 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.

@captainsafia
Copy link
Member

@copilot It looks like I hit a rate limit the last time I tried to request you. Can you start working on this again?

Copilot finished work on behalf of captainsafia May 21, 2025 16:33
@captainsafia
Copy link
Member

I was hoping that Copilot could handle this fairly "boring" task of mapping an implementation that used static analysis to an implementation that used dynamic analysis but it looks like the task is too large for the session limitations enforced by Copilot. :/

@dotnet-policy-service dotnet-policy-service bot added this to the 10.0-preview6 milestone May 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement runtime-based IValidatableTypeInfoResolver implementation
2 participants