Commit graph

268 commits

Author SHA1 Message Date
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
f47bb24ddf Fix error in doc comment (copy-paste fail!) 2020-05-16 12:25:05 +01:00
Graham Esau
e7cae04beb Update docs and changelog 2020-05-16 12:21:09 +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
4c501990b1 Document schema_with attribute 2020-05-15 17:42:37 +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
1e17c46803 Minor restyling of attribute docs 2020-04-30 15:34:00 +01:00
Graham Esau
08f7fa44a7 Update docs for v0.7.2 2020-04-30 14:36:21 +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
0920fe8fd7 Fix rustc 1.32 build 2020-04-11 22:12:22 +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
d1f2c0f803 Update changelog 2020-04-09 17:33:55 +01:00
Graham Esau
5021204dfb Add examples schema keyword 2020-04-09 17:03:27 +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
d7c9222330 Refactor apply_metadata() to remove clone 2020-02-29 19:57:34 +00:00
Graham Esau
39918ba06c Update examples 2020-02-29 19:57:18 +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
60284fdf93 Ensure json files are have LF line-endings.
"Expected" schema json files are generated by serde_json with LF line-endings, even on windows. Ensure that Git checks them out with LF line-endings to match
2020-02-26 19:17:14 +00:00
Graham Esau
a92638146a Ensure schema.json files are have LF line-endings.
The files are generated by serde_json with LF line-endings, even on windows. Ensure that Git checks them out with LF line-endings to match
2020-02-22 14:07:17 +00:00
Graham Esau
6bebd73701 Add test for allow_ref_siblings behaviour 2019-12-29 22:30:17 +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
1605a8a34d Small refactor 2019-12-29 18:45:55 +00:00
Graham Esau
0198ede4b6 Add JSON Schema 2019-09 settings 2019-12-29 18:05:10 +00:00
Graham Esau
233b1a4165 Add private field to SchemaSettings to prevent struct initialization.
This means future additions to SchemaSettings will not be breaking changes.
2019-12-29 14:45:23 +00:00
Graham Esau
1963b5c715 v0.6.5 2019-12-29 00:30:36 +00:00
Graham Esau
ec0a01b82b Update optional dependencies docs 2019-12-29 00:28:54 +00:00
Graham Esau
c46873ffb9 Run more CI tests on rust 1.32 2019-12-28 20:43:14 +00:00
Graham Esau
84baf51eb8 Disable github actions CI fail-fast 2019-12-28 20:34:08 +00:00
Graham Esau
d5e035d2cf Do not run tests with --all-features on rust 1.32 2019-12-28 20:31:35 +00:00
Graham Esau
a97d54bcad Implement JsonSchema on smallvec + arrayvec types
Documentation still needs updating.
2019-12-28 20:11:38 +00:00
Graham Esau
aec4824425 Add example for handling custom serialization 2019-12-28 16:45:00 +00:00
Graham Esau
79155cddf5 Add doc comments example 2019-12-28 15:38:41 +00:00
Graham Esau
51a0966ec1 v0.6.4 2019-12-27 22:43:14 +00:00