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 'allow_unknown' option for nested fields #74

Closed
wants to merge 3 commits into from

Conversation

otibsa
Copy link
Contributor

@otibsa otibsa commented Mar 20, 2015

I would like to have nested fields with arbitrary keys:

document = {
    'field1': {
        'nested1': 'foo'
        'arbitrary1': 'bar',
        'arbitrary2': 42
    }
}

schema = {
    'field1': {
        'type': 'dict',
        'allow_unknown': True,
        'schema': {
            'nested1': {'type': 'string'}
    }
}

allow_unknown can also be something like {'type': 'string'}.

@otibsa
Copy link
Contributor Author

otibsa commented Mar 20, 2015

Ah.. by adding "schema" to special_rules, i might have killed some stuff in validate_schema(...), including #73

working on it

@nicolaiarocci
Copy link
Member

Rebased and merged: f084f84

Thanks.

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

Successfully merging this pull request may close these issues.

2 participants