From 1d8d996983e360ba27bf28356655b5e104e3cebd Mon Sep 17 00:00:00 2001 From: Graham Esau Date: Wed, 23 Oct 2019 22:34:40 +0100 Subject: [PATCH] v0.4.0 --- README.md | 68 +++++++++++++++++++------------------- schemars/Cargo.toml | 2 +- schemars_derive/Cargo.toml | 2 +- 3 files changed, 36 insertions(+), 36 deletions(-) diff --git a/README.md b/README.md index 3e73078..d58287a 100644 --- a/README.md +++ b/README.md @@ -40,28 +40,6 @@ fn main() { { "$schema": "http://json-schema.org/draft-07/schema#", "title": "MyStruct", - "definitions": { - "MyEnum": { - "anyOf": [ - { - "enum": [ - "Unit" - ] - }, - { - "type": "object", - "required": [ - "StringNewType" - ], - "properties": { - "StringNewType": { - "type": "string" - } - } - } - ] - } - }, "type": "object", "required": [ "my_bool", @@ -86,6 +64,28 @@ fn main() { } ] } + }, + "definitions": { + "MyEnum": { + "anyOf": [ + { + "enum": [ + "Unit" + ] + }, + { + "type": "object", + "required": [ + "StringNewType" + ], + "properties": { + "StringNewType": { + "type": "string" + } + } + } + ] + } } } ``` @@ -130,18 +130,6 @@ fn main() { { "$schema": "http://json-schema.org/draft-07/schema#", "title": "MyStruct", - "definitions": { - "MyEnum": { - "anyOf": [ - { - "type": "null" - }, - { - "type": "string" - } - ] - } - }, "type": "object", "required": [ "myBool", @@ -165,6 +153,18 @@ fn main() { "type": "integer", "format": "int32" } + }, + "definitions": { + "MyEnum": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + } } } ``` diff --git a/schemars/Cargo.toml b/schemars/Cargo.toml index 01580ad..c6e0c1b 100644 --- a/schemars/Cargo.toml +++ b/schemars/Cargo.toml @@ -2,7 +2,7 @@ name = "schemars" description = "Generate JSON Schemas from Rust code" repository = "https://github.com/GREsau/schemars" -version = "0.3.0" +version = "0.4.0" authors = ["Graham Esau "] edition = "2018" license = "MIT" diff --git a/schemars_derive/Cargo.toml b/schemars_derive/Cargo.toml index 5cc402c..c8e4721 100644 --- a/schemars_derive/Cargo.toml +++ b/schemars_derive/Cargo.toml @@ -2,7 +2,7 @@ name = "schemars_derive" description = "Macros for #[derive(JsonSchema)], for use with schemars" repository = "https://github.com/GREsau/schemars" -version = "0.3.0" +version = "0.4.0" authors = ["Graham Esau "] edition = "2018" license = "MIT"