volatiletech / sqlboiler

Generate a Go ORM tailored to your database schema.
BSD 3-Clause "New" or "Revised" License
6.74k stars 546 forks source link

JSON camelCase config uses go like naming for words like ID #1411

Open arjendevos opened 2 months ago

arjendevos commented 2 months ago

Generated:

AccountID        string    `boil:"account_id" json:"accountID" toml:"account_id" yaml:"account_id"`

But it should be:

AccountID        string    `boil:"account_id" json:"accountId" toml:"account_id" yaml:"account_id"`

Config:

output = "models/dm"
pkgname = "dm"
wipe     = true
no-tests = true
add-enum-types = true
add-soft-deletes = true

[struct-tag-cases]
json = "camel"

Is this a bug or is it configurable?

stephenafamo commented 2 days ago

Unfortunately, this is not configurable. Open to suggestions/PRs