qi_openapi/lib.rs
1pub mod v3;
2
3#[cfg(test)]
4mod tests {
5 use super::*;
6 use std::path::Path;
7 use std::fs::File;
8
9 #[test]
10 fn json_deserialize() {
11 let path = Path::new("/tmp/openapi.json");
12 let file = match File::open(&path) {
13 Err(why) => panic!("open file: {}", why.to_string()),
14 Ok(file) => file,
15 };
16
17 let spec = v3::from_json_reader(file);
18
19 print!("{}", format!("{:?}", spec));
20 }
21}