Commit Graph

114 Commits

Author SHA1 Message Date
Dmitry Dygalo 46e7ff7ddf feat: FFI-based Python bindings 2020-06-09 17:47:49 +02:00
Dmitry Dygalo abcfc2ad2a
chore: Fix typo 2020-06-08 23:05:17 +02:00
Dmitry Dygalo 0317d67040
docs: Clarify compiler version in the docs 2020-06-08 23:03:29 +02:00
Dmitry Dygalo 9946e03eb8
docs: Update performance comparison 2020-06-08 22:50:54 +02:00
Dmitry Dygalo a9585c252b
chore: Release 0.3.0 2020-06-08 00:01:56 +02:00
Dmitry Dygalo 290a1f2325
docs: Document panic behavior of `is_valid` 2020-06-07 23:47:58 +02:00
Samuele Maci 00b33c9e12 perf: Explicitly implement Validate::(is_valid|validate) to better handle performances if the type dispatching has not been done yet 2020-06-07 14:32:30 +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
Samuele Maci 8be3f0b246 chore: Move Validate into dedicated module 2020-06-07 14:32:30 +02:00
Dmitry Dygalo 1970732d59 feat: Implement "Default" for "Draft" 2020-06-05 16:22:39 +02:00
Dmitry Dygalo 29c2dab3aa
Create CODE_OF_CONDUCT.md 2020-06-02 10:54:06 +02:00
Dmitry Dygalo f169c8e527 fix: Precision loss in `minimum`, `maximum`, `exclusiveMinimum` and `exclusiveMaximum` validators 2020-05-29 10:45:06 +02:00
Dmitry Dygalo 093ea199ea chore: Add various lints & fixes 2020-05-26 23:49:01 +02:00
Dmitry Dygalo 2220a83ebb chore: Add missing "Debug" implementations for public items 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 146aa51a62 perf: Replace in validators with 2020-05-26 09:11:14 +02:00
Dmitry Dygalo a7a67bcfb2
docs: Remove not needed link 2020-05-26 07:38:17 +02:00
Dmitry Dygalo 9436323bb6 docs: Add changelog 2020-05-26 07:36:56 +02:00
Dmitry Dygalo c4ae971be7 docs: Add link & badge for docs 2020-05-26 07:36:56 +02:00
Samuele Maci 9767a9f921 feat: Create perf-helpers subproject to help in running code profiling 2020-05-25 11:17:44 +02:00
Samuele Maci 26fe165100 style: A rust library should not pin exact versions but rather specify bounds 2020-05-24 01:34:13 +02:00
Dmitry Dygalo 8bb1c34584 chore: Avoid needless pass by value 2020-05-23 21:36:55 +02:00
Dmitry Dygalo 65e333ee4b chore: Update test suite 2020-05-23 21:36:55 +02:00
Samuele Maci 1f7f0f7cff feat: Allow github to run benchmarks if [bench] is present in the commit message
Update benchmark names to allow easier filtering and focusing on type of action (ie. check benches only of the lib or for comparison with other libs)
2020-05-23 20:23:56 +02:00
Dmitry Dygalo 41fb1ac9ea chore: Use `to_string` instead of `format!` 2020-05-23 19:10:43 +02:00
Samuele Maci b309ab5b9a perf: $ref validator compiles validators only once and not at every validation request 2020-05-23 15:45:47 +02:00
Dmitry Dygalo 5e7367bb51 chore: Cargo fmt & clippy 2020-05-23 14:32:03 +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
Leonardo Schwarz 9a4f79af98 chore: Convert gitmodule to https
Otherwise, when adding the repository as a git dependency to a Rust
project one can get cargo errors like:

```
error: failed to get `jsonschema` as a dependency of package `jsonschema-validator v0.1.0 (/home/leo/Projekte/jsonschema-validator)`

Caused by:
  failed to load source for dependency `jsonschema`

Caused by:
  Unable to update https://github.com/leoschwarz/jsonschema-rs?branch=v0.2.0-disable_tls

Caused by:
  failed to update submodule `tests/suite`

Caused by:
  failed to fetch submodule `tests/suite` from git@github.com:json-schema-org/JSON-Schema-Test-Suite.git

Caused by:
  failed to authenticate when downloading repository
attempted ssh-agent authentication, but none of the usernames `git` succeeded
```
2020-05-22 21:27:52 +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 3f787abb2b chore: Improve debug representation of validators 2020-05-21 12:24:46 +02:00
Dmitry Dygalo 415d1fd353
chore: Match on `keyword` first to avoid match on `Draft` for common keywords 2020-05-20 20:24:15 +02:00
Dmitry Dygalo 8dd3dbf304 chore: Disable unknown lint 2020-05-20 18:33:18 +02:00
Dmitry Dygalo afeae6c851 chore: Remove redundant lifetimes 2020-05-20 18:33:18 +02:00
Dmitry Dygalo f712fba72d chore: Add `integer_arithmetic` lint and clarify why it is not possible in the code 2020-05-20 18:33:18 +02:00
Dmitry Dygalo dfe290e7b9 fix: Avoid unwrap in `one_of`
It also improves performance for `validate` for ~15%
2020-05-20 18:33:18 +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 cb5f3bafec chore: Simplify `match` 2020-05-20 18:33:18 +02:00
Dmitry Dygalo 3d4c374937 chore: Enable `print_stdout` lint 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 8f71dc40e2 chore: Remove needless borrows 2020-05-20 18:33:18 +02:00
Dmitry Dygalo fe5ae33492 chore: Fix markdown syntax 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 f1747cb8b6 chore: Remove unnecessary closure 2020-05-20 18:33:18 +02:00
Dmitry Dygalo 987e59e3a0 chore: Remove explicit `iter` loop 2020-05-20 18:33:18 +02:00
Dmitry Dygalo 0fc9eb6c41 perf: Replace `FormatValidator` with simple structs 2020-05-20 15:10:09 +02:00