diff options
-rw-r--r-- | fatcat-openapi2.yml (renamed from rust/fatcat-openapi2.yml) | 0 | ||||
-rwxr-xr-x | python/codegen_python_client.sh | 8 | ||||
-rwxr-xr-x | rust/codegen_openapi2.sh | 2 | ||||
-rw-r--r-- | rust/src/bin/fatcatd.rs | 2 |
4 files changed, 7 insertions, 5 deletions
diff --git a/rust/fatcat-openapi2.yml b/fatcat-openapi2.yml index 8fcbf488..8fcbf488 100644 --- a/rust/fatcat-openapi2.yml +++ b/fatcat-openapi2.yml diff --git a/python/codegen_python_client.sh b/python/codegen_python_client.sh index 7824253d..ba9bb3d3 100755 --- a/python/codegen_python_client.sh +++ b/python/codegen_python_client.sh @@ -1,10 +1,11 @@ -#!/bin/sh +#!/bin/bash -set -ex +set -exu +set -o pipefail OUTPUT=`pwd`/codegen-out mkdir -p $OUTPUT -cp ../rust/fatcat-openapi2.yml $OUTPUT/api.yml +cp ../fatcat-openapi2.yml $OUTPUT/api.yml docker run \ -v $OUTPUT:/tmp/swagger/ \ @@ -18,3 +19,4 @@ docker run \ sudo chown -R `whoami`:`whoami` $OUTPUT cp -r $OUTPUT/fatcat_client fatcat_client cp -r $OUTPUT/test tests/codegen_tests +#rm -rf $OUTPUT diff --git a/rust/codegen_openapi2.sh b/rust/codegen_openapi2.sh index a6826148..6dbb087d 100755 --- a/rust/codegen_openapi2.sh +++ b/rust/codegen_openapi2.sh @@ -1,6 +1,6 @@ #!/bin/sh -cargo swagger fatcat-openapi2.yml fatcat-api --docker-tag=v2.3.1 +cargo swagger ../fatcat-openapi2.yml fatcat-api --docker-tag=v2.3.1 sudo chown `whoami`:`whoami` -R fatcat-api git checkout fatcat-api/Cargo.toml diff --git a/rust/src/bin/fatcatd.rs b/rust/src/bin/fatcatd.rs index b50da2be..256027c8 100644 --- a/rust/src/bin/fatcatd.rs +++ b/rust/src/bin/fatcatd.rs @@ -66,7 +66,7 @@ fn main() { fn yaml_handler(_: &mut Request) -> IronResult<Response> { Ok(Response::with(( status::Ok, - include_str!("../../fatcat-openapi2.yml"), + include_str!("../../../fatcat-openapi2.yml"), ))) } |