goadesign / gorma

Storage generation plugin for Goa
http://goa.design
MIT License
140 stars 35 forks source link

gorma should handle mixed camel and snake cases #90

Open bketelsen opened 8 years ago

bketelsen commented 8 years ago

make gorma smarter about mixing camel & snake case in the 'goa' side of the design.

jrnt30 commented 7 years ago

Little context for those coming to the project "green". If you do have camel casing in your MediaType or Payload, when you generate your models, you will most likely encounter an error when building around a missing method.

Ex. assuming the User media type contains Attribute("realName")

models/user_helper.go:49: tmp1.RealNameToRealName undefined (type *string has no field or method RealNameToRealName)

Currently the only way that I have found to resolve this is to change Attribute("realName") to not use camel casing and instead use Attribute("real_name")