Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Unknown keys in object properties #1245

Closed
miladezzat opened this issue Jul 16, 2020 · 3 comments
Closed

Unknown keys in object properties #1245

miladezzat opened this issue Jul 16, 2020 · 3 comments

Comments

@miladezzat
Copy link

I want to create schema for object with unknown keys

    let obj = {
           "unknownkey1":{from: 'any', to:'any'},
           "unknownkey2":{from: 'any', to:'any'},
           "unknownkey3":{from: 'any', to:'any'},
    }
@miladezzat
Copy link
Author

@epoberezkin

@epoberezkin
Copy link
Member

Please review JSON schema docs - you can do it with additionalProperties, patternProperties or propertyNames - probably additionalProperties in your case.

@miladezzat
Copy link
Author

THanks @epoberezkin

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

No branches or pull requests

2 participants