Xo is experimental. The source is now public on GitHub, or try Xo in your browser.
Menu · XO0413

Docs

XO0413: unknown derive argument

error · reported by the checker

derive Json and derive SqlRow take one argument, case:, which is snake, camel, pascal, or kebab: it converts the keys of the fields without their own wire name. Other derives take no arguments. See core 2.2.

Example

struct User {
  user_id: Int
} derive Json(case: shouty)

Fix

struct User {
  user_id: Int
} derive Json(case: camel)

Run xo explain XO0413 for this text in a terminal, or see section 10.6 of the specification.