use yaml directly for displaying open api spec

This commit is contained in:
realaravinth
2021-10-08 15:36:42 +05:30
parent 53720ff740
commit 9afb63c738
9 changed files with 5 additions and 37 deletions

View File

@@ -59,12 +59,6 @@ fn build() {
let git_hash = String::from_utf8(output.stdout).unwrap();
println!("cargo:rustc-env=GIT_HASH={}", git_hash);
let yml = include_str!("../openapi.yaml");
let api_json: serde_json::Value = serde_yaml::from_str(yml).unwrap();
println!(
"cargo:rustc-env=OPEN_API_DOCS={}",
serde_json::to_string(&api_json).unwrap()
);
cache_bust();
}