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
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.