Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

compat: Support Aeson 2.2.x #853

Merged
merged 21 commits into from
Apr 21, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
format
nalchevanidze committed Apr 21, 2024

Verified

This commit was signed with the committer’s verified signature.
SavageCore Oliver Sayers
commit 8e6377560c74bfc13dcb691e88f2ebd7e8b651ff
Original file line number Diff line number Diff line change
@@ -91,16 +91,16 @@ getFieldTypeName name = checkTypeExistence name $> packName (toHaskellTypeName n
getFieldName :: (CodeGenM m) => FieldName -> m FieldName
getFieldName fieldName = do
ServerCodeGenContext {hasNamespace, currentTypeName} <- ask
pure
$ if hasNamespace
pure $
if hasNamespace
then maybe fieldName (`camelCaseFieldName` fieldName) currentTypeName
else fieldName

getEnumName :: (MonadReader ServerCodeGenContext m) => TypeName -> m CodeGenTypeName
getEnumName enumName = do
ServerCodeGenContext {hasNamespace, currentTypeName} <- ask
pure
$ if hasNamespace
pure $
if hasNamespace
then CodeGenTypeName (map coerce $ maybeToList currentTypeName) [] enumName
else fromTypeName enumName