Commit graph

162 commits

Author SHA1 Message Date
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
Graham Esau
58e169b866 0.1.3 2019-08-10 00:41:48 +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
936fb8c96e Fix schema generation for complex enum variants 2019-08-08 22:45:21 +01:00
Graham Esau
94250fa037 Rename SchemaRef to Ref 2019-08-08 22:00:15 +01:00
Graham Esau
87b56f2a77 Add package info to Cargo.toml 2019-08-08 19:00:48 +01:00
Graham Esau
cf661afa13 Add package info to Cargo.toml 2019-08-08 18:50:41 +01:00
Graham Esau
8afce08c54 Slightly abstract away map/set types 2019-08-08 18:43: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
48465b51cf Refactor nullable schema generation 2019-08-06 07:48:44 +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
1f514f2be7 Add some config for openapi3 compatibility 2019-08-05 23:30:53 +01:00
Graham Esau
ef5c584118 Add schema_for macro 2019-08-05 21:20:16 +01:00
Graham Esau
463ba518b6 Refactor subschema generation 2019-08-05 21:05:31 +01:00
Graham Esau
4a9fdd3334 Support untagged enums 2019-08-05 20:40:06 +01:00
Graham Esau
c552e6d208 Change some derived traits in model structs 2019-08-05 20:05:31 +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
Graham Esau
076cf423c3
Fix error in map schema generation 2019-08-05 14:30:44 +01:00
Graham Esau
d79f0f56b0 Schema now implements MakeSchema 2019-08-05 13:16:06 +01:00
Graham Esau
d90a29f3f8 Struct-like enum variants work! 2019-08-04 22:52:03 +01:00
Graham Esau
8b034f4dd8 Tuple enums 2019-08-04 22:45:05 +01:00
Graham Esau
3be97a7da4 Handle newtype enum variants 2019-08-04 22:28:33 +01:00
Graham Esau
d628f7c162 Refactoring derive macros 2019-08-04 21:35:01 +01:00
Graham Esau
38c8b2d911 Tuples! 2019-08-04 20:43:02 +01:00
Graham Esau
d1a319c5f2 Generate schemas for simple enums 2019-08-04 19:49:41 +01:00
Graham Esau
48d6cda0b8 Use serde internals to determine property names 2019-08-04 18:43:20 +01:00
Graham Esau
2592fa388f Fix loop termination condition in make_unique_name 2019-08-04 16:55:59 +01:00
Graham Esau
e01c47da88 Merge branch 'master' of https://github.com/GREsau/schemars 2019-08-04 16:50:31 +01:00
Graham Esau
28403e8eaf
Initial commit 2019-08-04 16:48:29 +01:00
Graham Esau
5228ec65e5 Allow deriving MakeSchema on simple structs! 2019-08-04 16:44:09 +01:00
Graham Esau
fcb9d5d1c0 Derive PartialEq on Schema structs 2019-08-04 13:48:16 +01:00
Graham Esau
cbbc883038 Change generates_ref_schema default to true 2019-08-04 13:42:22 +01:00