Commit graph

179 commits

Author SHA1 Message Date
Graham Esau
88a8e0a706 Add strongly-typed validation fields 2019-09-12 22:49:38 +01:00
Graham Esau
5de6bcfdef Exclude skipped fields/variants from json schema 2019-09-12 19:07:25 +01:00
Graham Esau
709ba7b62e Enable eriving JsonSchema when fields are in remote crates 2019-09-12 18:02:37 +01:00
Graham Esau
af1fa5fe9e Do not ignore all serde attributes if there are also schemars attributes 2019-09-08 22:46:18 +01:00
Graham Esau
6cf9343657 Set format property on integers 2019-09-08 14:20:57 +01:00
Graham Esau
a236d7aee0 Implement JsonSchema for chrono types
Requires chrono feature.
2019-09-08 13:29:45 +01:00
Graham Esau
3f5f7cf0a3 Enable deriving JsonSchema for unit/newtype/tuple structs 2019-09-07 16:36:12 +01:00
Graham Esau
07f4f68a02 Add tests for tuple enum variants 2019-09-07 15:25:06 +01:00
Graham Esau
c2e8389e93 Fix Option<T> schema generation sometimes producing a schema that is not referenced 2019-09-03 19:47:39 +01:00
Graham Esau
f45181aac3 0.1.6 - implement JsonSchema for unsized types 2019-08-11 17:58:07 +01:00
Graham Esau
870dc3a2de Rename MakeSchema to JsonSchema 2019-08-11 14:35:26 +01:00
Graham Esau
a3076dde63 Internally tagged enums 2019-08-10 00:41:04 +01:00
Graham Esau
b0ae29094e Add enum tests 2019-08-10 00:09:40 +01:00
Graham Esau
94250fa037 Rename SchemaRef to Ref 2019-08-08 22:00:15 +01:00
Graham Esau
998e6c9f0f Set "required" schema attribute 2019-08-08 18:34:47 +01:00
Graham Esau
6b64cedb91 Process #[schemars] attributes 2019-08-08 08:24:30 +01:00
Graham Esau
1d0fd18c9e Enable renaming schemas using attribute on struct 2019-08-07 23:03:54 +01:00
Graham Esau
67d44533d6 Reorganise tests 2019-08-07 19:27:32 +01:00
Graham Esau
d14db450cf Test for default name of struct with type params 2019-08-07 13:32:44 +01:00
Graham Esau
54cfd2ba0e Support #[serde(flatten)]ed structs 2019-08-07 08:19:43 +01:00
Graham Esau
bd750714a0 Fix up schema naming - nightly no longer required! 2019-08-06 23:06:22 +01:00
Graham Esau
51ed13218c Allow making a schema to fail by returning an Err 2019-08-06 20:56:04 +01:00
Graham Esau
2aa1835240 Add test for flattened structs (currently ignored) 2019-08-06 18:57:36 +01:00
Graham Esau
933eb1ac40 Use pretty_assertions in tests 2019-08-06 08:55:25 +01:00
Graham Esau
70c8d0f763 Add test for openapi3-compatible schema generation 2019-08-06 08:42:43 +01:00
Graham Esau
650c434c1a Ensure all schema types are set to nullable when appropriate 2019-08-06 00:52:06 +01:00
Graham Esau
ef5c584118 Add schema_for macro 2019-08-05 21:20:16 +01:00
Graham Esau
4a9fdd3334 Support untagged enums 2019-08-05 20:40:06 +01:00
Graham Esau
fc346da692 Add test for schema generation.This test will frequently fail as new features/fixes are implemented - but at least it gives an easy way of visualising changes! 2019-08-05 18:58:28 +01:00