Coercing attributes to different names

I am using rom-http and trying to map HTTP resources into storage-agnostic Struct classes. Is there a way to coerce attribute names from their name provided by the HTTP API into a different name that is used in the data specification the common Structs are based on?

E.g. if a Location record with lat, lon attributes is returned, how to convert those attributes into latitude, longitude?

If this isn’t directly possible, where would the most appropriate place be to manually handle that change? (response handler, relation, repo?)

Hey please try attribute :lat, Types::Float, alias: :latitude in the relation schema definition. Aliasing support is not completely there yet but it works more or less :wink: If that doesn’t work, you can just use custom mappers.