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

add unknown => empty mapping in JTDSchemaType #1455

Merged
merged 1 commit into from
Feb 23, 2021

Conversation

erikbrinkman
Copy link
Collaborator

What issue does this pull request resolve?
Makes sure that unknown types can be validated with an empty schema

What changes did you make?
Added the above change, and also some tests, notably a test that shows that typescript doesn't error when specifying the discriminator again in the schema (although I'm not sure why). And a test of a recursive schema.

Is there anything that requires more attention while reviewing?
should be pretty straightforward

@epoberezkin epoberezkin merged commit ec68e7b into ajv-validator:master Feb 23, 2021
@epoberezkin
Copy link
Member

I had to revert it - I added JTDSchemaType to compile/validate type signatures and some minimal test for it, but this PR fails type inference in another place - here - see this error. Need to look into it later or maybe you can...

Also, strangely "compile" works without explicit JSONSchemaType annotation (see here) but JTDSchemaType required explicit type annotation (see here) - any idea why?

@epoberezkin
Copy link
Member

cc @erikbrinkman ^^

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

Successfully merging this pull request may close these issues.

2 participants