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

Coercion support for JTD #2328

Open
joshmossas opened this issue Sep 19, 2023 · 0 comments
Open

Coercion support for JTD #2328

joshmossas opened this issue Sep 19, 2023 · 0 comments

Comments

@joshmossas
Copy link

What version of Ajv you are you using?

v8.12.0

What problem do you want to solve?

Currently AJV doesn't support the coerceTypes option when using JSON type definitions. When you import from ajv/dist/jdt and try to pass coerceTypes to the constructor you get a "not assignable to undefined" type error.

image

What do you think is the correct solution to problem?

I think it would be good to implement support for this since it is already supported when using JSON schemas. A simple use case is coercing the values from url query parameters.

Will you be able to implement it?

Probably not.

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

No branches or pull requests

2 participants
@joshmossas and others