diff options
author | Bryan Newbold <bnewbold@robocracy.org> | 2019-09-18 20:58:42 -0700 |
---|---|---|
committer | Bryan Newbold <bnewbold@robocracy.org> | 2019-09-18 20:58:42 -0700 |
commit | 2b3d08dcaa31d9ed999d1904cc2578bda5026505 (patch) | |
tree | f9c102f0489c0c2dfe11f5e524454d1c4ac84c36 /rust/codegen_openapi2.sh | |
parent | c0ad5f80c13fc66240a17e59dfff559c6967aac7 (diff) | |
download | fatcat-2b3d08dcaa31d9ed999d1904cc2578bda5026505.tar.gz fatcat-2b3d08dcaa31d9ed999d1904cc2578bda5026505.zip |
rust: remove duplicated copies of API spec
Diffstat (limited to 'rust/codegen_openapi2.sh')
-rwxr-xr-x | rust/codegen_openapi2.sh | 4 |
1 files changed, 4 insertions, 0 deletions
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::<i64>().ok());$/.and_then(|x| Some(x.parse::<i6 sed -i 's/.and_then(|x| x.parse::<bool>().ok());$/.and_then(|x| Some(x.to_lowercase().parse::<bool>())).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::<chrono::DateTime<chrono::Utc>>().ok());$/.and_then(|x| Some(x.parse::<chrono::DateTime<chrono::Utc>>())).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)..." |