Generic configuration of EndpointInput annotations

Is there a 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.

implicit val configuration: Configuration = Configuration.default.withSnakeCaseMemberNames seems to only affect the request and response body fields, and not the query params, headers, etc.

Thanks in advance for any help

Sorry, this is not possible currently.

Can you create a feature request, though? Not sure if we can use Configuration (this might be surprising to existing users, if after a tapir update their query params naming suddenly changes), plus the method name on configuration mentions “members”, but maybe we could add a variant of EndpointInput.derived which takes a parameter.

Sounds good, I’ve added a feature issue here: [FEATURE] Generic configuration of Endpoint inputs · Issue #2690 · softwaremill/tapir · GitHub