mirror of
https://github.com/AThilenius/axum-connect.git
synced 2024-11-24 06:19:46 +00:00
fix referencing google.protobuf messages
This commit is contained in:
parent
7ee14669e9
commit
e8b0bd2b1a
1 changed files with 2 additions and 1 deletions
|
@ -100,11 +100,12 @@ pub fn axum_connect_codegen(settings: AxumConnectGenSettings) -> anyhow::Result<
|
|||
let files_c = files.clone();
|
||||
let writers = pbjson_build::Builder::new()
|
||||
.register_descriptors(&descriptor_set)?
|
||||
.extern_path(".google.protobuf", "::axum_connect::pbjson_types")
|
||||
.generate(&["."], move |package| {
|
||||
output.set_file_name(format!("{}.rs", package));
|
||||
files_c.deref().borrow_mut().push(output.clone());
|
||||
|
||||
let file = std::fs::OpenOptions::new().append(true).open(&output)?;
|
||||
let file = std::fs::OpenOptions::new().append(true).create(true).open(&output)?;
|
||||
|
||||
Ok(BufWriter::new(file))
|
||||
})?;
|
||||
|
|
Loading…
Reference in a new issue