Skip to content

Field name aliasing broken if naming strategy used #276

Closed
@shdunning

Description

@shdunning

One of the cool features of this library is that we can set field naming strategy like so...

extra.SetNamingStrategy(extra.LowerCaseWithUnderscores)

..however, then we can no longer rename fields using json tags; that is, the naming strategy forces the responses to always follow the naming strategy. This can be too restrictive in a production environment where we want a separation between the data and API models.

PR #275 proposes a fix for this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions