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

Validate throw error with additionalProperties: true #357

Open
ThibaudAV opened this issue Dec 22, 2021 · 1 comment
Open

Validate throw error with additionalProperties: true #357

ThibaudAV opened this issue Dec 22, 2021 · 1 comment

Comments

@ThibaudAV
Copy link

ThibaudAV commented Dec 22, 2021

If I set additionalProperties to true I get this error during validation:

Uncaught TypeError: Parameter 'url' must be a string, not function

If I understand correctly additionalProperties should never be true but only false | Schema .
In my case i need to init them to {} right ?

Source : #57 (comment)
Code :

var additionalProperties = schema.additionalProperties || {};

Types :
additionalProperties?: boolean | Schema

@awwright
Copy link
Collaborator

@ThibaudAV Can you please provide some example code with the expected and actual output?

As far as I know, the validator passes the relevant tests, but I need to see the exact context.

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

No branches or pull requests

2 participants