Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
87 changes: 0 additions & 87 deletions cargo-typify/tests/outputs/attr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,6 @@ pub mod error {
}
}
#[doc = "`Fruit`"]
#[doc = r""]
#[doc = r" <details><summary>JSON schema</summary>"]
#[doc = r""]
#[doc = r" ```json"]
#[doc = "{"]
#[doc = " \"type\": \"object\","]
#[doc = " \"additionalProperties\": {"]
#[doc = " \"type\": \"string\""]
#[doc = " }"]
#[doc = "}"]
#[doc = r" ```"]
#[doc = r" </details>"]
#[extra_attr]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(transparent)]
Expand Down Expand Up @@ -69,32 +57,6 @@ impl ::std::convert::From<::std::collections::HashMap<::std::string::String, ::s
}
}
#[doc = "`FruitOrVeg`"]
#[doc = r""]
#[doc = r" <details><summary>JSON schema</summary>"]
#[doc = r""]
#[doc = r" ```json"]
#[doc = "{"]
#[doc = " \"oneOf\": ["]
#[doc = " {"]
#[doc = " \"title\": \"veg\","]
#[doc = " \"anyOf\": ["]
#[doc = " {"]
#[doc = " \"$ref\": \"#/defs/veggie\""]
#[doc = " }"]
#[doc = " ]"]
#[doc = " },"]
#[doc = " {"]
#[doc = " \"title\": \"fruit\","]
#[doc = " \"anyOf\": ["]
#[doc = " {"]
#[doc = " \"$ref\": \"#/defs/fruit\""]
#[doc = " }"]
#[doc = " ]"]
#[doc = " }"]
#[doc = " ]"]
#[doc = "}"]
#[doc = r" ```"]
#[doc = r" </details>"]
#[extra_attr]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
Expand All @@ -113,29 +75,6 @@ impl ::std::convert::From<Fruit> for FruitOrVeg {
}
}
#[doc = "`Veggie`"]
#[doc = r""]
#[doc = r" <details><summary>JSON schema</summary>"]
#[doc = r""]
#[doc = r" ```json"]
#[doc = "{"]
#[doc = " \"type\": \"object\","]
#[doc = " \"required\": ["]
#[doc = " \"veggieLike\","]
#[doc = " \"veggieName\""]
#[doc = " ],"]
#[doc = " \"properties\": {"]
#[doc = " \"veggieLike\": {"]
#[doc = " \"description\": \"Do I like this vegetable?\","]
#[doc = " \"type\": \"boolean\""]
#[doc = " },"]
#[doc = " \"veggieName\": {"]
#[doc = " \"description\": \"The name of the vegetable.\","]
#[doc = " \"type\": \"string\""]
#[doc = " }"]
#[doc = " }"]
#[doc = "}"]
#[doc = r" ```"]
#[doc = r" </details>"]
#[extra_attr]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
pub struct Veggie {
Expand All @@ -147,32 +86,6 @@ pub struct Veggie {
pub veggie_name: ::std::string::String,
}
#[doc = "A representation of a person, company, organization, or place"]
#[doc = r""]
#[doc = r" <details><summary>JSON schema</summary>"]
#[doc = r""]
#[doc = r" ```json"]
#[doc = "{"]
#[doc = " \"$id\": \"https://example.com/arrays.schema.json\","]
#[doc = " \"title\": \"veggies\","]
#[doc = " \"description\": \"A representation of a person, company, organization, or place\","]
#[doc = " \"type\": \"object\","]
#[doc = " \"properties\": {"]
#[doc = " \"fruits\": {"]
#[doc = " \"type\": \"array\","]
#[doc = " \"items\": {"]
#[doc = " \"type\": \"string\""]
#[doc = " }"]
#[doc = " },"]
#[doc = " \"vegetables\": {"]
#[doc = " \"type\": \"array\","]
#[doc = " \"items\": {"]
#[doc = " \"$ref\": \"#/$defs/veggie\""]
#[doc = " }"]
#[doc = " }"]
#[doc = " }"]
#[doc = "}"]
#[doc = r" ```"]
#[doc = r" </details>"]
#[extra_attr]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, Default)]
pub struct Veggies {
Expand Down
87 changes: 0 additions & 87 deletions cargo-typify/tests/outputs/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,6 @@ pub mod error {
}
}
#[doc = "`Fruit`"]
#[doc = r""]
#[doc = r" <details><summary>JSON schema</summary>"]
#[doc = r""]
#[doc = r" ```json"]
#[doc = "{"]
#[doc = " \"type\": \"object\","]
#[doc = " \"additionalProperties\": {"]
#[doc = " \"type\": \"string\""]
#[doc = " }"]
#[doc = "}"]
#[doc = r" ```"]
#[doc = r" </details>"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(transparent)]
pub struct Fruit(pub ::std::collections::HashMap<::std::string::String, ::std::string::String>);
Expand All @@ -68,32 +56,6 @@ impl ::std::convert::From<::std::collections::HashMap<::std::string::String, ::s
}
}
#[doc = "`FruitOrVeg`"]
#[doc = r""]
#[doc = r" <details><summary>JSON schema</summary>"]
#[doc = r""]
#[doc = r" ```json"]
#[doc = "{"]
#[doc = " \"oneOf\": ["]
#[doc = " {"]
#[doc = " \"title\": \"veg\","]
#[doc = " \"anyOf\": ["]
#[doc = " {"]
#[doc = " \"$ref\": \"#/defs/veggie\""]
#[doc = " }"]
#[doc = " ]"]
#[doc = " },"]
#[doc = " {"]
#[doc = " \"title\": \"fruit\","]
#[doc = " \"anyOf\": ["]
#[doc = " {"]
#[doc = " \"$ref\": \"#/defs/fruit\""]
#[doc = " }"]
#[doc = " ]"]
#[doc = " }"]
#[doc = " ]"]
#[doc = "}"]
#[doc = r" ```"]
#[doc = r" </details>"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum FruitOrVeg {
Expand All @@ -111,29 +73,6 @@ impl ::std::convert::From<Fruit> for FruitOrVeg {
}
}
#[doc = "`Veggie`"]
#[doc = r""]
#[doc = r" <details><summary>JSON schema</summary>"]
#[doc = r""]
#[doc = r" ```json"]
#[doc = "{"]
#[doc = " \"type\": \"object\","]
#[doc = " \"required\": ["]
#[doc = " \"veggieLike\","]
#[doc = " \"veggieName\""]
#[doc = " ],"]
#[doc = " \"properties\": {"]
#[doc = " \"veggieLike\": {"]
#[doc = " \"description\": \"Do I like this vegetable?\","]
#[doc = " \"type\": \"boolean\""]
#[doc = " },"]
#[doc = " \"veggieName\": {"]
#[doc = " \"description\": \"The name of the vegetable.\","]
#[doc = " \"type\": \"string\""]
#[doc = " }"]
#[doc = " }"]
#[doc = "}"]
#[doc = r" ```"]
#[doc = r" </details>"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
pub struct Veggie {
#[doc = "Do I like this vegetable?"]
Expand All @@ -149,32 +88,6 @@ impl Veggie {
}
}
#[doc = "A representation of a person, company, organization, or place"]
#[doc = r""]
#[doc = r" <details><summary>JSON schema</summary>"]
#[doc = r""]
#[doc = r" ```json"]
#[doc = "{"]
#[doc = " \"$id\": \"https://example.com/arrays.schema.json\","]
#[doc = " \"title\": \"veggies\","]
#[doc = " \"description\": \"A representation of a person, company, organization, or place\","]
#[doc = " \"type\": \"object\","]
#[doc = " \"properties\": {"]
#[doc = " \"fruits\": {"]
#[doc = " \"type\": \"array\","]
#[doc = " \"items\": {"]
#[doc = " \"type\": \"string\""]
#[doc = " }"]
#[doc = " },"]
#[doc = " \"vegetables\": {"]
#[doc = " \"type\": \"array\","]
#[doc = " \"items\": {"]
#[doc = " \"$ref\": \"#/$defs/veggie\""]
#[doc = " }"]
#[doc = " }"]
#[doc = " }"]
#[doc = "}"]
#[doc = r" ```"]
#[doc = r" </details>"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, Default)]
pub struct Veggies {
#[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
Expand Down
87 changes: 0 additions & 87 deletions cargo-typify/tests/outputs/custom_btree_map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,6 @@ pub mod error {
}
}
#[doc = "`Fruit`"]
#[doc = r""]
#[doc = r" <details><summary>JSON schema</summary>"]
#[doc = r""]
#[doc = r" ```json"]
#[doc = "{"]
#[doc = " \"type\": \"object\","]
#[doc = " \"additionalProperties\": {"]
#[doc = " \"type\": \"string\""]
#[doc = " }"]
#[doc = "}"]
#[doc = r" ```"]
#[doc = r" </details>"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(transparent)]
pub struct Fruit(pub ::std::collections::BTreeMap<::std::string::String, ::std::string::String>);
Expand Down Expand Up @@ -69,32 +57,6 @@ impl
}
}
#[doc = "`FruitOrVeg`"]
#[doc = r""]
#[doc = r" <details><summary>JSON schema</summary>"]
#[doc = r""]
#[doc = r" ```json"]
#[doc = "{"]
#[doc = " \"oneOf\": ["]
#[doc = " {"]
#[doc = " \"title\": \"veg\","]
#[doc = " \"anyOf\": ["]
#[doc = " {"]
#[doc = " \"$ref\": \"#/defs/veggie\""]
#[doc = " }"]
#[doc = " ]"]
#[doc = " },"]
#[doc = " {"]
#[doc = " \"title\": \"fruit\","]
#[doc = " \"anyOf\": ["]
#[doc = " {"]
#[doc = " \"$ref\": \"#/defs/fruit\""]
#[doc = " }"]
#[doc = " ]"]
#[doc = " }"]
#[doc = " ]"]
#[doc = "}"]
#[doc = r" ```"]
#[doc = r" </details>"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum FruitOrVeg {
Expand All @@ -112,29 +74,6 @@ impl ::std::convert::From<Fruit> for FruitOrVeg {
}
}
#[doc = "`Veggie`"]
#[doc = r""]
#[doc = r" <details><summary>JSON schema</summary>"]
#[doc = r""]
#[doc = r" ```json"]
#[doc = "{"]
#[doc = " \"type\": \"object\","]
#[doc = " \"required\": ["]
#[doc = " \"veggieLike\","]
#[doc = " \"veggieName\""]
#[doc = " ],"]
#[doc = " \"properties\": {"]
#[doc = " \"veggieLike\": {"]
#[doc = " \"description\": \"Do I like this vegetable?\","]
#[doc = " \"type\": \"boolean\""]
#[doc = " },"]
#[doc = " \"veggieName\": {"]
#[doc = " \"description\": \"The name of the vegetable.\","]
#[doc = " \"type\": \"string\""]
#[doc = " }"]
#[doc = " }"]
#[doc = "}"]
#[doc = r" ```"]
#[doc = r" </details>"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
pub struct Veggie {
#[doc = "Do I like this vegetable?"]
Expand All @@ -150,32 +89,6 @@ impl Veggie {
}
}
#[doc = "A representation of a person, company, organization, or place"]
#[doc = r""]
#[doc = r" <details><summary>JSON schema</summary>"]
#[doc = r""]
#[doc = r" ```json"]
#[doc = "{"]
#[doc = " \"$id\": \"https://example.com/arrays.schema.json\","]
#[doc = " \"title\": \"veggies\","]
#[doc = " \"description\": \"A representation of a person, company, organization, or place\","]
#[doc = " \"type\": \"object\","]
#[doc = " \"properties\": {"]
#[doc = " \"fruits\": {"]
#[doc = " \"type\": \"array\","]
#[doc = " \"items\": {"]
#[doc = " \"type\": \"string\""]
#[doc = " }"]
#[doc = " },"]
#[doc = " \"vegetables\": {"]
#[doc = " \"type\": \"array\","]
#[doc = " \"items\": {"]
#[doc = " \"$ref\": \"#/$defs/veggie\""]
#[doc = " }"]
#[doc = " }"]
#[doc = " }"]
#[doc = "}"]
#[doc = r" ```"]
#[doc = r" </details>"]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, Default)]
pub struct Veggies {
#[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
Expand Down
Loading
Loading