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

noTypeless behavior when using anyof #36

Closed
bzuillsmith opened this issue Apr 23, 2014 · 2 comments
Closed

noTypeless behavior when using anyof #36

bzuillsmith opened this issue Apr 23, 2014 · 2 comments
Labels

Comments

@bzuillsmith
Copy link

I think this case should be valid, but currently throws an error. The current implementation only looks for type on the anyOf schemas and not the parent.

type: 'object',
properties: {
    'prop1': {...}
    'prop2': {...},
},
anyOf: [
    {
        required: ['prop1']
    },
    {
        required: ['prop2']
    }
]
@bzuillsmith bzuillsmith changed the title noTypeless behavior for when using anyof noTypeless behavior when using anyof Apr 23, 2014
zaggino added a commit that referenced this issue Apr 23, 2014
@zaggino
Copy link
Owner

zaggino commented Apr 23, 2014

npm + z-schema@2.4.7

should be fixed, please test / comment / close - thanks

@zaggino zaggino added bug and removed bug labels Apr 23, 2014
@bzuillsmith
Copy link
Author

Seems good. Thanks.

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

No branches or pull requests

2 participants