tapir icon indicating copy to clipboard operation
tapir copied to clipboard

[FEATURE] Generic configuration of Endpoint inputs

Open jpanda109 opened this issue 2 years ago • 0 comments

There's currently no way to default annotations to snake casing without having to manually specify each one. For example, given the following code:

case class Input(
  @query
  notSnakeCase: Int
)

This will produce an endpoint accepting query parameter of name notSnakeCase. Ideally, I’d like to be able to generically change all such occurrences to not_snake_case instead.

Something similar to the magnolia configuration:

implicit val configuration: AnnotationConfiguration = AnnotationConfiguration.default.withSnakeCaseMemberNames

From thread: https://softwaremill.community/t/generic-configuration-of-endpointinput-annotations/89/1

jpanda109 avatar Jan 18 '23 23:01 jpanda109