From 3a45076685471b969596ef5b58823ce8074224c6 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Tue, 12 Oct 2021 16:45:07 -0700 Subject: rust codegen for v0.4 --- rust/fatcat-openapi/examples/server_lib/server.rs | 24 ++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) (limited to 'rust/fatcat-openapi/examples/server_lib') diff --git a/rust/fatcat-openapi/examples/server_lib/server.rs b/rust/fatcat-openapi/examples/server_lib/server.rs index 56b82cc5..2aa38fd8 100644 --- a/rust/fatcat-openapi/examples/server_lib/server.rs +++ b/rust/fatcat-openapi/examples/server_lib/server.rs @@ -22,9 +22,9 @@ use fatcat_openapi::{ GetFileRedirectsResponse, GetFileResponse, GetFileRevisionResponse, GetFilesetEditResponse, GetFilesetHistoryResponse, GetFilesetRedirectsResponse, GetFilesetResponse, GetFilesetRevisionResponse, GetReleaseEditResponse, GetReleaseFilesResponse, GetReleaseFilesetsResponse, GetReleaseHistoryResponse, GetReleaseRedirectsResponse, GetReleaseResponse, GetReleaseRevisionResponse, GetReleaseWebcapturesResponse, GetWebcaptureEditResponse, GetWebcaptureHistoryResponse, GetWebcaptureRedirectsResponse, GetWebcaptureResponse, GetWebcaptureRevisionResponse, GetWorkEditResponse, - GetWorkHistoryResponse, GetWorkRedirectsResponse, GetWorkReleasesResponse, GetWorkResponse, GetWorkRevisionResponse, LookupContainerResponse, LookupCreatorResponse, LookupFileResponse, - LookupReleaseResponse, UpdateContainerResponse, UpdateCreatorResponse, UpdateEditgroupResponse, UpdateEditorResponse, UpdateFileResponse, UpdateFilesetResponse, UpdateReleaseResponse, - UpdateWebcaptureResponse, UpdateWorkResponse, + GetWorkHistoryResponse, GetWorkRedirectsResponse, GetWorkReleasesResponse, GetWorkResponse, GetWorkRevisionResponse, LookupContainerResponse, LookupCreatorResponse, LookupEditorResponse, + LookupFileResponse, LookupReleaseResponse, UpdateContainerResponse, UpdateCreatorResponse, UpdateEditgroupResponse, UpdateEditorResponse, UpdateFileResponse, UpdateFilesetResponse, + UpdateReleaseResponse, UpdateWebcaptureResponse, UpdateWorkResponse, }; #[derive(Copy, Clone)] @@ -159,6 +159,9 @@ impl Api for Server { fn lookup_container( &self, issnl: Option, + issne: Option, + issnp: Option, + issn: Option, wikidata_qid: Option, expand: Option, hide: Option, @@ -166,8 +169,11 @@ impl Api for Server { ) -> Box + Send> { let context = context.clone(); println!( - "lookup_container({:?}, {:?}, {:?}, {:?}) - X-Span-ID: {:?}", + "lookup_container({:?}, {:?}, {:?}, {:?}, {:?}, {:?}, {:?}) - X-Span-ID: {:?}", issnl, + issne, + issnp, + issn, wikidata_qid, expand, hide, @@ -444,6 +450,12 @@ impl Api for Server { Box::new(futures::failed("Generic failure".into())) } + fn lookup_editor(&self, username: Option, context: &Context) -> Box + Send> { + let context = context.clone(); + println!("lookup_editor({:?}) - X-Span-ID: {:?}", username, context.x_span_id.unwrap_or(String::from("")).clone()); + Box::new(futures::failed("Generic failure".into())) + } + fn update_editor(&self, editor_id: String, editor: models::Editor, context: &Context) -> Box + Send> { let context = context.clone(); println!( @@ -819,13 +831,14 @@ impl Api for Server { doaj: Option, dblp: Option, oai: Option, + hdl: Option, expand: Option, hide: Option, context: &Context, ) -> Box + Send> { let context = context.clone(); println!( - "lookup_release({:?}, {:?}, {:?}, {:?}, {:?}, {:?}, {:?}, {:?}, {:?}, {:?}, {:?}, {:?}, {:?}, {:?}, {:?}) - X-Span-ID: {:?}", + "lookup_release({:?}, {:?}, {:?}, {:?}, {:?}, {:?}, {:?}, {:?}, {:?}, {:?}, {:?}, {:?}, {:?}, {:?}, {:?}, {:?}) - X-Span-ID: {:?}", doi, wikidata_qid, isbn13, @@ -839,6 +852,7 @@ impl Api for Server { doaj, dblp, oai, + hdl, expand, hide, context.x_span_id.unwrap_or(String::from("")).clone() -- cgit v1.2.3