Implement JsonSchema for Path/PathBuf
This commit is contained in:
parent
c6a20764fe
commit
437b38dd8b
1 changed files with 3 additions and 0 deletions
|
@ -1,6 +1,7 @@
|
|||
use crate::gen::SchemaGenerator;
|
||||
use crate::schema::*;
|
||||
use crate::JsonSchema;
|
||||
use std::path::{Path, PathBuf};
|
||||
|
||||
macro_rules! simple_impl {
|
||||
($type:tt => $instance_type:ident) => {
|
||||
|
@ -31,6 +32,8 @@ macro_rules! simple_impl {
|
|||
|
||||
simple_impl!(str => String);
|
||||
simple_impl!(String => String);
|
||||
simple_impl!(Path => String);
|
||||
simple_impl!(PathBuf => String);
|
||||
simple_impl!(bool => Boolean);
|
||||
simple_impl!(f32 => Number, "float");
|
||||
simple_impl!(f64 => Number, "double");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue