Created
November 25, 2016 18:10
-
-
Save thesamet/d09eefdcb36efb8c918f62d70787a7f9 to your computer and use it in GitHub Desktop.
scalapb.proto v3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
syntax = "proto3"; | |
package scalapb; | |
option java_package = "com.trueaccord.scalapb"; | |
import "google/protobuf/descriptor.proto"; | |
message ScalaPbOptions { | |
// If set then it overrides the java_package and package. | |
string package_name = 1; | |
// If true, the compiler does not append the proto base file name | |
// into the generated package name. If false (the default), the | |
// generated scala package name is the package_name.basename where | |
// basename is the proto file name without the .proto extension. | |
bool flat_package = 2; | |
// Adds the following imports at the top of the file (this is meant | |
// to provide implicit TypeMappers) | |
repeated string import = 3; | |
// Text to add to the generated scala file. This can be used only | |
// when single_file is true. | |
repeated string preamble = 4; | |
// If true, all messages and enums (but not services) will be written | |
// to a single Scala file. | |
bool single_file = 5; | |
// When this option is enabled, wrappers defined at | |
// https://github.com/google/protobuf/blob/master/src/google/protobuf/wrappers.proto, | |
// are mapped to an Option[T] where T is a primitive type. | |
bool primitive_wrappers = 6; | |
} | |
extend google.protobuf.FileOptions { | |
// File-level optionals for ScalaPB. | |
// Extension number officially assigned by [email protected] | |
ScalaPbOptions options = 1020; | |
} | |
message MessageOptions { | |
// Additional classes and traits to mix in to the case class. | |
repeated string extends = 1; | |
// Additional classes and traits to mix in to the companion object. | |
repeated string companion_extends = 2; | |
} | |
extend google.protobuf.MessageOptions { | |
// Message-level optionals for ScalaPB. | |
// Extension number officially assigned by [email protected] | |
MessageOptions message = 1020; | |
} | |
message FieldOptions { | |
string type = 1; | |
} | |
extend google.protobuf.FieldOptions { | |
// File-level optionals for ScalaPB. | |
// Extension number officially assigned by [email protected] | |
FieldOptions field = 1020; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment