Skip to content

Commit

Permalink
Use lower-case toString for Visibility
Browse files Browse the repository at this point in the history
The `toString()` value is used to generate the api documentation. To
make the docs match the actual result values, `toString()` is mapped
to `name` for `Visibility`.

Fixes: #160
  • Loading branch information
eikek committed Aug 28, 2024
1 parent 607c7bf commit 6697f4c
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ enum Visibility:
lazy val name: String = productPrefix.toLowerCase
case Public, Private

override def toString(): String = name

object Visibility:
given Order[Visibility] = Order.by(_.ordinal)
given Encoder[Visibility] = Encoder.forString.contramap(_.name)
Expand Down

0 comments on commit 6697f4c

Please sign in to comment.