aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2018-05-28 14:21:21 -0700
committerBryan Newbold <bnewbold@robocracy.org>2018-05-28 14:21:21 -0700
commita0c8bf9fba31156f1ad7f79dafa98d1f4462b220 (patch)
treef7d911720c0273e2ac73afaad51b98344d9d25bf
parentc5bd3231df17fda2130e3bd51188dbe34628321a (diff)
downloadfatcat-a0c8bf9fba31156f1ad7f79dafa98d1f4462b220.tar.gz
fatcat-a0c8bf9fba31156f1ad7f79dafa98d1f4462b220.zip
move API spec to top level directory
-rw-r--r--fatcat-openapi2.yml (renamed from rust/fatcat-openapi2.yml)0
-rwxr-xr-xpython/codegen_python_client.sh8
-rwxr-xr-xrust/codegen_openapi2.sh2
-rw-r--r--rust/src/bin/fatcatd.rs2
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"),
)))
}