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

Seemingly no way to utilise the Validator class' stack mechanism #20

Open
ScottA38 opened this issue Jan 10, 2020 · 1 comment
Open

Comments

@ScottA38
Copy link
Contributor

Obviously due to the lack of private members in Python I could hack my way around this but there doesn't seem to be an intended public method to push schemas and json data onto the Validator class stack.

Unless I have missed something it would be nice to be able to manually push many to stack and validate the each element in batch.
Perhaps Validator.validate_toplevel() should just just validate the end of the current schema & object stack then pop those items off

Current keys:
JSON_TYPE_MAP __class__ __delattr__ __dict__ __dir__ __doc__ __eq__ __format__ __ge__ __getattribute__ __gt__ __hash__ __init__ __init_subclass__ __le__ __lt__ __module__ __ne__ __new__ __reduce__ __reduce_ex__ __repr__ __setattr__ __sizeof__ __str__ __subclasshook__ __weakref__ _get_object_expression _get_schema_expression _object _pop_object _pop_schema _push_additional_property_schema _push_array_item_object _push_array_schema _push_object _push_property_object _push_property_schema _push_schema _report_error _report_unsupported _schema _validate _validate_additional_properties _validate_enum _validate_format _validate_items _validate_length _validate_pattern _validate_properties _validate_range _validate_requires _validate_type validate validate_toplevel
Happy to have a go at this and make a pull request

@zyga
Copy link
Owner

zyga commented Jan 16, 2020

I honestly don't remember how this code used to work. I will need to look before giving an answer.

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