Commit Graph

25 Commits

Author SHA1 Message Date
Dmitry Dygalo 46e7ff7ddf feat: FFI-based Python bindings 2020-06-09 17:47:49 +02:00
Samuele Maci 6b7bb314d3 perf: Create type specific Const validators 2020-06-07 14:32:30 +02:00
Samuele Maci 12478a738e chore: Update Validate trait to provide type specific methods in order to avoid multiple conversions for the same object 2020-06-07 14:32:30 +02:00
Dmitry Dygalo 093ea199ea chore: Add various lints & fixes 2020-05-26 23:49:01 +02:00
Dmitry Dygalo 5a9ee34003 docs: Document public entities & add a lint for it 2020-05-26 19:03:15 +02:00
Dmitry Dygalo 41fb1ac9ea chore: Use `to_string` instead of `format!` 2020-05-23 19:10:43 +02:00
Samuele Maci 52b033c4d1 perf: Use bitmap to validate multiple types
Bitmaps allow lower memory footprint and faster checks as we remove vec iterations during validation
2020-05-22 22:01:27 +02:00
Samuele Maci 97b45d86ea chore: Move PrimitiveType into dedicated module 2020-05-22 22:01:27 +02:00
Dmitry Dygalo 4cf7d8d4ed fix: Handle errors instead of `unwrap` 2020-05-21 15:01:41 +02:00
Dmitry Dygalo cfc40f10fd fix: Possible truncation & panic in `maxItems`, `maxLength`, `maxProperties`, `minItems`, `minLength` and `minProperties` validator 2020-05-21 13:53:03 +02:00
Dmitry Dygalo 6dcfb06dcd chore: Use `expect` instead of `unwrap` for known to be valid cases 2020-05-20 18:33:18 +02:00
Dmitry Dygalo 0e6d42ea34 chore: Add missing more `#[inline]` where it positively affects performance 2020-05-20 18:33:18 +02:00
Dmitry Dygalo af6480b53f chore: Remove redundant pub(crate) 2020-05-20 18:33:18 +02:00
Dmitry Dygalo a5207f6ab3 chore: Simplify `match` on items with the same body 2020-05-20 18:33:18 +02:00
Dmitry Dygalo 476bba983d perf: Use static string in format validator 2020-05-20 15:10:09 +02:00
Dmitry Dygalo ea0d88c1fe test: Add more tests 2020-05-18 13:15:09 +02:00
Dmitry Dygalo a7d2e39054 chore: Elide explicit lifetime 2020-05-17 15:59:24 +02:00
Samuele Maci 45e5c7b9d4 chore: Use std::borrow::CoW to reduce number of serde_json::Value copies 2020-05-17 14:36:58 +02:00
Samuele Maci 1e3a7a55e2 chore: Update ValidationError to include 'instance' and update ValidationErrorKind to only have the informations related to the type of validation error
The objective of this change is to decouple as much as possible the ValidationErrorKind from the JSON instance that caused the ValidationError.
This is beneficial because we might ensure that ValidationError does actually store a reference of the instance causing the error and so preventing needless copies
2020-05-17 14:36:58 +02:00
Dmitry Dygalo 05dc119175
chore: Make `ErrorIterator` `Sync` and `Send` 2020-03-29 22:38:23 +02:00
Dmitry Dygalo a4f3c93244
chore: Implement `Error` and `Display` for `CompilationError` 2020-03-29 22:37:55 +02:00
Dmitry Dygalo 6e429a38f7
chore: Improve error messages 2020-03-29 21:28:39 +02:00
Dmitry Dygalo c75e591a82
refactor: Implement `is_valid` for `format` validator 2020-03-29 13:31:56 +02:00
Dmitry Dygalo 1fbc8d6831
feat: Error iterator 2020-03-29 10:47:09 +02:00
dmitry.dygalo 17d7fd5cb5
Initial commit 2020-03-25 18:04:54 +01:00