From 86fd0a416efd4015dc47494e723afd7f13771006 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Mon, 24 Dec 2018 16:03:52 -0800 Subject: API harmonization codegen --- rust/fatcat-api-spec/src/client.rs | 398 ++++++++++++++++------------ rust/fatcat-api-spec/src/lib.rs | 385 +++++++++++++-------------- rust/fatcat-api-spec/src/models.rs | 18 +- rust/fatcat-api-spec/src/server.rs | 516 ++++++++++++++++++------------------- 4 files changed, 695 insertions(+), 622 deletions(-) (limited to 'rust/fatcat-api-spec/src') diff --git a/rust/fatcat-api-spec/src/client.rs b/rust/fatcat-api-spec/src/client.rs index b3b1a922..eddd99fa 100644 --- a/rust/fatcat-api-spec/src/client.rs +++ b/rust/fatcat-api-spec/src/client.rs @@ -169,11 +169,15 @@ impl Client { } impl Api for Client { - fn create_container(&self, param_entity: models::ContainerEntity, param_editgroup: Option, context: &Context) -> Box + Send> { + fn create_container(&self, param_entity: models::ContainerEntity, param_editgroup_id: Option, context: &Context) -> Box + Send> { // Query parameters - let query_editgroup = param_editgroup.map_or_else(String::new, |query| format!("editgroup={editgroup}&", editgroup = query.to_string())); + let query_editgroup_id = param_editgroup_id.map_or_else(String::new, |query| format!("editgroup_id={editgroup_id}&", editgroup_id = query.to_string())); - let url = format!("{}/v0/container?{editgroup}", self.base_path, editgroup = utf8_percent_encode(&query_editgroup, QUERY_ENCODE_SET)); + let url = format!( + "{}/v0/container?{editgroup_id}", + self.base_path, + editgroup_id = utf8_percent_encode(&query_editgroup_id, QUERY_ENCODE_SET) + ); let body = serde_json::to_string(¶m_entity).expect("impossible to fail to serialize"); @@ -241,18 +245,18 @@ impl Api for Client { &self, param_entity_list: &Vec, param_autoaccept: Option, - param_editgroup: Option, + param_editgroup_id: Option, context: &Context, ) -> Box + Send> { // Query parameters let query_autoaccept = param_autoaccept.map_or_else(String::new, |query| format!("autoaccept={autoaccept}&", autoaccept = query.to_string())); - let query_editgroup = param_editgroup.map_or_else(String::new, |query| format!("editgroup={editgroup}&", editgroup = query.to_string())); + let query_editgroup_id = param_editgroup_id.map_or_else(String::new, |query| format!("editgroup_id={editgroup_id}&", editgroup_id = query.to_string())); let url = format!( - "{}/v0/container/batch?{autoaccept}{editgroup}", + "{}/v0/container/batch?{autoaccept}{editgroup_id}", self.base_path, autoaccept = utf8_percent_encode(&query_autoaccept, QUERY_ENCODE_SET), - editgroup = utf8_percent_encode(&query_editgroup, QUERY_ENCODE_SET) + editgroup_id = utf8_percent_encode(&query_editgroup_id, QUERY_ENCODE_SET) ); let body = serde_json::to_string(¶m_entity_list).expect("impossible to fail to serialize"); @@ -317,15 +321,15 @@ impl Api for Client { Box::new(futures::done(result)) } - fn delete_container(&self, param_id: String, param_editgroup: Option, context: &Context) -> Box + Send> { + fn delete_container(&self, param_ident: String, param_editgroup_id: Option, context: &Context) -> Box + Send> { // Query parameters - let query_editgroup = param_editgroup.map_or_else(String::new, |query| format!("editgroup={editgroup}&", editgroup = query.to_string())); + let query_editgroup_id = param_editgroup_id.map_or_else(String::new, |query| format!("editgroup_id={editgroup_id}&", editgroup_id = query.to_string())); let url = format!( - "{}/v0/container/{id}?{editgroup}", + "{}/v0/container/{ident}?{editgroup_id}", self.base_path, - id = utf8_percent_encode(¶m_id.to_string(), PATH_SEGMENT_ENCODE_SET), - editgroup = utf8_percent_encode(&query_editgroup, QUERY_ENCODE_SET) + ident = utf8_percent_encode(¶m_ident.to_string(), PATH_SEGMENT_ENCODE_SET), + editgroup_id = utf8_percent_encode(&query_editgroup_id, QUERY_ENCODE_SET) ); let hyper_client = (self.hyper_client)(); @@ -449,15 +453,15 @@ impl Api for Client { Box::new(futures::done(result)) } - fn get_container(&self, param_id: String, param_expand: Option, param_hide: Option, context: &Context) -> Box + Send> { + fn get_container(&self, param_ident: String, param_expand: Option, param_hide: Option, context: &Context) -> Box + Send> { // Query parameters let query_expand = param_expand.map_or_else(String::new, |query| format!("expand={expand}&", expand = query.to_string())); let query_hide = param_hide.map_or_else(String::new, |query| format!("hide={hide}&", hide = query.to_string())); let url = format!( - "{}/v0/container/{id}?{expand}{hide}", + "{}/v0/container/{ident}?{expand}{hide}", self.base_path, - id = utf8_percent_encode(¶m_id.to_string(), PATH_SEGMENT_ENCODE_SET), + ident = utf8_percent_encode(¶m_ident.to_string(), PATH_SEGMENT_ENCODE_SET), expand = utf8_percent_encode(&query_expand, QUERY_ENCODE_SET), hide = utf8_percent_encode(&query_hide, QUERY_ENCODE_SET) ); @@ -583,14 +587,14 @@ impl Api for Client { Box::new(futures::done(result)) } - fn get_container_history(&self, param_id: String, param_limit: Option, context: &Context) -> Box + Send> { + fn get_container_history(&self, param_ident: String, param_limit: Option, context: &Context) -> Box + Send> { // Query parameters let query_limit = param_limit.map_or_else(String::new, |query| format!("limit={limit}&", limit = query.to_string())); let url = format!( - "{}/v0/container/{id}/history?{limit}", + "{}/v0/container/{ident}/history?{limit}", self.base_path, - id = utf8_percent_encode(¶m_id.to_string(), PATH_SEGMENT_ENCODE_SET), + ident = utf8_percent_encode(¶m_ident.to_string(), PATH_SEGMENT_ENCODE_SET), limit = utf8_percent_encode(&query_limit, QUERY_ENCODE_SET) ); @@ -651,11 +655,11 @@ impl Api for Client { Box::new(futures::done(result)) } - fn get_container_redirects(&self, param_id: String, context: &Context) -> Box + Send> { + fn get_container_redirects(&self, param_ident: String, context: &Context) -> Box + Send> { let url = format!( - "{}/v0/container/{id}/redirects", + "{}/v0/container/{ident}/redirects", self.base_path, - id = utf8_percent_encode(¶m_id.to_string(), PATH_SEGMENT_ENCODE_SET) + ident = utf8_percent_encode(¶m_ident.to_string(), PATH_SEGMENT_ENCODE_SET) ); let hyper_client = (self.hyper_client)(); @@ -717,7 +721,7 @@ impl Api for Client { fn get_container_revision( &self, - param_id: String, + param_rev_id: String, param_expand: Option, param_hide: Option, context: &Context, @@ -727,9 +731,9 @@ impl Api for Client { let query_hide = param_hide.map_or_else(String::new, |query| format!("hide={hide}&", hide = query.to_string())); let url = format!( - "{}/v0/container/rev/{id}?{expand}{hide}", + "{}/v0/container/rev/{rev_id}?{expand}{hide}", self.base_path, - id = utf8_percent_encode(¶m_id.to_string(), PATH_SEGMENT_ENCODE_SET), + rev_id = utf8_percent_encode(¶m_rev_id.to_string(), PATH_SEGMENT_ENCODE_SET), expand = utf8_percent_encode(&query_expand, QUERY_ENCODE_SET), hide = utf8_percent_encode(&query_hide, QUERY_ENCODE_SET) ); @@ -873,19 +877,19 @@ impl Api for Client { fn update_container( &self, - param_id: String, + param_ident: String, param_entity: models::ContainerEntity, - param_editgroup: Option, + param_editgroup_id: Option, context: &Context, ) -> Box + Send> { // Query parameters - let query_editgroup = param_editgroup.map_or_else(String::new, |query| format!("editgroup={editgroup}&", editgroup = query.to_string())); + let query_editgroup_id = param_editgroup_id.map_or_else(String::new, |query| format!("editgroup_id={editgroup_id}&", editgroup_id = query.to_string())); let url = format!( - "{}/v0/container/{id}?{editgroup}", + "{}/v0/container/{ident}?{editgroup_id}", self.base_path, - id = utf8_percent_encode(¶m_id.to_string(), PATH_SEGMENT_ENCODE_SET), - editgroup = utf8_percent_encode(&query_editgroup, QUERY_ENCODE_SET) + ident = utf8_percent_encode(¶m_ident.to_string(), PATH_SEGMENT_ENCODE_SET), + editgroup_id = utf8_percent_encode(&query_editgroup_id, QUERY_ENCODE_SET) ); let body = serde_json::to_string(¶m_entity).expect("impossible to fail to serialize"); @@ -950,11 +954,15 @@ impl Api for Client { Box::new(futures::done(result)) } - fn create_creator(&self, param_entity: models::CreatorEntity, param_editgroup: Option, context: &Context) -> Box + Send> { + fn create_creator(&self, param_entity: models::CreatorEntity, param_editgroup_id: Option, context: &Context) -> Box + Send> { // Query parameters - let query_editgroup = param_editgroup.map_or_else(String::new, |query| format!("editgroup={editgroup}&", editgroup = query.to_string())); + let query_editgroup_id = param_editgroup_id.map_or_else(String::new, |query| format!("editgroup_id={editgroup_id}&", editgroup_id = query.to_string())); - let url = format!("{}/v0/creator?{editgroup}", self.base_path, editgroup = utf8_percent_encode(&query_editgroup, QUERY_ENCODE_SET)); + let url = format!( + "{}/v0/creator?{editgroup_id}", + self.base_path, + editgroup_id = utf8_percent_encode(&query_editgroup_id, QUERY_ENCODE_SET) + ); let body = serde_json::to_string(¶m_entity).expect("impossible to fail to serialize"); @@ -1022,18 +1030,18 @@ impl Api for Client { &self, param_entity_list: &Vec, param_autoaccept: Option, - param_editgroup: Option, + param_editgroup_id: Option, context: &Context, ) -> Box + Send> { // Query parameters let query_autoaccept = param_autoaccept.map_or_else(String::new, |query| format!("autoaccept={autoaccept}&", autoaccept = query.to_string())); - let query_editgroup = param_editgroup.map_or_else(String::new, |query| format!("editgroup={editgroup}&", editgroup = query.to_string())); + let query_editgroup_id = param_editgroup_id.map_or_else(String::new, |query| format!("editgroup_id={editgroup_id}&", editgroup_id = query.to_string())); let url = format!( - "{}/v0/creator/batch?{autoaccept}{editgroup}", + "{}/v0/creator/batch?{autoaccept}{editgroup_id}", self.base_path, autoaccept = utf8_percent_encode(&query_autoaccept, QUERY_ENCODE_SET), - editgroup = utf8_percent_encode(&query_editgroup, QUERY_ENCODE_SET) + editgroup_id = utf8_percent_encode(&query_editgroup_id, QUERY_ENCODE_SET) ); let body = serde_json::to_string(¶m_entity_list).expect("impossible to fail to serialize"); @@ -1098,15 +1106,15 @@ impl Api for Client { Box::new(futures::done(result)) } - fn delete_creator(&self, param_id: String, param_editgroup: Option, context: &Context) -> Box + Send> { + fn delete_creator(&self, param_ident: String, param_editgroup_id: Option, context: &Context) -> Box + Send> { // Query parameters - let query_editgroup = param_editgroup.map_or_else(String::new, |query| format!("editgroup={editgroup}&", editgroup = query.to_string())); + let query_editgroup_id = param_editgroup_id.map_or_else(String::new, |query| format!("editgroup_id={editgroup_id}&", editgroup_id = query.to_string())); let url = format!( - "{}/v0/creator/{id}?{editgroup}", + "{}/v0/creator/{ident}?{editgroup_id}", self.base_path, - id = utf8_percent_encode(¶m_id.to_string(), PATH_SEGMENT_ENCODE_SET), - editgroup = utf8_percent_encode(&query_editgroup, QUERY_ENCODE_SET) + ident = utf8_percent_encode(¶m_ident.to_string(), PATH_SEGMENT_ENCODE_SET), + editgroup_id = utf8_percent_encode(&query_editgroup_id, QUERY_ENCODE_SET) ); let hyper_client = (self.hyper_client)(); @@ -1230,15 +1238,15 @@ impl Api for Client { Box::new(futures::done(result)) } - fn get_creator(&self, param_id: String, param_expand: Option, param_hide: Option, context: &Context) -> Box + Send> { + fn get_creator(&self, param_ident: String, param_expand: Option, param_hide: Option, context: &Context) -> Box + Send> { // Query parameters let query_expand = param_expand.map_or_else(String::new, |query| format!("expand={expand}&", expand = query.to_string())); let query_hide = param_hide.map_or_else(String::new, |query| format!("hide={hide}&", hide = query.to_string())); let url = format!( - "{}/v0/creator/{id}?{expand}{hide}", + "{}/v0/creator/{ident}?{expand}{hide}", self.base_path, - id = utf8_percent_encode(¶m_id.to_string(), PATH_SEGMENT_ENCODE_SET), + ident = utf8_percent_encode(¶m_ident.to_string(), PATH_SEGMENT_ENCODE_SET), expand = utf8_percent_encode(&query_expand, QUERY_ENCODE_SET), hide = utf8_percent_encode(&query_hide, QUERY_ENCODE_SET) ); @@ -1364,14 +1372,14 @@ impl Api for Client { Box::new(futures::done(result)) } - fn get_creator_history(&self, param_id: String, param_limit: Option, context: &Context) -> Box + Send> { + fn get_creator_history(&self, param_ident: String, param_limit: Option, context: &Context) -> Box + Send> { // Query parameters let query_limit = param_limit.map_or_else(String::new, |query| format!("limit={limit}&", limit = query.to_string())); let url = format!( - "{}/v0/creator/{id}/history?{limit}", + "{}/v0/creator/{ident}/history?{limit}", self.base_path, - id = utf8_percent_encode(¶m_id.to_string(), PATH_SEGMENT_ENCODE_SET), + ident = utf8_percent_encode(¶m_ident.to_string(), PATH_SEGMENT_ENCODE_SET), limit = utf8_percent_encode(&query_limit, QUERY_ENCODE_SET) ); @@ -1432,8 +1440,12 @@ impl Api for Client { Box::new(futures::done(result)) } - fn get_creator_redirects(&self, param_id: String, context: &Context) -> Box + Send> { - let url = format!("{}/v0/creator/{id}/redirects", self.base_path, id = utf8_percent_encode(¶m_id.to_string(), PATH_SEGMENT_ENCODE_SET)); + fn get_creator_redirects(&self, param_ident: String, context: &Context) -> Box + Send> { + let url = format!( + "{}/v0/creator/{ident}/redirects", + self.base_path, + ident = utf8_percent_encode(¶m_ident.to_string(), PATH_SEGMENT_ENCODE_SET) + ); let hyper_client = (self.hyper_client)(); let request = hyper_client.request(hyper::method::Method::Get, &url); @@ -1492,14 +1504,14 @@ impl Api for Client { Box::new(futures::done(result)) } - fn get_creator_releases(&self, param_id: String, param_hide: Option, context: &Context) -> Box + Send> { + fn get_creator_releases(&self, param_ident: String, param_hide: Option, context: &Context) -> Box + Send> { // Query parameters let query_hide = param_hide.map_or_else(String::new, |query| format!("hide={hide}&", hide = query.to_string())); let url = format!( - "{}/v0/creator/{id}/releases?{hide}", + "{}/v0/creator/{ident}/releases?{hide}", self.base_path, - id = utf8_percent_encode(¶m_id.to_string(), PATH_SEGMENT_ENCODE_SET), + ident = utf8_percent_encode(¶m_ident.to_string(), PATH_SEGMENT_ENCODE_SET), hide = utf8_percent_encode(&query_hide, QUERY_ENCODE_SET) ); @@ -1562,7 +1574,7 @@ impl Api for Client { fn get_creator_revision( &self, - param_id: String, + param_rev_id: String, param_expand: Option, param_hide: Option, context: &Context, @@ -1572,9 +1584,9 @@ impl Api for Client { let query_hide = param_hide.map_or_else(String::new, |query| format!("hide={hide}&", hide = query.to_string())); let url = format!( - "{}/v0/creator/rev/{id}?{expand}{hide}", + "{}/v0/creator/rev/{rev_id}?{expand}{hide}", self.base_path, - id = utf8_percent_encode(¶m_id.to_string(), PATH_SEGMENT_ENCODE_SET), + rev_id = utf8_percent_encode(¶m_rev_id.to_string(), PATH_SEGMENT_ENCODE_SET), expand = utf8_percent_encode(&query_expand, QUERY_ENCODE_SET), hide = utf8_percent_encode(&query_hide, QUERY_ENCODE_SET) ); @@ -1718,19 +1730,19 @@ impl Api for Client { fn update_creator( &self, - param_id: String, + param_ident: String, param_entity: models::CreatorEntity, - param_editgroup: Option, + param_editgroup_id: Option, context: &Context, ) -> Box + Send> { // Query parameters - let query_editgroup = param_editgroup.map_or_else(String::new, |query| format!("editgroup={editgroup}&", editgroup = query.to_string())); + let query_editgroup_id = param_editgroup_id.map_or_else(String::new, |query| format!("editgroup_id={editgroup_id}&", editgroup_id = query.to_string())); let url = format!( - "{}/v0/creator/{id}?{editgroup}", + "{}/v0/creator/{ident}?{editgroup_id}", self.base_path, - id = utf8_percent_encode(¶m_id.to_string(), PATH_SEGMENT_ENCODE_SET), - editgroup = utf8_percent_encode(&query_editgroup, QUERY_ENCODE_SET) + ident = utf8_percent_encode(¶m_ident.to_string(), PATH_SEGMENT_ENCODE_SET), + editgroup_id = utf8_percent_encode(&query_editgroup_id, QUERY_ENCODE_SET) ); let body = serde_json::to_string(¶m_entity).expect("impossible to fail to serialize"); @@ -1795,8 +1807,12 @@ impl Api for Client { Box::new(futures::done(result)) } - fn get_editor(&self, param_id: String, context: &Context) -> Box + Send> { - let url = format!("{}/v0/editor/{id}", self.base_path, id = utf8_percent_encode(¶m_id.to_string(), PATH_SEGMENT_ENCODE_SET)); + fn get_editor(&self, param_editor_id: String, context: &Context) -> Box + Send> { + let url = format!( + "{}/v0/editor/{editor_id}", + self.base_path, + editor_id = utf8_percent_encode(¶m_editor_id.to_string(), PATH_SEGMENT_ENCODE_SET) + ); let hyper_client = (self.hyper_client)(); let request = hyper_client.request(hyper::method::Method::Get, &url); @@ -1855,8 +1871,12 @@ impl Api for Client { Box::new(futures::done(result)) } - fn get_editor_changelog(&self, param_id: String, context: &Context) -> Box + Send> { - let url = format!("{}/v0/editor/{id}/changelog", self.base_path, id = utf8_percent_encode(¶m_id.to_string(), PATH_SEGMENT_ENCODE_SET)); + fn get_editor_changelog(&self, param_editor_id: String, context: &Context) -> Box + Send> { + let url = format!( + "{}/v0/editor/{editor_id}/changelog", + self.base_path, + editor_id = utf8_percent_encode(¶m_editor_id.to_string(), PATH_SEGMENT_ENCODE_SET) + ); let hyper_client = (self.hyper_client)(); let request = hyper_client.request(hyper::method::Method::Get, &url); @@ -1964,8 +1984,12 @@ impl Api for Client { Box::new(futures::done(result)) } - fn accept_editgroup(&self, param_id: String, context: &Context) -> Box + Send> { - let url = format!("{}/v0/editgroup/{id}/accept", self.base_path, id = utf8_percent_encode(¶m_id.to_string(), PATH_SEGMENT_ENCODE_SET)); + fn accept_editgroup(&self, param_editgroup_id: String, context: &Context) -> Box + Send> { + let url = format!( + "{}/v0/editgroup/{editgroup_id}/accept", + self.base_path, + editgroup_id = utf8_percent_encode(¶m_editgroup_id.to_string(), PATH_SEGMENT_ENCODE_SET) + ); let hyper_client = (self.hyper_client)(); let request = hyper_client.request(hyper::method::Method::Post, &url); @@ -2138,8 +2162,12 @@ impl Api for Client { Box::new(futures::done(result)) } - fn get_changelog_entry(&self, param_id: i64, context: &Context) -> Box + Send> { - let url = format!("{}/v0/changelog/{id}", self.base_path, id = utf8_percent_encode(¶m_id.to_string(), PATH_SEGMENT_ENCODE_SET)); + fn get_changelog_entry(&self, param_index: i64, context: &Context) -> Box + Send> { + let url = format!( + "{}/v0/changelog/{index}", + self.base_path, + index = utf8_percent_encode(¶m_index.to_string(), PATH_SEGMENT_ENCODE_SET) + ); let hyper_client = (self.hyper_client)(); let request = hyper_client.request(hyper::method::Method::Get, &url); @@ -2191,8 +2219,12 @@ impl Api for Client { Box::new(futures::done(result)) } - fn get_editgroup(&self, param_id: String, context: &Context) -> Box + Send> { - let url = format!("{}/v0/editgroup/{id}", self.base_path, id = utf8_percent_encode(¶m_id.to_string(), PATH_SEGMENT_ENCODE_SET)); + fn get_editgroup(&self, param_editgroup_id: String, context: &Context) -> Box + Send> { + let url = format!( + "{}/v0/editgroup/{editgroup_id}", + self.base_path, + editgroup_id = utf8_percent_encode(¶m_editgroup_id.to_string(), PATH_SEGMENT_ENCODE_SET) + ); let hyper_client = (self.hyper_client)(); let request = hyper_client.request(hyper::method::Method::Get, &url); @@ -2251,11 +2283,11 @@ impl Api for Client { Box::new(futures::done(result)) } - fn create_file(&self, param_entity: models::FileEntity, param_editgroup: Option, context: &Context) -> Box + Send> { + fn create_file(&self, param_entity: models::FileEntity, param_editgroup_id: Option, context: &Context) -> Box + Send> { // Query parameters - let query_editgroup = param_editgroup.map_or_else(String::new, |query| format!("editgroup={editgroup}&", editgroup = query.to_string())); + let query_editgroup_id = param_editgroup_id.map_or_else(String::new, |query| format!("editgroup_id={editgroup_id}&", editgroup_id = query.to_string())); - let url = format!("{}/v0/file?{editgroup}", self.base_path, editgroup = utf8_percent_encode(&query_editgroup, QUERY_ENCODE_SET)); + let url = format!("{}/v0/file?{editgroup_id}", self.base_path, editgroup_id = utf8_percent_encode(&query_editgroup_id, QUERY_ENCODE_SET)); let body = serde_json::to_string(¶m_entity).expect("impossible to fail to serialize"); @@ -2323,18 +2355,18 @@ impl Api for Client { &self, param_entity_list: &Vec, param_autoaccept: Option, - param_editgroup: Option, + param_editgroup_id: Option, context: &Context, ) -> Box + Send> { // Query parameters let query_autoaccept = param_autoaccept.map_or_else(String::new, |query| format!("autoaccept={autoaccept}&", autoaccept = query.to_string())); - let query_editgroup = param_editgroup.map_or_else(String::new, |query| format!("editgroup={editgroup}&", editgroup = query.to_string())); + let query_editgroup_id = param_editgroup_id.map_or_else(String::new, |query| format!("editgroup_id={editgroup_id}&", editgroup_id = query.to_string())); let url = format!( - "{}/v0/file/batch?{autoaccept}{editgroup}", + "{}/v0/file/batch?{autoaccept}{editgroup_id}", self.base_path, autoaccept = utf8_percent_encode(&query_autoaccept, QUERY_ENCODE_SET), - editgroup = utf8_percent_encode(&query_editgroup, QUERY_ENCODE_SET) + editgroup_id = utf8_percent_encode(&query_editgroup_id, QUERY_ENCODE_SET) ); let body = serde_json::to_string(¶m_entity_list).expect("impossible to fail to serialize"); @@ -2399,15 +2431,15 @@ impl Api for Client { Box::new(futures::done(result)) } - fn delete_file(&self, param_id: String, param_editgroup: Option, context: &Context) -> Box + Send> { + fn delete_file(&self, param_ident: String, param_editgroup_id: Option, context: &Context) -> Box + Send> { // Query parameters - let query_editgroup = param_editgroup.map_or_else(String::new, |query| format!("editgroup={editgroup}&", editgroup = query.to_string())); + let query_editgroup_id = param_editgroup_id.map_or_else(String::new, |query| format!("editgroup_id={editgroup_id}&", editgroup_id = query.to_string())); let url = format!( - "{}/v0/file/{id}?{editgroup}", + "{}/v0/file/{ident}?{editgroup_id}", self.base_path, - id = utf8_percent_encode(¶m_id.to_string(), PATH_SEGMENT_ENCODE_SET), - editgroup = utf8_percent_encode(&query_editgroup, QUERY_ENCODE_SET) + ident = utf8_percent_encode(¶m_ident.to_string(), PATH_SEGMENT_ENCODE_SET), + editgroup_id = utf8_percent_encode(&query_editgroup_id, QUERY_ENCODE_SET) ); let hyper_client = (self.hyper_client)(); @@ -2531,15 +2563,15 @@ impl Api for Client { Box::new(futures::done(result)) } - fn get_file(&self, param_id: String, param_expand: Option, param_hide: Option, context: &Context) -> Box + Send> { + fn get_file(&self, param_ident: String, param_expand: Option, param_hide: Option, context: &Context) -> Box + Send> { // Query parameters let query_expand = param_expand.map_or_else(String::new, |query| format!("expand={expand}&", expand = query.to_string())); let query_hide = param_hide.map_or_else(String::new, |query| format!("hide={hide}&", hide = query.to_string())); let url = format!( - "{}/v0/file/{id}?{expand}{hide}", + "{}/v0/file/{ident}?{expand}{hide}", self.base_path, - id = utf8_percent_encode(¶m_id.to_string(), PATH_SEGMENT_ENCODE_SET), + ident = utf8_percent_encode(¶m_ident.to_string(), PATH_SEGMENT_ENCODE_SET), expand = utf8_percent_encode(&query_expand, QUERY_ENCODE_SET), hide = utf8_percent_encode(&query_hide, QUERY_ENCODE_SET) ); @@ -2665,14 +2697,14 @@ impl Api for Client { Box::new(futures::done(result)) } - fn get_file_history(&self, param_id: String, param_limit: Option, context: &Context) -> Box + Send> { + fn get_file_history(&self, param_ident: String, param_limit: Option, context: &Context) -> Box + Send> { // Query parameters let query_limit = param_limit.map_or_else(String::new, |query| format!("limit={limit}&", limit = query.to_string())); let url = format!( - "{}/v0/file/{id}/history?{limit}", + "{}/v0/file/{ident}/history?{limit}", self.base_path, - id = utf8_percent_encode(¶m_id.to_string(), PATH_SEGMENT_ENCODE_SET), + ident = utf8_percent_encode(¶m_ident.to_string(), PATH_SEGMENT_ENCODE_SET), limit = utf8_percent_encode(&query_limit, QUERY_ENCODE_SET) ); @@ -2733,8 +2765,12 @@ impl Api for Client { Box::new(futures::done(result)) } - fn get_file_redirects(&self, param_id: String, context: &Context) -> Box + Send> { - let url = format!("{}/v0/file/{id}/redirects", self.base_path, id = utf8_percent_encode(¶m_id.to_string(), PATH_SEGMENT_ENCODE_SET)); + fn get_file_redirects(&self, param_ident: String, context: &Context) -> Box + Send> { + let url = format!( + "{}/v0/file/{ident}/redirects", + self.base_path, + ident = utf8_percent_encode(¶m_ident.to_string(), PATH_SEGMENT_ENCODE_SET) + ); let hyper_client = (self.hyper_client)(); let request = hyper_client.request(hyper::method::Method::Get, &url); @@ -2793,15 +2829,21 @@ impl Api for Client { Box::new(futures::done(result)) } - fn get_file_revision(&self, param_id: String, param_expand: Option, param_hide: Option, context: &Context) -> Box + Send> { + fn get_file_revision( + &self, + param_rev_id: String, + param_expand: Option, + param_hide: Option, + context: &Context, + ) -> Box + Send> { // Query parameters let query_expand = param_expand.map_or_else(String::new, |query| format!("expand={expand}&", expand = query.to_string())); let query_hide = param_hide.map_or_else(String::new, |query| format!("hide={hide}&", hide = query.to_string())); let url = format!( - "{}/v0/file/rev/{id}?{expand}{hide}", + "{}/v0/file/rev/{rev_id}?{expand}{hide}", self.base_path, - id = utf8_percent_encode(¶m_id.to_string(), PATH_SEGMENT_ENCODE_SET), + rev_id = utf8_percent_encode(¶m_rev_id.to_string(), PATH_SEGMENT_ENCODE_SET), expand = utf8_percent_encode(&query_expand, QUERY_ENCODE_SET), hide = utf8_percent_encode(&query_hide, QUERY_ENCODE_SET) ); @@ -2946,15 +2988,21 @@ impl Api for Client { Box::new(futures::done(result)) } - fn update_file(&self, param_id: String, param_entity: models::FileEntity, param_editgroup: Option, context: &Context) -> Box + Send> { + fn update_file( + &self, + param_ident: String, + param_entity: models::FileEntity, + param_editgroup_id: Option, + context: &Context, + ) -> Box + Send> { // Query parameters - let query_editgroup = param_editgroup.map_or_else(String::new, |query| format!("editgroup={editgroup}&", editgroup = query.to_string())); + let query_editgroup_id = param_editgroup_id.map_or_else(String::new, |query| format!("editgroup_id={editgroup_id}&", editgroup_id = query.to_string())); let url = format!( - "{}/v0/file/{id}?{editgroup}", + "{}/v0/file/{ident}?{editgroup_id}", self.base_path, - id = utf8_percent_encode(¶m_id.to_string(), PATH_SEGMENT_ENCODE_SET), - editgroup = utf8_percent_encode(&query_editgroup, QUERY_ENCODE_SET) + ident = utf8_percent_encode(¶m_ident.to_string(), PATH_SEGMENT_ENCODE_SET), + editgroup_id = utf8_percent_encode(&query_editgroup_id, QUERY_ENCODE_SET) ); let body = serde_json::to_string(¶m_entity).expect("impossible to fail to serialize"); @@ -3019,11 +3067,15 @@ impl Api for Client { Box::new(futures::done(result)) } - fn create_release(&self, param_entity: models::ReleaseEntity, param_editgroup: Option, context: &Context) -> Box + Send> { + fn create_release(&self, param_entity: models::ReleaseEntity, param_editgroup_id: Option, context: &Context) -> Box + Send> { // Query parameters - let query_editgroup = param_editgroup.map_or_else(String::new, |query| format!("editgroup={editgroup}&", editgroup = query.to_string())); + let query_editgroup_id = param_editgroup_id.map_or_else(String::new, |query| format!("editgroup_id={editgroup_id}&", editgroup_id = query.to_string())); - let url = format!("{}/v0/release?{editgroup}", self.base_path, editgroup = utf8_percent_encode(&query_editgroup, QUERY_ENCODE_SET)); + let url = format!( + "{}/v0/release?{editgroup_id}", + self.base_path, + editgroup_id = utf8_percent_encode(&query_editgroup_id, QUERY_ENCODE_SET) + ); let body = serde_json::to_string(¶m_entity).expect("impossible to fail to serialize"); @@ -3091,18 +3143,18 @@ impl Api for Client { &self, param_entity_list: &Vec, param_autoaccept: Option, - param_editgroup: Option, + param_editgroup_id: Option, context: &Context, ) -> Box + Send> { // Query parameters let query_autoaccept = param_autoaccept.map_or_else(String::new, |query| format!("autoaccept={autoaccept}&", autoaccept = query.to_string())); - let query_editgroup = param_editgroup.map_or_else(String::new, |query| format!("editgroup={editgroup}&", editgroup = query.to_string())); + let query_editgroup_id = param_editgroup_id.map_or_else(String::new, |query| format!("editgroup_id={editgroup_id}&", editgroup_id = query.to_string())); let url = format!( - "{}/v0/release/batch?{autoaccept}{editgroup}", + "{}/v0/release/batch?{autoaccept}{editgroup_id}", self.base_path, autoaccept = utf8_percent_encode(&query_autoaccept, QUERY_ENCODE_SET), - editgroup = utf8_percent_encode(&query_editgroup, QUERY_ENCODE_SET) + editgroup_id = utf8_percent_encode(&query_editgroup_id, QUERY_ENCODE_SET) ); let body = serde_json::to_string(¶m_entity_list).expect("impossible to fail to serialize"); @@ -3167,11 +3219,11 @@ impl Api for Client { Box::new(futures::done(result)) } - fn create_work(&self, param_entity: models::WorkEntity, param_editgroup: Option, context: &Context) -> Box + Send> { + fn create_work(&self, param_entity: models::WorkEntity, param_editgroup_id: Option, context: &Context) -> Box + Send> { // Query parameters - let query_editgroup = param_editgroup.map_or_else(String::new, |query| format!("editgroup={editgroup}&", editgroup = query.to_string())); + let query_editgroup_id = param_editgroup_id.map_or_else(String::new, |query| format!("editgroup_id={editgroup_id}&", editgroup_id = query.to_string())); - let url = format!("{}/v0/work?{editgroup}", self.base_path, editgroup = utf8_percent_encode(&query_editgroup, QUERY_ENCODE_SET)); + let url = format!("{}/v0/work?{editgroup_id}", self.base_path, editgroup_id = utf8_percent_encode(&query_editgroup_id, QUERY_ENCODE_SET)); let body = serde_json::to_string(¶m_entity).expect("impossible to fail to serialize"); @@ -3235,15 +3287,15 @@ impl Api for Client { Box::new(futures::done(result)) } - fn delete_release(&self, param_id: String, param_editgroup: Option, context: &Context) -> Box + Send> { + fn delete_release(&self, param_ident: String, param_editgroup_id: Option, context: &Context) -> Box + Send> { // Query parameters - let query_editgroup = param_editgroup.map_or_else(String::new, |query| format!("editgroup={editgroup}&", editgroup = query.to_string())); + let query_editgroup_id = param_editgroup_id.map_or_else(String::new, |query| format!("editgroup_id={editgroup_id}&", editgroup_id = query.to_string())); let url = format!( - "{}/v0/release/{id}?{editgroup}", + "{}/v0/release/{ident}?{editgroup_id}", self.base_path, - id = utf8_percent_encode(¶m_id.to_string(), PATH_SEGMENT_ENCODE_SET), - editgroup = utf8_percent_encode(&query_editgroup, QUERY_ENCODE_SET) + ident = utf8_percent_encode(¶m_ident.to_string(), PATH_SEGMENT_ENCODE_SET), + editgroup_id = utf8_percent_encode(&query_editgroup_id, QUERY_ENCODE_SET) ); let hyper_client = (self.hyper_client)(); @@ -3367,15 +3419,15 @@ impl Api for Client { Box::new(futures::done(result)) } - fn get_release(&self, param_id: String, param_expand: Option, param_hide: Option, context: &Context) -> Box + Send> { + fn get_release(&self, param_ident: String, param_expand: Option, param_hide: Option, context: &Context) -> Box + Send> { // Query parameters let query_expand = param_expand.map_or_else(String::new, |query| format!("expand={expand}&", expand = query.to_string())); let query_hide = param_hide.map_or_else(String::new, |query| format!("hide={hide}&", hide = query.to_string())); let url = format!( - "{}/v0/release/{id}?{expand}{hide}", + "{}/v0/release/{ident}?{expand}{hide}", self.base_path, - id = utf8_percent_encode(¶m_id.to_string(), PATH_SEGMENT_ENCODE_SET), + ident = utf8_percent_encode(¶m_ident.to_string(), PATH_SEGMENT_ENCODE_SET), expand = utf8_percent_encode(&query_expand, QUERY_ENCODE_SET), hide = utf8_percent_encode(&query_hide, QUERY_ENCODE_SET) ); @@ -3501,14 +3553,14 @@ impl Api for Client { Box::new(futures::done(result)) } - fn get_release_files(&self, param_id: String, param_hide: Option, context: &Context) -> Box + Send> { + fn get_release_files(&self, param_ident: String, param_hide: Option, context: &Context) -> Box + Send> { // Query parameters let query_hide = param_hide.map_or_else(String::new, |query| format!("hide={hide}&", hide = query.to_string())); let url = format!( - "{}/v0/release/{id}/files?{hide}", + "{}/v0/release/{ident}/files?{hide}", self.base_path, - id = utf8_percent_encode(¶m_id.to_string(), PATH_SEGMENT_ENCODE_SET), + ident = utf8_percent_encode(¶m_ident.to_string(), PATH_SEGMENT_ENCODE_SET), hide = utf8_percent_encode(&query_hide, QUERY_ENCODE_SET) ); @@ -3569,14 +3621,14 @@ impl Api for Client { Box::new(futures::done(result)) } - fn get_release_history(&self, param_id: String, param_limit: Option, context: &Context) -> Box + Send> { + fn get_release_history(&self, param_ident: String, param_limit: Option, context: &Context) -> Box + Send> { // Query parameters let query_limit = param_limit.map_or_else(String::new, |query| format!("limit={limit}&", limit = query.to_string())); let url = format!( - "{}/v0/release/{id}/history?{limit}", + "{}/v0/release/{ident}/history?{limit}", self.base_path, - id = utf8_percent_encode(¶m_id.to_string(), PATH_SEGMENT_ENCODE_SET), + ident = utf8_percent_encode(¶m_ident.to_string(), PATH_SEGMENT_ENCODE_SET), limit = utf8_percent_encode(&query_limit, QUERY_ENCODE_SET) ); @@ -3637,8 +3689,12 @@ impl Api for Client { Box::new(futures::done(result)) } - fn get_release_redirects(&self, param_id: String, context: &Context) -> Box + Send> { - let url = format!("{}/v0/release/{id}/redirects", self.base_path, id = utf8_percent_encode(¶m_id.to_string(), PATH_SEGMENT_ENCODE_SET)); + fn get_release_redirects(&self, param_ident: String, context: &Context) -> Box + Send> { + let url = format!( + "{}/v0/release/{ident}/redirects", + self.base_path, + ident = utf8_percent_encode(¶m_ident.to_string(), PATH_SEGMENT_ENCODE_SET) + ); let hyper_client = (self.hyper_client)(); let request = hyper_client.request(hyper::method::Method::Get, &url); @@ -3699,7 +3755,7 @@ impl Api for Client { fn get_release_revision( &self, - param_id: String, + param_rev_id: String, param_expand: Option, param_hide: Option, context: &Context, @@ -3709,9 +3765,9 @@ impl Api for Client { let query_hide = param_hide.map_or_else(String::new, |query| format!("hide={hide}&", hide = query.to_string())); let url = format!( - "{}/v0/release/rev/{id}?{expand}{hide}", + "{}/v0/release/rev/{rev_id}?{expand}{hide}", self.base_path, - id = utf8_percent_encode(¶m_id.to_string(), PATH_SEGMENT_ENCODE_SET), + rev_id = utf8_percent_encode(¶m_rev_id.to_string(), PATH_SEGMENT_ENCODE_SET), expand = utf8_percent_encode(&query_expand, QUERY_ENCODE_SET), hide = utf8_percent_encode(&query_hide, QUERY_ENCODE_SET) ); @@ -3867,19 +3923,19 @@ impl Api for Client { fn update_release( &self, - param_id: String, + param_ident: String, param_entity: models::ReleaseEntity, - param_editgroup: Option, + param_editgroup_id: Option, context: &Context, ) -> Box + Send> { // Query parameters - let query_editgroup = param_editgroup.map_or_else(String::new, |query| format!("editgroup={editgroup}&", editgroup = query.to_string())); + let query_editgroup_id = param_editgroup_id.map_or_else(String::new, |query| format!("editgroup_id={editgroup_id}&", editgroup_id = query.to_string())); let url = format!( - "{}/v0/release/{id}?{editgroup}", + "{}/v0/release/{ident}?{editgroup_id}", self.base_path, - id = utf8_percent_encode(¶m_id.to_string(), PATH_SEGMENT_ENCODE_SET), - editgroup = utf8_percent_encode(&query_editgroup, QUERY_ENCODE_SET) + ident = utf8_percent_encode(¶m_ident.to_string(), PATH_SEGMENT_ENCODE_SET), + editgroup_id = utf8_percent_encode(&query_editgroup_id, QUERY_ENCODE_SET) ); let body = serde_json::to_string(¶m_entity).expect("impossible to fail to serialize"); @@ -3948,18 +4004,18 @@ impl Api for Client { &self, param_entity_list: &Vec, param_autoaccept: Option, - param_editgroup: Option, + param_editgroup_id: Option, context: &Context, ) -> Box + Send> { // Query parameters let query_autoaccept = param_autoaccept.map_or_else(String::new, |query| format!("autoaccept={autoaccept}&", autoaccept = query.to_string())); - let query_editgroup = param_editgroup.map_or_else(String::new, |query| format!("editgroup={editgroup}&", editgroup = query.to_string())); + let query_editgroup_id = param_editgroup_id.map_or_else(String::new, |query| format!("editgroup_id={editgroup_id}&", editgroup_id = query.to_string())); let url = format!( - "{}/v0/work/batch?{autoaccept}{editgroup}", + "{}/v0/work/batch?{autoaccept}{editgroup_id}", self.base_path, autoaccept = utf8_percent_encode(&query_autoaccept, QUERY_ENCODE_SET), - editgroup = utf8_percent_encode(&query_editgroup, QUERY_ENCODE_SET) + editgroup_id = utf8_percent_encode(&query_editgroup_id, QUERY_ENCODE_SET) ); let body = serde_json::to_string(¶m_entity_list).expect("impossible to fail to serialize"); @@ -4024,15 +4080,15 @@ impl Api for Client { Box::new(futures::done(result)) } - fn delete_work(&self, param_id: String, param_editgroup: Option, context: &Context) -> Box + Send> { + fn delete_work(&self, param_ident: String, param_editgroup_id: Option, context: &Context) -> Box + Send> { // Query parameters - let query_editgroup = param_editgroup.map_or_else(String::new, |query| format!("editgroup={editgroup}&", editgroup = query.to_string())); + let query_editgroup_id = param_editgroup_id.map_or_else(String::new, |query| format!("editgroup_id={editgroup_id}&", editgroup_id = query.to_string())); let url = format!( - "{}/v0/work/{id}?{editgroup}", + "{}/v0/work/{ident}?{editgroup_id}", self.base_path, - id = utf8_percent_encode(¶m_id.to_string(), PATH_SEGMENT_ENCODE_SET), - editgroup = utf8_percent_encode(&query_editgroup, QUERY_ENCODE_SET) + ident = utf8_percent_encode(¶m_ident.to_string(), PATH_SEGMENT_ENCODE_SET), + editgroup_id = utf8_percent_encode(&query_editgroup_id, QUERY_ENCODE_SET) ); let hyper_client = (self.hyper_client)(); @@ -4156,15 +4212,15 @@ impl Api for Client { Box::new(futures::done(result)) } - fn get_work(&self, param_id: String, param_expand: Option, param_hide: Option, context: &Context) -> Box + Send> { + fn get_work(&self, param_ident: String, param_expand: Option, param_hide: Option, context: &Context) -> Box + Send> { // Query parameters let query_expand = param_expand.map_or_else(String::new, |query| format!("expand={expand}&", expand = query.to_string())); let query_hide = param_hide.map_or_else(String::new, |query| format!("hide={hide}&", hide = query.to_string())); let url = format!( - "{}/v0/work/{id}?{expand}{hide}", + "{}/v0/work/{ident}?{expand}{hide}", self.base_path, - id = utf8_percent_encode(¶m_id.to_string(), PATH_SEGMENT_ENCODE_SET), + ident = utf8_percent_encode(¶m_ident.to_string(), PATH_SEGMENT_ENCODE_SET), expand = utf8_percent_encode(&query_expand, QUERY_ENCODE_SET), hide = utf8_percent_encode(&query_hide, QUERY_ENCODE_SET) ); @@ -4290,14 +4346,14 @@ impl Api for Client { Box::new(futures::done(result)) } - fn get_work_history(&self, param_id: String, param_limit: Option, context: &Context) -> Box + Send> { + fn get_work_history(&self, param_ident: String, param_limit: Option, context: &Context) -> Box + Send> { // Query parameters let query_limit = param_limit.map_or_else(String::new, |query| format!("limit={limit}&", limit = query.to_string())); let url = format!( - "{}/v0/work/{id}/history?{limit}", + "{}/v0/work/{ident}/history?{limit}", self.base_path, - id = utf8_percent_encode(¶m_id.to_string(), PATH_SEGMENT_ENCODE_SET), + ident = utf8_percent_encode(¶m_ident.to_string(), PATH_SEGMENT_ENCODE_SET), limit = utf8_percent_encode(&query_limit, QUERY_ENCODE_SET) ); @@ -4358,8 +4414,12 @@ impl Api for Client { Box::new(futures::done(result)) } - fn get_work_redirects(&self, param_id: String, context: &Context) -> Box + Send> { - let url = format!("{}/v0/work/{id}/redirects", self.base_path, id = utf8_percent_encode(¶m_id.to_string(), PATH_SEGMENT_ENCODE_SET)); + fn get_work_redirects(&self, param_ident: String, context: &Context) -> Box + Send> { + let url = format!( + "{}/v0/work/{ident}/redirects", + self.base_path, + ident = utf8_percent_encode(¶m_ident.to_string(), PATH_SEGMENT_ENCODE_SET) + ); let hyper_client = (self.hyper_client)(); let request = hyper_client.request(hyper::method::Method::Get, &url); @@ -4418,14 +4478,14 @@ impl Api for Client { Box::new(futures::done(result)) } - fn get_work_releases(&self, param_id: String, param_hide: Option, context: &Context) -> Box + Send> { + fn get_work_releases(&self, param_ident: String, param_hide: Option, context: &Context) -> Box + Send> { // Query parameters let query_hide = param_hide.map_or_else(String::new, |query| format!("hide={hide}&", hide = query.to_string())); let url = format!( - "{}/v0/work/{id}/releases?{hide}", + "{}/v0/work/{ident}/releases?{hide}", self.base_path, - id = utf8_percent_encode(¶m_id.to_string(), PATH_SEGMENT_ENCODE_SET), + ident = utf8_percent_encode(¶m_ident.to_string(), PATH_SEGMENT_ENCODE_SET), hide = utf8_percent_encode(&query_hide, QUERY_ENCODE_SET) ); @@ -4486,15 +4546,21 @@ impl Api for Client { Box::new(futures::done(result)) } - fn get_work_revision(&self, param_id: String, param_expand: Option, param_hide: Option, context: &Context) -> Box + Send> { + fn get_work_revision( + &self, + param_rev_id: String, + param_expand: Option, + param_hide: Option, + context: &Context, + ) -> Box + Send> { // Query parameters let query_expand = param_expand.map_or_else(String::new, |query| format!("expand={expand}&", expand = query.to_string())); let query_hide = param_hide.map_or_else(String::new, |query| format!("hide={hide}&", hide = query.to_string())); let url = format!( - "{}/v0/work/rev/{id}?{expand}{hide}", + "{}/v0/work/rev/{rev_id}?{expand}{hide}", self.base_path, - id = utf8_percent_encode(¶m_id.to_string(), PATH_SEGMENT_ENCODE_SET), + rev_id = utf8_percent_encode(¶m_rev_id.to_string(), PATH_SEGMENT_ENCODE_SET), expand = utf8_percent_encode(&query_expand, QUERY_ENCODE_SET), hide = utf8_percent_encode(&query_hide, QUERY_ENCODE_SET) ); @@ -4556,15 +4622,21 @@ impl Api for Client { Box::new(futures::done(result)) } - fn update_work(&self, param_id: String, param_entity: models::WorkEntity, param_editgroup: Option, context: &Context) -> Box + Send> { + fn update_work( + &self, + param_ident: String, + param_entity: models::WorkEntity, + param_editgroup_id: Option, + context: &Context, + ) -> Box + Send> { // Query parameters - let query_editgroup = param_editgroup.map_or_else(String::new, |query| format!("editgroup={editgroup}&", editgroup = query.to_string())); + let query_editgroup_id = param_editgroup_id.map_or_else(String::new, |query| format!("editgroup_id={editgroup_id}&", editgroup_id = query.to_string())); let url = format!( - "{}/v0/work/{id}?{editgroup}", + "{}/v0/work/{ident}?{editgroup_id}", self.base_path, - id = utf8_percent_encode(¶m_id.to_string(), PATH_SEGMENT_ENCODE_SET), - editgroup = utf8_percent_encode(&query_editgroup, QUERY_ENCODE_SET) + ident = utf8_percent_encode(¶m_ident.to_string(), PATH_SEGMENT_ENCODE_SET), + editgroup_id = utf8_percent_encode(&query_editgroup_id, QUERY_ENCODE_SET) ); let body = serde_json::to_string(¶m_entity).expect("impossible to fail to serialize"); diff --git a/rust/fatcat-api-spec/src/lib.rs b/rust/fatcat-api-spec/src/lib.rs index 4e06616f..ba578224 100644 --- a/rust/fatcat-api-spec/src/lib.rs +++ b/rust/fatcat-api-spec/src/lib.rs @@ -804,29 +804,29 @@ pub enum UpdateWorkResponse { /// API pub trait Api { - fn create_container(&self, entity: models::ContainerEntity, editgroup: Option, context: &Context) -> Box + Send>; + fn create_container(&self, entity: models::ContainerEntity, editgroup_id: Option, context: &Context) -> Box + Send>; fn create_container_batch( &self, entity_list: &Vec, autoaccept: Option, - editgroup: Option, + editgroup_id: Option, context: &Context, ) -> Box + Send>; - fn delete_container(&self, id: String, editgroup: Option, context: &Context) -> Box + Send>; + fn delete_container(&self, ident: String, editgroup_id: Option, context: &Context) -> Box + Send>; fn delete_container_edit(&self, edit_id: i64, context: &Context) -> Box + Send>; - fn get_container(&self, id: String, expand: Option, hide: Option, context: &Context) -> Box + Send>; + fn get_container(&self, ident: String, expand: Option, hide: Option, context: &Context) -> Box + Send>; fn get_container_edit(&self, edit_id: i64, context: &Context) -> Box + Send>; - fn get_container_history(&self, id: String, limit: Option, context: &Context) -> Box + Send>; + fn get_container_history(&self, ident: String, limit: Option, context: &Context) -> Box + Send>; - fn get_container_redirects(&self, id: String, context: &Context) -> Box + Send>; + fn get_container_redirects(&self, ident: String, context: &Context) -> Box + Send>; - fn get_container_revision(&self, id: String, expand: Option, hide: Option, context: &Context) -> Box + Send>; + fn get_container_revision(&self, rev_id: String, expand: Option, hide: Option, context: &Context) -> Box + Send>; fn lookup_container( &self, @@ -837,33 +837,34 @@ pub trait Api { context: &Context, ) -> Box + Send>; - fn update_container(&self, id: String, entity: models::ContainerEntity, editgroup: Option, context: &Context) -> Box + Send>; + fn update_container(&self, ident: String, entity: models::ContainerEntity, editgroup_id: Option, context: &Context) + -> Box + Send>; - fn create_creator(&self, entity: models::CreatorEntity, editgroup: Option, context: &Context) -> Box + Send>; + fn create_creator(&self, entity: models::CreatorEntity, editgroup_id: Option, context: &Context) -> Box + Send>; fn create_creator_batch( &self, entity_list: &Vec, autoaccept: Option, - editgroup: Option, + editgroup_id: Option, context: &Context, ) -> Box + Send>; - fn delete_creator(&self, id: String, editgroup: Option, context: &Context) -> Box + Send>; + fn delete_creator(&self, ident: String, editgroup_id: Option, context: &Context) -> Box + Send>; fn delete_creator_edit(&self, edit_id: i64, context: &Context) -> Box + Send>; - fn get_creator(&self, id: String, expand: Option, hide: Option, context: &Context) -> Box + Send>; + fn get_creator(&self, ident: String, expand: Option, hide: Option, context: &Context) -> Box + Send>; fn get_creator_edit(&self, edit_id: i64, context: &Context) -> Box + Send>; - fn get_creator_history(&self, id: String, limit: Option, context: &Context) -> Box + Send>; + fn get_creator_history(&self, ident: String, limit: Option, context: &Context) -> Box + Send>; - fn get_creator_redirects(&self, id: String, context: &Context) -> Box + Send>; + fn get_creator_redirects(&self, ident: String, context: &Context) -> Box + Send>; - fn get_creator_releases(&self, id: String, hide: Option, context: &Context) -> Box + Send>; + fn get_creator_releases(&self, ident: String, hide: Option, context: &Context) -> Box + Send>; - fn get_creator_revision(&self, id: String, expand: Option, hide: Option, context: &Context) -> Box + Send>; + fn get_creator_revision(&self, rev_id: String, expand: Option, hide: Option, context: &Context) -> Box + Send>; fn lookup_creator( &self, @@ -874,47 +875,47 @@ pub trait Api { context: &Context, ) -> Box + Send>; - fn update_creator(&self, id: String, entity: models::CreatorEntity, editgroup: Option, context: &Context) -> Box + Send>; + fn update_creator(&self, ident: String, entity: models::CreatorEntity, editgroup_id: Option, context: &Context) -> Box + Send>; - fn get_editor(&self, id: String, context: &Context) -> Box + Send>; + fn get_editor(&self, editor_id: String, context: &Context) -> Box + Send>; - fn get_editor_changelog(&self, id: String, context: &Context) -> Box + Send>; + fn get_editor_changelog(&self, editor_id: String, context: &Context) -> Box + Send>; fn get_stats(&self, more: Option, context: &Context) -> Box + Send>; - fn accept_editgroup(&self, id: String, context: &Context) -> Box + Send>; + fn accept_editgroup(&self, editgroup_id: String, context: &Context) -> Box + Send>; fn create_editgroup(&self, editgroup: models::Editgroup, context: &Context) -> Box + Send>; fn get_changelog(&self, limit: Option, context: &Context) -> Box + Send>; - fn get_changelog_entry(&self, id: i64, context: &Context) -> Box + Send>; + fn get_changelog_entry(&self, index: i64, context: &Context) -> Box + Send>; - fn get_editgroup(&self, id: String, context: &Context) -> Box + Send>; + fn get_editgroup(&self, editgroup_id: String, context: &Context) -> Box + Send>; - fn create_file(&self, entity: models::FileEntity, editgroup: Option, context: &Context) -> Box + Send>; + fn create_file(&self, entity: models::FileEntity, editgroup_id: Option, context: &Context) -> Box + Send>; fn create_file_batch( &self, entity_list: &Vec, autoaccept: Option, - editgroup: Option, + editgroup_id: Option, context: &Context, ) -> Box + Send>; - fn delete_file(&self, id: String, editgroup: Option, context: &Context) -> Box + Send>; + fn delete_file(&self, ident: String, editgroup_id: Option, context: &Context) -> Box + Send>; fn delete_file_edit(&self, edit_id: i64, context: &Context) -> Box + Send>; - fn get_file(&self, id: String, expand: Option, hide: Option, context: &Context) -> Box + Send>; + fn get_file(&self, ident: String, expand: Option, hide: Option, context: &Context) -> Box + Send>; fn get_file_edit(&self, edit_id: i64, context: &Context) -> Box + Send>; - fn get_file_history(&self, id: String, limit: Option, context: &Context) -> Box + Send>; + fn get_file_history(&self, ident: String, limit: Option, context: &Context) -> Box + Send>; - fn get_file_redirects(&self, id: String, context: &Context) -> Box + Send>; + fn get_file_redirects(&self, ident: String, context: &Context) -> Box + Send>; - fn get_file_revision(&self, id: String, expand: Option, hide: Option, context: &Context) -> Box + Send>; + fn get_file_revision(&self, rev_id: String, expand: Option, hide: Option, context: &Context) -> Box + Send>; fn lookup_file( &self, @@ -926,35 +927,35 @@ pub trait Api { context: &Context, ) -> Box + Send>; - fn update_file(&self, id: String, entity: models::FileEntity, editgroup: Option, context: &Context) -> Box + Send>; + fn update_file(&self, ident: String, entity: models::FileEntity, editgroup_id: Option, context: &Context) -> Box + Send>; - fn create_release(&self, entity: models::ReleaseEntity, editgroup: Option, context: &Context) -> Box + Send>; + fn create_release(&self, entity: models::ReleaseEntity, editgroup_id: Option, context: &Context) -> Box + Send>; fn create_release_batch( &self, entity_list: &Vec, autoaccept: Option, - editgroup: Option, + editgroup_id: Option, context: &Context, ) -> Box + Send>; - fn create_work(&self, entity: models::WorkEntity, editgroup: Option, context: &Context) -> Box + Send>; + fn create_work(&self, entity: models::WorkEntity, editgroup_id: Option, context: &Context) -> Box + Send>; - fn delete_release(&self, id: String, editgroup: Option, context: &Context) -> Box + Send>; + fn delete_release(&self, ident: String, editgroup_id: Option, context: &Context) -> Box + Send>; fn delete_release_edit(&self, edit_id: i64, context: &Context) -> Box + Send>; - fn get_release(&self, id: String, expand: Option, hide: Option, context: &Context) -> Box + Send>; + fn get_release(&self, ident: String, expand: Option, hide: Option, context: &Context) -> Box + Send>; fn get_release_edit(&self, edit_id: i64, context: &Context) -> Box + Send>; - fn get_release_files(&self, id: String, hide: Option, context: &Context) -> Box + Send>; + fn get_release_files(&self, ident: String, hide: Option, context: &Context) -> Box + Send>; - fn get_release_history(&self, id: String, limit: Option, context: &Context) -> Box + Send>; + fn get_release_history(&self, ident: String, limit: Option, context: &Context) -> Box + Send>; - fn get_release_redirects(&self, id: String, context: &Context) -> Box + Send>; + fn get_release_redirects(&self, ident: String, context: &Context) -> Box + Send>; - fn get_release_revision(&self, id: String, expand: Option, hide: Option, context: &Context) -> Box + Send>; + fn get_release_revision(&self, rev_id: String, expand: Option, hide: Option, context: &Context) -> Box + Send>; fn lookup_release( &self, @@ -969,59 +970,59 @@ pub trait Api { context: &Context, ) -> Box + Send>; - fn update_release(&self, id: String, entity: models::ReleaseEntity, editgroup: Option, context: &Context) -> Box + Send>; + fn update_release(&self, ident: String, entity: models::ReleaseEntity, editgroup_id: Option, context: &Context) -> Box + Send>; fn create_work_batch( &self, entity_list: &Vec, autoaccept: Option, - editgroup: Option, + editgroup_id: Option, context: &Context, ) -> Box + Send>; - fn delete_work(&self, id: String, editgroup: Option, context: &Context) -> Box + Send>; + fn delete_work(&self, ident: String, editgroup_id: Option, context: &Context) -> Box + Send>; fn delete_work_edit(&self, edit_id: i64, context: &Context) -> Box + Send>; - fn get_work(&self, id: String, expand: Option, hide: Option, context: &Context) -> Box + Send>; + fn get_work(&self, ident: String, expand: Option, hide: Option, context: &Context) -> Box + Send>; fn get_work_edit(&self, edit_id: i64, context: &Context) -> Box + Send>; - fn get_work_history(&self, id: String, limit: Option, context: &Context) -> Box + Send>; + fn get_work_history(&self, ident: String, limit: Option, context: &Context) -> Box + Send>; - fn get_work_redirects(&self, id: String, context: &Context) -> Box + Send>; + fn get_work_redirects(&self, ident: String, context: &Context) -> Box + Send>; - fn get_work_releases(&self, id: String, hide: Option, context: &Context) -> Box + Send>; + fn get_work_releases(&self, ident: String, hide: Option, context: &Context) -> Box + Send>; - fn get_work_revision(&self, id: String, expand: Option, hide: Option, context: &Context) -> Box + Send>; + fn get_work_revision(&self, rev_id: String, expand: Option, hide: Option, context: &Context) -> Box + Send>; - fn update_work(&self, id: String, entity: models::WorkEntity, editgroup: Option, context: &Context) -> Box + Send>; + fn update_work(&self, ident: String, entity: models::WorkEntity, editgroup_id: Option, context: &Context) -> Box + Send>; } /// API without a `Context` pub trait ApiNoContext { - fn create_container(&self, entity: models::ContainerEntity, editgroup: Option) -> Box + Send>; + fn create_container(&self, entity: models::ContainerEntity, editgroup_id: Option) -> Box + Send>; fn create_container_batch( &self, entity_list: &Vec, autoaccept: Option, - editgroup: Option, + editgroup_id: Option, ) -> Box + Send>; - fn delete_container(&self, id: String, editgroup: Option) -> Box + Send>; + fn delete_container(&self, ident: String, editgroup_id: Option) -> Box + Send>; fn delete_container_edit(&self, edit_id: i64) -> Box + Send>; - fn get_container(&self, id: String, expand: Option, hide: Option) -> Box + Send>; + fn get_container(&self, ident: String, expand: Option, hide: Option) -> Box + Send>; fn get_container_edit(&self, edit_id: i64) -> Box + Send>; - fn get_container_history(&self, id: String, limit: Option) -> Box + Send>; + fn get_container_history(&self, ident: String, limit: Option) -> Box + Send>; - fn get_container_redirects(&self, id: String) -> Box + Send>; + fn get_container_redirects(&self, ident: String) -> Box + Send>; - fn get_container_revision(&self, id: String, expand: Option, hide: Option) -> Box + Send>; + fn get_container_revision(&self, rev_id: String, expand: Option, hide: Option) -> Box + Send>; fn lookup_container( &self, @@ -1031,70 +1032,70 @@ pub trait ApiNoContext { hide: Option, ) -> Box + Send>; - fn update_container(&self, id: String, entity: models::ContainerEntity, editgroup: Option) -> Box + Send>; + fn update_container(&self, ident: String, entity: models::ContainerEntity, editgroup_id: Option) -> Box + Send>; - fn create_creator(&self, entity: models::CreatorEntity, editgroup: Option) -> Box + Send>; + fn create_creator(&self, entity: models::CreatorEntity, editgroup_id: Option) -> Box + Send>; fn create_creator_batch( &self, entity_list: &Vec, autoaccept: Option, - editgroup: Option, + editgroup_id: Option, ) -> Box + Send>; - fn delete_creator(&self, id: String, editgroup: Option) -> Box + Send>; + fn delete_creator(&self, ident: String, editgroup_id: Option) -> Box + Send>; fn delete_creator_edit(&self, edit_id: i64) -> Box + Send>; - fn get_creator(&self, id: String, expand: Option, hide: Option) -> Box + Send>; + fn get_creator(&self, ident: String, expand: Option, hide: Option) -> Box + Send>; fn get_creator_edit(&self, edit_id: i64) -> Box + Send>; - fn get_creator_history(&self, id: String, limit: Option) -> Box + Send>; + fn get_creator_history(&self, ident: String, limit: Option) -> Box + Send>; - fn get_creator_redirects(&self, id: String) -> Box + Send>; + fn get_creator_redirects(&self, ident: String) -> Box + Send>; - fn get_creator_releases(&self, id: String, hide: Option) -> Box + Send>; + fn get_creator_releases(&self, ident: String, hide: Option) -> Box + Send>; - fn get_creator_revision(&self, id: String, expand: Option, hide: Option) -> Box + Send>; + fn get_creator_revision(&self, rev_id: String, expand: Option, hide: Option) -> Box + Send>; fn lookup_creator(&self, orcid: Option, wikidata_qid: Option, expand: Option, hide: Option) -> Box + Send>; - fn update_creator(&self, id: String, entity: models::CreatorEntity, editgroup: Option) -> Box + Send>; + fn update_creator(&self, ident: String, entity: models::CreatorEntity, editgroup_id: Option) -> Box + Send>; - fn get_editor(&self, id: String) -> Box + Send>; + fn get_editor(&self, editor_id: String) -> Box + Send>; - fn get_editor_changelog(&self, id: String) -> Box + Send>; + fn get_editor_changelog(&self, editor_id: String) -> Box + Send>; fn get_stats(&self, more: Option) -> Box + Send>; - fn accept_editgroup(&self, id: String) -> Box + Send>; + fn accept_editgroup(&self, editgroup_id: String) -> Box + Send>; fn create_editgroup(&self, editgroup: models::Editgroup) -> Box + Send>; fn get_changelog(&self, limit: Option) -> Box + Send>; - fn get_changelog_entry(&self, id: i64) -> Box + Send>; + fn get_changelog_entry(&self, index: i64) -> Box + Send>; - fn get_editgroup(&self, id: String) -> Box + Send>; + fn get_editgroup(&self, editgroup_id: String) -> Box + Send>; - fn create_file(&self, entity: models::FileEntity, editgroup: Option) -> Box + Send>; + fn create_file(&self, entity: models::FileEntity, editgroup_id: Option) -> Box + Send>; - fn create_file_batch(&self, entity_list: &Vec, autoaccept: Option, editgroup: Option) -> Box + Send>; + fn create_file_batch(&self, entity_list: &Vec, autoaccept: Option, editgroup_id: Option) -> Box + Send>; - fn delete_file(&self, id: String, editgroup: Option) -> Box + Send>; + fn delete_file(&self, ident: String, editgroup_id: Option) -> Box + Send>; fn delete_file_edit(&self, edit_id: i64) -> Box + Send>; - fn get_file(&self, id: String, expand: Option, hide: Option) -> Box + Send>; + fn get_file(&self, ident: String, expand: Option, hide: Option) -> Box + Send>; fn get_file_edit(&self, edit_id: i64) -> Box + Send>; - fn get_file_history(&self, id: String, limit: Option) -> Box + Send>; + fn get_file_history(&self, ident: String, limit: Option) -> Box + Send>; - fn get_file_redirects(&self, id: String) -> Box + Send>; + fn get_file_redirects(&self, ident: String) -> Box + Send>; - fn get_file_revision(&self, id: String, expand: Option, hide: Option) -> Box + Send>; + fn get_file_revision(&self, rev_id: String, expand: Option, hide: Option) -> Box + Send>; fn lookup_file( &self, @@ -1105,34 +1106,34 @@ pub trait ApiNoContext { hide: Option, ) -> Box + Send>; - fn update_file(&self, id: String, entity: models::FileEntity, editgroup: Option) -> Box + Send>; + fn update_file(&self, ident: String, entity: models::FileEntity, editgroup_id: Option) -> Box + Send>; - fn create_release(&self, entity: models::ReleaseEntity, editgroup: Option) -> Box + Send>; + fn create_release(&self, entity: models::ReleaseEntity, editgroup_id: Option) -> Box + Send>; fn create_release_batch( &self, entity_list: &Vec, autoaccept: Option, - editgroup: Option, + editgroup_id: Option, ) -> Box + Send>; - fn create_work(&self, entity: models::WorkEntity, editgroup: Option) -> Box + Send>; + fn create_work(&self, entity: models::WorkEntity, editgroup_id: Option) -> Box + Send>; - fn delete_release(&self, id: String, editgroup: Option) -> Box + Send>; + fn delete_release(&self, ident: String, editgroup_id: Option) -> Box + Send>; fn delete_release_edit(&self, edit_id: i64) -> Box + Send>; - fn get_release(&self, id: String, expand: Option, hide: Option) -> Box + Send>; + fn get_release(&self, ident: String, expand: Option, hide: Option) -> Box + Send>; fn get_release_edit(&self, edit_id: i64) -> Box + Send>; - fn get_release_files(&self, id: String, hide: Option) -> Box + Send>; + fn get_release_files(&self, ident: String, hide: Option) -> Box + Send>; - fn get_release_history(&self, id: String, limit: Option) -> Box + Send>; + fn get_release_history(&self, ident: String, limit: Option) -> Box + Send>; - fn get_release_redirects(&self, id: String) -> Box + Send>; + fn get_release_redirects(&self, ident: String) -> Box + Send>; - fn get_release_revision(&self, id: String, expand: Option, hide: Option) -> Box + Send>; + fn get_release_revision(&self, rev_id: String, expand: Option, hide: Option) -> Box + Send>; fn lookup_release( &self, @@ -1146,27 +1147,27 @@ pub trait ApiNoContext { hide: Option, ) -> Box + Send>; - fn update_release(&self, id: String, entity: models::ReleaseEntity, editgroup: Option) -> Box + Send>; + fn update_release(&self, ident: String, entity: models::ReleaseEntity, editgroup_id: Option) -> Box + Send>; - fn create_work_batch(&self, entity_list: &Vec, autoaccept: Option, editgroup: Option) -> Box + Send>; + fn create_work_batch(&self, entity_list: &Vec, autoaccept: Option, editgroup_id: Option) -> Box + Send>; - fn delete_work(&self, id: String, editgroup: Option) -> Box + Send>; + fn delete_work(&self, ident: String, editgroup_id: Option) -> Box + Send>; fn delete_work_edit(&self, edit_id: i64) -> Box + Send>; - fn get_work(&self, id: String, expand: Option, hide: Option) -> Box + Send>; + fn get_work(&self, ident: String, expand: Option, hide: Option) -> Box + Send>; fn get_work_edit(&self, edit_id: i64) -> Box + Send>; - fn get_work_history(&self, id: String, limit: Option) -> Box + Send>; + fn get_work_history(&self, ident: String, limit: Option) -> Box + Send>; - fn get_work_redirects(&self, id: String) -> Box + Send>; + fn get_work_redirects(&self, ident: String) -> Box + Send>; - fn get_work_releases(&self, id: String, hide: Option) -> Box + Send>; + fn get_work_releases(&self, ident: String, hide: Option) -> Box + Send>; - fn get_work_revision(&self, id: String, expand: Option, hide: Option) -> Box + Send>; + fn get_work_revision(&self, rev_id: String, expand: Option, hide: Option) -> Box + Send>; - fn update_work(&self, id: String, entity: models::WorkEntity, editgroup: Option) -> Box + Send>; + fn update_work(&self, ident: String, entity: models::WorkEntity, editgroup_id: Option) -> Box + Send>; } /// Trait to extend an API to make it easy to bind it to a context. @@ -1185,45 +1186,45 @@ impl<'a, T: Api + Sized> ContextWrapperExt<'a> for T { } impl<'a, T: Api> ApiNoContext for ContextWrapper<'a, T> { - fn create_container(&self, entity: models::ContainerEntity, editgroup: Option) -> Box + Send> { - self.api().create_container(entity, editgroup, &self.context()) + fn create_container(&self, entity: models::ContainerEntity, editgroup_id: Option) -> Box + Send> { + self.api().create_container(entity, editgroup_id, &self.context()) } fn create_container_batch( &self, entity_list: &Vec, autoaccept: Option, - editgroup: Option, + editgroup_id: Option, ) -> Box + Send> { - self.api().create_container_batch(entity_list, autoaccept, editgroup, &self.context()) + self.api().create_container_batch(entity_list, autoaccept, editgroup_id, &self.context()) } - fn delete_container(&self, id: String, editgroup: Option) -> Box + Send> { - self.api().delete_container(id, editgroup, &self.context()) + fn delete_container(&self, ident: String, editgroup_id: Option) -> Box + Send> { + self.api().delete_container(ident, editgroup_id, &self.context()) } fn delete_container_edit(&self, edit_id: i64) -> Box + Send> { self.api().delete_container_edit(edit_id, &self.context()) } - fn get_container(&self, id: String, expand: Option, hide: Option) -> Box + Send> { - self.api().get_container(id, expand, hide, &self.context()) + fn get_container(&self, ident: String, expand: Option, hide: Option) -> Box + Send> { + self.api().get_container(ident, expand, hide, &self.context()) } fn get_container_edit(&self, edit_id: i64) -> Box + Send> { self.api().get_container_edit(edit_id, &self.context()) } - fn get_container_history(&self, id: String, limit: Option) -> Box + Send> { - self.api().get_container_history(id, limit, &self.context()) + fn get_container_history(&self, ident: String, limit: Option) -> Box + Send> { + self.api().get_container_history(ident, limit, &self.context()) } - fn get_container_redirects(&self, id: String) -> Box + Send> { - self.api().get_container_redirects(id, &self.context()) + fn get_container_redirects(&self, ident: String) -> Box + Send> { + self.api().get_container_redirects(ident, &self.context()) } - fn get_container_revision(&self, id: String, expand: Option, hide: Option) -> Box + Send> { - self.api().get_container_revision(id, expand, hide, &self.context()) + fn get_container_revision(&self, rev_id: String, expand: Option, hide: Option) -> Box + Send> { + self.api().get_container_revision(rev_id, expand, hide, &self.context()) } fn lookup_container( @@ -1236,77 +1237,77 @@ impl<'a, T: Api> ApiNoContext for ContextWrapper<'a, T> { self.api().lookup_container(issnl, wikidata_qid, expand, hide, &self.context()) } - fn update_container(&self, id: String, entity: models::ContainerEntity, editgroup: Option) -> Box + Send> { - self.api().update_container(id, entity, editgroup, &self.context()) + fn update_container(&self, ident: String, entity: models::ContainerEntity, editgroup_id: Option) -> Box + Send> { + self.api().update_container(ident, entity, editgroup_id, &self.context()) } - fn create_creator(&self, entity: models::CreatorEntity, editgroup: Option) -> Box + Send> { - self.api().create_creator(entity, editgroup, &self.context()) + fn create_creator(&self, entity: models::CreatorEntity, editgroup_id: Option) -> Box + Send> { + self.api().create_creator(entity, editgroup_id, &self.context()) } fn create_creator_batch( &self, entity_list: &Vec, autoaccept: Option, - editgroup: Option, + editgroup_id: Option, ) -> Box + Send> { - self.api().create_creator_batch(entity_list, autoaccept, editgroup, &self.context()) + self.api().create_creator_batch(entity_list, autoaccept, editgroup_id, &self.context()) } - fn delete_creator(&self, id: String, editgroup: Option) -> Box + Send> { - self.api().delete_creator(id, editgroup, &self.context()) + fn delete_creator(&self, ident: String, editgroup_id: Option) -> Box + Send> { + self.api().delete_creator(ident, editgroup_id, &self.context()) } fn delete_creator_edit(&self, edit_id: i64) -> Box + Send> { self.api().delete_creator_edit(edit_id, &self.context()) } - fn get_creator(&self, id: String, expand: Option, hide: Option) -> Box + Send> { - self.api().get_creator(id, expand, hide, &self.context()) + fn get_creator(&self, ident: String, expand: Option, hide: Option) -> Box + Send> { + self.api().get_creator(ident, expand, hide, &self.context()) } fn get_creator_edit(&self, edit_id: i64) -> Box + Send> { self.api().get_creator_edit(edit_id, &self.context()) } - fn get_creator_history(&self, id: String, limit: Option) -> Box + Send> { - self.api().get_creator_history(id, limit, &self.context()) + fn get_creator_history(&self, ident: String, limit: Option) -> Box + Send> { + self.api().get_creator_history(ident, limit, &self.context()) } - fn get_creator_redirects(&self, id: String) -> Box + Send> { - self.api().get_creator_redirects(id, &self.context()) + fn get_creator_redirects(&self, ident: String) -> Box + Send> { + self.api().get_creator_redirects(ident, &self.context()) } - fn get_creator_releases(&self, id: String, hide: Option) -> Box + Send> { - self.api().get_creator_releases(id, hide, &self.context()) + fn get_creator_releases(&self, ident: String, hide: Option) -> Box + Send> { + self.api().get_creator_releases(ident, hide, &self.context()) } - fn get_creator_revision(&self, id: String, expand: Option, hide: Option) -> Box + Send> { - self.api().get_creator_revision(id, expand, hide, &self.context()) + fn get_creator_revision(&self, rev_id: String, expand: Option, hide: Option) -> Box + Send> { + self.api().get_creator_revision(rev_id, expand, hide, &self.context()) } fn lookup_creator(&self, orcid: Option, wikidata_qid: Option, expand: Option, hide: Option) -> Box + Send> { self.api().lookup_creator(orcid, wikidata_qid, expand, hide, &self.context()) } - fn update_creator(&self, id: String, entity: models::CreatorEntity, editgroup: Option) -> Box + Send> { - self.api().update_creator(id, entity, editgroup, &self.context()) + fn update_creator(&self, ident: String, entity: models::CreatorEntity, editgroup_id: Option) -> Box + Send> { + self.api().update_creator(ident, entity, editgroup_id, &self.context()) } - fn get_editor(&self, id: String) -> Box + Send> { - self.api().get_editor(id, &self.context()) + fn get_editor(&self, editor_id: String) -> Box + Send> { + self.api().get_editor(editor_id, &self.context()) } - fn get_editor_changelog(&self, id: String) -> Box + Send> { - self.api().get_editor_changelog(id, &self.context()) + fn get_editor_changelog(&self, editor_id: String) -> Box + Send> { + self.api().get_editor_changelog(editor_id, &self.context()) } fn get_stats(&self, more: Option) -> Box + Send> { self.api().get_stats(more, &self.context()) } - fn accept_editgroup(&self, id: String) -> Box + Send> { - self.api().accept_editgroup(id, &self.context()) + fn accept_editgroup(&self, editgroup_id: String) -> Box + Send> { + self.api().accept_editgroup(editgroup_id, &self.context()) } fn create_editgroup(&self, editgroup: models::Editgroup) -> Box + Send> { @@ -1317,48 +1318,48 @@ impl<'a, T: Api> ApiNoContext for ContextWrapper<'a, T> { self.api().get_changelog(limit, &self.context()) } - fn get_changelog_entry(&self, id: i64) -> Box + Send> { - self.api().get_changelog_entry(id, &self.context()) + fn get_changelog_entry(&self, index: i64) -> Box + Send> { + self.api().get_changelog_entry(index, &self.context()) } - fn get_editgroup(&self, id: String) -> Box + Send> { - self.api().get_editgroup(id, &self.context()) + fn get_editgroup(&self, editgroup_id: String) -> Box + Send> { + self.api().get_editgroup(editgroup_id, &self.context()) } - fn create_file(&self, entity: models::FileEntity, editgroup: Option) -> Box + Send> { - self.api().create_file(entity, editgroup, &self.context()) + fn create_file(&self, entity: models::FileEntity, editgroup_id: Option) -> Box + Send> { + self.api().create_file(entity, editgroup_id, &self.context()) } - fn create_file_batch(&self, entity_list: &Vec, autoaccept: Option, editgroup: Option) -> Box + Send> { - self.api().create_file_batch(entity_list, autoaccept, editgroup, &self.context()) + fn create_file_batch(&self, entity_list: &Vec, autoaccept: Option, editgroup_id: Option) -> Box + Send> { + self.api().create_file_batch(entity_list, autoaccept, editgroup_id, &self.context()) } - fn delete_file(&self, id: String, editgroup: Option) -> Box + Send> { - self.api().delete_file(id, editgroup, &self.context()) + fn delete_file(&self, ident: String, editgroup_id: Option) -> Box + Send> { + self.api().delete_file(ident, editgroup_id, &self.context()) } fn delete_file_edit(&self, edit_id: i64) -> Box + Send> { self.api().delete_file_edit(edit_id, &self.context()) } - fn get_file(&self, id: String, expand: Option, hide: Option) -> Box + Send> { - self.api().get_file(id, expand, hide, &self.context()) + fn get_file(&self, ident: String, expand: Option, hide: Option) -> Box + Send> { + self.api().get_file(ident, expand, hide, &self.context()) } fn get_file_edit(&self, edit_id: i64) -> Box + Send> { self.api().get_file_edit(edit_id, &self.context()) } - fn get_file_history(&self, id: String, limit: Option) -> Box + Send> { - self.api().get_file_history(id, limit, &self.context()) + fn get_file_history(&self, ident: String, limit: Option) -> Box + Send> { + self.api().get_file_history(ident, limit, &self.context()) } - fn get_file_redirects(&self, id: String) -> Box + Send> { - self.api().get_file_redirects(id, &self.context()) + fn get_file_redirects(&self, ident: String) -> Box + Send> { + self.api().get_file_redirects(ident, &self.context()) } - fn get_file_revision(&self, id: String, expand: Option, hide: Option) -> Box + Send> { - self.api().get_file_revision(id, expand, hide, &self.context()) + fn get_file_revision(&self, rev_id: String, expand: Option, hide: Option) -> Box + Send> { + self.api().get_file_revision(rev_id, expand, hide, &self.context()) } fn lookup_file( @@ -1372,57 +1373,57 @@ impl<'a, T: Api> ApiNoContext for ContextWrapper<'a, T> { self.api().lookup_file(md5, sha1, sha256, expand, hide, &self.context()) } - fn update_file(&self, id: String, entity: models::FileEntity, editgroup: Option) -> Box + Send> { - self.api().update_file(id, entity, editgroup, &self.context()) + fn update_file(&self, ident: String, entity: models::FileEntity, editgroup_id: Option) -> Box + Send> { + self.api().update_file(ident, entity, editgroup_id, &self.context()) } - fn create_release(&self, entity: models::ReleaseEntity, editgroup: Option) -> Box + Send> { - self.api().create_release(entity, editgroup, &self.context()) + fn create_release(&self, entity: models::ReleaseEntity, editgroup_id: Option) -> Box + Send> { + self.api().create_release(entity, editgroup_id, &self.context()) } fn create_release_batch( &self, entity_list: &Vec, autoaccept: Option, - editgroup: Option, + editgroup_id: Option, ) -> Box + Send> { - self.api().create_release_batch(entity_list, autoaccept, editgroup, &self.context()) + self.api().create_release_batch(entity_list, autoaccept, editgroup_id, &self.context()) } - fn create_work(&self, entity: models::WorkEntity, editgroup: Option) -> Box + Send> { - self.api().create_work(entity, editgroup, &self.context()) + fn create_work(&self, entity: models::WorkEntity, editgroup_id: Option) -> Box + Send> { + self.api().create_work(entity, editgroup_id, &self.context()) } - fn delete_release(&self, id: String, editgroup: Option) -> Box + Send> { - self.api().delete_release(id, editgroup, &self.context()) + fn delete_release(&self, ident: String, editgroup_id: Option) -> Box + Send> { + self.api().delete_release(ident, editgroup_id, &self.context()) } fn delete_release_edit(&self, edit_id: i64) -> Box + Send> { self.api().delete_release_edit(edit_id, &self.context()) } - fn get_release(&self, id: String, expand: Option, hide: Option) -> Box + Send> { - self.api().get_release(id, expand, hide, &self.context()) + fn get_release(&self, ident: String, expand: Option, hide: Option) -> Box + Send> { + self.api().get_release(ident, expand, hide, &self.context()) } fn get_release_edit(&self, edit_id: i64) -> Box + Send> { self.api().get_release_edit(edit_id, &self.context()) } - fn get_release_files(&self, id: String, hide: Option) -> Box + Send> { - self.api().get_release_files(id, hide, &self.context()) + fn get_release_files(&self, ident: String, hide: Option) -> Box + Send> { + self.api().get_release_files(ident, hide, &self.context()) } - fn get_release_history(&self, id: String, limit: Option) -> Box + Send> { - self.api().get_release_history(id, limit, &self.context()) + fn get_release_history(&self, ident: String, limit: Option) -> Box + Send> { + self.api().get_release_history(ident, limit, &self.context()) } - fn get_release_redirects(&self, id: String) -> Box + Send> { - self.api().get_release_redirects(id, &self.context()) + fn get_release_redirects(&self, ident: String) -> Box + Send> { + self.api().get_release_redirects(ident, &self.context()) } - fn get_release_revision(&self, id: String, expand: Option, hide: Option) -> Box + Send> { - self.api().get_release_revision(id, expand, hide, &self.context()) + fn get_release_revision(&self, rev_id: String, expand: Option, hide: Option) -> Box + Send> { + self.api().get_release_revision(rev_id, expand, hide, &self.context()) } fn lookup_release( @@ -1439,48 +1440,48 @@ impl<'a, T: Api> ApiNoContext for ContextWrapper<'a, T> { self.api().lookup_release(doi, wikidata_qid, isbn13, pmid, pmcid, core_id, expand, hide, &self.context()) } - fn update_release(&self, id: String, entity: models::ReleaseEntity, editgroup: Option) -> Box + Send> { - self.api().update_release(id, entity, editgroup, &self.context()) + fn update_release(&self, ident: String, entity: models::ReleaseEntity, editgroup_id: Option) -> Box + Send> { + self.api().update_release(ident, entity, editgroup_id, &self.context()) } - fn create_work_batch(&self, entity_list: &Vec, autoaccept: Option, editgroup: Option) -> Box + Send> { - self.api().create_work_batch(entity_list, autoaccept, editgroup, &self.context()) + fn create_work_batch(&self, entity_list: &Vec, autoaccept: Option, editgroup_id: Option) -> Box + Send> { + self.api().create_work_batch(entity_list, autoaccept, editgroup_id, &self.context()) } - fn delete_work(&self, id: String, editgroup: Option) -> Box + Send> { - self.api().delete_work(id, editgroup, &self.context()) + fn delete_work(&self, ident: String, editgroup_id: Option) -> Box + Send> { + self.api().delete_work(ident, editgroup_id, &self.context()) } fn delete_work_edit(&self, edit_id: i64) -> Box + Send> { self.api().delete_work_edit(edit_id, &self.context()) } - fn get_work(&self, id: String, expand: Option, hide: Option) -> Box + Send> { - self.api().get_work(id, expand, hide, &self.context()) + fn get_work(&self, ident: String, expand: Option, hide: Option) -> Box + Send> { + self.api().get_work(ident, expand, hide, &self.context()) } fn get_work_edit(&self, edit_id: i64) -> Box + Send> { self.api().get_work_edit(edit_id, &self.context()) } - fn get_work_history(&self, id: String, limit: Option) -> Box + Send> { - self.api().get_work_history(id, limit, &self.context()) + fn get_work_history(&self, ident: String, limit: Option) -> Box + Send> { + self.api().get_work_history(ident, limit, &self.context()) } - fn get_work_redirects(&self, id: String) -> Box + Send> { - self.api().get_work_redirects(id, &self.context()) + fn get_work_redirects(&self, ident: String) -> Box + Send> { + self.api().get_work_redirects(ident, &self.context()) } - fn get_work_releases(&self, id: String, hide: Option) -> Box + Send> { - self.api().get_work_releases(id, hide, &self.context()) + fn get_work_releases(&self, ident: String, hide: Option) -> Box + Send> { + self.api().get_work_releases(ident, hide, &self.context()) } - fn get_work_revision(&self, id: String, expand: Option, hide: Option) -> Box + Send> { - self.api().get_work_revision(id, expand, hide, &self.context()) + fn get_work_revision(&self, rev_id: String, expand: Option, hide: Option) -> Box + Send> { + self.api().get_work_revision(rev_id, expand, hide, &self.context()) } - fn update_work(&self, id: String, entity: models::WorkEntity, editgroup: Option) -> Box + Send> { - self.api().update_work(id, entity, editgroup, &self.context()) + fn update_work(&self, ident: String, entity: models::WorkEntity, editgroup_id: Option) -> Box + Send> { + self.api().update_work(ident, entity, editgroup_id, &self.context()) } } diff --git a/rust/fatcat-api-spec/src/models.rs b/rust/fatcat-api-spec/src/models.rs index b8bd9a70..d640be42 100644 --- a/rust/fatcat-api-spec/src/models.rs +++ b/rust/fatcat-api-spec/src/models.rs @@ -184,9 +184,9 @@ impl CreatorEntity { #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct Editgroup { /// base32-encoded unique identifier - #[serde(rename = "id")] + #[serde(rename = "editgroup_id")] #[serde(skip_serializing_if = "Option::is_none")] - pub id: Option, + pub editgroup_id: Option, /// base32-encoded unique identifier #[serde(rename = "editor_id")] @@ -208,7 +208,7 @@ pub struct Editgroup { impl Editgroup { pub fn new(editor_id: String) -> Editgroup { Editgroup { - id: None, + editgroup_id: None, editor_id: editor_id, description: None, extra: None, @@ -254,9 +254,9 @@ impl EditgroupEdits { #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct Editor { - #[serde(rename = "id")] + #[serde(rename = "editor_id")] #[serde(skip_serializing_if = "Option::is_none")] - pub id: Option, + pub editor_id: Option, #[serde(rename = "username")] pub username: String, @@ -264,7 +264,7 @@ pub struct Editor { impl Editor { pub fn new(username: String) -> Editor { - Editor { id: None, username: username } + Editor { editor_id: None, username: username } } } @@ -346,9 +346,9 @@ impl ErrorResponse { #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct FileEntity { - #[serde(rename = "releases")] + #[serde(rename = "release_ids")] #[serde(skip_serializing_if = "Option::is_none")] - pub releases: Option>, + pub release_ids: Option>, #[serde(rename = "mimetype")] #[serde(skip_serializing_if = "Option::is_none")] @@ -406,7 +406,7 @@ pub struct FileEntity { impl FileEntity { pub fn new() -> FileEntity { FileEntity { - releases: None, + release_ids: None, mimetype: None, urls: None, sha256: None, diff --git a/rust/fatcat-api-spec/src/server.rs b/rust/fatcat-api-spec/src/server.rs index 84c691ef..6dec84b9 100644 --- a/rust/fatcat-api-spec/src/server.rs +++ b/rust/fatcat-api-spec/src/server.rs @@ -110,7 +110,7 @@ where // Query parameters (note that non-required or collection query parameters will ignore garbage values, rather than causing a 400 response) let query_params = req.get::().unwrap_or_default(); - let param_editgroup = query_params.get("editgroup").and_then(|list| list.first()).and_then(|x| x.parse::().ok()); + let param_editgroup_id = query_params.get("editgroup_id").and_then(|list| list.first()).and_then(|x| x.parse::().ok()); // Body parameters (note that non-required body parameters will ignore garbage // values, rather than causing a 400 response). Produce warning header and logs for @@ -137,7 +137,7 @@ where }; let param_entity = param_entity.ok_or_else(|| Response::with((status::BadRequest, "Missing required body parameter entity".to_string())))?; - match api.create_container(param_entity, param_editgroup, context).wait() { + match api.create_container(param_entity, param_editgroup_id, context).wait() { Ok(rsp) => match rsp { CreateContainerResponse::CreatedEntity(body) => { let body_string = serde_json::to_string(&body).expect("impossible to fail to serialize"); @@ -222,7 +222,7 @@ where // Query parameters (note that non-required or collection query parameters will ignore garbage values, rather than causing a 400 response) let query_params = req.get::().unwrap_or_default(); let param_autoaccept = query_params.get("autoaccept").and_then(|list| list.first()).and_then(|x| x.parse::().ok()); - let param_editgroup = query_params.get("editgroup").and_then(|list| list.first()).and_then(|x| x.parse::().ok()); + let param_editgroup_id = query_params.get("editgroup_id").and_then(|list| list.first()).and_then(|x| x.parse::().ok()); // Body parameters (note that non-required body parameters will ignore garbage // values, rather than causing a 400 response). Produce warning header and logs for @@ -249,7 +249,7 @@ where }; let param_entity_list = param_entity_list.ok_or_else(|| Response::with((status::BadRequest, "Missing required body parameter entity_list".to_string())))?; - match api.create_container_batch(param_entity_list.as_ref(), param_autoaccept, param_editgroup, context).wait() { + match api.create_container_batch(param_entity_list.as_ref(), param_autoaccept, param_editgroup_id, context).wait() { Ok(rsp) => match rsp { CreateContainerBatchResponse::CreatedEntities(body) => { let body_string = serde_json::to_string(&body).expect("impossible to fail to serialize"); @@ -318,7 +318,7 @@ where let api_clone = api.clone(); router.delete( - "/v0/container/:id", + "/v0/container/:ident", move |req: &mut Request| { let mut context = Context::default(); @@ -332,25 +332,25 @@ where context.authorization = req.extensions.remove::(); // Path parameters - let param_id = { + let param_ident = { let param = req .extensions .get::() .ok_or_else(|| Response::with((status::InternalServerError, "An internal error occurred".to_string())))? - .find("id") - .ok_or_else(|| Response::with((status::BadRequest, "Missing path parameter id".to_string())))?; + .find("ident") + .ok_or_else(|| Response::with((status::BadRequest, "Missing path parameter ident".to_string())))?; percent_decode(param.as_bytes()) .decode_utf8() .map_err(|_| Response::with((status::BadRequest, format!("Couldn't percent-decode path parameter as UTF-8: {}", param))))? .parse() - .map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse path parameter id: {}", e))))? + .map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse path parameter ident: {}", e))))? }; // Query parameters (note that non-required or collection query parameters will ignore garbage values, rather than causing a 400 response) let query_params = req.get::().unwrap_or_default(); - let param_editgroup = query_params.get("editgroup").and_then(|list| list.first()).and_then(|x| x.parse::().ok()); + let param_editgroup_id = query_params.get("editgroup_id").and_then(|list| list.first()).and_then(|x| x.parse::().ok()); - match api.delete_container(param_id, param_editgroup, context).wait() { + match api.delete_container(param_ident, param_editgroup_id, context).wait() { Ok(rsp) => match rsp { DeleteContainerResponse::DeletedEntity(body) => { let body_string = serde_json::to_string(&body).expect("impossible to fail to serialize"); @@ -500,7 +500,7 @@ where let api_clone = api.clone(); router.get( - "/v0/container/:id", + "/v0/container/:ident", move |req: &mut Request| { let mut context = Context::default(); @@ -514,18 +514,18 @@ where context.authorization = req.extensions.remove::(); // Path parameters - let param_id = { + let param_ident = { let param = req .extensions .get::() .ok_or_else(|| Response::with((status::InternalServerError, "An internal error occurred".to_string())))? - .find("id") - .ok_or_else(|| Response::with((status::BadRequest, "Missing path parameter id".to_string())))?; + .find("ident") + .ok_or_else(|| Response::with((status::BadRequest, "Missing path parameter ident".to_string())))?; percent_decode(param.as_bytes()) .decode_utf8() .map_err(|_| Response::with((status::BadRequest, format!("Couldn't percent-decode path parameter as UTF-8: {}", param))))? .parse() - .map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse path parameter id: {}", e))))? + .map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse path parameter ident: {}", e))))? }; // Query parameters (note that non-required or collection query parameters will ignore garbage values, rather than causing a 400 response) @@ -533,7 +533,7 @@ where let param_expand = query_params.get("expand").and_then(|list| list.first()).and_then(|x| x.parse::().ok()); let param_hide = query_params.get("hide").and_then(|list| list.first()).and_then(|x| x.parse::().ok()); - match api.get_container(param_id, param_expand, param_hide, context).wait() { + match api.get_container(param_ident, param_expand, param_hide, context).wait() { Ok(rsp) => match rsp { GetContainerResponse::FoundEntity(body) => { let body_string = serde_json::to_string(&body).expect("impossible to fail to serialize"); @@ -683,7 +683,7 @@ where let api_clone = api.clone(); router.get( - "/v0/container/:id/history", + "/v0/container/:ident/history", move |req: &mut Request| { let mut context = Context::default(); @@ -697,25 +697,25 @@ where context.authorization = req.extensions.remove::(); // Path parameters - let param_id = { + let param_ident = { let param = req .extensions .get::() .ok_or_else(|| Response::with((status::InternalServerError, "An internal error occurred".to_string())))? - .find("id") - .ok_or_else(|| Response::with((status::BadRequest, "Missing path parameter id".to_string())))?; + .find("ident") + .ok_or_else(|| Response::with((status::BadRequest, "Missing path parameter ident".to_string())))?; percent_decode(param.as_bytes()) .decode_utf8() .map_err(|_| Response::with((status::BadRequest, format!("Couldn't percent-decode path parameter as UTF-8: {}", param))))? .parse() - .map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse path parameter id: {}", e))))? + .map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse path parameter ident: {}", e))))? }; // Query parameters (note that non-required or collection query parameters will ignore garbage values, rather than causing a 400 response) let query_params = req.get::().unwrap_or_default(); let param_limit = query_params.get("limit").and_then(|list| list.first()).and_then(|x| x.parse::().ok()); - match api.get_container_history(param_id, param_limit, context).wait() { + match api.get_container_history(param_ident, param_limit, context).wait() { Ok(rsp) => match rsp { GetContainerHistoryResponse::FoundEntityHistory(body) => { let body_string = serde_json::to_string(&body).expect("impossible to fail to serialize"); @@ -776,7 +776,7 @@ where let api_clone = api.clone(); router.get( - "/v0/container/:id/redirects", + "/v0/container/:ident/redirects", move |req: &mut Request| { let mut context = Context::default(); @@ -790,21 +790,21 @@ where context.authorization = req.extensions.remove::(); // Path parameters - let param_id = { + let param_ident = { let param = req .extensions .get::() .ok_or_else(|| Response::with((status::InternalServerError, "An internal error occurred".to_string())))? - .find("id") - .ok_or_else(|| Response::with((status::BadRequest, "Missing path parameter id".to_string())))?; + .find("ident") + .ok_or_else(|| Response::with((status::BadRequest, "Missing path parameter ident".to_string())))?; percent_decode(param.as_bytes()) .decode_utf8() .map_err(|_| Response::with((status::BadRequest, format!("Couldn't percent-decode path parameter as UTF-8: {}", param))))? .parse() - .map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse path parameter id: {}", e))))? + .map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse path parameter ident: {}", e))))? }; - match api.get_container_redirects(param_id, context).wait() { + match api.get_container_redirects(param_ident, context).wait() { Ok(rsp) => match rsp { GetContainerRedirectsResponse::FoundEntityRedirects(body) => { let body_string = serde_json::to_string(&body).expect("impossible to fail to serialize"); @@ -865,7 +865,7 @@ where let api_clone = api.clone(); router.get( - "/v0/container/rev/:id", + "/v0/container/rev/:rev_id", move |req: &mut Request| { let mut context = Context::default(); @@ -879,18 +879,18 @@ where context.authorization = req.extensions.remove::(); // Path parameters - let param_id = { + let param_rev_id = { let param = req .extensions .get::() .ok_or_else(|| Response::with((status::InternalServerError, "An internal error occurred".to_string())))? - .find("id") - .ok_or_else(|| Response::with((status::BadRequest, "Missing path parameter id".to_string())))?; + .find("rev_id") + .ok_or_else(|| Response::with((status::BadRequest, "Missing path parameter rev_id".to_string())))?; percent_decode(param.as_bytes()) .decode_utf8() .map_err(|_| Response::with((status::BadRequest, format!("Couldn't percent-decode path parameter as UTF-8: {}", param))))? .parse() - .map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse path parameter id: {}", e))))? + .map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse path parameter rev_id: {}", e))))? }; // Query parameters (note that non-required or collection query parameters will ignore garbage values, rather than causing a 400 response) @@ -898,7 +898,7 @@ where let param_expand = query_params.get("expand").and_then(|list| list.first()).and_then(|x| x.parse::().ok()); let param_hide = query_params.get("hide").and_then(|list| list.first()).and_then(|x| x.parse::().ok()); - match api.get_container_revision(param_id, param_expand, param_hide, context).wait() { + match api.get_container_revision(param_rev_id, param_expand, param_hide, context).wait() { Ok(rsp) => match rsp { GetContainerRevisionResponse::FoundEntityRevision(body) => { let body_string = serde_json::to_string(&body).expect("impossible to fail to serialize"); @@ -1040,7 +1040,7 @@ where let api_clone = api.clone(); router.put( - "/v0/container/:id", + "/v0/container/:ident", move |req: &mut Request| { let mut context = Context::default(); @@ -1054,23 +1054,23 @@ where context.authorization = req.extensions.remove::(); // Path parameters - let param_id = { + let param_ident = { let param = req .extensions .get::() .ok_or_else(|| Response::with((status::InternalServerError, "An internal error occurred".to_string())))? - .find("id") - .ok_or_else(|| Response::with((status::BadRequest, "Missing path parameter id".to_string())))?; + .find("ident") + .ok_or_else(|| Response::with((status::BadRequest, "Missing path parameter ident".to_string())))?; percent_decode(param.as_bytes()) .decode_utf8() .map_err(|_| Response::with((status::BadRequest, format!("Couldn't percent-decode path parameter as UTF-8: {}", param))))? .parse() - .map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse path parameter id: {}", e))))? + .map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse path parameter ident: {}", e))))? }; // Query parameters (note that non-required or collection query parameters will ignore garbage values, rather than causing a 400 response) let query_params = req.get::().unwrap_or_default(); - let param_editgroup = query_params.get("editgroup").and_then(|list| list.first()).and_then(|x| x.parse::().ok()); + let param_editgroup_id = query_params.get("editgroup_id").and_then(|list| list.first()).and_then(|x| x.parse::().ok()); // Body parameters (note that non-required body parameters will ignore garbage // values, rather than causing a 400 response). Produce warning header and logs for @@ -1097,7 +1097,7 @@ where }; let param_entity = param_entity.ok_or_else(|| Response::with((status::BadRequest, "Missing required body parameter entity".to_string())))?; - match api.update_container(param_id, param_entity, param_editgroup, context).wait() { + match api.update_container(param_ident, param_entity, param_editgroup_id, context).wait() { Ok(rsp) => match rsp { UpdateContainerResponse::UpdatedEntity(body) => { let body_string = serde_json::to_string(&body).expect("impossible to fail to serialize"); @@ -1181,7 +1181,7 @@ where // Query parameters (note that non-required or collection query parameters will ignore garbage values, rather than causing a 400 response) let query_params = req.get::().unwrap_or_default(); - let param_editgroup = query_params.get("editgroup").and_then(|list| list.first()).and_then(|x| x.parse::().ok()); + let param_editgroup_id = query_params.get("editgroup_id").and_then(|list| list.first()).and_then(|x| x.parse::().ok()); // Body parameters (note that non-required body parameters will ignore garbage // values, rather than causing a 400 response). Produce warning header and logs for @@ -1208,7 +1208,7 @@ where }; let param_entity = param_entity.ok_or_else(|| Response::with((status::BadRequest, "Missing required body parameter entity".to_string())))?; - match api.create_creator(param_entity, param_editgroup, context).wait() { + match api.create_creator(param_entity, param_editgroup_id, context).wait() { Ok(rsp) => match rsp { CreateCreatorResponse::CreatedEntity(body) => { let body_string = serde_json::to_string(&body).expect("impossible to fail to serialize"); @@ -1293,7 +1293,7 @@ where // Query parameters (note that non-required or collection query parameters will ignore garbage values, rather than causing a 400 response) let query_params = req.get::().unwrap_or_default(); let param_autoaccept = query_params.get("autoaccept").and_then(|list| list.first()).and_then(|x| x.parse::().ok()); - let param_editgroup = query_params.get("editgroup").and_then(|list| list.first()).and_then(|x| x.parse::().ok()); + let param_editgroup_id = query_params.get("editgroup_id").and_then(|list| list.first()).and_then(|x| x.parse::().ok()); // Body parameters (note that non-required body parameters will ignore garbage // values, rather than causing a 400 response). Produce warning header and logs for @@ -1320,7 +1320,7 @@ where }; let param_entity_list = param_entity_list.ok_or_else(|| Response::with((status::BadRequest, "Missing required body parameter entity_list".to_string())))?; - match api.create_creator_batch(param_entity_list.as_ref(), param_autoaccept, param_editgroup, context).wait() { + match api.create_creator_batch(param_entity_list.as_ref(), param_autoaccept, param_editgroup_id, context).wait() { Ok(rsp) => match rsp { CreateCreatorBatchResponse::CreatedEntities(body) => { let body_string = serde_json::to_string(&body).expect("impossible to fail to serialize"); @@ -1389,7 +1389,7 @@ where let api_clone = api.clone(); router.delete( - "/v0/creator/:id", + "/v0/creator/:ident", move |req: &mut Request| { let mut context = Context::default(); @@ -1403,25 +1403,25 @@ where context.authorization = req.extensions.remove::(); // Path parameters - let param_id = { + let param_ident = { let param = req .extensions .get::() .ok_or_else(|| Response::with((status::InternalServerError, "An internal error occurred".to_string())))? - .find("id") - .ok_or_else(|| Response::with((status::BadRequest, "Missing path parameter id".to_string())))?; + .find("ident") + .ok_or_else(|| Response::with((status::BadRequest, "Missing path parameter ident".to_string())))?; percent_decode(param.as_bytes()) .decode_utf8() .map_err(|_| Response::with((status::BadRequest, format!("Couldn't percent-decode path parameter as UTF-8: {}", param))))? .parse() - .map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse path parameter id: {}", e))))? + .map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse path parameter ident: {}", e))))? }; // Query parameters (note that non-required or collection query parameters will ignore garbage values, rather than causing a 400 response) let query_params = req.get::().unwrap_or_default(); - let param_editgroup = query_params.get("editgroup").and_then(|list| list.first()).and_then(|x| x.parse::().ok()); + let param_editgroup_id = query_params.get("editgroup_id").and_then(|list| list.first()).and_then(|x| x.parse::().ok()); - match api.delete_creator(param_id, param_editgroup, context).wait() { + match api.delete_creator(param_ident, param_editgroup_id, context).wait() { Ok(rsp) => match rsp { DeleteCreatorResponse::DeletedEntity(body) => { let body_string = serde_json::to_string(&body).expect("impossible to fail to serialize"); @@ -1571,7 +1571,7 @@ where let api_clone = api.clone(); router.get( - "/v0/creator/:id", + "/v0/creator/:ident", move |req: &mut Request| { let mut context = Context::default(); @@ -1585,18 +1585,18 @@ where context.authorization = req.extensions.remove::(); // Path parameters - let param_id = { + let param_ident = { let param = req .extensions .get::() .ok_or_else(|| Response::with((status::InternalServerError, "An internal error occurred".to_string())))? - .find("id") - .ok_or_else(|| Response::with((status::BadRequest, "Missing path parameter id".to_string())))?; + .find("ident") + .ok_or_else(|| Response::with((status::BadRequest, "Missing path parameter ident".to_string())))?; percent_decode(param.as_bytes()) .decode_utf8() .map_err(|_| Response::with((status::BadRequest, format!("Couldn't percent-decode path parameter as UTF-8: {}", param))))? .parse() - .map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse path parameter id: {}", e))))? + .map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse path parameter ident: {}", e))))? }; // Query parameters (note that non-required or collection query parameters will ignore garbage values, rather than causing a 400 response) @@ -1604,7 +1604,7 @@ where let param_expand = query_params.get("expand").and_then(|list| list.first()).and_then(|x| x.parse::().ok()); let param_hide = query_params.get("hide").and_then(|list| list.first()).and_then(|x| x.parse::().ok()); - match api.get_creator(param_id, param_expand, param_hide, context).wait() { + match api.get_creator(param_ident, param_expand, param_hide, context).wait() { Ok(rsp) => match rsp { GetCreatorResponse::FoundEntity(body) => { let body_string = serde_json::to_string(&body).expect("impossible to fail to serialize"); @@ -1754,7 +1754,7 @@ where let api_clone = api.clone(); router.get( - "/v0/creator/:id/history", + "/v0/creator/:ident/history", move |req: &mut Request| { let mut context = Context::default(); @@ -1768,25 +1768,25 @@ where context.authorization = req.extensions.remove::(); // Path parameters - let param_id = { + let param_ident = { let param = req .extensions .get::() .ok_or_else(|| Response::with((status::InternalServerError, "An internal error occurred".to_string())))? - .find("id") - .ok_or_else(|| Response::with((status::BadRequest, "Missing path parameter id".to_string())))?; + .find("ident") + .ok_or_else(|| Response::with((status::BadRequest, "Missing path parameter ident".to_string())))?; percent_decode(param.as_bytes()) .decode_utf8() .map_err(|_| Response::with((status::BadRequest, format!("Couldn't percent-decode path parameter as UTF-8: {}", param))))? .parse() - .map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse path parameter id: {}", e))))? + .map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse path parameter ident: {}", e))))? }; // Query parameters (note that non-required or collection query parameters will ignore garbage values, rather than causing a 400 response) let query_params = req.get::().unwrap_or_default(); let param_limit = query_params.get("limit").and_then(|list| list.first()).and_then(|x| x.parse::().ok()); - match api.get_creator_history(param_id, param_limit, context).wait() { + match api.get_creator_history(param_ident, param_limit, context).wait() { Ok(rsp) => match rsp { GetCreatorHistoryResponse::FoundEntityHistory(body) => { let body_string = serde_json::to_string(&body).expect("impossible to fail to serialize"); @@ -1847,7 +1847,7 @@ where let api_clone = api.clone(); router.get( - "/v0/creator/:id/redirects", + "/v0/creator/:ident/redirects", move |req: &mut Request| { let mut context = Context::default(); @@ -1861,21 +1861,21 @@ where context.authorization = req.extensions.remove::(); // Path parameters - let param_id = { + let param_ident = { let param = req .extensions .get::() .ok_or_else(|| Response::with((status::InternalServerError, "An internal error occurred".to_string())))? - .find("id") - .ok_or_else(|| Response::with((status::BadRequest, "Missing path parameter id".to_string())))?; + .find("ident") + .ok_or_else(|| Response::with((status::BadRequest, "Missing path parameter ident".to_string())))?; percent_decode(param.as_bytes()) .decode_utf8() .map_err(|_| Response::with((status::BadRequest, format!("Couldn't percent-decode path parameter as UTF-8: {}", param))))? .parse() - .map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse path parameter id: {}", e))))? + .map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse path parameter ident: {}", e))))? }; - match api.get_creator_redirects(param_id, context).wait() { + match api.get_creator_redirects(param_ident, context).wait() { Ok(rsp) => match rsp { GetCreatorRedirectsResponse::FoundEntityRedirects(body) => { let body_string = serde_json::to_string(&body).expect("impossible to fail to serialize"); @@ -1936,7 +1936,7 @@ where let api_clone = api.clone(); router.get( - "/v0/creator/:id/releases", + "/v0/creator/:ident/releases", move |req: &mut Request| { let mut context = Context::default(); @@ -1950,25 +1950,25 @@ where context.authorization = req.extensions.remove::(); // Path parameters - let param_id = { + let param_ident = { let param = req .extensions .get::() .ok_or_else(|| Response::with((status::InternalServerError, "An internal error occurred".to_string())))? - .find("id") - .ok_or_else(|| Response::with((status::BadRequest, "Missing path parameter id".to_string())))?; + .find("ident") + .ok_or_else(|| Response::with((status::BadRequest, "Missing path parameter ident".to_string())))?; percent_decode(param.as_bytes()) .decode_utf8() .map_err(|_| Response::with((status::BadRequest, format!("Couldn't percent-decode path parameter as UTF-8: {}", param))))? .parse() - .map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse path parameter id: {}", e))))? + .map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse path parameter ident: {}", e))))? }; // Query parameters (note that non-required or collection query parameters will ignore garbage values, rather than causing a 400 response) let query_params = req.get::().unwrap_or_default(); let param_hide = query_params.get("hide").and_then(|list| list.first()).and_then(|x| x.parse::().ok()); - match api.get_creator_releases(param_id, param_hide, context).wait() { + match api.get_creator_releases(param_ident, param_hide, context).wait() { Ok(rsp) => match rsp { GetCreatorReleasesResponse::Found(body) => { let body_string = serde_json::to_string(&body).expect("impossible to fail to serialize"); @@ -2029,7 +2029,7 @@ where let api_clone = api.clone(); router.get( - "/v0/creator/rev/:id", + "/v0/creator/rev/:rev_id", move |req: &mut Request| { let mut context = Context::default(); @@ -2043,18 +2043,18 @@ where context.authorization = req.extensions.remove::(); // Path parameters - let param_id = { + let param_rev_id = { let param = req .extensions .get::() .ok_or_else(|| Response::with((status::InternalServerError, "An internal error occurred".to_string())))? - .find("id") - .ok_or_else(|| Response::with((status::BadRequest, "Missing path parameter id".to_string())))?; + .find("rev_id") + .ok_or_else(|| Response::with((status::BadRequest, "Missing path parameter rev_id".to_string())))?; percent_decode(param.as_bytes()) .decode_utf8() .map_err(|_| Response::with((status::BadRequest, format!("Couldn't percent-decode path parameter as UTF-8: {}", param))))? .parse() - .map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse path parameter id: {}", e))))? + .map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse path parameter rev_id: {}", e))))? }; // Query parameters (note that non-required or collection query parameters will ignore garbage values, rather than causing a 400 response) @@ -2062,7 +2062,7 @@ where let param_expand = query_params.get("expand").and_then(|list| list.first()).and_then(|x| x.parse::().ok()); let param_hide = query_params.get("hide").and_then(|list| list.first()).and_then(|x| x.parse::().ok()); - match api.get_creator_revision(param_id, param_expand, param_hide, context).wait() { + match api.get_creator_revision(param_rev_id, param_expand, param_hide, context).wait() { Ok(rsp) => match rsp { GetCreatorRevisionResponse::FoundEntityRevision(body) => { let body_string = serde_json::to_string(&body).expect("impossible to fail to serialize"); @@ -2204,7 +2204,7 @@ where let api_clone = api.clone(); router.put( - "/v0/creator/:id", + "/v0/creator/:ident", move |req: &mut Request| { let mut context = Context::default(); @@ -2218,23 +2218,23 @@ where context.authorization = req.extensions.remove::(); // Path parameters - let param_id = { + let param_ident = { let param = req .extensions .get::() .ok_or_else(|| Response::with((status::InternalServerError, "An internal error occurred".to_string())))? - .find("id") - .ok_or_else(|| Response::with((status::BadRequest, "Missing path parameter id".to_string())))?; + .find("ident") + .ok_or_else(|| Response::with((status::BadRequest, "Missing path parameter ident".to_string())))?; percent_decode(param.as_bytes()) .decode_utf8() .map_err(|_| Response::with((status::BadRequest, format!("Couldn't percent-decode path parameter as UTF-8: {}", param))))? .parse() - .map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse path parameter id: {}", e))))? + .map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse path parameter ident: {}", e))))? }; // Query parameters (note that non-required or collection query parameters will ignore garbage values, rather than causing a 400 response) let query_params = req.get::().unwrap_or_default(); - let param_editgroup = query_params.get("editgroup").and_then(|list| list.first()).and_then(|x| x.parse::().ok()); + let param_editgroup_id = query_params.get("editgroup_id").and_then(|list| list.first()).and_then(|x| x.parse::().ok()); // Body parameters (note that non-required body parameters will ignore garbage // values, rather than causing a 400 response). Produce warning header and logs for @@ -2261,7 +2261,7 @@ where }; let param_entity = param_entity.ok_or_else(|| Response::with((status::BadRequest, "Missing required body parameter entity".to_string())))?; - match api.update_creator(param_id, param_entity, param_editgroup, context).wait() { + match api.update_creator(param_ident, param_entity, param_editgroup_id, context).wait() { Ok(rsp) => match rsp { UpdateCreatorResponse::UpdatedEntity(body) => { let body_string = serde_json::to_string(&body).expect("impossible to fail to serialize"); @@ -2330,7 +2330,7 @@ where let api_clone = api.clone(); router.get( - "/v0/editor/:id", + "/v0/editor/:editor_id", move |req: &mut Request| { let mut context = Context::default(); @@ -2344,21 +2344,21 @@ where context.authorization = req.extensions.remove::(); // Path parameters - let param_id = { + let param_editor_id = { let param = req .extensions .get::() .ok_or_else(|| Response::with((status::InternalServerError, "An internal error occurred".to_string())))? - .find("id") - .ok_or_else(|| Response::with((status::BadRequest, "Missing path parameter id".to_string())))?; + .find("editor_id") + .ok_or_else(|| Response::with((status::BadRequest, "Missing path parameter editor_id".to_string())))?; percent_decode(param.as_bytes()) .decode_utf8() .map_err(|_| Response::with((status::BadRequest, format!("Couldn't percent-decode path parameter as UTF-8: {}", param))))? .parse() - .map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse path parameter id: {}", e))))? + .map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse path parameter editor_id: {}", e))))? }; - match api.get_editor(param_id, context).wait() { + match api.get_editor(param_editor_id, context).wait() { Ok(rsp) => match rsp { GetEditorResponse::Found(body) => { let body_string = serde_json::to_string(&body).expect("impossible to fail to serialize"); @@ -2419,7 +2419,7 @@ where let api_clone = api.clone(); router.get( - "/v0/editor/:id/changelog", + "/v0/editor/:editor_id/changelog", move |req: &mut Request| { let mut context = Context::default(); @@ -2433,21 +2433,21 @@ where context.authorization = req.extensions.remove::(); // Path parameters - let param_id = { + let param_editor_id = { let param = req .extensions .get::() .ok_or_else(|| Response::with((status::InternalServerError, "An internal error occurred".to_string())))? - .find("id") - .ok_or_else(|| Response::with((status::BadRequest, "Missing path parameter id".to_string())))?; + .find("editor_id") + .ok_or_else(|| Response::with((status::BadRequest, "Missing path parameter editor_id".to_string())))?; percent_decode(param.as_bytes()) .decode_utf8() .map_err(|_| Response::with((status::BadRequest, format!("Couldn't percent-decode path parameter as UTF-8: {}", param))))? .parse() - .map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse path parameter id: {}", e))))? + .map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse path parameter editor_id: {}", e))))? }; - match api.get_editor_changelog(param_id, context).wait() { + match api.get_editor_changelog(param_editor_id, context).wait() { Ok(rsp) => match rsp { GetEditorChangelogResponse::Found(body) => { let body_string = serde_json::to_string(&body).expect("impossible to fail to serialize"); @@ -2566,7 +2566,7 @@ where let api_clone = api.clone(); router.post( - "/v0/editgroup/:id/accept", + "/v0/editgroup/:editgroup_id/accept", move |req: &mut Request| { let mut context = Context::default(); @@ -2580,21 +2580,21 @@ where context.authorization = req.extensions.remove::(); // Path parameters - let param_id = { + let param_editgroup_id = { let param = req .extensions .get::() .ok_or_else(|| Response::with((status::InternalServerError, "An internal error occurred".to_string())))? - .find("id") - .ok_or_else(|| Response::with((status::BadRequest, "Missing path parameter id".to_string())))?; + .find("editgroup_id") + .ok_or_else(|| Response::with((status::BadRequest, "Missing path parameter editgroup_id".to_string())))?; percent_decode(param.as_bytes()) .decode_utf8() .map_err(|_| Response::with((status::BadRequest, format!("Couldn't percent-decode path parameter as UTF-8: {}", param))))? .parse() - .map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse path parameter id: {}", e))))? + .map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse path parameter editgroup_id: {}", e))))? }; - match api.accept_editgroup(param_id, context).wait() { + match api.accept_editgroup(param_editgroup_id, context).wait() { Ok(rsp) => match rsp { AcceptEditgroupResponse::MergedSuccessfully(body) => { let body_string = serde_json::to_string(&body).expect("impossible to fail to serialize"); @@ -2818,7 +2818,7 @@ where let api_clone = api.clone(); router.get( - "/v0/changelog/:id", + "/v0/changelog/:index", move |req: &mut Request| { let mut context = Context::default(); @@ -2832,21 +2832,21 @@ where context.authorization = req.extensions.remove::(); // Path parameters - let param_id = { + let param_index = { let param = req .extensions .get::() .ok_or_else(|| Response::with((status::InternalServerError, "An internal error occurred".to_string())))? - .find("id") - .ok_or_else(|| Response::with((status::BadRequest, "Missing path parameter id".to_string())))?; + .find("index") + .ok_or_else(|| Response::with((status::BadRequest, "Missing path parameter index".to_string())))?; percent_decode(param.as_bytes()) .decode_utf8() .map_err(|_| Response::with((status::BadRequest, format!("Couldn't percent-decode path parameter as UTF-8: {}", param))))? .parse() - .map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse path parameter id: {}", e))))? + .map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse path parameter index: {}", e))))? }; - match api.get_changelog_entry(param_id, context).wait() { + match api.get_changelog_entry(param_index, context).wait() { Ok(rsp) => match rsp { GetChangelogEntryResponse::FoundChangelogEntry(body) => { let body_string = serde_json::to_string(&body).expect("impossible to fail to serialize"); @@ -2897,7 +2897,7 @@ where let api_clone = api.clone(); router.get( - "/v0/editgroup/:id", + "/v0/editgroup/:editgroup_id", move |req: &mut Request| { let mut context = Context::default(); @@ -2911,21 +2911,21 @@ where context.authorization = req.extensions.remove::(); // Path parameters - let param_id = { + let param_editgroup_id = { let param = req .extensions .get::() .ok_or_else(|| Response::with((status::InternalServerError, "An internal error occurred".to_string())))? - .find("id") - .ok_or_else(|| Response::with((status::BadRequest, "Missing path parameter id".to_string())))?; + .find("editgroup_id") + .ok_or_else(|| Response::with((status::BadRequest, "Missing path parameter editgroup_id".to_string())))?; percent_decode(param.as_bytes()) .decode_utf8() .map_err(|_| Response::with((status::BadRequest, format!("Couldn't percent-decode path parameter as UTF-8: {}", param))))? .parse() - .map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse path parameter id: {}", e))))? + .map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse path parameter editgroup_id: {}", e))))? }; - match api.get_editgroup(param_id, context).wait() { + match api.get_editgroup(param_editgroup_id, context).wait() { Ok(rsp) => match rsp { GetEditgroupResponse::Found(body) => { let body_string = serde_json::to_string(&body).expect("impossible to fail to serialize"); @@ -3001,7 +3001,7 @@ where // Query parameters (note that non-required or collection query parameters will ignore garbage values, rather than causing a 400 response) let query_params = req.get::().unwrap_or_default(); - let param_editgroup = query_params.get("editgroup").and_then(|list| list.first()).and_then(|x| x.parse::().ok()); + let param_editgroup_id = query_params.get("editgroup_id").and_then(|list| list.first()).and_then(|x| x.parse::().ok()); // Body parameters (note that non-required body parameters will ignore garbage // values, rather than causing a 400 response). Produce warning header and logs for @@ -3028,7 +3028,7 @@ where }; let param_entity = param_entity.ok_or_else(|| Response::with((status::BadRequest, "Missing required body parameter entity".to_string())))?; - match api.create_file(param_entity, param_editgroup, context).wait() { + match api.create_file(param_entity, param_editgroup_id, context).wait() { Ok(rsp) => match rsp { CreateFileResponse::CreatedEntity(body) => { let body_string = serde_json::to_string(&body).expect("impossible to fail to serialize"); @@ -3113,7 +3113,7 @@ where // Query parameters (note that non-required or collection query parameters will ignore garbage values, rather than causing a 400 response) let query_params = req.get::().unwrap_or_default(); let param_autoaccept = query_params.get("autoaccept").and_then(|list| list.first()).and_then(|x| x.parse::().ok()); - let param_editgroup = query_params.get("editgroup").and_then(|list| list.first()).and_then(|x| x.parse::().ok()); + let param_editgroup_id = query_params.get("editgroup_id").and_then(|list| list.first()).and_then(|x| x.parse::().ok()); // Body parameters (note that non-required body parameters will ignore garbage // values, rather than causing a 400 response). Produce warning header and logs for @@ -3140,7 +3140,7 @@ where }; let param_entity_list = param_entity_list.ok_or_else(|| Response::with((status::BadRequest, "Missing required body parameter entity_list".to_string())))?; - match api.create_file_batch(param_entity_list.as_ref(), param_autoaccept, param_editgroup, context).wait() { + match api.create_file_batch(param_entity_list.as_ref(), param_autoaccept, param_editgroup_id, context).wait() { Ok(rsp) => match rsp { CreateFileBatchResponse::CreatedEntities(body) => { let body_string = serde_json::to_string(&body).expect("impossible to fail to serialize"); @@ -3209,7 +3209,7 @@ where let api_clone = api.clone(); router.delete( - "/v0/file/:id", + "/v0/file/:ident", move |req: &mut Request| { let mut context = Context::default(); @@ -3223,25 +3223,25 @@ where context.authorization = req.extensions.remove::(); // Path parameters - let param_id = { + let param_ident = { let param = req .extensions .get::() .ok_or_else(|| Response::with((status::InternalServerError, "An internal error occurred".to_string())))? - .find("id") - .ok_or_else(|| Response::with((status::BadRequest, "Missing path parameter id".to_string())))?; + .find("ident") + .ok_or_else(|| Response::with((status::BadRequest, "Missing path parameter ident".to_string())))?; percent_decode(param.as_bytes()) .decode_utf8() .map_err(|_| Response::with((status::BadRequest, format!("Couldn't percent-decode path parameter as UTF-8: {}", param))))? .parse() - .map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse path parameter id: {}", e))))? + .map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse path parameter ident: {}", e))))? }; // Query parameters (note that non-required or collection query parameters will ignore garbage values, rather than causing a 400 response) let query_params = req.get::().unwrap_or_default(); - let param_editgroup = query_params.get("editgroup").and_then(|list| list.first()).and_then(|x| x.parse::().ok()); + let param_editgroup_id = query_params.get("editgroup_id").and_then(|list| list.first()).and_then(|x| x.parse::().ok()); - match api.delete_file(param_id, param_editgroup, context).wait() { + match api.delete_file(param_ident, param_editgroup_id, context).wait() { Ok(rsp) => match rsp { DeleteFileResponse::DeletedEntity(body) => { let body_string = serde_json::to_string(&body).expect("impossible to fail to serialize"); @@ -3391,7 +3391,7 @@ where let api_clone = api.clone(); router.get( - "/v0/file/:id", + "/v0/file/:ident", move |req: &mut Request| { let mut context = Context::default(); @@ -3405,18 +3405,18 @@ where context.authorization = req.extensions.remove::(); // Path parameters - let param_id = { + let param_ident = { let param = req .extensions .get::() .ok_or_else(|| Response::with((status::InternalServerError, "An internal error occurred".to_string())))? - .find("id") - .ok_or_else(|| Response::with((status::BadRequest, "Missing path parameter id".to_string())))?; + .find("ident") + .ok_or_else(|| Response::with((status::BadRequest, "Missing path parameter ident".to_string())))?; percent_decode(param.as_bytes()) .decode_utf8() .map_err(|_| Response::with((status::BadRequest, format!("Couldn't percent-decode path parameter as UTF-8: {}", param))))? .parse() - .map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse path parameter id: {}", e))))? + .map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse path parameter ident: {}", e))))? }; // Query parameters (note that non-required or collection query parameters will ignore garbage values, rather than causing a 400 response) @@ -3424,7 +3424,7 @@ where let param_expand = query_params.get("expand").and_then(|list| list.first()).and_then(|x| x.parse::().ok()); let param_hide = query_params.get("hide").and_then(|list| list.first()).and_then(|x| x.parse::().ok()); - match api.get_file(param_id, param_expand, param_hide, context).wait() { + match api.get_file(param_ident, param_expand, param_hide, context).wait() { Ok(rsp) => match rsp { GetFileResponse::FoundEntity(body) => { let body_string = serde_json::to_string(&body).expect("impossible to fail to serialize"); @@ -3574,7 +3574,7 @@ where let api_clone = api.clone(); router.get( - "/v0/file/:id/history", + "/v0/file/:ident/history", move |req: &mut Request| { let mut context = Context::default(); @@ -3588,25 +3588,25 @@ where context.authorization = req.extensions.remove::(); // Path parameters - let param_id = { + let param_ident = { let param = req .extensions .get::() .ok_or_else(|| Response::with((status::InternalServerError, "An internal error occurred".to_string())))? - .find("id") - .ok_or_else(|| Response::with((status::BadRequest, "Missing path parameter id".to_string())))?; + .find("ident") + .ok_or_else(|| Response::with((status::BadRequest, "Missing path parameter ident".to_string())))?; percent_decode(param.as_bytes()) .decode_utf8() .map_err(|_| Response::with((status::BadRequest, format!("Couldn't percent-decode path parameter as UTF-8: {}", param))))? .parse() - .map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse path parameter id: {}", e))))? + .map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse path parameter ident: {}", e))))? }; // Query parameters (note that non-required or collection query parameters will ignore garbage values, rather than causing a 400 response) let query_params = req.get::().unwrap_or_default(); let param_limit = query_params.get("limit").and_then(|list| list.first()).and_then(|x| x.parse::().ok()); - match api.get_file_history(param_id, param_limit, context).wait() { + match api.get_file_history(param_ident, param_limit, context).wait() { Ok(rsp) => match rsp { GetFileHistoryResponse::FoundEntityHistory(body) => { let body_string = serde_json::to_string(&body).expect("impossible to fail to serialize"); @@ -3667,7 +3667,7 @@ where let api_clone = api.clone(); router.get( - "/v0/file/:id/redirects", + "/v0/file/:ident/redirects", move |req: &mut Request| { let mut context = Context::default(); @@ -3681,21 +3681,21 @@ where context.authorization = req.extensions.remove::(); // Path parameters - let param_id = { + let param_ident = { let param = req .extensions .get::() .ok_or_else(|| Response::with((status::InternalServerError, "An internal error occurred".to_string())))? - .find("id") - .ok_or_else(|| Response::with((status::BadRequest, "Missing path parameter id".to_string())))?; + .find("ident") + .ok_or_else(|| Response::with((status::BadRequest, "Missing path parameter ident".to_string())))?; percent_decode(param.as_bytes()) .decode_utf8() .map_err(|_| Response::with((status::BadRequest, format!("Couldn't percent-decode path parameter as UTF-8: {}", param))))? .parse() - .map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse path parameter id: {}", e))))? + .map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse path parameter ident: {}", e))))? }; - match api.get_file_redirects(param_id, context).wait() { + match api.get_file_redirects(param_ident, context).wait() { Ok(rsp) => match rsp { GetFileRedirectsResponse::FoundEntityRedirects(body) => { let body_string = serde_json::to_string(&body).expect("impossible to fail to serialize"); @@ -3756,7 +3756,7 @@ where let api_clone = api.clone(); router.get( - "/v0/file/rev/:id", + "/v0/file/rev/:rev_id", move |req: &mut Request| { let mut context = Context::default(); @@ -3770,18 +3770,18 @@ where context.authorization = req.extensions.remove::(); // Path parameters - let param_id = { + let param_rev_id = { let param = req .extensions .get::() .ok_or_else(|| Response::with((status::InternalServerError, "An internal error occurred".to_string())))? - .find("id") - .ok_or_else(|| Response::with((status::BadRequest, "Missing path parameter id".to_string())))?; + .find("rev_id") + .ok_or_else(|| Response::with((status::BadRequest, "Missing path parameter rev_id".to_string())))?; percent_decode(param.as_bytes()) .decode_utf8() .map_err(|_| Response::with((status::BadRequest, format!("Couldn't percent-decode path parameter as UTF-8: {}", param))))? .parse() - .map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse path parameter id: {}", e))))? + .map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse path parameter rev_id: {}", e))))? }; // Query parameters (note that non-required or collection query parameters will ignore garbage values, rather than causing a 400 response) @@ -3789,7 +3789,7 @@ where let param_expand = query_params.get("expand").and_then(|list| list.first()).and_then(|x| x.parse::().ok()); let param_hide = query_params.get("hide").and_then(|list| list.first()).and_then(|x| x.parse::().ok()); - match api.get_file_revision(param_id, param_expand, param_hide, context).wait() { + match api.get_file_revision(param_rev_id, param_expand, param_hide, context).wait() { Ok(rsp) => match rsp { GetFileRevisionResponse::FoundEntityRevision(body) => { let body_string = serde_json::to_string(&body).expect("impossible to fail to serialize"); @@ -3932,7 +3932,7 @@ where let api_clone = api.clone(); router.put( - "/v0/file/:id", + "/v0/file/:ident", move |req: &mut Request| { let mut context = Context::default(); @@ -3946,23 +3946,23 @@ where context.authorization = req.extensions.remove::(); // Path parameters - let param_id = { + let param_ident = { let param = req .extensions .get::() .ok_or_else(|| Response::with((status::InternalServerError, "An internal error occurred".to_string())))? - .find("id") - .ok_or_else(|| Response::with((status::BadRequest, "Missing path parameter id".to_string())))?; + .find("ident") + .ok_or_else(|| Response::with((status::BadRequest, "Missing path parameter ident".to_string())))?; percent_decode(param.as_bytes()) .decode_utf8() .map_err(|_| Response::with((status::BadRequest, format!("Couldn't percent-decode path parameter as UTF-8: {}", param))))? .parse() - .map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse path parameter id: {}", e))))? + .map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse path parameter ident: {}", e))))? }; // Query parameters (note that non-required or collection query parameters will ignore garbage values, rather than causing a 400 response) let query_params = req.get::().unwrap_or_default(); - let param_editgroup = query_params.get("editgroup").and_then(|list| list.first()).and_then(|x| x.parse::().ok()); + let param_editgroup_id = query_params.get("editgroup_id").and_then(|list| list.first()).and_then(|x| x.parse::().ok()); // Body parameters (note that non-required body parameters will ignore garbage // values, rather than causing a 400 response). Produce warning header and logs for @@ -3989,7 +3989,7 @@ where }; let param_entity = param_entity.ok_or_else(|| Response::with((status::BadRequest, "Missing required body parameter entity".to_string())))?; - match api.update_file(param_id, param_entity, param_editgroup, context).wait() { + match api.update_file(param_ident, param_entity, param_editgroup_id, context).wait() { Ok(rsp) => match rsp { UpdateFileResponse::UpdatedEntity(body) => { let body_string = serde_json::to_string(&body).expect("impossible to fail to serialize"); @@ -4073,7 +4073,7 @@ where // Query parameters (note that non-required or collection query parameters will ignore garbage values, rather than causing a 400 response) let query_params = req.get::().unwrap_or_default(); - let param_editgroup = query_params.get("editgroup").and_then(|list| list.first()).and_then(|x| x.parse::().ok()); + let param_editgroup_id = query_params.get("editgroup_id").and_then(|list| list.first()).and_then(|x| x.parse::().ok()); // Body parameters (note that non-required body parameters will ignore garbage // values, rather than causing a 400 response). Produce warning header and logs for @@ -4100,7 +4100,7 @@ where }; let param_entity = param_entity.ok_or_else(|| Response::with((status::BadRequest, "Missing required body parameter entity".to_string())))?; - match api.create_release(param_entity, param_editgroup, context).wait() { + match api.create_release(param_entity, param_editgroup_id, context).wait() { Ok(rsp) => match rsp { CreateReleaseResponse::CreatedEntity(body) => { let body_string = serde_json::to_string(&body).expect("impossible to fail to serialize"); @@ -4185,7 +4185,7 @@ where // Query parameters (note that non-required or collection query parameters will ignore garbage values, rather than causing a 400 response) let query_params = req.get::().unwrap_or_default(); let param_autoaccept = query_params.get("autoaccept").and_then(|list| list.first()).and_then(|x| x.parse::().ok()); - let param_editgroup = query_params.get("editgroup").and_then(|list| list.first()).and_then(|x| x.parse::().ok()); + let param_editgroup_id = query_params.get("editgroup_id").and_then(|list| list.first()).and_then(|x| x.parse::().ok()); // Body parameters (note that non-required body parameters will ignore garbage // values, rather than causing a 400 response). Produce warning header and logs for @@ -4212,7 +4212,7 @@ where }; let param_entity_list = param_entity_list.ok_or_else(|| Response::with((status::BadRequest, "Missing required body parameter entity_list".to_string())))?; - match api.create_release_batch(param_entity_list.as_ref(), param_autoaccept, param_editgroup, context).wait() { + match api.create_release_batch(param_entity_list.as_ref(), param_autoaccept, param_editgroup_id, context).wait() { Ok(rsp) => match rsp { CreateReleaseBatchResponse::CreatedEntities(body) => { let body_string = serde_json::to_string(&body).expect("impossible to fail to serialize"); @@ -4296,7 +4296,7 @@ where // Query parameters (note that non-required or collection query parameters will ignore garbage values, rather than causing a 400 response) let query_params = req.get::().unwrap_or_default(); - let param_editgroup = query_params.get("editgroup").and_then(|list| list.first()).and_then(|x| x.parse::().ok()); + let param_editgroup_id = query_params.get("editgroup_id").and_then(|list| list.first()).and_then(|x| x.parse::().ok()); // Body parameters (note that non-required body parameters will ignore garbage // values, rather than causing a 400 response). Produce warning header and logs for @@ -4323,7 +4323,7 @@ where }; let param_entity = param_entity.ok_or_else(|| Response::with((status::BadRequest, "Missing required body parameter entity".to_string())))?; - match api.create_work(param_entity, param_editgroup, context).wait() { + match api.create_work(param_entity, param_editgroup_id, context).wait() { Ok(rsp) => match rsp { CreateWorkResponse::CreatedEntity(body) => { let body_string = serde_json::to_string(&body).expect("impossible to fail to serialize"); @@ -4392,7 +4392,7 @@ where let api_clone = api.clone(); router.delete( - "/v0/release/:id", + "/v0/release/:ident", move |req: &mut Request| { let mut context = Context::default(); @@ -4406,25 +4406,25 @@ where context.authorization = req.extensions.remove::(); // Path parameters - let param_id = { + let param_ident = { let param = req .extensions .get::() .ok_or_else(|| Response::with((status::InternalServerError, "An internal error occurred".to_string())))? - .find("id") - .ok_or_else(|| Response::with((status::BadRequest, "Missing path parameter id".to_string())))?; + .find("ident") + .ok_or_else(|| Response::with((status::BadRequest, "Missing path parameter ident".to_string())))?; percent_decode(param.as_bytes()) .decode_utf8() .map_err(|_| Response::with((status::BadRequest, format!("Couldn't percent-decode path parameter as UTF-8: {}", param))))? .parse() - .map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse path parameter id: {}", e))))? + .map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse path parameter ident: {}", e))))? }; // Query parameters (note that non-required or collection query parameters will ignore garbage values, rather than causing a 400 response) let query_params = req.get::().unwrap_or_default(); - let param_editgroup = query_params.get("editgroup").and_then(|list| list.first()).and_then(|x| x.parse::().ok()); + let param_editgroup_id = query_params.get("editgroup_id").and_then(|list| list.first()).and_then(|x| x.parse::().ok()); - match api.delete_release(param_id, param_editgroup, context).wait() { + match api.delete_release(param_ident, param_editgroup_id, context).wait() { Ok(rsp) => match rsp { DeleteReleaseResponse::DeletedEntity(body) => { let body_string = serde_json::to_string(&body).expect("impossible to fail to serialize"); @@ -4574,7 +4574,7 @@ where let api_clone = api.clone(); router.get( - "/v0/release/:id", + "/v0/release/:ident", move |req: &mut Request| { let mut context = Context::default(); @@ -4588,18 +4588,18 @@ where context.authorization = req.extensions.remove::(); // Path parameters - let param_id = { + let param_ident = { let param = req .extensions .get::() .ok_or_else(|| Response::with((status::InternalServerError, "An internal error occurred".to_string())))? - .find("id") - .ok_or_else(|| Response::with((status::BadRequest, "Missing path parameter id".to_string())))?; + .find("ident") + .ok_or_else(|| Response::with((status::BadRequest, "Missing path parameter ident".to_string())))?; percent_decode(param.as_bytes()) .decode_utf8() .map_err(|_| Response::with((status::BadRequest, format!("Couldn't percent-decode path parameter as UTF-8: {}", param))))? .parse() - .map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse path parameter id: {}", e))))? + .map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse path parameter ident: {}", e))))? }; // Query parameters (note that non-required or collection query parameters will ignore garbage values, rather than causing a 400 response) @@ -4607,7 +4607,7 @@ where let param_expand = query_params.get("expand").and_then(|list| list.first()).and_then(|x| x.parse::().ok()); let param_hide = query_params.get("hide").and_then(|list| list.first()).and_then(|x| x.parse::().ok()); - match api.get_release(param_id, param_expand, param_hide, context).wait() { + match api.get_release(param_ident, param_expand, param_hide, context).wait() { Ok(rsp) => match rsp { GetReleaseResponse::FoundEntity(body) => { let body_string = serde_json::to_string(&body).expect("impossible to fail to serialize"); @@ -4757,7 +4757,7 @@ where let api_clone = api.clone(); router.get( - "/v0/release/:id/files", + "/v0/release/:ident/files", move |req: &mut Request| { let mut context = Context::default(); @@ -4771,25 +4771,25 @@ where context.authorization = req.extensions.remove::(); // Path parameters - let param_id = { + let param_ident = { let param = req .extensions .get::() .ok_or_else(|| Response::with((status::InternalServerError, "An internal error occurred".to_string())))? - .find("id") - .ok_or_else(|| Response::with((status::BadRequest, "Missing path parameter id".to_string())))?; + .find("ident") + .ok_or_else(|| Response::with((status::BadRequest, "Missing path parameter ident".to_string())))?; percent_decode(param.as_bytes()) .decode_utf8() .map_err(|_| Response::with((status::BadRequest, format!("Couldn't percent-decode path parameter as UTF-8: {}", param))))? .parse() - .map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse path parameter id: {}", e))))? + .map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse path parameter ident: {}", e))))? }; // Query parameters (note that non-required or collection query parameters will ignore garbage values, rather than causing a 400 response) let query_params = req.get::().unwrap_or_default(); let param_hide = query_params.get("hide").and_then(|list| list.first()).and_then(|x| x.parse::().ok()); - match api.get_release_files(param_id, param_hide, context).wait() { + match api.get_release_files(param_ident, param_hide, context).wait() { Ok(rsp) => match rsp { GetReleaseFilesResponse::Found(body) => { let body_string = serde_json::to_string(&body).expect("impossible to fail to serialize"); @@ -4850,7 +4850,7 @@ where let api_clone = api.clone(); router.get( - "/v0/release/:id/history", + "/v0/release/:ident/history", move |req: &mut Request| { let mut context = Context::default(); @@ -4864,25 +4864,25 @@ where context.authorization = req.extensions.remove::(); // Path parameters - let param_id = { + let param_ident = { let param = req .extensions .get::() .ok_or_else(|| Response::with((status::InternalServerError, "An internal error occurred".to_string())))? - .find("id") - .ok_or_else(|| Response::with((status::BadRequest, "Missing path parameter id".to_string())))?; + .find("ident") + .ok_or_else(|| Response::with((status::BadRequest, "Missing path parameter ident".to_string())))?; percent_decode(param.as_bytes()) .decode_utf8() .map_err(|_| Response::with((status::BadRequest, format!("Couldn't percent-decode path parameter as UTF-8: {}", param))))? .parse() - .map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse path parameter id: {}", e))))? + .map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse path parameter ident: {}", e))))? }; // Query parameters (note that non-required or collection query parameters will ignore garbage values, rather than causing a 400 response) let query_params = req.get::().unwrap_or_default(); let param_limit = query_params.get("limit").and_then(|list| list.first()).and_then(|x| x.parse::().ok()); - match api.get_release_history(param_id, param_limit, context).wait() { + match api.get_release_history(param_ident, param_limit, context).wait() { Ok(rsp) => match rsp { GetReleaseHistoryResponse::FoundEntityHistory(body) => { let body_string = serde_json::to_string(&body).expect("impossible to fail to serialize"); @@ -4943,7 +4943,7 @@ where let api_clone = api.clone(); router.get( - "/v0/release/:id/redirects", + "/v0/release/:ident/redirects", move |req: &mut Request| { let mut context = Context::default(); @@ -4957,21 +4957,21 @@ where context.authorization = req.extensions.remove::(); // Path parameters - let param_id = { + let param_ident = { let param = req .extensions .get::() .ok_or_else(|| Response::with((status::InternalServerError, "An internal error occurred".to_string())))? - .find("id") - .ok_or_else(|| Response::with((status::BadRequest, "Missing path parameter id".to_string())))?; + .find("ident") + .ok_or_else(|| Response::with((status::BadRequest, "Missing path parameter ident".to_string())))?; percent_decode(param.as_bytes()) .decode_utf8() .map_err(|_| Response::with((status::BadRequest, format!("Couldn't percent-decode path parameter as UTF-8: {}", param))))? .parse() - .map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse path parameter id: {}", e))))? + .map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse path parameter ident: {}", e))))? }; - match api.get_release_redirects(param_id, context).wait() { + match api.get_release_redirects(param_ident, context).wait() { Ok(rsp) => match rsp { GetReleaseRedirectsResponse::FoundEntityRedirects(body) => { let body_string = serde_json::to_string(&body).expect("impossible to fail to serialize"); @@ -5032,7 +5032,7 @@ where let api_clone = api.clone(); router.get( - "/v0/release/rev/:id", + "/v0/release/rev/:rev_id", move |req: &mut Request| { let mut context = Context::default(); @@ -5046,18 +5046,18 @@ where context.authorization = req.extensions.remove::(); // Path parameters - let param_id = { + let param_rev_id = { let param = req .extensions .get::() .ok_or_else(|| Response::with((status::InternalServerError, "An internal error occurred".to_string())))? - .find("id") - .ok_or_else(|| Response::with((status::BadRequest, "Missing path parameter id".to_string())))?; + .find("rev_id") + .ok_or_else(|| Response::with((status::BadRequest, "Missing path parameter rev_id".to_string())))?; percent_decode(param.as_bytes()) .decode_utf8() .map_err(|_| Response::with((status::BadRequest, format!("Couldn't percent-decode path parameter as UTF-8: {}", param))))? .parse() - .map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse path parameter id: {}", e))))? + .map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse path parameter rev_id: {}", e))))? }; // Query parameters (note that non-required or collection query parameters will ignore garbage values, rather than causing a 400 response) @@ -5065,7 +5065,7 @@ where let param_expand = query_params.get("expand").and_then(|list| list.first()).and_then(|x| x.parse::().ok()); let param_hide = query_params.get("hide").and_then(|list| list.first()).and_then(|x| x.parse::().ok()); - match api.get_release_revision(param_id, param_expand, param_hide, context).wait() { + match api.get_release_revision(param_rev_id, param_expand, param_hide, context).wait() { Ok(rsp) => match rsp { GetReleaseRevisionResponse::FoundEntityRevision(body) => { let body_string = serde_json::to_string(&body).expect("impossible to fail to serialize"); @@ -5214,7 +5214,7 @@ where let api_clone = api.clone(); router.put( - "/v0/release/:id", + "/v0/release/:ident", move |req: &mut Request| { let mut context = Context::default(); @@ -5228,23 +5228,23 @@ where context.authorization = req.extensions.remove::(); // Path parameters - let param_id = { + let param_ident = { let param = req .extensions .get::() .ok_or_else(|| Response::with((status::InternalServerError, "An internal error occurred".to_string())))? - .find("id") - .ok_or_else(|| Response::with((status::BadRequest, "Missing path parameter id".to_string())))?; + .find("ident") + .ok_or_else(|| Response::with((status::BadRequest, "Missing path parameter ident".to_string())))?; percent_decode(param.as_bytes()) .decode_utf8() .map_err(|_| Response::with((status::BadRequest, format!("Couldn't percent-decode path parameter as UTF-8: {}", param))))? .parse() - .map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse path parameter id: {}", e))))? + .map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse path parameter ident: {}", e))))? }; // Query parameters (note that non-required or collection query parameters will ignore garbage values, rather than causing a 400 response) let query_params = req.get::().unwrap_or_default(); - let param_editgroup = query_params.get("editgroup").and_then(|list| list.first()).and_then(|x| x.parse::().ok()); + let param_editgroup_id = query_params.get("editgroup_id").and_then(|list| list.first()).and_then(|x| x.parse::().ok()); // Body parameters (note that non-required body parameters will ignore garbage // values, rather than causing a 400 response). Produce warning header and logs for @@ -5271,7 +5271,7 @@ where }; let param_entity = param_entity.ok_or_else(|| Response::with((status::BadRequest, "Missing required body parameter entity".to_string())))?; - match api.update_release(param_id, param_entity, param_editgroup, context).wait() { + match api.update_release(param_ident, param_entity, param_editgroup_id, context).wait() { Ok(rsp) => match rsp { UpdateReleaseResponse::UpdatedEntity(body) => { let body_string = serde_json::to_string(&body).expect("impossible to fail to serialize"); @@ -5356,7 +5356,7 @@ where // Query parameters (note that non-required or collection query parameters will ignore garbage values, rather than causing a 400 response) let query_params = req.get::().unwrap_or_default(); let param_autoaccept = query_params.get("autoaccept").and_then(|list| list.first()).and_then(|x| x.parse::().ok()); - let param_editgroup = query_params.get("editgroup").and_then(|list| list.first()).and_then(|x| x.parse::().ok()); + let param_editgroup_id = query_params.get("editgroup_id").and_then(|list| list.first()).and_then(|x| x.parse::().ok()); // Body parameters (note that non-required body parameters will ignore garbage // values, rather than causing a 400 response). Produce warning header and logs for @@ -5383,7 +5383,7 @@ where }; let param_entity_list = param_entity_list.ok_or_else(|| Response::with((status::BadRequest, "Missing required body parameter entity_list".to_string())))?; - match api.create_work_batch(param_entity_list.as_ref(), param_autoaccept, param_editgroup, context).wait() { + match api.create_work_batch(param_entity_list.as_ref(), param_autoaccept, param_editgroup_id, context).wait() { Ok(rsp) => match rsp { CreateWorkBatchResponse::CreatedEntities(body) => { let body_string = serde_json::to_string(&body).expect("impossible to fail to serialize"); @@ -5452,7 +5452,7 @@ where let api_clone = api.clone(); router.delete( - "/v0/work/:id", + "/v0/work/:ident", move |req: &mut Request| { let mut context = Context::default(); @@ -5466,25 +5466,25 @@ where context.authorization = req.extensions.remove::(); // Path parameters - let param_id = { + let param_ident = { let param = req .extensions .get::() .ok_or_else(|| Response::with((status::InternalServerError, "An internal error occurred".to_string())))? - .find("id") - .ok_or_else(|| Response::with((status::BadRequest, "Missing path parameter id".to_string())))?; + .find("ident") + .ok_or_else(|| Response::with((status::BadRequest, "Missing path parameter ident".to_string())))?; percent_decode(param.as_bytes()) .decode_utf8() .map_err(|_| Response::with((status::BadRequest, format!("Couldn't percent-decode path parameter as UTF-8: {}", param))))? .parse() - .map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse path parameter id: {}", e))))? + .map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse path parameter ident: {}", e))))? }; // Query parameters (note that non-required or collection query parameters will ignore garbage values, rather than causing a 400 response) let query_params = req.get::().unwrap_or_default(); - let param_editgroup = query_params.get("editgroup").and_then(|list| list.first()).and_then(|x| x.parse::().ok()); + let param_editgroup_id = query_params.get("editgroup_id").and_then(|list| list.first()).and_then(|x| x.parse::().ok()); - match api.delete_work(param_id, param_editgroup, context).wait() { + match api.delete_work(param_ident, param_editgroup_id, context).wait() { Ok(rsp) => match rsp { DeleteWorkResponse::DeletedEntity(body) => { let body_string = serde_json::to_string(&body).expect("impossible to fail to serialize"); @@ -5634,7 +5634,7 @@ where let api_clone = api.clone(); router.get( - "/v0/work/:id", + "/v0/work/:ident", move |req: &mut Request| { let mut context = Context::default(); @@ -5648,18 +5648,18 @@ where context.authorization = req.extensions.remove::(); // Path parameters - let param_id = { + let param_ident = { let param = req .extensions .get::() .ok_or_else(|| Response::with((status::InternalServerError, "An internal error occurred".to_string())))? - .find("id") - .ok_or_else(|| Response::with((status::BadRequest, "Missing path parameter id".to_string())))?; + .find("ident") + .ok_or_else(|| Response::with((status::BadRequest, "Missing path parameter ident".to_string())))?; percent_decode(param.as_bytes()) .decode_utf8() .map_err(|_| Response::with((status::BadRequest, format!("Couldn't percent-decode path parameter as UTF-8: {}", param))))? .parse() - .map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse path parameter id: {}", e))))? + .map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse path parameter ident: {}", e))))? }; // Query parameters (note that non-required or collection query parameters will ignore garbage values, rather than causing a 400 response) @@ -5667,7 +5667,7 @@ where let param_expand = query_params.get("expand").and_then(|list| list.first()).and_then(|x| x.parse::().ok()); let param_hide = query_params.get("hide").and_then(|list| list.first()).and_then(|x| x.parse::().ok()); - match api.get_work(param_id, param_expand, param_hide, context).wait() { + match api.get_work(param_ident, param_expand, param_hide, context).wait() { Ok(rsp) => match rsp { GetWorkResponse::FoundEntity(body) => { let body_string = serde_json::to_string(&body).expect("impossible to fail to serialize"); @@ -5817,7 +5817,7 @@ where let api_clone = api.clone(); router.get( - "/v0/work/:id/history", + "/v0/work/:ident/history", move |req: &mut Request| { let mut context = Context::default(); @@ -5831,25 +5831,25 @@ where context.authorization = req.extensions.remove::(); // Path parameters - let param_id = { + let param_ident = { let param = req .extensions .get::() .ok_or_else(|| Response::with((status::InternalServerError, "An internal error occurred".to_string())))? - .find("id") - .ok_or_else(|| Response::with((status::BadRequest, "Missing path parameter id".to_string())))?; + .find("ident") + .ok_or_else(|| Response::with((status::BadRequest, "Missing path parameter ident".to_string())))?; percent_decode(param.as_bytes()) .decode_utf8() .map_err(|_| Response::with((status::BadRequest, format!("Couldn't percent-decode path parameter as UTF-8: {}", param))))? .parse() - .map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse path parameter id: {}", e))))? + .map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse path parameter ident: {}", e))))? }; // Query parameters (note that non-required or collection query parameters will ignore garbage values, rather than causing a 400 response) let query_params = req.get::().unwrap_or_default(); let param_limit = query_params.get("limit").and_then(|list| list.first()).and_then(|x| x.parse::().ok()); - match api.get_work_history(param_id, param_limit, context).wait() { + match api.get_work_history(param_ident, param_limit, context).wait() { Ok(rsp) => match rsp { GetWorkHistoryResponse::FoundEntityHistory(body) => { let body_string = serde_json::to_string(&body).expect("impossible to fail to serialize"); @@ -5910,7 +5910,7 @@ where let api_clone = api.clone(); router.get( - "/v0/work/:id/redirects", + "/v0/work/:ident/redirects", move |req: &mut Request| { let mut context = Context::default(); @@ -5924,21 +5924,21 @@ where context.authorization = req.extensions.remove::(); // Path parameters - let param_id = { + let param_ident = { let param = req .extensions .get::() .ok_or_else(|| Response::with((status::InternalServerError, "An internal error occurred".to_string())))? - .find("id") - .ok_or_else(|| Response::with((status::BadRequest, "Missing path parameter id".to_string())))?; + .find("ident") + .ok_or_else(|| Response::with((status::BadRequest, "Missing path parameter ident".to_string())))?; percent_decode(param.as_bytes()) .decode_utf8() .map_err(|_| Response::with((status::BadRequest, format!("Couldn't percent-decode path parameter as UTF-8: {}", param))))? .parse() - .map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse path parameter id: {}", e))))? + .map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse path parameter ident: {}", e))))? }; - match api.get_work_redirects(param_id, context).wait() { + match api.get_work_redirects(param_ident, context).wait() { Ok(rsp) => match rsp { GetWorkRedirectsResponse::FoundEntityRedirects(body) => { let body_string = serde_json::to_string(&body).expect("impossible to fail to serialize"); @@ -5999,7 +5999,7 @@ where let api_clone = api.clone(); router.get( - "/v0/work/:id/releases", + "/v0/work/:ident/releases", move |req: &mut Request| { let mut context = Context::default(); @@ -6013,25 +6013,25 @@ where context.authorization = req.extensions.remove::(); // Path parameters - let param_id = { + let param_ident = { let param = req .extensions .get::() .ok_or_else(|| Response::with((status::InternalServerError, "An internal error occurred".to_string())))? - .find("id") - .ok_or_else(|| Response::with((status::BadRequest, "Missing path parameter id".to_string())))?; + .find("ident") + .ok_or_else(|| Response::with((status::BadRequest, "Missing path parameter ident".to_string())))?; percent_decode(param.as_bytes()) .decode_utf8() .map_err(|_| Response::with((status::BadRequest, format!("Couldn't percent-decode path parameter as UTF-8: {}", param))))? .parse() - .map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse path parameter id: {}", e))))? + .map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse path parameter ident: {}", e))))? }; // Query parameters (note that non-required or collection query parameters will ignore garbage values, rather than causing a 400 response) let query_params = req.get::().unwrap_or_default(); let param_hide = query_params.get("hide").and_then(|list| list.first()).and_then(|x| x.parse::().ok()); - match api.get_work_releases(param_id, param_hide, context).wait() { + match api.get_work_releases(param_ident, param_hide, context).wait() { Ok(rsp) => match rsp { GetWorkReleasesResponse::Found(body) => { let body_string = serde_json::to_string(&body).expect("impossible to fail to serialize"); @@ -6092,7 +6092,7 @@ where let api_clone = api.clone(); router.get( - "/v0/work/rev/:id", + "/v0/work/rev/:rev_id", move |req: &mut Request| { let mut context = Context::default(); @@ -6106,18 +6106,18 @@ where context.authorization = req.extensions.remove::(); // Path parameters - let param_id = { + let param_rev_id = { let param = req .extensions .get::() .ok_or_else(|| Response::with((status::InternalServerError, "An internal error occurred".to_string())))? - .find("id") - .ok_or_else(|| Response::with((status::BadRequest, "Missing path parameter id".to_string())))?; + .find("rev_id") + .ok_or_else(|| Response::with((status::BadRequest, "Missing path parameter rev_id".to_string())))?; percent_decode(param.as_bytes()) .decode_utf8() .map_err(|_| Response::with((status::BadRequest, format!("Couldn't percent-decode path parameter as UTF-8: {}", param))))? .parse() - .map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse path parameter id: {}", e))))? + .map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse path parameter rev_id: {}", e))))? }; // Query parameters (note that non-required or collection query parameters will ignore garbage values, rather than causing a 400 response) @@ -6125,7 +6125,7 @@ where let param_expand = query_params.get("expand").and_then(|list| list.first()).and_then(|x| x.parse::().ok()); let param_hide = query_params.get("hide").and_then(|list| list.first()).and_then(|x| x.parse::().ok()); - match api.get_work_revision(param_id, param_expand, param_hide, context).wait() { + match api.get_work_revision(param_rev_id, param_expand, param_hide, context).wait() { Ok(rsp) => match rsp { GetWorkRevisionResponse::FoundEntityRevision(body) => { let body_string = serde_json::to_string(&body).expect("impossible to fail to serialize"); @@ -6186,7 +6186,7 @@ where let api_clone = api.clone(); router.put( - "/v0/work/:id", + "/v0/work/:ident", move |req: &mut Request| { let mut context = Context::default(); @@ -6200,23 +6200,23 @@ where context.authorization = req.extensions.remove::(); // Path parameters - let param_id = { + let param_ident = { let param = req .extensions .get::() .ok_or_else(|| Response::with((status::InternalServerError, "An internal error occurred".to_string())))? - .find("id") - .ok_or_else(|| Response::with((status::BadRequest, "Missing path parameter id".to_string())))?; + .find("ident") + .ok_or_else(|| Response::with((status::BadRequest, "Missing path parameter ident".to_string())))?; percent_decode(param.as_bytes()) .decode_utf8() .map_err(|_| Response::with((status::BadRequest, format!("Couldn't percent-decode path parameter as UTF-8: {}", param))))? .parse() - .map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse path parameter id: {}", e))))? + .map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse path parameter ident: {}", e))))? }; // Query parameters (note that non-required or collection query parameters will ignore garbage values, rather than causing a 400 response) let query_params = req.get::().unwrap_or_default(); - let param_editgroup = query_params.get("editgroup").and_then(|list| list.first()).and_then(|x| x.parse::().ok()); + let param_editgroup_id = query_params.get("editgroup_id").and_then(|list| list.first()).and_then(|x| x.parse::().ok()); // Body parameters (note that non-required body parameters will ignore garbage // values, rather than causing a 400 response). Produce warning header and logs for @@ -6243,7 +6243,7 @@ where }; let param_entity = param_entity.ok_or_else(|| Response::with((status::BadRequest, "Missing required body parameter entity".to_string())))?; - match api.update_work(param_id, param_entity, param_editgroup, context).wait() { + match api.update_work(param_ident, param_entity, param_editgroup_id, context).wait() { Ok(rsp) => match rsp { UpdateWorkResponse::UpdatedEntity(body) => { let body_string = serde_json::to_string(&body).expect("impossible to fail to serialize"); -- cgit v1.2.3