Commit Graph

168 Commits

Author SHA1 Message Date
Dmitry Dygalo 5feb0d2308 chore: Avoid usage of deprecated PyO3 traits 2022-05-12 16:51:51 +02:00
Dmitry Dygalo a5cd893363 chore: Update `fancy_regex` from `0.9.0` to `0.10.0` 2022-05-12 16:26:36 +02:00
Dmitry Dygalo fc779c8c39 chore: Update `pyo3` to `0.16` & drop Python 3.6 support 2022-05-12 15:53:43 +02:00
Dmitry Dygalo 7544f7a2af fix(python): Compatibility with `pyo3-built` 2022-05-03 17:57:14 +02:00
Dmitry Dygalo 6f4bc34d51 build: Add Python 3.10 2022-04-25 19:28:56 +02:00
Dmitry Dygalo 37955910cf refactor(test): Refactor Python tests 2022-04-25 19:28:56 +02:00
Dmitry Dygalo 4a07ba9a82
chore: Update to Rust 2021 edition in all crates 2022-04-10 23:31:34 +02:00
Dmitry Dygalo 7924d55af7 chore: Update pre-commit 2022-04-01 09:49:01 +02:00
Dmitry Dygalo 778b424b3d
chore(python): Release 0.14.0 2022-01-31 11:58:01 +01:00
Dmitry Dygalo 5f52908009
chore(rust): Release 0.15.0 2022-01-31 11:51:20 +01:00
Dmitry Dygalo 06148bcb3b
docs: Adjust changelogs 2022-01-31 11:38:36 +01:00
Ferenc Tamás b43b0e9eb1
feat: Custom Resolvers for external references (#246)
* feat: resolver

* chore: rustfmt

* chore: even more rustfmt

* chore: relax anyhow version requirement

* chore: restore url dependency requirement

* fix(resolver): jsonschema/src/resolver.rs typo

Co-authored-by: Dmitry Dygalo <Stranger6667@users.noreply.github.com>

* fix(resolver): python binding

* feat(resolver): include original ref string, docs

* feat(resolver): reqwest feature compile error

* chore(resolver): changelog

* fix(*): clippy

* fix(resolver): doctest example

* feat(resolver): reqwest feature compile error

* chore(resolver): changelog

* fix(*): clippy

* fix(resolver): doctest example
2022-01-31 11:33:17 +01:00
Dmitry Dygalo 872bd7617e
chore(python): Fix clippy warnings 2022-01-28 12:23:10 +01:00
Dmitry Dygalo 06d4e4a251
chore(python): Update `pyo3` to `0.15` 2022-01-28 12:16:52 +01:00
Dmitry Dygalo 99fdd4a812
chore(rust): Release 0.14.0 2022-01-23 17:28:36 +01:00
Dmitry Dygalo 1584d65365 chore: Bump `itoa` to `1.0`
Ref: #337
2022-01-23 17:24:22 +01:00
Dmitry Dygalo 347e01541b perf(python): Do not box iterator inside `ValidationErrorIter` 2021-12-12 21:40:02 +01:00
Dmitry Dygalo 2d061579c8
chore(rust): Release 0.13.3 2021-12-08 12:33:31 +01:00
Dmitry Dygalo 0aaff827b5
chore(python): Release 0.13.1
Signed-off-by: Dmitry Dygalo <dmitry@dygalo.dev>
2021-11-10 16:01:18 +01:00
Blayne Chard 0515c955a4
feat: convert python enum into raw values before validating (#317)
* feat: convert python enum into raw values before validating

* refactor: apply pull request comments
2021-11-09 20:49:04 +01:00
Dmitry Dygalo 527cf797cf
docs(python): Update benchmarks 2021-11-04 13:11:17 +01:00
Dmitry Dygalo 88156ada20
chore(python): Release 0.13.0
Signed-off-by: Dmitry Dygalo <dmitry@dygalo.dev>
2021-11-04 12:35:37 +01:00
Dmitry Dygalo 2ea835a442
chore(rust): Release 0.13.2
Signed-off-by: Dmitry Dygalo <dmitry@dygalo.dev>
2021-11-04 12:32:57 +01:00
Blayne Chard 9867b383a6 refactor: split list and tuple serialization 2021-11-04 12:29:45 +01:00
Blayne Chard b88262bb14 test: validate that named tuples error 2021-11-04 12:29:45 +01:00
Blayne Chard a4dc339635 refactor: expand tests around arrays and tuples 2021-11-04 12:29:45 +01:00
Blayne Chard 3ae1db54de refactor: convert tuple size to 0 2021-11-04 12:29:45 +01:00
Blayne Chard 045d4aaab5 refactor: avoid serialization logic duplication 2021-11-04 12:29:45 +01:00
Blayne Chard 734445856b fix: convert tuples into lists 2021-11-04 12:29:45 +01:00
Dmitry Dygalo 80c5af90c4
docs: Update support notes
Signed-off-by: Dmitry Dygalo <dmitry@dygalo.dev>
2021-10-29 17:53:44 +02:00
Dmitry Dygalo a95a754496 feat(python): A way to compile schemas from a string
Signed-off-by: Dmitry Dygalo <dmitry@dygalo.dev>
2021-10-29 17:50:43 +02:00
Dmitry Dygalo 8de1cb3400
fix(python): Wrong path to schemas in benchmarks
Signed-off-by: Dmitry Dygalo <dmitry@dygalo.dev>
2021-10-28 11:46:24 +02:00
Dmitry Dygalo 2ce396b29b
chore(rust): Release 0.13.1
Signed-off-by: Dmitry Dygalo <dmitry@dygalo.dev>
2021-10-28 11:17:27 +02:00
Dmitry Dygalo 63cdb32485
chore(rust): Release 0.13.0
Signed-off-by: Dmitry Dygalo <dmitry@dygalo.dev>
2021-10-28 09:41:27 +02:00
Dmitry Dygalo c5dd4f3a47 chore(python): Set proper __module__ attribute to JSONSchema
Signed-off-by: Dmitry Dygalo <dmitry@dygalo.dev>
2021-10-27 21:09:49 +02:00
Dmitry Dygalo 1388a74e74
docs: Adjust changelogs
Signed-off-by: Dmitry Dygalo <dmitry@dygalo.dev>
2021-10-27 20:49:17 +02:00
Blayne Chard 0430432957
feat(python): support iterating all errors with `iter_errors` (#296)
* feat(python): support iterating all errors with iter_errors

* docs: move changelog into the python changelog

* test: parameterise tests to validate both iter_errors functions

* refactor: fixup pr comments

* docs: remove excess line
2021-10-22 08:50:20 +02:00
Dmitry Dygalo 4992676eb5 chore: Update dependencies
Signed-off-by: Dmitry Dygalo <dmitry@dygalo.dev>
2021-10-21 11:45:28 +02:00
Dmitry Dygalo b0d0af1f0b
docs: Add a missing changelog entry
Signed-off-by: Dmitry Dygalo <dmitry@dygalo.dev>
2021-10-21 10:06:55 +02:00
Dmitry Dygalo 9f9cbe9d86
docs: Update changelog
Signed-off-by: Dmitry Dygalo <dadygalo@gmail.com>
2021-08-14 23:54:58 +02:00
Dmitry Dygalo 264b24e43d
chore(python): Release 0.12.1
Signed-off-by: Dmitry Dygalo <dadygalo@gmail.com>
2021-07-29 10:36:23 +02:00
Dmitry Dygalo c4cda8d501
chore(rust): Release 0.12.1
Signed-off-by: Dmitry Dygalo <dadygalo@gmail.com>
2021-07-29 10:33:40 +02:00
Dmitry Dygalo 6765d072fe fix: Panic on incomplete escape sequences in regex patterns
Signed-off-by: Dmitry Dygalo <dadygalo@gmail.com>
2021-07-29 10:30:36 +02:00
Dmitry Dygalo d7b69197a7 fix(python): Inaccurate schema path in validation error messages
Signed-off-by: Dmitry Dygalo <dadygalo@gmail.com>
2021-07-26 10:13:52 +02:00
Dmitry Dygalo 7d8364ec9c fix: Allow using empty arrays or arrays with non-unique elements for the `enum` keyword in schemas
Signed-off-by: Dmitry Dygalo <dadygalo@gmail.com>
2021-07-26 09:41:13 +02:00
Dmitry Dygalo f03a8f5f24
chore: Update Cargo.lock in Python bindings
Signed-off-by: Dmitry Dygalo <dadygalo@gmail.com>
2021-07-26 09:17:57 +02:00
Dmitry Dygalo 1d5f52bc24
chore(python): Release 0.12.0
Signed-off-by: Dmitry Dygalo <dadygalo@gmail.com>
2021-07-24 16:28:57 +02:00
Dmitry Dygalo b69482b312 chore: Pre-compute `JSONSchema` representation
Signed-off-by: Dmitry Dygalo <dadygalo@gmail.com>
2021-07-24 16:13:19 +02:00
Alex Good 11086926d0 refactor: update python bindings to remove JSONSchema lifetime 2021-07-24 15:32:06 +02:00
Dmitry Dygalo 28b71f64e3
perf: Minor optimizations
* perf: Use Box<str> in PathChunk
* perf: Create InstancePath once
* perf: Do not call to_string() when it is not needed
2021-07-15 08:35:09 +02:00
Dmitry Dygalo 76cfe5073f
docs(python): Update benchmark data
Signed-off-by: Dmitry Dygalo <dadygalo@gmail.com>
2021-07-07 08:51:33 +02:00
Dmitry Dygalo 3c342448e6
chore(python): Remove unused import
Signed-off-by: Dmitry Dygalo <dadygalo@gmail.com>
2021-07-06 18:41:40 +02:00
Dmitry Dygalo 7227728dcc
chore(python): Release 0.11.1
Signed-off-by: Dmitry Dygalo <dadygalo@gmail.com>
2021-07-06 14:44:03 +02:00
Dmitry Dygalo a773044d28 feat(python): Additional attributes for ValidationError
Signed-off-by: Dmitry Dygalo <dadygalo@gmail.com>
2021-07-06 14:40:09 +02:00
Dmitry Dygalo c3754cedf9
chore: Update PyO3 to 0.14.1
Signed-off-by: Dmitry Dygalo <dadygalo@gmail.com>
2021-07-05 14:34:53 +02:00
Dmitry Dygalo 442c05bd75
test(python): Properly wait for the test server
Signed-off-by: Dmitry Dygalo <dadygalo@gmail.com>
2021-06-30 13:49:24 +02:00
Dmitry Dygalo 767ba29466
chore(python): Update dependencies
Signed-off-by: Dmitry Dygalo <dadygalo@gmail.com>
2021-06-30 12:33:22 +02:00
Dmitry Dygalo acfeaa3faa
chore(python): Update dependencies 2021-06-20 09:59:44 +02:00
Dmitry Dygalo 36e77fed81
chore(python): Release 0.11.0 2021-06-19 17:19:35 +02:00
Dmitry Dygalo afc9677aba
docs: Update Python bindings changelog 2021-06-19 17:10:58 +02:00
DzikiChrzan 561f9cd2bd
feat: Report schema paths in validation errors
Ref: #199

Co-authored-by: ueco <ueco@libertymail.net>
Co-authored-by: Dmitry Dygalo <dadygalo@gmail.com>
2021-06-19 17:00:26 +02:00
Dmitry Dygalo a0a5be814b chore: Fix various clippy lints 2021-06-17 19:27:14 +02:00
Dmitry Dygalo a4acce7868
chore(python): Release 0.10.0 2021-06-17 15:33:42 +02:00
Dmitry Dygalo e7f59586cc
docs: Update Python changelog 2021-06-17 15:31:59 +02:00
Eden Yefet 5e65010387
feat: Use meta-schemas to validate input schemas 2021-06-17 15:04:29 +02:00
Dmitry Dygalo 1212e8893b
chore(python): Release 0.9.1 2021-06-17 13:37:09 +02:00
Dmitry Dygalo e24630567f fix: The `format` validator incorrectly rejecting supported regex patterns
Ref: #230
2021-06-17 13:02:36 +02:00
Dmitry Dygalo 26ff8d4880
chore(python): Release 0.9.0 2021-05-07 09:07:06 +02:00
Dmitry Dygalo 4620adb594
chore(docs): Add changelog entry 2021-05-07 08:41:40 +02:00
Dmitry Dygalo 38be11f6d4 chore: Remove unused `idna` dependency 2021-05-06 18:42:16 +02:00
Dmitry Dygalo 7df454703e fix: Extend the `email` format validation 2021-05-06 11:40:58 +02:00
Dmitry Dygalo 0aabba871d
chore(python): Release 0.8.0 2021-05-05 14:01:35 +02:00
Dmitry Dygalo 9acd43ce08
chore(python): Add overhead info to benchmarks data 2021-05-05 14:00:16 +02:00
Dmitry Dygalo 17acb7000f feat(python): Add instance path to error messages
Ref: #144
2021-05-05 13:37:54 +02:00
Dmitry Dygalo 12bea0de30 chore(docs): Add missing changelog entries 2021-05-05 13:37:54 +02:00
Dmitry Dygalo 249422e6e1 fix: Missing `array` type in error messages for `type` validators containing multiple values
Ref: #216
2021-05-05 12:52:23 +02:00
Dmitry Dygalo 2c399ac368 fix: Skipped validation on an unsupported regular expression in `patternProperties` 2021-05-04 17:25:40 +02:00
Dmitry Dygalo 8ba3e717a8
chore(python): Release 0.6.2 2021-05-03 15:15:31 +02:00
Dmitry Dygalo c996f8987d perf: Special handling for single-item `required` validators 2021-05-03 13:23:23 +02:00
Dmitry Dygalo 5eced3929b chore: Update `PyO3` to `0.13.x` 2021-05-03 11:02:12 +02:00
Dmitry Dygalo e3f1e62df1 chore: Resolve clippy lints 2021-05-03 11:02:12 +02:00
Dmitry Dygalo 33ba13115d
docs: Update benchmark data 2021-05-02 12:58:23 +02:00
Dmitry Dygalo 2b807f2364 perf: Use vectors instead of `AHashMap` if the number of properties is small 2021-05-01 20:48:35 +02:00
Dmitry Dygalo c3b901b093 perf: Shortcut in the `uniqueItems` validator for short arrays 2021-05-01 18:36:11 +02:00
Dmitry Dygalo b9f5ff242e perf: Reduce the number of `RwLock.read()` calls in `$ref` validators 2021-05-01 15:03:01 +02:00
Dmitry Dygalo c99064ceaf fix: Floating point overflow in the `multipleOf` validator 2021-04-30 21:32:04 +02:00
Dmitry Dygalo 1a1c6c3afb perf: Replace heap-allocated `InstancePath` with stack-only linked list 2021-04-30 13:09:31 +02:00
Dmitry Dygalo 867b515df1
chore(python): Add `jsonschema_rs.validate` to benchmarks 2021-04-28 10:01:54 +02:00
Dmitry Dygalo c0624a435b perf: Do not use `Cow` in `InstancePath`
This way it avoids copying the whole vec in `$ref` which leads to ~15% improvement the big schema benchmark and doesn't visibly affect other benchmarks
2021-04-26 13:01:19 +02:00
Dmitry Dygalo 68359b211f
docs(python): Update benchmark data 2021-04-24 09:00:54 +02:00
Dmitry Dygalo e9cc380f10 chore: Update Cargo.lock in Python bindings 2021-04-23 16:10:16 +02:00
Dmitry Dygalo b1580c90bb
docs(python): Remove not needed quote 2021-03-26 10:30:56 +01:00
Dmitry Dygalo c097860cf7
chore(python): Release 0.6.1 2021-03-26 10:10:31 +01:00
Dmitry Dygalo a4658ddde5 fix: Incorrect handling of strings that contain escaped character groups in `pattern` keywords 2021-03-26 09:58:10 +01:00
Dmitry Dygalo d41a922704 fix: Incorrect handling of `\w` and `\W` character groups in `pattern` keywords
Ref: #180
2021-03-26 09:00:26 +01:00
Dmitry Dygalo c496fa2d23
docs(python): Fix the mentioned `fastjsonschema` version
Note, that the benchmark was done with the new version
2021-02-03 15:56:48 +01:00
Dmitry Dygalo c8d7704866
chore(python): Release 0.6.0 2021-02-03 15:34:58 +01:00
Dmitry Dygalo cce4056946
chore: Revert "Update `PyO3` to `0.13`" 2021-02-03 15:34:30 +01:00
Dmitry Dygalo 4da2f0d2bb test(python): Bring the suite tests back 2021-02-03 13:46:24 +01:00
Dmitry Dygalo dee71c7c56 feat(python): Add `validate` shortcut 2021-02-03 12:30:50 +01:00