Open
Description
Following JSON camelCase naming convention acronyms should be not uppercased.
- test table definition:
CREATE TABLE acronyms (
acronym_id SERIAL,
acronym_http VARCHAR NOT NULL,
acronym_url VARCHAR NOT NULL,
acronym_dns VARCHAR NOT NULL
)
- config file.
psql:
output: "./sql/bob/models/acronym"
pkgname: "acronym"
schemas: ["public"]
no_factory: true
tags:
- json
struct_tag_casing: "camel"
- generated model
type Acronym struct {
AcronymID int32 `db:"acronym_id" json:"acronymID"`
AcronymHTTP string `db:"acronym_http" json:"acronymHTTP"`
AcronymURL string `db:"acronym_url" json:"acronymURL"`
AcronymDNS string `db:"acronym_dns" json:"acronymDNS"`
}
Conclusion:
Acronyms in json tags should be not uppercased. Or there should be possibility to declare some property in config to choose acronym naming convention.