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

in apiParser, expectedObject allow for 'or' notation #132

Open
gardenofwine opened this issue Jan 2, 2013 · 0 comments
Open

in apiParser, expectedObject allow for 'or' notation #132

gardenofwine opened this issue Jan 2, 2013 · 0 comments

Comments

@gardenofwine
Copy link
Owner

a result from the server can return a complex json structure which can have different set of fields for each separate request. The validateObject function in utils.js doesn't know how to cope with a situation like that.

An example is the bill api.
This bill request:
http://www.oknesset.org/api/bill/7171/?callback=Ext.util.JSONP.callback
is a gov_proposa and not a knesset_proposal, so the validateObject function returns:
"bill not valid. Failed match for 'proposals'. Failed match for 'knesset_proposal'. Failed match for 'explanation'. Failed match for undefined. object of type 'undefined' doesn't match any of the expected types 'string'"

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

No branches or pull requests

1 participant