Commit graph

111 commits

Author SHA1 Message Date
Graham Esau
37f0e4bc71 v0.8.0-alpha-4 2020-06-12 21:38:21 +01:00
Graham Esau
ca7c66eb08 v0.8.0-alpha-3 2020-06-12 20:43:16 +01:00
Graham Esau
260cd99293 v0.8.0-alpha-2 2020-06-07 22:33:57 +01:00
Graham Esau
b0a2f9994b Error on unknown schemars attr items 2020-06-04 19:39:57 +01:00
Graham Esau
4b37f96c99 v0.7.6 2020-05-17 18:35:03 +01:00
Graham Esau
be6cd1080d Allow unused braces in macro output.
Fixes warnings in beta/nightly rustc
2020-05-17 17:22:42 +01:00
Graham Esau
e259955809 Attribute for defining examples (#23) 2020-05-17 16:41:19 +01:00
Graham Esau
19b9bef395 v0.7.5 2020-05-17 13:46:09 +01:00
Graham Esau
75419fa3d5 Fix rustc 1.32 build 2020-05-17 11:27:11 +01:00
Graham Esau
1b42dc7e3e Allow overriding title/desc from doc comments (#13) 2020-05-17 11:19:48 +01:00
Graham Esau
5a28cef598 Respect #[serde(transparent)] attribute (#17) 2020-05-16 21:16:59 +01:00
Graham Esau
509a1c3b7b Check for #[deprecated] attributes 2020-05-16 16:44:44 +01:00
Graham Esau
bb8c93ddc1 v0.7.4 2020-05-16 12:27:56 +01:00
Graham Esau
bfb3f06253 Avoid setting ObjectValidation unnecessarily 2020-05-16 12:10:54 +01:00
Denis Kurilov
1190b1fad9
additionalProperties: false for struct annotated with serde deny_unknown_fields (#30)
Co-authored-by: Denis Kurilov <denis@routinghub.com>
2020-05-16 12:02:47 +01:00
Graham Esau
ea351f3b42 Set type on enum schemas (#28) 2020-05-16 10:41:30 +01:00
Graham Esau
f4c8e7d4d3 v0.7.3 2020-05-15 17:55:28 +01:00
Graham Esau
3fd316063a schema_with attribute 2020-05-15 17:11:28 +01:00
Graham Esau
9d951b34ce Fix rustc 1.32 build 2020-05-12 21:19:43 +01:00
Graham Esau
780c7286a6 Refactor attribute parsing to make it more extensible 2020-05-12 21:17:34 +01:00
Graham Esau
b1ded882b7 More refactoring of proc macro... 2020-05-11 21:53:36 +01:00
Graham Esau
631120ead8 Fix rustc 1.32 build 2020-05-10 22:16:17 +01:00
Graham Esau
70b5a1a2e6 Refactor of AST parsing 2020-05-10 22:09:15 +01:00
Graham Esau
08886799bb Respect with attributes on enum variants 2020-05-10 17:17:04 +01:00
Graham Esau
60b1b27157 v0.7.2 2020-04-30 14:28:18 +01:00
Graham Esau
11b7a09c93 Enable deriving JsonSchema on adjacent tagged enums
Issue #4
2020-04-30 14:21:04 +01:00
Graham Esau
8207892fa6 v0.7.1 2020-04-11 22:17:30 +01:00
Graham Esau
63af0ceb73 Fix skip_serializing_if/serialize_with handling
Previously whenever a field with a default value has both `skip_serializing_if` and `with`/`serialize_with` attributes, the value would be converted to a type that performs the custom serialization before checking if it should be serialized. This would cause the wrong type to be given to the skip_serializing_if function, causing a compile error.

Issue #26
2020-04-11 22:06:48 +01:00
Graham Esau
726860cb8e v0.7.0 2020-03-24 18:58:41 +00:00
Atsuki Takahashi
873ab3ae02
Specify full path for String (#19) 2020-03-24 18:05:37 +00:00
Graham Esau
3e1ab76c21 Parse types as syn::Type, not syn::ExprPath.
#[schemars(with= "()")] should now work!
2020-02-29 23:36:39 +00:00
Graham Esau
c76ea691c7 v0.7.0-alpha-2 2020-02-29 19:39:16 +00:00
Graham Esau
4ad5000232
Make Option<T> fields optional in generated schemas (#16) 2020-02-29 19:37:20 +00:00
Graham Esau
58cc7fac25 Run cargo fmt 2019-12-29 22:09:54 +00:00
Graham Esau
98f981634c v0.7.0-alpha-1 2019-12-29 21:53:10 +00:00
Graham Esau
1963b5c715 v0.6.5 2019-12-29 00:30:36 +00:00
Graham Esau
51a0966ec1 v0.6.4 2019-12-27 22:43:14 +00:00
Graham Esau
4b9578ec2b v0.6.3 2019-12-27 18:49:25 +00:00
Graham Esau
c9d1f34243 v0.6.2 2019-12-27 18:29:48 +00:00
Graham Esau
40f459603a Add link to website 2019-12-27 16:47:50 +00:00
Graham Esau
781f40b061 Improve schema naming for deriving on remote types 2019-12-27 15:37:59 +00:00
Graham Esau
d30238c981 Do not pass container attributes through enums/variants
When deriving JsonSchema over a struct-style enum variant, do not apply the enum's container attributes to the variant. This couldn't cause any problems in practice because the only container attribute we explicitly set is "default", which cannot be set on an enum.
2019-12-23 20:50:26 +00:00
Graham Esau
b5e1821f3a Don't include "doc" in list of helper attributes 2019-12-09 21:56:19 +00:00
Graham Esau
e151d21d6d v0.6.1
Fix a compile error that can occur when deriving `JsonSchema` from a project that doesn't reference serde_json
2019-12-09 21:25:37 +00:00
Graham Esau
351ff1572a v0.6.0 2019-12-09 21:06:44 +00:00
Graham Esau
3fb625e08c Refactoring of schemars_derive 2019-12-09 20:57:38 +00:00
Graham Esau
dca9e2d920 Pass fewer attributes to serde_derive_internals 2019-12-09 18:43:43 +00:00
Graham Esau
e4d69f89e7 v0.6.0-alpha-2 2019-12-09 13:07:39 +00:00
Graham Esau
26c4099bbe Do not serialize schema default if it would be skipped by skip_serializing_if attribute 2019-12-09 12:34:28 +00:00
Graham Esau
8301a38b8f v0.6.0-alpha 2019-12-09 11:44:00 +00:00