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

[haskell][haskell-yesod] Fix special char replacements #16197

Merged

Commits on Jul 26, 2023

  1. [haskell][haskell-yesod] remove fixOperatorChars()

    fixOperatorChars() does not change input strings since special
    characters have already been replaced in DefaultCodegen.fromModel().
    msakai committed Jul 26, 2023
    Configuration menu
    Copy the full SHA
    08170c2 View commit details
    Browse the repository at this point in the history
  2. [haskell][haskell-yesod] do not prefix with quote ("'") when generati…

    …ng removeFieldLabelPrefix table
    
    We switched from the conversion done by fixOperatorChars() to the
    conversion done by DefaultCodegen.fromModel() and the latter does not
    insert quote characters. So We modify the removeFieldLabelPrefix table
    to conform the new mapping.
    msakai committed Jul 26, 2023
    Configuration menu
    Copy the full SHA
    4505ee3 View commit details
    Browse the repository at this point in the history
  3. [haskell][haskell-yesod] remove forParsing parameter from removeField…

    …LabelPrefix function
    
    Aeson's fieldLabelModifier always convert Haskell field names to JSON
    field names, whether at parse time or not. (Note that stripPrefix and
    uncapitalize do not take such parameter)
    msakai committed Jul 26, 2023
    Configuration menu
    Copy the full SHA
    6fdf8b4 View commit details
    Browse the repository at this point in the history
  4. [haskell][haskell-yesod] perform replaceSpecialChars after stripping …

    …prefix
    
    Because replaceSpecialChars can corrupt prefix if the prefix contains
    a replacement string of a specfial character as a substring.
    msakai committed Jul 26, 2023
    Configuration menu
    Copy the full SHA
    ab6d2b4 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    b87bcca View commit details
    Browse the repository at this point in the history