aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--LICENSE6
-rw-r--r--rust/Cargo.toml6
-rw-r--r--rust/HACKING.md5
-rwxr-xr-xrust/codegen_openapi2.sh10
-rw-r--r--rust/fatcat-api-spec/.cargo/config (renamed from rust/fatcat-api/.cargo/config)0
-rw-r--r--rust/fatcat-api-spec/Cargo.toml (renamed from rust/fatcat-api/Cargo.toml)16
-rw-r--r--rust/fatcat-api-spec/README.md (renamed from rust/fatcat-api/README.md)2
-rw-r--r--rust/fatcat-api-spec/api.yaml (renamed from rust/fatcat-api/api.yaml)0
-rw-r--r--rust/fatcat-api-spec/api/swagger.yaml (renamed from rust/fatcat-api/api/swagger.yaml)0
-rw-r--r--rust/fatcat-api-spec/examples/ca.pem (renamed from rust/fatcat-api/examples/ca.pem)0
-rw-r--r--rust/fatcat-api-spec/examples/client.rs (renamed from rust/fatcat-api/examples/client.rs)0
-rw-r--r--rust/fatcat-api-spec/examples/server-chain.pem (renamed from rust/fatcat-api/examples/server-chain.pem)0
-rw-r--r--rust/fatcat-api-spec/examples/server-key.pem (renamed from rust/fatcat-api/examples/server-key.pem)0
-rw-r--r--rust/fatcat-api-spec/examples/server.rs (renamed from rust/fatcat-api/examples/server.rs)0
-rw-r--r--rust/fatcat-api-spec/examples/server_lib/mod.rs (renamed from rust/fatcat-api/examples/server_lib/mod.rs)0
-rw-r--r--rust/fatcat-api-spec/examples/server_lib/server.rs (renamed from rust/fatcat-api/examples/server_lib/server.rs)0
-rw-r--r--rust/fatcat-api-spec/rustfmt.toml (renamed from rust/fatcat-api/rustfmt.toml)0
-rw-r--r--rust/fatcat-api-spec/src/client.rs (renamed from rust/fatcat-api/src/client.rs)0
-rw-r--r--rust/fatcat-api-spec/src/lib.rs (renamed from rust/fatcat-api/src/lib.rs)0
-rw-r--r--rust/fatcat-api-spec/src/mimetypes.rs (renamed from rust/fatcat-api/src/mimetypes.rs)0
-rw-r--r--rust/fatcat-api-spec/src/models.rs (renamed from rust/fatcat-api/src/models.rs)0
-rw-r--r--rust/fatcat-api-spec/src/server.rs (renamed from rust/fatcat-api/src/server.rs)132
-rw-r--r--rust/fatcat-api/.gitignore2
23 files changed, 112 insertions, 67 deletions
diff --git a/LICENSE b/LICENSE
index 54ebef57..e25f9276 100644
--- a/LICENSE
+++ b/LICENSE
@@ -9,9 +9,9 @@ The python 'fatcat_client' API client library (under the
./python/fatcat_client/ directory), which is auto-generated from a
swagger/openapi schema specification, is released to the public domain.
-The rust 'fatcat-api' API library (under the ./rust/fatcat-api/ directory),
-which is auto-generated from the swagger/openapi schema specification, is
-released to the public domain.
+The rust 'fatcat-api-spec' API library (under the ./rust/fatcat-api-spec/
+directory), which is auto-generated from the swagger/openapi schema
+specification, is released to the public domain.
The python 'fatcat' web interface, tests, scripts, and bots (under the
./python/ directory, not including fatcat_client), unless otherwise specified
diff --git a/rust/Cargo.toml b/rust/Cargo.toml
index 67318f26..6b2e1ffe 100644
--- a/rust/Cargo.toml
+++ b/rust/Cargo.toml
@@ -2,12 +2,14 @@
name = "fatcat"
version = "0.1.0"
authors = ["Bryan Newbold <bnewbold@archive.org>"]
+description = "A scalable, versioned, API-oriented catalog of bibliographic entities and file metadata"
+license = "AGPL 3.0"
[workspace]
-members = ["fatcat-api"]
+members = ["fatcat-api-spec"]
[dependencies]
-fatcat-api = {version = "*", path = "fatcat-api"}
+fatcat-api-spec = {version = "*", path = "fatcat-api-spec"}
diesel = { version = "1.3", features = ["postgres", "uuid", "serde_json", "chrono", "r2d2"] }
diesel_migrations = "1.3"
dotenv = "0.9.0"
diff --git a/rust/HACKING.md b/rust/HACKING.md
index 0dde5058..57642b2d 100644
--- a/rust/HACKING.md
+++ b/rust/HACKING.md
@@ -16,8 +16,9 @@ swagger API spec on one side and the SQL schema on the other.
- `./src/api_wrappers.rs`: hand- and macro-generated wrapper functions, one per
API endpoint, that map between API request and return types, and
rust-idiomatic request and return types (plus API models).
-- `./fatcat-api`: autogenerated API models and endpoint types/signatures
-- `../fatcat-openapi2.yaml`:
+- `./fatcat-api-spec`: autogenerated API models and endpoint types/signatures
+- `../fatcat-openapi2.yaml`: OpenAPI 2 specification of API models and
+ endpoints
When deciding to use this structure, it wasn't expected that either
`api_wrappers.rs` or `database_models.rs` would need to hand-maintained; both
diff --git a/rust/codegen_openapi2.sh b/rust/codegen_openapi2.sh
index 6dbb087d..05e75ff0 100755
--- a/rust/codegen_openapi2.sh
+++ b/rust/codegen_openapi2.sh
@@ -1,11 +1,11 @@
#!/bin/sh
-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
+cargo swagger ../fatcat-openapi2.yml fatcat-api-spec --docker-tag=v2.3.1
+sudo chown `whoami`:`whoami` -R fatcat-api-spec
+git checkout fatcat-api-spec/Cargo.toml
# Hack to handle "extra" JSON fields
-sed -i 's/Object/serde_json::Value/g' fatcat-api/src/models.rs
-sed -i 's/extern crate uuid;/extern crate serde_json;\nextern crate uuid;/g' fatcat-api/src/models.rs
+sed -i 's/Object/serde_json::Value/g' fatcat-api-spec/src/models.rs
+sed -i 's/extern crate uuid;/extern crate serde_json;\nextern crate uuid;/g' fatcat-api-spec/src/models.rs
cargo fmt
diff --git a/rust/fatcat-api/.cargo/config b/rust/fatcat-api-spec/.cargo/config
index b8acc9c0..b8acc9c0 100644
--- a/rust/fatcat-api/.cargo/config
+++ b/rust/fatcat-api-spec/.cargo/config
diff --git a/rust/fatcat-api/Cargo.toml b/rust/fatcat-api-spec/Cargo.toml
index 4380da96..72758cb4 100644
--- a/rust/fatcat-api/Cargo.toml
+++ b/rust/fatcat-api-spec/Cargo.toml
@@ -1,9 +1,9 @@
[package]
-name = "fatcat-api"
+name = "fatcat-api-spec"
version = "0.1.0"
-authors = []
-description = "A scalable, versioned, API-oriented catalog of bibliographic entities and file metadata"
-license = "Unlicense"
+authors = ["Bryan Newbold <bnewbold@archive.org>"]
+description = "HTTP API models, endpoints, and other auto-generated types"
+license = "CC-0"
[features]
default = ["client", "server"]
@@ -17,22 +17,22 @@ chrono = { version = "0.4", features = ["serde"] }
futures = "0.1"
hyper = {version = "0.10", optional = true}
hyper-openssl = {version = "0.2", optional = true }
-iron = {version = "0.6", optional = true}
+iron = {version = "0.5", optional = true}
swagger = "0.7"
# Not required by example server.
#
-bodyparser = {version = "0.8", optional = true}
+bodyparser = {version = "0.7", optional = true}
url = "1.5"
lazy_static = "0.2"
log = "0.3.0"
multipart = {version = "0.13", optional = true}
-router = {version = "0.6", optional = true}
+router = {version = "0.5", optional = true}
serde = "1.0"
serde_derive = "1.0"
serde_ignored = {version = "0.0.4", optional = true}
serde_json = {version = "1.0", optional = true}
-urlencoded = {version = "0.6", optional = true}
+urlencoded = {version = "0.5", optional = true}
uuid = {version = "0.5", optional = true, features = ["serde", "v4"]}
# ToDo: this should be updated to point at the official crate once
# https://github.com/RReverser/serde-xml-rs/pull/45 is accepted upstream
diff --git a/rust/fatcat-api/README.md b/rust/fatcat-api-spec/README.md
index 1b566766..4c613ba7 100644
--- a/rust/fatcat-api/README.md
+++ b/rust/fatcat-api-spec/README.md
@@ -13,7 +13,7 @@ To see how to make this your own, look here:
[README](https://github.com/swagger-api/swagger-codegen/blob/master/README.md)
- API version: 0.1.0
-- Build date: 2018-09-11T02:27:08.863Z
+- Build date: 2018-09-11T20:55:46.846Z
This autogenerated project defines an API crate `fatcat` which contains:
* An `Api` trait defining the API in Rust.
diff --git a/rust/fatcat-api/api.yaml b/rust/fatcat-api-spec/api.yaml
index 2b0615d2..2b0615d2 100644
--- a/rust/fatcat-api/api.yaml
+++ b/rust/fatcat-api-spec/api.yaml
diff --git a/rust/fatcat-api/api/swagger.yaml b/rust/fatcat-api-spec/api/swagger.yaml
index 9bc84351..9bc84351 100644
--- a/rust/fatcat-api/api/swagger.yaml
+++ b/rust/fatcat-api-spec/api/swagger.yaml
diff --git a/rust/fatcat-api/examples/ca.pem b/rust/fatcat-api-spec/examples/ca.pem
index d2317fb5..d2317fb5 100644
--- a/rust/fatcat-api/examples/ca.pem
+++ b/rust/fatcat-api-spec/examples/ca.pem
diff --git a/rust/fatcat-api/examples/client.rs b/rust/fatcat-api-spec/examples/client.rs
index cc94af11..cc94af11 100644
--- a/rust/fatcat-api/examples/client.rs
+++ b/rust/fatcat-api-spec/examples/client.rs
diff --git a/rust/fatcat-api/examples/server-chain.pem b/rust/fatcat-api-spec/examples/server-chain.pem
index 47d7e201..47d7e201 100644
--- a/rust/fatcat-api/examples/server-chain.pem
+++ b/rust/fatcat-api-spec/examples/server-chain.pem
diff --git a/rust/fatcat-api/examples/server-key.pem b/rust/fatcat-api-spec/examples/server-key.pem
index 29c00682..29c00682 100644
--- a/rust/fatcat-api/examples/server-key.pem
+++ b/rust/fatcat-api-spec/examples/server-key.pem
diff --git a/rust/fatcat-api/examples/server.rs b/rust/fatcat-api-spec/examples/server.rs
index 8d2e9b64..8d2e9b64 100644
--- a/rust/fatcat-api/examples/server.rs
+++ b/rust/fatcat-api-spec/examples/server.rs
diff --git a/rust/fatcat-api/examples/server_lib/mod.rs b/rust/fatcat-api-spec/examples/server_lib/mod.rs
index 5291637e..5291637e 100644
--- a/rust/fatcat-api/examples/server_lib/mod.rs
+++ b/rust/fatcat-api-spec/examples/server_lib/mod.rs
diff --git a/rust/fatcat-api/examples/server_lib/server.rs b/rust/fatcat-api-spec/examples/server_lib/server.rs
index ab08f594..ab08f594 100644
--- a/rust/fatcat-api/examples/server_lib/server.rs
+++ b/rust/fatcat-api-spec/examples/server_lib/server.rs
diff --git a/rust/fatcat-api/rustfmt.toml b/rust/fatcat-api-spec/rustfmt.toml
index cba42c2b..cba42c2b 100644
--- a/rust/fatcat-api/rustfmt.toml
+++ b/rust/fatcat-api-spec/rustfmt.toml
diff --git a/rust/fatcat-api/src/client.rs b/rust/fatcat-api-spec/src/client.rs
index a08e3cfe..a08e3cfe 100644
--- a/rust/fatcat-api/src/client.rs
+++ b/rust/fatcat-api-spec/src/client.rs
diff --git a/rust/fatcat-api/src/lib.rs b/rust/fatcat-api-spec/src/lib.rs
index a08c6e04..a08c6e04 100644
--- a/rust/fatcat-api/src/lib.rs
+++ b/rust/fatcat-api-spec/src/lib.rs
diff --git a/rust/fatcat-api/src/mimetypes.rs b/rust/fatcat-api-spec/src/mimetypes.rs
index ff2c12ce..ff2c12ce 100644
--- a/rust/fatcat-api/src/mimetypes.rs
+++ b/rust/fatcat-api-spec/src/mimetypes.rs
diff --git a/rust/fatcat-api/src/models.rs b/rust/fatcat-api-spec/src/models.rs
index 81701b70..81701b70 100644
--- a/rust/fatcat-api/src/models.rs
+++ b/rust/fatcat-api-spec/src/models.rs
diff --git a/rust/fatcat-api/src/server.rs b/rust/fatcat-api-spec/src/server.rs
index dfc94a81..5510b34d 100644
--- a/rust/fatcat-api/src/server.rs
+++ b/rust/fatcat-api-spec/src/server.rs
@@ -107,7 +107,8 @@ where
// Path parameters
let param_id = {
- let param = req.extensions
+ let param = req
+ .extensions
.get::<Router>()
.ok_or_else(|| Response::with((status::InternalServerError, "An internal error occurred".to_string())))?
.find("id")
@@ -207,7 +208,8 @@ where
// values, rather than causing a 400 response). Produce warning header and logs for
// any unused fields.
- let param_entity = req.get::<bodyparser::Raw>()
+ let param_entity = req
+ .get::<bodyparser::Raw>()
.map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse body parameter entity - not valid UTF-8: {}", e))))?;
let mut unused_elements = Vec::new();
@@ -318,7 +320,8 @@ where
// values, rather than causing a 400 response). Produce warning header and logs for
// any unused fields.
- let param_entity_list = req.get::<bodyparser::Raw>()
+ let param_entity_list = req
+ .get::<bodyparser::Raw>()
.map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse body parameter entity_list - not valid UTF-8: {}", e))))?;
let mut unused_elements = Vec::new();
@@ -424,7 +427,8 @@ where
// values, rather than causing a 400 response). Produce warning header and logs for
// any unused fields.
- let param_entity = req.get::<bodyparser::Raw>()
+ let param_entity = req
+ .get::<bodyparser::Raw>()
.map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse body parameter entity - not valid UTF-8: {}", e))))?;
let mut unused_elements = Vec::new();
@@ -535,7 +539,8 @@ where
// values, rather than causing a 400 response). Produce warning header and logs for
// any unused fields.
- let param_entity_list = req.get::<bodyparser::Raw>()
+ let param_entity_list = req
+ .get::<bodyparser::Raw>()
.map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse body parameter entity_list - not valid UTF-8: {}", e))))?;
let mut unused_elements = Vec::new();
@@ -641,7 +646,8 @@ where
// values, rather than causing a 400 response). Produce warning header and logs for
// any unused fields.
- let param_entity = req.get::<bodyparser::Raw>()
+ let param_entity = req
+ .get::<bodyparser::Raw>()
.map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse body parameter entity - not valid UTF-8: {}", e))))?;
let mut unused_elements = Vec::new();
@@ -734,7 +740,8 @@ where
// values, rather than causing a 400 response). Produce warning header and logs for
// any unused fields.
- let param_entity = req.get::<bodyparser::Raw>()
+ let param_entity = req
+ .get::<bodyparser::Raw>()
.map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse body parameter entity - not valid UTF-8: {}", e))))?;
let mut unused_elements = Vec::new();
@@ -845,7 +852,8 @@ where
// values, rather than causing a 400 response). Produce warning header and logs for
// any unused fields.
- let param_entity_list = req.get::<bodyparser::Raw>()
+ let param_entity_list = req
+ .get::<bodyparser::Raw>()
.map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse body parameter entity_list - not valid UTF-8: {}", e))))?;
let mut unused_elements = Vec::new();
@@ -951,7 +959,8 @@ where
// values, rather than causing a 400 response). Produce warning header and logs for
// any unused fields.
- let param_entity = req.get::<bodyparser::Raw>()
+ let param_entity = req
+ .get::<bodyparser::Raw>()
.map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse body parameter entity - not valid UTF-8: {}", e))))?;
let mut unused_elements = Vec::new();
@@ -1062,7 +1071,8 @@ where
// values, rather than causing a 400 response). Produce warning header and logs for
// any unused fields.
- let param_entity_list = req.get::<bodyparser::Raw>()
+ let param_entity_list = req
+ .get::<bodyparser::Raw>()
.map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse body parameter entity_list - not valid UTF-8: {}", e))))?;
let mut unused_elements = Vec::new();
@@ -1168,7 +1178,8 @@ where
// values, rather than causing a 400 response). Produce warning header and logs for
// any unused fields.
- let param_entity = req.get::<bodyparser::Raw>()
+ let param_entity = req
+ .get::<bodyparser::Raw>()
.map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse body parameter entity - not valid UTF-8: {}", e))))?;
let mut unused_elements = Vec::new();
@@ -1279,7 +1290,8 @@ where
// values, rather than causing a 400 response). Produce warning header and logs for
// any unused fields.
- let param_entity_list = req.get::<bodyparser::Raw>()
+ let param_entity_list = req
+ .get::<bodyparser::Raw>()
.map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse body parameter entity_list - not valid UTF-8: {}", e))))?;
let mut unused_elements = Vec::new();
@@ -1383,7 +1395,8 @@ where
// Path parameters
let param_id = {
- let param = req.extensions
+ let param = req
+ .extensions
.get::<Router>()
.ok_or_else(|| Response::with((status::InternalServerError, "An internal error occurred".to_string())))?
.find("id")
@@ -1475,7 +1488,8 @@ where
// Path parameters
let param_id = {
- let param = req.extensions
+ let param = req
+ .extensions
.get::<Router>()
.ok_or_else(|| Response::with((status::InternalServerError, "An internal error occurred".to_string())))?
.find("id")
@@ -1567,7 +1581,8 @@ where
// Path parameters
let param_id = {
- let param = req.extensions
+ let param = req
+ .extensions
.get::<Router>()
.ok_or_else(|| Response::with((status::InternalServerError, "An internal error occurred".to_string())))?
.find("id")
@@ -1659,7 +1674,8 @@ where
// Path parameters
let param_id = {
- let param = req.extensions
+ let param = req
+ .extensions
.get::<Router>()
.ok_or_else(|| Response::with((status::InternalServerError, "An internal error occurred".to_string())))?
.find("id")
@@ -1751,7 +1767,8 @@ where
// Path parameters
let param_id = {
- let param = req.extensions
+ let param = req
+ .extensions
.get::<Router>()
.ok_or_else(|| Response::with((status::InternalServerError, "An internal error occurred".to_string())))?
.find("id")
@@ -1901,7 +1918,8 @@ where
// Path parameters
let param_id = {
- let param = req.extensions
+ let param = req
+ .extensions
.get::<Router>()
.ok_or_else(|| Response::with((status::InternalServerError, "An internal error occurred".to_string())))?
.find("id")
@@ -1979,7 +1997,8 @@ where
// Path parameters
let param_id = {
- let param = req.extensions
+ let param = req
+ .extensions
.get::<Router>()
.ok_or_else(|| Response::with((status::InternalServerError, "An internal error occurred".to_string())))?
.find("id")
@@ -2071,7 +2090,8 @@ where
// Path parameters
let param_id = {
- let param = req.extensions
+ let param = req
+ .extensions
.get::<Router>()
.ok_or_else(|| Response::with((status::InternalServerError, "An internal error occurred".to_string())))?
.find("id")
@@ -2163,7 +2183,8 @@ where
// Path parameters
let param_id = {
- let param = req.extensions
+ let param = req
+ .extensions
.get::<Router>()
.ok_or_else(|| Response::with((status::InternalServerError, "An internal error occurred".to_string())))?
.find("id")
@@ -2255,7 +2276,8 @@ where
// Path parameters
let param_id = {
- let param = req.extensions
+ let param = req
+ .extensions
.get::<Router>()
.ok_or_else(|| Response::with((status::InternalServerError, "An internal error occurred".to_string())))?
.find("id")
@@ -2347,7 +2369,8 @@ where
// Path parameters
let param_id = {
- let param = req.extensions
+ let param = req
+ .extensions
.get::<Router>()
.ok_or_else(|| Response::with((status::InternalServerError, "An internal error occurred".to_string())))?
.find("id")
@@ -2435,7 +2458,8 @@ where
// Path parameters
let param_id = {
- let param = req.extensions
+ let param = req
+ .extensions
.get::<Router>()
.ok_or_else(|| Response::with((status::InternalServerError, "An internal error occurred".to_string())))?
.find("id")
@@ -2523,7 +2547,8 @@ where
// Path parameters
let param_id = {
- let param = req.extensions
+ let param = req
+ .extensions
.get::<Router>()
.ok_or_else(|| Response::with((status::InternalServerError, "An internal error occurred".to_string())))?
.find("id")
@@ -2611,7 +2636,8 @@ where
// Path parameters
let param_id = {
- let param = req.extensions
+ let param = req
+ .extensions
.get::<Router>()
.ok_or_else(|| Response::with((status::InternalServerError, "An internal error occurred".to_string())))?
.find("id")
@@ -2699,7 +2725,8 @@ where
// Path parameters
let param_id = {
- let param = req.extensions
+ let param = req
+ .extensions
.get::<Router>()
.ok_or_else(|| Response::with((status::InternalServerError, "An internal error occurred".to_string())))?
.find("id")
@@ -2791,7 +2818,8 @@ where
// Path parameters
let param_id = {
- let param = req.extensions
+ let param = req
+ .extensions
.get::<Router>()
.ok_or_else(|| Response::with((status::InternalServerError, "An internal error occurred".to_string())))?
.find("id")
@@ -2883,7 +2911,8 @@ where
// Path parameters
let param_id = {
- let param = req.extensions
+ let param = req
+ .extensions
.get::<Router>()
.ok_or_else(|| Response::with((status::InternalServerError, "An internal error occurred".to_string())))?
.find("id")
@@ -2975,7 +3004,8 @@ where
// Path parameters
let param_id = {
- let param = req.extensions
+ let param = req
+ .extensions
.get::<Router>()
.ok_or_else(|| Response::with((status::InternalServerError, "An internal error occurred".to_string())))?
.find("id")
@@ -3063,7 +3093,8 @@ where
// Path parameters
let param_id = {
- let param = req.extensions
+ let param = req
+ .extensions
.get::<Router>()
.ok_or_else(|| Response::with((status::InternalServerError, "An internal error occurred".to_string())))?
.find("id")
@@ -3213,7 +3244,8 @@ where
// Path parameters
let param_id = {
- let param = req.extensions
+ let param = req
+ .extensions
.get::<Router>()
.ok_or_else(|| Response::with((status::InternalServerError, "An internal error occurred".to_string())))?
.find("id")
@@ -3305,7 +3337,8 @@ where
// Path parameters
let param_id = {
- let param = req.extensions
+ let param = req
+ .extensions
.get::<Router>()
.ok_or_else(|| Response::with((status::InternalServerError, "An internal error occurred".to_string())))?
.find("id")
@@ -3397,7 +3430,8 @@ where
// Path parameters
let param_id = {
- let param = req.extensions
+ let param = req
+ .extensions
.get::<Router>()
.ok_or_else(|| Response::with((status::InternalServerError, "An internal error occurred".to_string())))?
.find("id")
@@ -3821,7 +3855,8 @@ where
// Path parameters
let param_id = {
- let param = req.extensions
+ let param = req
+ .extensions
.get::<Router>()
.ok_or_else(|| Response::with((status::InternalServerError, "An internal error occurred".to_string())))?
.find("id")
@@ -3837,7 +3872,8 @@ where
// values, rather than causing a 400 response). Produce warning header and logs for
// any unused fields.
- let param_entity = req.get::<bodyparser::Raw>()
+ let param_entity = req
+ .get::<bodyparser::Raw>()
.map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse body parameter entity - not valid UTF-8: {}", e))))?;
let mut unused_elements = Vec::new();
@@ -3941,7 +3977,8 @@ where
// Path parameters
let param_id = {
- let param = req.extensions
+ let param = req
+ .extensions
.get::<Router>()
.ok_or_else(|| Response::with((status::InternalServerError, "An internal error occurred".to_string())))?
.find("id")
@@ -3957,7 +3994,8 @@ where
// values, rather than causing a 400 response). Produce warning header and logs for
// any unused fields.
- let param_entity = req.get::<bodyparser::Raw>()
+ let param_entity = req
+ .get::<bodyparser::Raw>()
.map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse body parameter entity - not valid UTF-8: {}", e))))?;
let mut unused_elements = Vec::new();
@@ -4061,7 +4099,8 @@ where
// Path parameters
let param_id = {
- let param = req.extensions
+ let param = req
+ .extensions
.get::<Router>()
.ok_or_else(|| Response::with((status::InternalServerError, "An internal error occurred".to_string())))?
.find("id")
@@ -4077,7 +4116,8 @@ where
// values, rather than causing a 400 response). Produce warning header and logs for
// any unused fields.
- let param_entity = req.get::<bodyparser::Raw>()
+ let param_entity = req
+ .get::<bodyparser::Raw>()
.map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse body parameter entity - not valid UTF-8: {}", e))))?;
let mut unused_elements = Vec::new();
@@ -4181,7 +4221,8 @@ where
// Path parameters
let param_id = {
- let param = req.extensions
+ let param = req
+ .extensions
.get::<Router>()
.ok_or_else(|| Response::with((status::InternalServerError, "An internal error occurred".to_string())))?
.find("id")
@@ -4197,7 +4238,8 @@ where
// values, rather than causing a 400 response). Produce warning header and logs for
// any unused fields.
- let param_entity = req.get::<bodyparser::Raw>()
+ let param_entity = req
+ .get::<bodyparser::Raw>()
.map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse body parameter entity - not valid UTF-8: {}", e))))?;
let mut unused_elements = Vec::new();
@@ -4301,7 +4343,8 @@ where
// Path parameters
let param_id = {
- let param = req.extensions
+ let param = req
+ .extensions
.get::<Router>()
.ok_or_else(|| Response::with((status::InternalServerError, "An internal error occurred".to_string())))?
.find("id")
@@ -4317,7 +4360,8 @@ where
// values, rather than causing a 400 response). Produce warning header and logs for
// any unused fields.
- let param_entity = req.get::<bodyparser::Raw>()
+ let param_entity = req
+ .get::<bodyparser::Raw>()
.map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse body parameter entity - not valid UTF-8: {}", e))))?;
let mut unused_elements = Vec::new();
diff --git a/rust/fatcat-api/.gitignore b/rust/fatcat-api/.gitignore
deleted file mode 100644
index a9d37c56..00000000
--- a/rust/fatcat-api/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-target
-Cargo.lock