Skip to content

Commit

Permalink
add debug endpoint to access the pb as json
Browse files Browse the repository at this point in the history
add a temporay debug endpoint that read the protobuf and output it as
json
  • Loading branch information
antoine-de committed Nov 22, 2018
1 parent af80c72 commit 3a127ee
Show file tree
Hide file tree
Showing 7 changed files with 877 additions and 6 deletions.
175 changes: 175 additions & 0 deletions Cargo.lock

Large diffs are not rendered by default.

8 changes: 8 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,11 @@ reqwest = "0.9"
log = "0.4"
chrono = "0.4"
failure = "0.1"
bytes = "0.4"
prost = "0.4"
prost-derive = "0.4"
serde = "1.0"
serde_derive = "1"

[build-dependencies]
prost-build = "0.4"
11 changes: 11 additions & 0 deletions build.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
extern crate prost_build;

fn main() {
let mut config = prost_build::Config::new();
config.type_attribute(".", "#[derive(Serialize)]");
config.type_attribute(".", "#[serde(rename_all = \"camelCase\")]");

config
.compile_protos(&["proto/gtfs-realtime.proto"], &["proto/"])
.unwrap();
}
Loading

0 comments on commit 3a127ee

Please sign in to comment.