Commit graph

27 commits

Author SHA1 Message Date
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
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
2d38db903a Only process "crate" from schemars attr, not serde attr 2021-04-10 14:48:39 +01:00
Graham Esau
b2b733ba5c
Support for #[schemars(crate = "...")] (#80) 2021-04-05 19:34:28 +01:00
Graham Esau
6ab567f3a5 Read #[validate(...)] attributes 2021-03-29 16:38:55 +01:00
Graham Esau
11d95b79e5
Derive JsonSchema_repr (#76) 2021-03-25 22:36:28 +00:00
Graham Esau
3a7d7ad905 Apply some clippy suggestions 2021-03-19 23:20:16 +00:00
Graham Esau
0c02525fb9 Trim leading asterisks from doc block comments
This is to handle a change in behaviour in current beta rustc
2020-09-21 09:55:31 +01:00
Graham Esau
b0a2f9994b Error on unknown schemars attr items 2020-06-04 19:39:57 +01:00
Graham Esau
e259955809 Attribute for defining examples (#23) 2020-05-17 16:41:19 +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
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
3fd316063a schema_with attribute 2020-05-15 17:11:28 +01:00
Graham Esau
780c7286a6 Refactor attribute parsing to make it more extensible 2020-05-12 21:17:34 +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
11b7a09c93 Enable deriving JsonSchema on adjacent tagged enums
Issue #4
2020-04-30 14:21:04 +01: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
781f40b061 Improve schema naming for deriving on remote types 2019-12-27 15:37:59 +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