title: Unknown fields in proto generated by scalapb
body: <p>I'm new to scalapb and protobuf.</p>
  
  <p>I'm trying to create unit test for my scalapb's generators. I've generated proto files and trying to use them in tests.</p>
  
  <p>I've got this proto file:</p>
  
  <pre><code>syntax = "proto3";
  
  package hellogrpc.calc;
  
  import "google/api/annotations.proto";
  
  option (scalapb.options) = {
    flat_package: true
  };
  
  service CalcService {
  
      rpc CalcSum (SumRequest) returns (CalcResponse) {
          option (google.api.http) = {
            post: "/calcService/sum"
            body: "*"
          };
      }
  
  }
  </code></pre>
  
  <p>There is method CalcSum which is annotated</p>
  
  <p>And corresponding generated proto file:</p>
  
  <pre><code>// Generated by the Scala Plugin for the Protocol Buffer Compiler.
  // Do not edit!
  //
  // Protofile syntax: PROTO3
  
  package hellogrpc.calc
  
  
  
  object CalcServiceProto extends _root_.com.trueaccord.scalapb.GeneratedFileObject {
    lazy val dependencies: Seq[_root_.com.trueaccord.scalapb.GeneratedFileObject] = Seq(
      com.trueaccord.scalapb.scalapb.ScalapbProto,
      com.google.api.annotations.AnnotationsProto
    )
    lazy val messagesCompanions: Seq[_root_.com.trueaccord.scalapb.GeneratedMessageCompanion[_]] = Seq(
      hellogrpc.calc.SumRequest,
      hellogrpc.calc.CalcResponse
    )
    private lazy val ProtoBytes: Array[Byte] =
        com.trueaccord.scalapb.Encoding.fromBase64(scala.collection.Seq(
    """ChtoZWxsb2dycGMvQ2FsY1NlcnZpY2UucHJvdG8SDmhlbGxvZ3JwYy5jYWxjGhVzY2FsYXBiL3NjYWxhcGIucHJvdG8aHGdvb
    2dsZS9hcGkvYW5ub3RhdGlvbnMucHJvdG8iKAoKU3VtUmVxdWVzdBIMCgFhGAEgASgFUgFhEgwKAWIYAiABKAVSAWIiJgoMQ2FsY
    1Jlc3BvbnNlEhYKBnJlc3VsdBgBIAEoBVIGcmVzdWx0Mm8KC0NhbGNTZXJ2aWNlEmAKB0NhbGNTdW0SGi5oZWxsb2dycGMuY2FsY
    y5TdW1SZXF1ZXN0GhwuaGVsbG9ncnBjLmNhbGMuQ2FsY1Jlc3BvbnNlIhuC0+STAhUiEC9jYWxjU2VydmljZS9zdW06ASpCBeI/A
    hABYgZwcm90bzM="""
        ).mkString)
    lazy val scalaDescriptor: _root_.scalapb.descriptors.FileDescriptor = {
      val scalaProto = com.google.protobuf.descriptor.FileDescriptorProto.parseFrom(ProtoBytes)
      _root_.scalapb.descriptors.FileDescriptor.buildFrom(scalaProto, dependencies.map(_.scalaDescriptor))
    }
    lazy val javaDescriptor: com.google.protobuf.Descriptors.FileDescriptor = {
      val javaProto = com.google.protobuf.DescriptorProtos.FileDescriptorProto.parseFrom(ProtoBytes)
      com.google.protobuf.Descriptors.FileDescriptor.buildFrom(javaProto, Array(
        com.trueaccord.scalapb.scalapb.ScalapbProto.javaDescriptor,
        com.google.api.annotations.AnnotationsProto.javaDescriptor
      ))
    }
    @deprecated("Use javaDescriptor instead. In a future version this will refer to scalaDescriptor.", "ScalaPB 0.5.47")
    def de
  ```scriptor: com.google.protobuf.Descriptors.FileDescriptor = javaDescriptor
  }
  </code></pre>
  
  <p>I inspect CalcServiceProto.javaDescriptor in intellj idea:</p>
  
  <p><a href="https://i.stack.imgur.com/312R8.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/312R8.png" alt="enter image description here"></a></p>
  
  <p>Method descriptor has this proto definition:</p>
  
  <pre><code>name: "CalcSum"
  input_type: ".hellogrpc.calc.SumRequest"
  output_type: ".hellogrpc.calc.CalcResponse"
  options {
    72295728: "\"\020/calcService/sum:\001*"
  }
  </code></pre>
  
  <p>But generator works just fine! I debug generator, toggled breakpoint on generator and method CalcSum has this proto definition:</p>
  
  <pre><code>name: "CalcSum"
  input_type: ".hellogrpc.calc.SumRequest"
  output_type: ".hellogrpc.calc.CalcResponse"
  options {
    [google.api.http] {
      post: "/calcService/sum"
      body: "*"
    }
  }
  </code></pre>
  
  <p>May be this works differently because i didn't register extensions like generator do.</p>
  
  <p>Any way i want this test to be passed:</p>
  
  <pre><code>  val s = CalcServiceProto.javaDescriptor.getServices.get(0)
  
    val m = s.getMethods.get(0)
  
    m.getOptions.getExtension(AnnotationsProto.http).getPost shouldBe "/calcService/sum"
  </code></pre>