Skip to content

Commit

Permalink
fix: fix autodocodec field name casing
Browse files Browse the repository at this point in the history
  • Loading branch information
vst committed Jun 5, 2024
1 parent 3106048 commit 3c7bb2c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Postmap/Gencode/Haskell.hs
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ mkRecordDataTypeField _config record@Record {..} field@Field {..} = do

mkRecordJsonField :: Record -> Field -> T.Text
mkRecordJsonField record field@Field {..} =
let jName = T.pack . Casing.snake . T.unpack $ unFieldName fieldName
let jName = T.toLower . T.pack . Casing.snake . T.unpack $ unFieldName fieldName
fName = mkRecordFieldName record field
fDesc = show $ fromMaybe "<undocumented>" fieldDescription
in [i|Autodocodec.requiredField "#{jName}" #{fDesc} Autodocodec..= #{fName}|]
Expand Down

0 comments on commit 3c7bb2c

Please sign in to comment.