Skip to content

Commit

Permalink
Add docs for derives
Browse files Browse the repository at this point in the history
  • Loading branch information
thesamet committed Oct 17, 2023
1 parent ba25726 commit 3416943
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions docs/src/main/markdown/customizations.md
Original file line number Diff line number Diff line change
Expand Up @@ -807,3 +807,22 @@ enum BarEnum {
BarValue = 1 [(scalapb.enum_value).annotations = "@annotation4"];
}
```

## Adding derives clause

In ScalaPB 0.11.14, it is possible to add a `derives` clause to generated messages and
sealed oneofs:

```protobuf
message Foo {
option (scalapb.message).derives = "yourpkg.Show";
...
}}}
message Expr {
option (scalapb.message).sealed_oneof_derives = "yourpkg.Show";
oneof sealed_value {
...
}
}
```

0 comments on commit 3416943

Please sign in to comment.