Skip to content

Key transformation via transformer classes #293

@rsamoilov

Description

@rsamoilov

Detect known transformer classes applied at the blueprint or global level and apply the corresponding key transformation to generated property names. Introduce a transformer-detection table that maps class names to transform functions, easy to extend later.

class UserBlueprint < Blueprinter::Base
  transform LowerCamelTransformer
  fields :first_name, :last_name
  # -> "firstName": string, "lastName": string
end

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions