aboutsummaryrefslogtreecommitdiffstats
path: root/rust/HACKING.md
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2018-08-24 13:29:29 -0700
committerBryan Newbold <bnewbold@robocracy.org>2018-08-24 13:29:29 -0700
commitf997c5bcbcc800a8780a62dc56a4b7f4e5b68c3c (patch)
tree675d45c2b34b95de3475c550d3381f95e372647d /rust/HACKING.md
parent6a87d4b3ab252d76bb380a69ed53f21989761e9f (diff)
downloadfatcat-f997c5bcbcc800a8780a62dc56a4b7f4e5b68c3c.tar.gz
fatcat-f997c5bcbcc800a8780a62dc56a4b7f4e5b68c3c.zip
split/move docs around
Diffstat (limited to 'rust/HACKING.md')
-rw-r--r--rust/HACKING.md24
1 files changed, 24 insertions, 0 deletions
diff --git a/rust/HACKING.md b/rust/HACKING.md
new file mode 100644
index 00000000..a399164c
--- /dev/null
+++ b/rust/HACKING.md
@@ -0,0 +1,24 @@
+
+## Updating Schemas
+
+Regenerate API schemas after editing the fatcat-openapi2 schema. This will, as
+a side-effect, also run `cargo fmt` on the whole project, so don't run it with
+your editor open!
+
+ cargo install cargo-swagger # uses docker
+ ./codegen_openapi2.sh
+
+Update Rust database schema (after changing raw SQL schema):
+
+ diesel database reset
+ diesel print-schema > src/database_schema.rs
+
+Debug SQL schema errors (if diesel commands fail):
+
+ psql fatcat_test < migrations/2018-05-12-001226_init/up.sql
+
+## Direct API Interaction
+
+Creating entities via API:
+
+ http --json post localhost:9411/v0/container name=asdf issn=1234-5678