@@ -7,7 +7,7 @@ use serde_json::json;
77
88// Enum definitions
99
10- /// A very simple enum with empty variants
10+ /// A very simple enum with unit variants
1111#[ derive( Serialize , Deserialize , Debug , Clone , JsonSchema ) ]
1212enum NormalEnum {
1313 /// First variant
@@ -31,7 +31,10 @@ pub enum NormalEnumWithoutDescriptions {
3131/// A complex enum with unit and struct variants
3232#[ derive( Serialize , Deserialize , Debug , Clone , JsonSchema ) ]
3333enum ComplexEnum {
34+ /// Override documentation on the Normal variant
3435 Normal ( NormalEnum ) ,
36+
37+ /// Documentation on the Hardcore variant
3538 Hardcore {
3639 hard : String ,
3740 core : NormalEnum ,
@@ -43,7 +46,7 @@ enum ComplexEnum {
4346#[ derive( Serialize , Deserialize , Debug , Clone , JsonSchema ) ]
4447#[ serde( untagged) ]
4548enum UntaggedEnum {
46- /// Used in case the `one` field of tpye [`u32`] is present
49+ /// Used in case the `one` field of type [`u32`] is present
4750 A { one : String } ,
4851 /// Used in case the `two` field of type [`NormalEnum`] is present
4952 B { two : NormalEnum } ,
@@ -192,7 +195,7 @@ fn normal_enum() {
192195 "spec" : {
193196 "properties" : {
194197 "foo" : {
195- "description" : "A very simple enum with empty variants" ,
198+ "description" : "A very simple enum with unit variants" ,
196199 "enum" : [
197200 "C" ,
198201 "D" ,
@@ -258,7 +261,7 @@ fn optional_enum() {
258261 "spec" : {
259262 "properties" : {
260263 "foo" : {
261- "description" : "A very simple enum with empty variants" ,
264+ "description" : "A very simple enum with unit variants" ,
262265 "enum" : [
263266 "C" ,
264267 "D" ,
@@ -482,7 +485,7 @@ fn untagged_enum() {
482485 "type" : "string"
483486 } ,
484487 "two" : {
485- "description" : "A very simple enum with empty variants" ,
488+ "description" : "A very simple enum with unit variants" ,
486489 "enum" : [
487490 "C" ,
488491 "D" ,
@@ -571,7 +574,7 @@ fn optional_untagged_enum() {
571574 "type" : "string"
572575 } ,
573576 "two" : {
574- "description" : "A very simple enum with empty variants" ,
577+ "description" : "A very simple enum with unit variants" ,
575578 "enum" : [
576579 "C" ,
577580 "D" ,
@@ -656,7 +659,7 @@ fn flattened_untagged_enum() {
656659 "type" : "string"
657660 } ,
658661 "two" : {
659- "description" : "A very simple enum with empty variants" ,
662+ "description" : "A very simple enum with unit variants" ,
660663 "enum" : [
661664 "C" ,
662665 "D" ,
0 commit comments