Commit graph

104 commits

Author SHA1 Message Date
Graham Esau
b40c160ec2 Update code example in readme 2019-10-20 14:35:29 +01:00
Graham Esau
317c317e95 Make schema_for macro pattern stricter 2019-10-20 14:34:15 +01:00
Graham Esau
fb6bb85cb7 Remove JsonSchemaError/Result 2019-10-20 14:33:54 +01:00
Graham Esau
18c2d417e3 Fix schema generation for flatten Options 2019-10-19 21:03:34 +01:00
Graham Esau
5bf8b30753 Schema generation now never returns an error 2019-10-19 20:33:26 +01:00
Graham Esau
8880fb3961 v0.2.0 2019-10-14 20:19:27 +01:00
Graham Esau
2bc3957cb8 Set readOnly/writeOnly on properties 2019-10-14 20:00:57 +01:00
Graham Esau
68ddfa310f Add default, deprecated, readOnly, writeOnly properties 2019-10-13 23:01:48 +01:00
Graham Esau
f38f58d1e8 Move root schema definitions into Metadata 2019-10-13 22:42:34 +01:00
Graham Esau
c78d721fc5 Further reduce memory footprint of SchemaObject.
More fields are now wrapped in Option<Box<_>>, reducing size of JsonSchema (depending on system) from 424 to 240 bytes.
2019-10-13 22:38:20 +01:00
Graham Esau
72629a3c37 Reduce memory footprint of SchemaObject.
Nested validation structs are now wrapped in Option<Box<_>>, reducing size of JsonSchema (depending on system) from 688 to 424 bytes.
2019-10-13 20:42:29 +01:00
Graham Esau
5a82498e28 Change $ref to be part of a SchemaObject.
This allows other keyworlds to be used alongside $ref, as allowed in Json Schema 2019-09
2019-10-13 18:30:05 +01:00
Graham Esau
7d162a8fb5 Update syn/quote/proc-macro2 to 1.0 2019-10-12 12:56:51 +01:00
Graham Esau
505c369f27 Regenerate integration test expected json 2019-10-07 20:35:40 +01:00
Graham Esau
7e8f5b6785 v0.1.9 2019-10-06 20:38:19 +01:00
Graham Esau
9a202a34b8 v0.1.9 2019-10-06 20:36:52 +01:00
Graham Esau
a555d7739a Fix schemas for internally tagged newtype variants
Fixes #2
2019-10-06 20:22:27 +01:00
Graham Esau
01632b37fc Always enable syn extra-traits feature.
ExprPath's PartialEq implementation is required by schemars_derive
2019-10-06 17:15:59 +01:00
Graham Esau
f1f0ad5692 Add list of TODOs to readme 2019-09-15 21:27:38 +01:00
Graham Esau
8a507f38a1 Add example 2019-09-15 16:29:57 +01:00
Graham Esau
4962e1f731 Add example to readme 2019-09-15 16:07:23 +01:00
Graham Esau
13267d37d7 Simplify schema for Options 2019-09-14 22:44:05 +01:00
Graham Esau
d7a214526f Prevent possibility of infinite loop 2019-09-14 20:36:59 +01:00
Graham Esau
b9e9360b5c Refactor out some unneeded clones 2019-09-14 20:30:03 +01:00
Graham Esau
49b2d1f89d Add const 2019-09-14 18:54:07 +01:00
Graham Esau
00f79281db Refactor schema flattening 2019-09-14 18:17:19 +01:00
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
8d68e36f7c Add unit test for serde attribute processing 2019-09-08 23:13:26 +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
0304fefb61 v0.1.8 2019-09-08 14:52:54 +01:00
Graham Esau
e9e0526adc Implement JsonSchema for more deref types 2019-09-08 14:44:32 +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
7285dde99a Add tuple unit test 2019-09-07 23:45:40 +01:00
Graham Esau
3fcdc72662 Add unit tests for map JsonSchemas 2019-09-07 23:23:01 +01:00
Graham Esau
45e37a9c81 Add unit tests for Option schemas 2019-09-07 22:39:13 +01:00
Graham Esau
00148bdf57 Split JsonSchema implementations into separate files 2019-09-07 21:58:31 +01:00
Graham Esau
a68b105450 v0.1.7 2019-09-07 16:36: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
717e3baed9 Clippy fixes 2019-09-03 19:28:17 +01:00
Graham Esau
9938c498a0 Add workspace cargo.toml 2019-09-03 19:26:37 +01:00
Graham Esau
10ab02f167 Remove explicit lifetime from get_schema_object 2019-08-27 21:46:27 +01:00
Graham Esau
f45181aac3 0.1.6 - implement JsonSchema for unsized types 2019-08-11 17:58:07 +01:00
Graham Esau
6eba5df7b3 Fix schemars_derive dependency 2019-08-11 14:55:15 +01:00
Graham Esau
a00f488559 Make get_schema_object public 2019-08-11 14:46:03 +01:00
Graham Esau
870dc3a2de Rename MakeSchema to JsonSchema 2019-08-11 14:35:26 +01:00