From 2b3d08dcaa31d9ed999d1904cc2578bda5026505 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Wed, 18 Sep 2019 20:58:42 -0700 Subject: rust: remove duplicated copies of API spec --- rust/codegen_openapi2.sh | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'rust/codegen_openapi2.sh') diff --git a/rust/codegen_openapi2.sh b/rust/codegen_openapi2.sh index af599ea1..195b7dca 100755 --- a/rust/codegen_openapi2.sh +++ b/rust/codegen_openapi2.sh @@ -45,6 +45,10 @@ sed -i 's/.and_then(|x| x.parse::().ok());$/.and_then(|x| Some(x.parse::().ok());$/.and_then(|x| Some(x.to_lowercase().parse::())).map_or_else(|| Ok(None), |x| x.map(|v| Some(v))).map_err(|x| Response::with((status::BadRequest, "unparsable query parameter (expected boolean)".to_string())))?;/g' fatcat-openapi/src/server.rs sed -i 's/.and_then(|x| x.parse::>().ok());$/.and_then(|x| Some(x.parse::>())).map_or_else(|| Ok(None), |x| x.map(|v| Some(v))).map_err(|x| Response::with((status::BadRequest, "unparsable query parameter (expected UTC datetime in ISO\/RFC format)".to_string())))?;/g' fatcat-openapi/src/server.rs +# unnecessary duplicate copies of API spec +rm fatcat-openapi/api.yaml +rm -rf fatcat-openapi/api/ + cd fatcat-openapi echo "Running cargo-fix (slow)..." -- cgit v1.2.3