Adam H. Leventhal
98ad16288b
Internally tagged enums don't honor deny_unknown_fields as precisely as
...
they might.
flatten doesn't act quite as intended with regard to
additional_properties
2021-11-25 21:55:48 +00:00
Graham Esau
d549957183
Document new optional dependencies
2021-11-25 21:42:54 +00:00
timando
f0d2b1c50c
Add support for rust_decimal and bigdecimal ( #101 )
2021-11-25 21:42:25 +00:00
Graham Esau
3cac0e5048
Add example for optional dependency in readme
...
Based on https://github.com/GREsau/schemars/pull/118/files
2021-11-25 21:12:30 +00:00
Graham Esau
1a13ba9f9b
v0.8.7
2021-11-14 19:23:15 +00:00
Graham Esau
690fe44343
Allow non-Serialize default values.
...
Default values that don't implement Serialize are now ignored, rather than causing a compile error.
This is done by simulating specialization using a technique copied from Rocket:
5ebefa97c9/core/lib/src/sentinel.rs (L391-L445)
Fixes #115
2021-11-14 19:16:46 +00:00
Graham Esau
6f39a13724
Update examples after 0a1200b
2021-11-14 19:05:09 +00:00
Matt Campbell
d059686da8
Implement JsonSchema on EnumSet type
2021-10-10 18:49:34 +01:00
Graham Esau
515a87a564
Correct latest changelog entry
2021-09-26 18:43:53 +01:00
Graham Esau
33e54d3c42
v0.8.6
2021-09-26 18:39:11 +01:00
Adam Leventhal
0a1200baac
Use oneOf for enums when possible ( #108 )
2021-09-26 18:02:44 +01:00
Graham Esau
dec8bcc3b7
v0.8.5
2021-09-20 16:49:50 +01:00
Graham Esau
de7314f305
Allow empty #[validate] attributes.
...
Fixes #109
2021-09-20 16:48:16 +01:00
Graham Esau
00e482c3a1
v0.8.4
2021-09-19 10:43:29 +01:00
Graham Esau
7a8eeafde2
Add newline to attributes docs
2021-09-18 23:03:28 +01:00
Graham Esau
1d3541b4b1
Update changelog and docs
2021-09-18 23:00:14 +01:00
Graham Esau
cec8751c82
Merge pull request #78 from GREsau/validate
...
Read #[validate(...)] attributes
2021-09-18 21:25:15 +01:00
Graham Esau
63b3055e7b
Fix indexmap tests for rust 1.37
2021-09-17 23:53:46 +01:00
Graham Esau
605db3bba8
Emit compilation errors for duplicate validation attributes
2021-09-17 23:04:37 +01:00
Graham Esau
af69a8ea11
Fix doc test
2021-04-24 13:43:45 +01:00
Graham Esau
d99a96fc8a
Add some doc comments
2021-04-24 11:46:07 +01:00
Graham Esau
7914593d89
Allow setting validation attributes via #[schemars(...)]
2021-04-18 22:17:53 +01:00
Graham Esau
c013052f59
Support inline regex
2021-04-16 22:31:03 +01:00
Graham Esau
5f841f2e5c
Refactoring
2021-04-16 17:02:57 +01:00
Graham Esau
4be21bd811
Refactor out "local_id" for type definitions
2021-04-16 14:23:10 +01:00
Graham Esau
9e507272da
Process validation attributes in tuple structs
2021-04-16 13:56:26 +01:00
Graham Esau
31a5893d10
Process validation attributes in newtype structs
2021-04-16 12:30:52 +01:00
Graham Esau
60a9869448
Refactor out add_schema_as_property
2021-04-16 10:42:03 +01:00
Graham Esau
1a2dafc1a5
Handle required flattened Option fields
2021-04-15 18:11:28 +01:00
Graham Esau
b68132f17d
Merge branch 'master' into validate
2021-04-15 16:08:10 +01:00
Graham Esau
55b860428e
Refactory of private functions
2021-04-15 13:34:04 +01:00
Graham Esau
5dc644000c
Allow schema_with attr on enum variants
2021-04-10 15:16:16 +01:00
Graham Esau
2d38db903a
Only process "crate" from schemars attr, not serde attr
2021-04-10 14:48:39 +01:00
Graham Esau
6d174a2efb
Add "crate" to attribute docs ToC
2021-04-05 21:21:26 +01:00
Graham Esau
86e2844c93
v0.8.3
2021-04-05 21:12:23 +01:00
Graham Esau
b4a6aeb51b
Update changelog
2021-04-05 21:08:26 +01:00
Graham Esau
9e2ba85772
Also implement JsonSchema for BytesMut
2021-04-05 21:02:49 +01:00
Daniel Hahne
0e3938798f
Support Bytes ( #68 )
2021-04-05 21:02:32 +01:00
Graham Esau
9c68e080d6
Remove extraneous "and" from tuple schema names
2021-04-05 20:47:03 +01:00
Graham Esau
b2b733ba5c
Support for #[schemars(crate = "...")] ( #80 )
2021-04-05 19:34:28 +01:00
Graham Esau
ebd7ff32ce
More fixes for deriving JsonSchema inside macro
2021-04-05 16:40:20 +01:00
Graham Esau
4d3400152e
Fix deriving JsonSchema inside macro ( #79 )
2021-04-05 16:15:34 +01:00
Graham Esau
6ab567f3a5
Read #[validate(...)] attributes
2021-03-29 16:38:55 +01:00
Graham Esau
dada8582ee
Fix rustc 1.37 build
2021-03-27 10:34:39 +00:00
Graham Esau
29dc025629
Clippy fixes
2021-03-27 00:45:06 +00:00
Graham Esau
61d64df57d
v0.8.2
2021-03-27 00:04:07 +00:00
Graham Esau
4c238605be
Update changelog
2021-03-26 23:07:01 +00:00
Graham Esau
ce4946afc1
Remove unnecessary macro usage
2021-03-26 23:00:20 +00:00
Alastair Feille
f0836d4415
Implement JsonSchema on Url
2021-03-26 23:00:20 +00:00
Graham Esau
3a2b425998
Make docs examples a tiny bit prettier
2021-03-25 22:56:25 +00:00