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

Disable reportTypeError to enable users to implement their own coercion rule #2363

Open
wdavidw opened this issue Jan 2, 2024 · 1 comment

Comments

@wdavidw
Copy link

wdavidw commented Jan 2, 2024

I manage to implement my own coercion rules. The values are correctly coerced. However, I have to define in the schema all the types that may be coerced or an error is thrown by reportTypeError. Here is how I format the error in Nikita:

Error: NIKITA_SCHEMA_VALIDATION_CONFIG: one error was found in the configuration of root action: #/definitions/config/properties/from_string/type config/from_string must be number, type is ["number"].

Please provide us a way to disable calling reportTypeError. For information, this issue has bugged me (and my libraries) for years and is related to issue #1437.

@wdavidw wdavidw changed the title Disable reportTypeError to enable user to implme Disable reportTypeError to enable users to implement their own coercion rule Jan 2, 2024
@jasoniangreen
Copy link
Collaborator

Can you provide a code sample, if possible in runkit?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

3 participants
@wdavidw @jasoniangreen and others