Open DazWilkin opened 4 years ago
E.g. googleapis/google/api/auth.proto#JwtLocation:
// Specifies a location to extract JWT from an API request. message JwtLocation { oneof in { // Specifies HTTP header name to extract JWT token. string header = 1; // Specifies URL query parameter name to extract JWT token. string query = 2; }
protoc_rust_grpc generates:
protoc_rust_grpc
auth.rs:
auth.rs
#[derive(PartialEq,Clone,Default)] pub struct JwtLocation { // message fields pub value_prefix: ::std::string::String, // message oneof groups pub in: ::std::option::Option<JwtLocation_oneof_in>, // special fields pub unknown_fields: ::protobuf::UnknownFields, pub cached_size: ::protobuf::CachedSize, }
Results in:
expected identifier, found keyword `in` expected identifier, found keyword help: you can escape reserved keywords to use them as identifiers: `r#in`
It's unclear to me whether prefixing all|keyword fields with raw string literals would address this issue comprehensively.
E.g. googleapis/google/api/auth.proto#JwtLocation:
protoc_rust_grpc
generates:auth.rs
:Results in:
It's unclear to me whether prefixing all|keyword fields with raw string literals would address this issue comprehensively.