Open sergeysova opened 4 years ago
Single attribute:
schema: properties: demo: type: string x-rust-attribute: serde(skip_serializing_if = "Option::is_none")
Should generate something like:
struct Example { #[serde(skip_serializing_if = "Option::is_none")] demo: String, }
Multiple attributes:
schema: properties: demo: type: string x-rust-attribute: - serde(skip_serializing_if = “Option::is_none”) - validate(url)
Output:
struct Example { #[serde(skip_serializing_if = "Option::is_none")] #[validate(url)] demo: String, }
Single attribute:
Should generate something like:
Multiple attributes:
Output: