mirror of
https://github.com/mCaptcha/mCaptcha.git
synced 2026-02-11 01:55:40 +00:00
use yaml directly for displaying open api spec
This commit is contained in:
7
build.rs
7
build.rs
@@ -28,13 +28,6 @@ fn main() {
|
||||
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()
|
||||
);
|
||||
|
||||
let now = OffsetDateTime::now_utc().format("%y-%m-%d");
|
||||
println!("cargo:rustc-env=COMPILED_DATE={}", &now);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user