Skip to content
This repository has been archived by the owner on Sep 16, 2024. It is now read-only.

Support for custom and forward function. #10

Merged
merged 5 commits into from
Jan 30, 2024

Conversation

ciscoheat
Copy link
Contributor

A small fix for supporting custom schemas, just a passthrough since they cannot be transformed to JSON schema.

@gcornut
Copy link
Owner

gcornut commented Jan 29, 2024

I'm thinking it might be better to add an option to ignore unsupported valibot validations. Some user might try to convert to JSON schema without even thinking of the fact they have custom validation that can't be converted.

@ciscoheat
Copy link
Contributor Author

ciscoheat commented Jan 29, 2024

Sounds good, should I add an option like that for only custom validations, or more general?

@gcornut
Copy link
Owner

gcornut commented Jan 29, 2024

I'd say an option to ignore all unknown validations (like ignoreUnknownValidation?: boolean).
That way it could be changed later with an array of string to specifically list the validations to ignore but I don't know if it is useful

@ciscoheat
Copy link
Contributor Author

Updated with that option now!

@gcornut gcornut merged commit 35f5bb5 into gcornut:main Jan 30, 2024
3 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants