mirror of
https://github.com/EFForg/rayhunter.git
synced 2026-06-13 00:03:31 -07:00
9b6c4cee0b
* api documentation * utoipa openapi docs generator --------- Co-authored-by: Andrej Walilko <awalilko@liquidweb.com>
13 lines
308 B
Rust
13 lines
308 B
Rust
use std::{env, fs};
|
|
|
|
fn main() {
|
|
let content = rayhunter_daemon::ApiDocs::generate();
|
|
let mut filename = "openapi.json".to_string();
|
|
let args: Vec<String> = env::args().collect();
|
|
if args.len() > 1 {
|
|
filename = args[1].to_string();
|
|
}
|
|
|
|
fs::write(filename, content).unwrap();
|
|
}
|