Skip to content

Commit

Permalink
Documentation for #105.
Browse files Browse the repository at this point in the history
  • Loading branch information
thesamet committed Apr 28, 2016
1 parent 0b5a35b commit 2ed753f
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions customizations.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,20 @@ trait BaseCustomer {

You can specify any number of base traits for a message.

It is also possible to make the generated companion classes extend a class
or trait, by using the `companion_extends` options. For example:

{% highlight proto %}
message MyMessage {
option (scalapb.message).extends = "MySuperClass";
option (scalapb.message).companion_extends = "MySuperCompanionClass";
int32 n = 1;
}
{% endhighlight %}

Will generate a case class that extends `MySuperClass`, and the companion
object will extend `MySuperCompanionClass`.

# Custom types

You can customize the Scala type of any field. One use-case for this is when
Expand Down

0 comments on commit 2ed753f

Please sign in to comment.