Skip to content
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

feat: Support custom metadata property #63

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

alphaho
Copy link

@alphaho alphaho commented Feb 2, 2025

Try to solve #34 with a generic metadata property in the Constraint class, while keeping the backward compatibility as much as possible by defining type aliases for Contraint/Validatable. But haven't made the type alias for Runner's subclasses yet.

On the ktor integration, it still uses the default metadata type, as the Exception class can not be generic. It may need some more work to make it accept different types for metadata if we want.

@nesk Do you think it's a good idea to add the metadata support like this? Or there's something else in your mind?
If you think it's the right way to do, I can carry on and refine the PR further.

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.

1 participant